C# moment of clarity

The good thing about changing technical focus is all the new exciting things to learn. The bad things is… all those new exciting things to learn mean your development output drops to the floor for some period of time. It’s always a frustrating window of time, be it a month or two, where you feel like an idiot. Having done these changes enough times in the past, I know this too will pass. That doesn’t change the fact that while you may have read 200 pages of developer documentation on a given day, your emacs buffer looks eerily similar at the end of the day as when the day kicked off.

Inevitably, you hit a break through, and now all that example test code that didn’t compile, and you didn’t know why, starts working, and patterns fall into place. Yesterday I had such a moment of clarity around C# and ADO.NET (which is MS’s db interface layer). It turns out that in the function “SqlConnection(string)”, Sql doesn’t mean “generic sql engine”. Sql actually means “MSSQL vendor extension”. Some set of compile errors yesterday got me to on a lark change that to SqliteConnection, and stuff worked. A lot of stuff worked, all at once.

I had to step back from the computer and make sure no evil spirits had come or gone in the process. Leave it to microsoft to very clearly muddle the difference between “something generic”, and “something only we have”, as to them the whole world looks like something only they have. Boo microsoft!

With that set of filters back in hand, the O’Reilly books around C# are now falling into place much more quickly. The persistence engine for OpenSim should have a good first pass by the end of the day, and I’m not feeling so stupid any more.

I also have to give MS some credit on ADO.NET. While C# looks a lot like Java, the patterns and objects they created for database interfacing looks way more like a dynamic language (be it php, perl, or ruby), especially on the read side. Read site, what will take 50 lines of code in C#, would probably be 200 lines in Java. So not boo to microsoft there.

Time to get back to that emacs buffer.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s