Especially Object Oriented, agile-assisted, latest fad, scrummed up, backlog driven, customer focussed, buttock-clenching purists.
Just like their counterparts during the Spanish Inquisition they like to go around telling everyone what to do and think. Then do the exact opposite themselves whilst vilifying any non-believers as evil-doers. Hypocrits!
Why am I having this rant? Simple. I was coding a small app earlier today and needed to change the Connection Timeout period of my Connection object. All well and good, a simple connDB.COnnectionTimeout=5 should do it. Or so I thought.
WRONG! How very, very wrong.
The ConnectionTimeout property is read only. Fair enough, some things should be read only. So which connection object property DO I set when I want to change the connection timeout period? Answer: I don’t.
I was expecting something like:
But no. Here’s the solution:
sConnString = “Provider=sqloledb;integrated security=SSPI;data source=” & sNewServerName & “;Connect Timeout=5″
Where as I’d have expected something truely OO such as:
Instead, I end up with hacking around strings with delimited values.
So. One of the simplest and most common things you can ever wish to do as a developer, ie: connect to a database to execute SQL cannot be done in true, 100% O-O fashion. If I want to do it I have to launch myself back into the 1970s land of semi-colon delimited strings, unfashionable beards, real ale and loon pants.
With all the non-OO possibilities for mis-spelling and non-binding that entails. I’m just mildly surprised I’ve not been forced to specify it all in XML.
I love backwards compatibility as much as anyone else. But it makes you wonder if the .net wonder-boys at Microsoft get bored half-way through and think, “Sod it, we’ll leave that bit as it is, I feel like a beer.”
Well, thank YOU !
I feel tainted.
I’m off to scrub my hands repeatedly and sanitise my keyboard.
I feel light-headed, nauseous and may even vomit.
I think I need to lay down.
In a dark room.
Now where did I put my C++ book and that list of heretical non-believers?
I need a fix….