ConnectionString Loses Password Field

Illustration

One application used ConnectionString that read “Server=.\SQLEXPRESS; Database=MyDatabase; MultipleActiveResultSets=true; User ID=MyUser; Password=MyPassword; Connect Timeout=10;”. Yes, I know all dangers of transporting user id and password in this manner, but trust me, there was no other choice for this particular scenario. It worked for quite some time and I was satisfied with it.

As upgrade went, I needed one additional connection. I saw no problem with it, I did it plenty of times:

public SqlConnection Clone(SqlConnection original) {
    var clone = new SqlConnection()
    clone.ConnectionString = original.ConnectionString
    return clone;
}

However, in this particular scenario, all I got was “Login failed for user…” message. After some checking, I noticed one peculiar thing. My connection string, as far as SqlClient was concerned, was “Server=.\SQLEXPRESS; Database=MyDatabase; MultipleActiveResultSets=true; User ID=MyUser; Connect Timeout=10;”. My Password field was completely missing!

ConnectionString gets cleaning treatment and password just gets omitted. Solution comes in form of one additional parameter. If we add “Persist Security Info=true;” to out ConnectionString SqlConnection will give us enough rope to hang ourself and Password field will be preserved.

A Piece of Shit

Illustration

First, some clarifications: I am HP man, I always was. My current laptop is HP, my wife’s laptop is HP, my previous laptop was HP, my printer is HP…

When it came time to replace my trusty HP nx9030 I tried to find best laptop in reasonable price range. I thought that I found it in HP 6730b. It had decent processor, lot of memory (4 GB), nice screen… Only thing I found wrong with it was keyboard design where they jammed Home, PgUp, PgDown, etc. keys in vertical line at right side. It wasn’t as nice as almost-standard placement on 9030 but I could live with it.

I should have seen trouble when I managed to scratch it’s scratch-proof surface. Next thing to go was power adapter. After that my screen went crazy. Then another power adapter went down. Then it started to go crazy. It would reboot without warning (and no, it wasn’t Windows’ fault). My guess is that it overheats. Although that doesn’t explain why capacitive keys at top (volume, wireless, etc.) sometime turnoff until next reboot. Booting from USB is broken for last few BIOS revisions - to do USB install I need to downgrade… And trust me, these are things that I hate the most - I will not event get into a lot of small issues. Only thing that works correctly is keyboard - no, wait, I had to replace that also…

I owned this laptop for little bit over two years now and I still cannot trust it. It just keeps failing me. It might be me, it might be my particular laptop, it might be whole series. I just know that I am utterly disappointed.

Bright side?

There is single bright point in whole situation - HP support. Guys were more than helpful with all these problems and did their fair share of fixing. They are only reason I would even consider HP again.

[2011-02-20: Guess what? Laptop is dead again. I would guess that whole charging circuit on laptop went kaboom. Good news is that power adapter seems to be ok…]

[2011-03-22: As soon as I said that HP support is only bright side, I should have known that this will turn bad. I got laptop from last service and from plastic seemed little bit “wobbly”. When I opened case I saw that four screws keeping plastic were missing altogether. Laptop is working without them but my trust in HP support is shaken.]

[2011-03-31: Yes, I am selling this laptop. Interested?]

Top 5 Tips for Graduate Engineers

I am doing most of my work as a computer programmer but I play with electronics as a hobby of mine and thus I watch EEVBlog quite regularly.

In his latest video he gives tips about working in electronics industry and they match my experiences in computer industry perfectly. Definitely video to check, even if you are not a graduate student.

WordPress Vs Blogger

Illustration

It may be little unfair to compare self-hosting solution that you can configure to suit your needs with solution that needs to satisfy masses but I will do it anyhow. :)

Speed

Thing that annoyed me most with Blogger was getting to Google Webmaster Tools and then seeing that my blog was slower than 75% of all other locations. It may be that some of that slowness came because of SyntaxHighlighter but definitely not all can be blamed on it.

Nicer links

Links that were available with Blogger were not bad (e.g. http://blog.jmedved.com/2011/01/wordpress-vs-blogger.html) but WordPress can have it much nicer (https://www.medo64.com/2011/01/wordpress-vs-blogger). Although this isn’t available upon installation but only with some .htaccess magic, WordPress gets a point here because it can do this. Blogger just never took efforts to do it.

Search

Blogger never had search integrated. WordPress gives you proper search limited to your blog only. It just works as it should.

Source code

I try to keep number of programming-related posts at this blog at cca 50% (although you wouldn’t say this judging by last 10 posts :)) so it is fair to say that I have big need for syntax highlighting. With Blogger I had solution that kind-of worked but with WordPress it is just much better. Although I use same underlying solution (Alex Gorbatchev’s SyntaxHighlighter) WordPress just integrates it much better. There is no need to load all brushed, there is no need to do any preparation of XML (< and > characters get replaced automatically). I just installed plugin and all started working.

Basic functionality

One may be puzzled that I left basic functionality as last point but there is reason for it. Basic functionality that you would expect while writing posts is almost equal for both of them. I just find no big difference here. I might even say that Blogger had slight advantage here (mostly because of integrated preview and easier date entry) but I do not find anything worth complaining about. Once you sum all advantages and disadvantages on both sides, there is just not clear winner.

Conclusion

Never mind all complaints above - I used Blogger for full two years and I haven’t felt punished. Although I find WordPress better solution there is also more maintenance involved. Blogger just worked without any effort on my side. For self-hosted WordPress there is more of effort involved (e.g. backups, security…). Life is just not as simple as before.

I do intend to use WordPress from now on, but we shall see how wise that decision was once something fails and, Murphy says, something will fail.

In the Year 2010...

I like statistics and start of new year always brings opportunity to summarize previous one. :)

There were 132 new posts for year 2010 and around 40% were about programming. Next 30% were about virtualization, SQL and general IT topics. Rest of posts were either me presenting new versions of my programs (MagiWOL, QText and VHD Attach) or being annoyed over something.

Total number of page views was around 65,000 which is quite an improvement over 20,000 that was for last year. Total number of visits that I saw was around 54,000. Search engines still bring me around 75% of traffic with Google as a clear winner (over 70%). U.S. visitors are strong at 30% with all other countries bringing less than 10% to the table. My own country (Croatia) is not even within first 10.

Internet Explorer is winner with 39% (same as last year) with Firefox being close second with 35% (43% last year). My personal favorite Chrome is at 19% (from 10% last year). 95% of my visitors are running Windows (62% being Windows 7).

Judging by the number of visits, most interesting posts for last year were instructions on screen replacement for HTC S740 and setting up debugging on HTC Desire.

Year 2010 was also last one on Blogger platform. This post starts new era of self-hosted WordPress. Let’s see what else this year brings us.