Drawing Blanks

Premature Optimization is a Prerequisite for Success

Archive for April 2010

Visual Studio 2008 and Vista UAC (and nasty viruses)

leave a comment »

I used to turn off UAC in Vista, until I got a terrible malware problem and realized that UAC would have protected me.

So now I work with UAC On and it’s not that annoying after all. The only issue is that Visual Studio 2008 needs to run as Administrator in order to access local websites. Here is a little tip on how to make VS2008 always run as Administrator. You need to set the “Run as Administrator” flag (under Properties/Compatibility) on these 2 exes:

Program Files\Microsoft Visual Studio 9.0\Common7\IDE\devenv.exe

Program Files\Common Files\microsoft shared\MSEnv\VSLauncher.exe

Another bit of advice on how to avoid malware infections: Never turn off UAC. If you have Java, make sure you have the latest version of JRE and uninstall all older versions. I got infected because of a JRE vulnerability. Don’t rely just on your antivirus program. No antivirus (no matter free or commercial) can prevent/remove all existing (and future) kinds of infection. Also, make sure your system has a Recovery Partition (or you have a Windows installation media). That will allow you to run System Restore from a clean boot.

Advertisements

Written by bbzippo

04/14/2010 at 6:11 pm

Posted in Uncategorized

A funny bug on my.msn.com

leave a comment »

Here is the Bing search box on my.msn.com (Note the “Search the web” watermark)

mymsn

When you click Search, the watermark is passed to Bing as search phrase. I’m pretty sure this is a bug.

Also the results returned by Bing http://www.bing.com/search?q=Search+the+web&FORM=MYMSNA&web= are quite curious

search

Actually, Google search results for “Search the web” are very similar, but Google at least lists itself at the 6th place.

Written by bbzippo

04/09/2010 at 5:22 am

Posted in Uncategorized

Scientific “SEO tricks”

leave a comment »

Disclaimer: I’m not a professional mathematician and no expert on scientific publishing. My opinions below are based on common sense and on opinions of people whom I trust. Update: I have carefully reworded some statements, because it looks like this topic is still hot and sensitive, there are some lawsuits in progress, etc.

I was asked some questions with regards to this post https://bbzippo.wordpress.com/2010/03/05/the-state-of-scholarly-publishing/

What exactly is wrong with this paper http://works.bepress.com/cgi/viewcontent.cgi?article=1000&context=ji_huan_he which used to be the Most Cited Publication in Mathematics?

In my opinion, it is spam, for lack of a better word. More precisely, the paper looks like its purpose was to generate self citations and citations of papers which cite the author.

Here is how the industry of “scientific citation spam” most likely worked at the time when the article was published (pure speculation). There probably existed “citation farms” that consist of 5 – 10 journals. (It is likely that “Applied Mathematics and Computation” and “Chaos, Solitons and Fractals” were among those). Those journals published papers by authors who cited themselves and one another, and the peer review requirements in those journals were rather relaxed. Since those papers were spread across the multiple journals, the self-citation index of any of those journals was not high enough for the journal to lose its impact factor. On the contrary, because of the volume of publications, those citation farms might have had higher impact factors than quality journals.

Apparently, in some countries scientists are paid for high-impact publications. So they happily do what they are paid for. Their governments are also happy because they get what they pay for: a lot of “science”. And the publisher who owns the journals (in this case it’s Elsevier http://en.wikipedia.org/wiki/Elsevier) is happy too because the impact of their journals grows.

Ji Huan He is frequently mentioned in the context of criticism of Mohamed El Naschie, the former chief editor of Chaos, Solitons and Fractals. If you google, you can find tons of controversy and dirty laundry which I don’t want to reference.

Written by bbzippo

04/03/2010 at 10:26 am

Posted in Uncategorized

Updating SQL XML DateTimes in a XmlSerializer-friendly way

leave a comment »

Storing XmlSerialized objects in a table may save you tons of time in certain scenarios. But sometimes it may be tricky to modify particular nodes of the XML. The latest challenge that I ran into was how to modify DateTime nodes. In SQL Server 2005 XQuery doesn’t directly support DateTimes, so you need to update it as string. And you must watch the format so that the value can be correctly deserialized. Here is the method that worked for me:

UPDATE MyReports SET
  ReportXml.modify('
    replace value of (/ReportInfo/ExportedDate/text())[1] with
      sql:variable("@ExportedDateXmlValue")
  ')

 

Where @ExportedDateXmlValue is a varchar parameter that is passed from the application in the following format:

XmlConvert.ToString(DateTime.Now, XmlDateTimeSerializationMode.Local)

 

Formatting the value in the app ensures compatibility with XmlSerializer.

Note that some XQuery operations require SET Arithabort ON on your session, and ADO.Net still doesn’t send this option by default, so you may need to send it before sending the SQL.

Written by bbzippo

04/03/2010 at 8:47 am

Posted in programming