Wednesday, June 03, 2009

Publish and be spammed

For many years now I have believed in the principle of "Publish and be damned" which I learned from my days in software engineering working with Stingray Software. I had never experienced having to write code that someone else would code review or criticise in any way. When I actually had a team of people to tell me what was wrong with the code I had slaved over in my darkened home-office, I grew both professionally and personally.

Code review nowadays can be automated. Systems such as FX Cop and Style Cop will mercilessly tear your code apart and dispassionately explain how much of an idiot you are several times a day, if your software factory is running correctly that is.

How much of this automated code review is really useful though? Microsoft cite the need for uniformity in the code. Because they have such a huge code generating body of workers, the way code is laid out needs to be standardised, homogenised and sanitised for reasons of continuity within teams. but honestly, the rules can seem to be arbitrary on the one hand and just plain stupid on the other.

Mobile work forces can mean many diverse styles, where each coder is conscientiously doing what they think is best and still generating a confusing mish-mash of coding styles for the poor sod who comes after. This is why MS have produced these Machiavellian code checkers.

Working, as I do, in a company that has a large body of legacy code in many different technologies, coupled with a developer workforce who are just ordinary programmers with few aspirations to being the next Don Box, I see a huge amount of code that can only be characterised as absolutely bloody horrible! Given such standard of quality and quality of coder, how can I, as an architect, hope to bring this code into line with even the minimum of compliance to what would be considered as acceptable for the crew in Building 42, Microsoft Way, Redmond?

My conclusion is that sadly, the people that "manage" said body of code have a vested interest in defending the stuff because many of them wrote it. Secondly, the will to change must be coupled with the acceptance that something needs fixing and so, if externally, your architecture doesn't seem to be teetering on the brink of the omni-flush toilet, then the budget is rarely available to re-write the stuff. Budgets are always available however to maintain the awful rubbish for as long as it functions even partially.

So. What's the conclusion you may ask yourself? Well, software is politics because its about egos. People believe that their solutions, however nasty are the right way and elegant and good. Politics is a human condition and someone has to point a finger somewhere.

On the other hand, computers are next to gods in our society. They are always right and they know everything worth knowing, or at least have access to it, so, I have come to the conclusion that if you want code that is readable or maintains the minimum standards, then you should get FX Cop and Style Cop tied securely into your TFS build process and spam everyone who checks in code with all 23,000 warnings a day.

This way, you can sit smugly by in the knowlege that the rules these programs apply are despotic, uneccesary and often idiotic but, when the manager who wrote said crap moans about the time it takes to add a simple function to the code you can put your hand on your heart and say; "Sorry, it's not me, it's the software factory rules. We can't check in till the warnings are fixed."

Monday, June 01, 2009

That mashup called life.

A recurring theme on this blog is how technologies can change ones life in a positive way. I think that during my life I have avoided computer games but may actually spend more time interacting via the computer than even hardened gamers.

This weekend I have been to see a band, The Enid, in the UK who have essentially been revitalized via the Internet I have used an "External Brain" in the form of Evernote to remember and organise my thoughts and sights into a searchable database. I have used my iPhone and its Internet connection for instant answers. Once again I have used a mixture of Microsoft, Apple and open source technologies to enable me to be connected 24 hours a day without having to carry a laptop or a big bag of electronic gizmos

When I drove from place to place I used a GPS for navigation and, more importantly, to avoid traffic and to find alternative routes. Finally, I think I had the most fun experience I have had in, well, decades I suppose when I danced the night away in a silent disco at the Wychwood Festival near Cheltenham in the UK. For those of you that have never seen one, a silent disco is one in which the revellers are all equipped with headsets that can receive one of several channels of music that can be as loud as one desires but does not annoy the neighours. When you remove the headset you are returned to a room containing perhaps a thousand people and a low hum of conversation punctuated by the occasional snatches of songs sung by the crowd. In any case, the deafening thump of base and ear splitting noise that has made the disco or club a health hazard is replaced by pure participatory fun and, who would have guessed, conversation.

As I live this technologically enabled existence I can truly say that computers, the Internet and the things which some people revile as a waste of time and which pollutes the human experience can be, and often is demonstrably a boon and a blessing.