Sunday, July 29

Windows Mobile 6

My HTC Wizard (Cingular 8125) is now proudly sporting a Windows Mobile 6.0 ROM, plus a few other toys.

The awesomeness is breathtaking. I'm still playing with all the new features. I'll provide further detail here in a day or three.

Tuesday, July 24

What the fark? I've been dehumanized.



I was 10 or 11 pages deep into some search results, when apparently Google decided I was a bot.

Thursday, July 19

Death to piss-poor DALs!

Just slayed the beast of a well-intended but poorly-implemented Data Access Layer (DAL). A few months back I picked up this project -- a website with a simple webservice API, simple reporting functionality, etc. etc. The original website was outsourced to a company, who in turn outsourced it to Belarus.

Apparently they don't believe in YAGNI (Ya Ain't Gonna Need It) in Belarus. The object oriented (OO) architecture is heavily over-engineered: singletons and factories everywhere (nothing wrong with them, just a little unnecessary) and a weeeeird data access class that is NOT designed for use in ASP.NET.

Desktop apps, maybe, but not web -- it uses a single static instance of a connection for the entire life of the application defeating IIS's connection pooling. If connectivity to the DB server is ever lost for the life of the application, the connection is toast until the application is restarted.

Retarded? Yep. And at first I thought I could swap the DAL out in one fell swoop, only to discover weirdness with a third party data grid they had been using -- rather than just populate these display-only grids with a lightweight SqlDataReader, they are filling a SqlDataAdapter, then grabbing its DefaultView, which then becomes the DataSource for the "SimpleGrid" datagrid.

Simple my ass. Simply retarded.

Tuesday, July 17

Flame on!

One of the many mailing lists I'm on is the Test-Driven Development (TDD) list. This list has some big name subscribers, including Ron Jeffries, author, practitioner, well known for Agile/XP.

Someone posed a question of the list regarding the use of Generics, and how well a generic collection conveys intent, versus deriving a non-generic collection to handle the object type in question. In this discussion, the original poster (OP) mentioned he's enumerating the collection -- because it's "prettier" than iterating it. Reading through this on Sunday morning, I replied, letting the OP know that if the List is of any real length, you're better off iterating it -- you get a 5%+ performance gain over enumeration.

Ron Jeffries and 2 other list-subscribers then jump in, demanding "proof," "test results," questioning my programming capabilities, questioning my use of various techniques, telling me that the "bozo bit ought to be flipped" because apparently my argument didn't make sense to at least one of these guys.

Hey guys -- hello -- not here to have a fight. Not here to win a debate, not here to prove a point -- I was simply offering a bit of advice gleaned from my own .NET experience.

The list erupted in idiocy and assclownery. I ignored it for almost two days -- a tactic that proved surprisingly effective, as a couple people backed up my original position. I stopped back in this morning to point out that enumeration produces 120% as much IL as iteration, including a try/finally block. Granted length of IL alone isn't guaranteed to be a performance indicator, different operations may have different costs, but it's a pretty good indicator.

All that said -- my respect for Ron Jeffries has evaporated. At one point in the thread, he made the comment, (paraphrasing) "I can write a collection that takes longer to iterate than enumerate." Hey Ron, that's fantastic buddy -- anyone with half a clue can write something that performs poorly, on purpose. The point of the matter however was generic Lists, not some RonJeffriesSpecialObjectCollection.

I have crossed Ron's name off my copy of the Agile Manfifesto in thick, black marker.

Pure, unadulterated awesomeness