Code style Tip: Case insensitive string comparison

if (String.Compare(myString, ALL_TEXT, StringComparison.OrdinalIgnoreCase) == 0)
                                        return true;
OK(not obvious what true means)

if (String.Compare(myString, ALL_TEXT, true) == 0)
                                        return true;
BAD: (non null safe)

if (myString.ToLower()==ALL_TEXT.ToLower()
                                        return true;

Disable messages from SQL Server “Login failed for user” in Event log

I’ve noticed multiple messages from SQL Server in EventLog on my machine
Login failed for user ‘NT AUTHORITYANONYMOUS LOGON’. Reason: Token-based server access validation failed with an infrastructure error. Check for previous errors. [CLIENT:]
I’ve found that there are machines of my co-workers, but they were not sure, which processes tried to access my SQL server.

I’ve tried a few things and finally in SQL Server Configuration Manager disabled tcp, as it was suggested in

Copy to local drive before running installations

I’ve downloaded Windows Identity Foundation from,
but when I  was trying to install, it returned
Windows Update Standalone Installer
Installer encountered an error: 0x80070003
The system cannot find the path specified.

I’ve tried a few other similar downloads, and all had the same error,
Finally I’ve realized, that they don’t want to run from shared drive.
After I’ve copied to local drive  Windows6.1-KB974405-x64.msu, I was able to install it.

Bookmarking for e-reading devices(Kindle and IPad)

Our family has Kindle and IPad, and periodically I had to use one or another.

Normally I prefer IPad, but Kindle has 2 advantages –   on a light sun it’s much easy to read Kindle screen, and it also have free free wireless internet(but browser is quite limitted),when for my IPad wi-fi is required.

 A few months ago I’ve wrote a  post about Kindle and ability to transfer articles using Instapaper  add-on I beleive that it’s the most convinient way to pass html files to Kindle.
   For iPhone and iPad I love ReadItLater. It saves any articles from web site on iPad Safary.
  When you reading inside RIL, you can click on any link and ask to “Read it later” and continue with the main article. Previously In Safary new link was opened in a new tab and it became current, which interrupted reader from the main article.It has been gixed in the latest version of Safary.     

Put reusable code into libraries to share between projects

I’ve recently read the post The Mooney Project » Reusable Code Is Bad.

Also I disagree with the title of the post, most of the issues in the text are valid and important.
Mike Mooney is mostly talking of creating customizable applications, that have hundreds of configuration settings.
Most close to my opinion is a comment from Geoff H

Design libraries for reuse, glue code to bind together, and logic code to call libraries through the glue.

When I am writing  an individual method, I am asking myself, how generic is the logic, is it only be useful for this feature, or to different parts of my application, or can be used as an extension of .Net framework.  Depending on this , I will move the common logic to one or another of my libraries. Sometimes, when I will looking to which class/dll should I add this new method, I will recognize, that our library already has the same or very similar method, and I don’t need to write it again.

Copy HTML documents to Kindle DX

I’ve tried to work out, is it good to use to convert and send documents to Kindle DX.
Amazon description is not very clear, and it’s not obvious, that DX doesn’t support WiFi.
Finally I understood, that sending to just sends the email to your email address attempting to convert attachments to azw fromat.
You can then transfer the document to your Kindle through the USB cable.
Keep in mind that IE support  to send html page in email body, but not directly  as attachment, Also images from html pages were not converted properly.
So I decided do not bother with this free kindle service.

Much simpler is to Download Calibre ,save any html file from browser(using ctrl-S in FireFox), and use Calibre to send the file(s) to Kindle through USB connection.

UPDATE: Recently I’ve started to use Instapaper and found the article
I am using Kindle DX 3G browser, but wasn’t able to save links< as it was suggested in the article.
Fortunately, comments have a link to, which allow to copy every saved to instapaper document to the Kindle as soon as Kindle connected to my machine.
It is much simpler than Calibre.


Search systems on desktop/enterprise level

I’ve put together a few links regarding search systems on desktop/enterprise level