This blog contains reflections and thoughts on my work as a software engineer

onsdag den 12. marts 2008

The art and magic of manual deployment

Well... I promised myself that I would write a post on this blog at least once per week. I actually tried but always halted on the one question: "Uhm - what to write about - I've only got some 16 hours remaining..."

What is the purpose of such a goal if you have to dig deep to find something remotely interesting to write about? I therefore announce that I will only be writing whenever I feel like it. Heck, nobody of you guys (all three: You, my mom and my parent's dog - I haven't got a clue how many people are actually reading this) even knew that I made a promise to begin with but it sounds pretty good, right? ;o)

I have went from a complete newbie in my new job to actually being able to deliver some kind of work. Slowly I have begun moving tasks from the "Sprint backlog" to the "In progress" and actually some of them have moved to the "Finished" part of the whiteboard without being moved back a few hours later. It feels good to participate in getting a job done. We're releasing March 25 and have loads to do - I haven't got the time to write this but the second option was benchmarking on various Danish newspapers for news I couldn't care less about anyway.

The reason for choosing Option #1 was that yesterday I suddenly realized how much time we spend deploying stuff to our staging enviroment. Everything is done manually so if you have changes in 4 files and you added a new Usercontrol and included a new Javascript file to the solution you will have to _manually_ (yes, manually) find all files and upload them to the staging server. That is as crappy as it can possibly be. Where do we get these files? From the developer's machine, what else? Yes, my boys, everything is left to the man behind the machine with the largest possible margin for human errors to occur. And of course we have no backlog of uploaded files on the staging server so if you accidently overwrite the wrong file with one that will break the stagingserver's build you leave your users f***ed until you correct the error (that is: restore a backup from your own machine or call the server maintenance guy to restore the file for you from yesterdays backup because you haven't got a working backup locally. Yeeeehaaaaaaa!!!).

I have read a bit about how we can use our Continuous Integration enviroment to deliver a clean build for every checkin to be able to make revised deployments. My thoughts are to build the scripts neccessary to let the buildserver create a fully deployable package for every checkin which will enable us to synchronize i.e. revision 1447 of the codebase (stored in it's own folder) with the content on the staging server using robocopy. I have no experience on creating scripts apart from reading on various blogs about related issues but I promise to write a few follow-ups on the matter as we get along. Until then I will be stuck with issues such as deploying files from my machine which I acciddently forgot to check in.... There's nothing but work to do here, I suppose ;o)

mandag den 3. marts 2008

The Decision Trap

I have been developing software for about 6 years now - give or take. Throughout that time I have had numerous encounters with users when I try to explain to them why they have to make a certain decision to enable me to figure out how I am supposed to approach a specific problem. Maybe I am not the best to communicate (being married I know that for a fact) so I have had a few meetings which went pretty ugly because I was unable to tell the users why they had to have an opinion on matters such as a particular detail in the flow diagram or in a certain submit form. The answer sometimes was "I don't care - I just want to be able to f***** submit an order! Why can't you just make it work like I have told you a million times before in our previous meetings?". I do not remember the exact words so maybe the F-word was left out in the actual conversation but the other parts of the conversation was close to the one described.

I have always taken this as a sign of users really not being interested in doing their job properly. They didn't want to spend the time to investigate on their responsibilities when they should describe a certain story or task for me - in the end that was something which the computer guy would probably do better. Somewhat simplified and with a few exceptions I must admit that I have thought this about my product owners more than just a few times. Just until this weekend actually when I was put in a user's situation without even knowing it. The story goes:

At home we decided a few months ago that we needed an outer house with a second bathroom. We had one but it was not heated, the rooms were badly placed, not wired properly and the entire building was not isolated at all. We have a kid and expect a few more to follow in the coming years so we need a place beside the main house where you can get rid of dirty clothes, dust of the contents of the sandbox in our yard and change shoes before opening the door to the kitchen entering the main house. So we went to the bank and lend a lot of money and last weekend we tore the outer house apart completely. Down to the bones - nothing left but 4 walls and a roof. What a mess..... Afterwards we dug out 40 centimeters down to be able to get water pipes, sewer lines, electriciy and yadi-yadi into the floor before isolating and sealing off everything with concrete for the rest of our life. I have my dad helping me out because he recently retired and I felt a strong obligation to make sure that he doesn't sit on is behind all day and disintegrate. The fact that he has been a farmer for 20 years and a craftsman for 40 in various enterprises and knows everything about building a house there is - that's nothing but a nice sideeffect ;o)

After digging and moving dirt all last weekend he spent the last week building infrastructure such as sewers, electricity, cold and warm water etc. Last Saturday I helped him with the tubes for the floor heating system we decided upon and everything went well. We went in for a cup of coffee because he had a few questions regarding the placement of various items such as toilet, shower, washing machine etc. so he shoot at us and we answered the best we could. I hadn't given much of it any thought because I am not very detail oriented as a person - luckily my wife had thought a bit more about things than me so we quickly gained a shared understanding on what we wanted to do with Outerhouse version 2.0 whenever the project was finished in late 2008.

My dad at some point caught me off guard with a question on how much isolation we wanted to put into the walls. I replied with a tired face: "What do you suggest?" and he replied somewhat similar to "Well there are a few options" and started explaining that if you went for option A you didn't have to put as much into the walls as option B and C because - but if option B was the chosen one and we didn't consider D and E we could get into trouble later on if we decided to i.e. change placement of the tumble dryer.... I felt an urge to cry out loud: "I just want to sit down and take a dump! That's my primary success criteria for building a restroom - I want to empty my back reading my favourite Gary Larson comic! If it is cold outside I want to be able to turn up the heat and pay a hideous heating bill 6 months later. Can you build me a toilet and some floor heating, please? That's all I ask for".

Needless to say I didn't say anything but went for one of the options of his choice being tired of having to take all kinds of matters unknown to me into account and deciding for myself. I realized later on that I was just being a user caught in the Decision Trap - knowing that your decisions today will have great impact on all kinds of things totally unknown to you and at a great cost in time and money if you make the wrong call today.

I learned an important lesson that day - and the next time I get into a meeting with users being tired of stupid developers asking stupid questions about stupid issues I will have a little first hand experience which hopefully will enable me to put myself in their situation before ruling them out as impatient and irresponsible product owners ;o)