Saturday, June 28, 2008

Last time, I poked a little fun at the Architects. In the interest of fairness, it's the turn of the programmers who don't test.


The image was made over at diy.despair.com using an image from Wikipedia.

Saturday, June 21, 2008

Who moved my bliss?

Far too many years ago, as a young computer enthusiast I thought to myself that it must be wonderful to be paid to write programs. After all, I wrote them at home, for myself, for free, so the idea that someone would pay me to do that for them seemed somehow magical to this teenager. So I diligently applied myself to the art of creating computer programs, got a degree and headed for the big city to ply my new trade.

Ah, yes, the optimism of youth. Silly me! There is no joy in corporate software development. None. Not even a little bit. The reasons for this are numerous, but a couple of recent blog posts highlight a few of the reasons nicely:

I don't understand computers is not an excuse

and

I quit my job today

I'm sure I'll get around to listing a few more here in the coming days, especially after my experience with our company architect yesterday. My last few dregs of remaining hope for Corporate America pretty much shriveled up and died on Friday afternoon.

Tuesday, June 10, 2008

Poking a little fun at architects


I made this one over at diy.despair.com using an image from Wikipedia. Most excellent! I have some more I made as well, but I'll save them for another day. (Click on the picture for a larger version.)

Saturday, May 24, 2008

Project Managers

There are few things in this life that can instantly raise my blood pressure, but I.S. project managers can. While researching this Sunday's lesson, I re-discovered this scripture that I think perfectly captures my feelings about them.
Who is this that darkeneth counsel by words without knowledge?
Job 38:2
Nothing else to add.

Friday, May 23, 2008

Unit Testing

Unit Testing or, as J.B. Rainsberger likes to refer to it, Programmer Testing is a seriously undervalued and underused technique within the I.S. industry. I just read a post by Andrew Binstock over at his personal blog asking "Is the popularity of unit tests waning?" This is an interesting question.

I also found interesting, his observation that TestNG is effectively invisible. For the record, I had not only heard of it, but was previously asked to be one of the pre-press technical reviewers for the book. But, it is true that when you speak of unit testing these days you are, by default, referring to JUnit.

But back to the question. As I ponder this, I am drawn to the conclusion that it never was popular. Unit testing is pretty much the programming equivalent of flossing your teeth. You know you should do it and you understand the health benefits that will come from it, but you just never quite manage to get yourself to do it.

I think that unit testing has been promoted by the alpha geeks and early adopters of tools and techniques. I have been using it more on than off for over five years now, so I can honestly tell you that getting programmers to write unit tests is seriously hard work. I have had the most success with my JUnit evangelism with teams that I am personally leading. As a technical lead, I try to lead my teams by example and show how unit tests help me be certain that my code does what I think it does and how it is safe to refactor because I can prove it works with a simple run of an ant build.

I have had a moderate amount of success with management. Most managers now recognize the term unit test and they will generally agree that they are good things and that programmers should indeed write them. The problem comes when the deadlines get short, because so do their memories and they "forget" that they agreed that unit tests should be written no matter what, even if that means an overrun on the targeted due date. All hail the great god Deadlines!

I have had so little success convincing fellow programmers to use unit testing that I'm almost embarrassed. I was even the "JUnit sheriff" at a previous location and I still didn't get much traction. I think that the problem comes from the lack of positive feedback. Knowing that you get more of the behavior that is rewarded, the lack of unit testing must be because of the lack of seeing unit testing produce positive results.

On previous projects of mine, thinking especially of a big one a couple of employers back, I have insisted on unit tests (writing them myself where necessary) and the positive feedback loop starts to kick in and the others on the project start writing them as well. At the current employer, there were zero unit tests in the house when I walked through the door just over a year ago. I was involved in a couple of projects where I wrote unit tests, but after they got canceled, the positive feedback loop was short-circuited and we are still having an awful job getting folks to write tests.

If you haven't seen a suite of unit tests working its magic and saving you from certain crashing, then it's hard to internalize why you would want them.

So, one of life's great dilemmas. Unit tests are good for you, but until you see them work, it's hard to see that they could work.

Thursday, May 22, 2008

Bad Singing

More specifically, my bad singing.

I feel very sorry for Sis. Geek on Wednesday nights. We have midweek service and our normal song leader is still working on understanding the importance of making it to every service, so I lead the song service. I like to describe my singing voice as worse than a gravel crusher. I have the voice of one suited to written media. Various people have told me that I actually can sing, but I think they're just being nice. Even if they're right, there are still a couple of reasons why you don't want me behind a microphone when music is playing.

The first reason for keeping me away from a microphone is that I have no memory for song lyrics. None. Nada. Zip. Sis. Geek provides me with song sheets for the main service, but she picks songs according to the moving of the Spirit during altar service and that's when my bad memory really does me the most disservice. I loose count of the number of times, I haven't been able to remember the words to some really appropriate song that she's selected. Sigh.

The second reason is that I don't have a creative bone in my body and have no natural music comprehension. This shows itself in my inability to figure out how to lead the flow through a song. Knowing that I'm not a creative sort (and being fairly used to it by now) I applied some geeky analysis to the problem. I was fairly pleased with the result, but Sis. Geek still shakes her head when I use this technique. Allow me to explain.

Songs have verses and choruses and sometimes even bridges. I'm not really sure what the exact difference between a chorus and a bridge actually is, but my best understanding is that a bridge is kind of like an extra chorus. (Feel free to flame me in the comments if I have this all goofed up!) My problem is that with the new-fangled songs (rather than the traditional hymns, which I have no problem with) have very loose "rules" on which part goes where and when and in what order and which pieces you can repeat and even whether you finish at the end of a chorus or a verse. What is a geek to do?

Flow diagrams to the rescue! Check out this simple one:

  I -> I -> II -> II -> I -> II -> II -> II

This is a real example where the song has two parts and are best sequenced with the first part sung twice, then the second part sung twice, the first part once more and then the second part three times. I have this penciled at the bottom the song sheet and typically follow this sequence for that song.

Naturally, there are some songs with more leeway and flow diagrams allow for this. An example will help:

      .----.*
v |
I -> C -> I -> C

This shows that the song starts with the verse, then moves to the chorus. It then alternates between the verse and the chorus (the asterisk depicts that the loop can be followed zero or more times), with the chorus being the end point of the song.

A very geeky way to solve a creative problem, but it works very well for me.

Saturday, May 10, 2008

Ladies Retreat

Umm, no, I didn't attend our district's Ladies Retreat. Sister Geek went with several ladies from the church. I took time off from work to stay and look after our Geeklets.

What did we do? Well, we have a fairly well established tradition at this point as we've been doing this for several years and we have pretty much the same routine every year. I checked with the Geeklets before the long weekend and they still wanted to follow the usual pattern. So we did. As the best weather was forecast for Thursday, we went to the zoo and then followed that with the aquarium on Friday because we don't mind being inside on an overcast day.

This is a wonderful combination as it's interesting to both me and them. We also have plenty of opportunity for quality daddy time. Much fun was had by all. A good thing really as they spend months looking forward to this event every year.