Blogging on another turf

Also known as guest posting. It’s been a while since I’ve started blogging. I blog because I want to share my knowledge of programming and the activities surrounding it.

Anyway, I wrote a post for Tapping Creativity by Geoffrey Hineman, describing a fairly routine, yet indispensable ritual I need at work to get me going: listening to music. I had to think of what I’m actually trying to do, before I could come up with a satisfactory title, “Coaxing Creativity with Music“. It’s also my first guest post (I’m so excited!). Talk about stretching myself…

In the post, I talked about listening to a variety of music. Well, I’ve been stretching myself again, and buying music from artists I’ve never heard of or would never have listened to. I bought the CDs based on the look of the CD cover and *drum roll*, my gut feeling. Pure instincts. I just bought a Maroon 5 CD (It won’t be soon before long). You know what, they’re really good.

It took a while for me to get used to writing regularly on my own blog, let alone writing for someone else’s blog. Let me tell you, it’s hard work and tough. And I learned a lot. And I became a better programmer because of it.

I learned how to manage a blog. I learned by reading other people’s blogs (programming and otherwise). I developed better discipline (try keeping to a regular blogging schedule and you’ll know). And all these skills and knowledge made me a better manager of software code and design.

And check out another article by Geoffrey, describing the Rapid Tangential Thought Process process. Following an idea all the way through sometimes work better than scattered learning.

Practical Programming (part 3)

First there was the traditional model of software development. Then there’s agile software development. And both models fail miserably for me, and I’ll tell you why.

I work in a fluid environment. It means I drift from one team to another based on need. I’m now the “user interface guy”. Anything that has to do with web applications, Windows applications, screen messages/errors, they look for me. I’m also the only programmer doing interface work, which brings me to…

Why the traditional development model fails

As I’ve said before, the traditional model takes too long. My users want a feature or a small complete program ready to launch in a few days, inclusive of whatever testing required. There was this one time where I was expected to come up with a complete web application in one month, with all the backend supporting processes running as well. That was in a December holiday season. They had a big paying customer. The project must launch. I was seriously stressed out then…

My users also don’t usually have concrete interface requirements. They have concrete business requirements, but as far as the user interface is concerned, they’re pretty casual. Documentation is focussed on business logic. Interface screen design is sketchy at best when it is time to sign off on the requirements. This means I have to come up with a good and usable design. Then the screen design is recorded into the sign off document post-development, as a formality.

Why the agile software development model fails

My users don’t want to be intimately involved in testing. They’ll tell me what’s right and what’s wrong after the project was launched and they’ve used it. My testers don’t want to do iterative testing. They have a very specific testing period, and they’ll only do testing after I’m completely done with development. There goes frequent iterative test cycles…

Due to limited resources (I’m the only programmer, remember?), any major changes introduced late in testing severely affects development. There’s this recent incident where my development work was completed, and I went on to work on another team’s development work. Everything seemed fine, until a day before the project was to be launched, the tester sent me a bunch of interface enhancements.

The enhancements required more than just a change in error messages. These enhancements required me to change business code classes, write a new stored procedure and add more stuff on the web forms. In a day? And I have to test it myself first, and I’m involved with another team’s development work.

The current system simply cannot handle sudden additional requirements like this.

The lone wolf development model

No, it has nothing to do with the canine. It refers to the fact that you’re the only one doing everything. Ok, so you may not be the only one. You can still be handling a lot of responsibilities.

What do you do then? Think and design very carefully. The motto is “Do it once, do it right“, because you might not have time to go back and correct the code. Code resiliency is important; Your code must be fairly change-resistant.

I typically use a day or two studying requirements. I pick out relations and dependencies in database tables and the desired screen interfaces. Once I’ve isolated independent screens, I draw out the desired screen layout on paper. I design supporting business class, and consider if there’s any special code I need to make the screen interface work. Only then do I start coding.

This has saved me lots of time, because the code I write is capable of handling minor changes efficiently, and can easily be expanded on for medium-scale changes. The code also becomes the basis of a reusable framework. I wrote simple tools that help generate code for my data classes, which become part of that framework.

All this made it easy for me to come up with a completely brand new web application from scratch. Well, not really from scratch. The code is newly written, but the base idea and structure was already well thought out.

Being a lone wolf programmer and still churn out working code in a practical time frame isn’t easy. But it can be done. You just have to think harder.

Paint.NET 3.2 release

My favourite image editing software, Paint.NET, just got upgraded to version 3.2. There are quite a few changes, and the most striking ones for me are the reorganisation of the “Effect” menu and the addition of Julia and Mandelbrot fractals.

Now, all the special effects are categorised into the following

  • Artistic
  • Blurs
  • Distort
  • Noise
  • Photo
  • Render
  • Stylize

The two fractal generation effects are in Render.

I also noticed that during the update installation, there was special mention that Paint.NET is a free software, and is supported through donations via the main web site. Maybe Rick found his software packaged with another commercial software and sold for profit.

Practical Programming (part 2)

I’ve talked about the more traditional way of software development and management in part 1. Now I’m going to introduce you to the other extreme: agile software development.

On first instinct, the word “agile” conveys the feeling of flexibility and speed. My first contact with agile software was with extreme programming. I actually had flashes of pallid faces sticking it through the night cranking out code, like extreme sports or something…

There seem to be quite a few variations of what agile software development is. From what I gather, the key points are:

  • Frequent development iterations
  • Focus on customer needs
  • Simple designs

There are a few other points, such as delivering working software in weeks rather than months. I feel the above 3 points most affect how you can be an effective programmer personally as well as when working with others.

Frequent development iterations

The software development life cycle (SDLC) primarily consist of

  • requirement gathering
  • design and development
  • user acceptance test
  • deployment

Those phases are usually very distinct, meaning they don’t overlap in terms of timelines. This makes for very rigid deadlines. If a major bug is discovered during testing, there might not be enough time to correct it.

It also counts as one development iteration. Fine, it just runs once, so it’s not much of an iteration. But in agile development, there are many iterations. They are just much smaller in scale.

Suppose you need to develop 10 independent web forms. Don’t wait until all 10 are done before testing. Finish one, let the user test it while you continue to code the next web form. Then when the user’s done testing on the first one, your second one might be finished.

Perhaps the first one had errors. Perhaps not. Either way, you can continue to code, correcting the first or starting the third.

Hopefully you see the picture. You get feedback almost immediately, and both development and testing are done in tandem. You get a finished product very quickly, even if it’s just one well coded and well tested web form, it’s still a finished product.

The other advantage is that if pressed for time, you always have some kind of finished product at hand. It’s not the full thing, but you get something very close to it.

Focus on customer needs

In part 1, I mentioned that the point of creating software is to make people’s lives better. In particular, you want to make non-programmer lives better. The software is not very useful if you’re the only one who finds it easy to use.

Focus on how other people interact with your software. Focus on your customers because they’re the ones who are in contact with your software everyday.

I’ve found that once I start using my created software from my users’ point of view, what I originally thought was flawless code seemed riddled with inconsistencies.

I talk with many of my users on a fairly regular basis. Through an unfortunate combination of circumstances, I was laden with much maintenance and legacy code, and mostly user interfaced based. What this meant was that the moment users get an error on the screen, my name popped immediately into their minds. And I’ll receive an email or a phone call.

Through the conversations and emails, I gained an understanding of how they went about doing their daily work. And I applied that knowledge to my future development work, incorporating enhancements and design considerations I never would’ve thought of.

And one of my greatest light bulb moments came when I understood the importance of one word…

Simplicity

Make everything as simple as possible, but not simpler.
Albert Einstein

This is one of the most important points in practical programming. The Agile Manifesto says

Simplicity–the art of maximizing the amount of work not done–is essential.

For example, Microsoft Office has many options for doing the same thing. Say you want to save that Word document you’ve been furiously banging on the keyboard for the last half hour. You can click on that diskette save icon. You can do a Ctrl + S. You can click on the menu “File”, then “Save”.

Having options is good. But there’s also the case of having too many options. And the user gets overwhelmed and fails to interact with your software effectively. Why else do you think Microsoft toned down the menu bar and pushed more frequently used items to the forefront in Office 2007?

I develop smaller scaled software. So I stick to a much simpler rule. Make it one option.

There’s only one save button on the web form. There’s only one way to get to the next screen. There’s only one way to retrieve and display data, using the standardly placed “Retrieve” button, which is also standardly named “Retrieve”.

Once I started doing this, my development work simplified. Testing also simplified, since the testers don’t have to test all sorts of saving functions for instance. The users are happy, because they don’t have to think whether they did something correctly, because there’s only one way of doing it, so they must be doing it correctly! And they can continue doing what they’re supposed to be doing: driving the company business.

Closing words

I have obviously a bias towards agile software development. Yet I don’t adopt all the practices some of the proponents teach. My reason? Practicality.

I work in a small team, sometimes being the only developer. As a result, I find it hard to follow any software management method, even one as flexible as agile development.

More than anything, I need fluidity.

In the next and final part, I’ll talk about how I managed a hybrid of the rigid SDLC and the flexible agile models. If you’re a lone wolf programmer, you will find it familiar.

Bangkok Vacation – Day 3

This was the last day of my vacation. Yes, it’s short. A lot of people had been telling me about it. I’m treating it as a slightly extended weekend getaway. So the first day was harrowing, the second day was eventful. The third and final day…

Erawan Shrine revisited

This was where the 4 faced Buddha resided. My brother wanted to go there for another visit. I’m just astonished that the small open air shrine was situated right next to a modern shopping place where a window display had Burberry on it.

My brother told me that legend has it that any building constructed on that piece of land kept collapsing. As a gesture to appease the spirit residing on that land, people built a shrine. Since then, nothing bad happened and the place flourished.

In fact, any wish you have, when sincerely made, will come true. The stories I’ve heard with wishes actualised, seemed to come with binding promises, say you will come back to pray and give more if the wish is fulfilled. I’ve even heard of a Hong Kong actress who promised to dance naked.

Mah Boon Krong

Supposedly another shopping haven, my brother wanted to go there to get shoes or socks. We decided to take the exciting combination of the underground metro and the sky train to get to our destination. This would give me the chance to experience two modes of transportation in one fell swoop.

After paying for the metro ride, this was given to me
Metro coin
It works like the tap card in Singapore. You just place it near a sensor at the barrier gate, and lo and behold, the gates part. When you reach your destination, there’s a coin slot at the exit gates. Slot it in, and the gates open. And it’s much smaller and easier to carry than a credit card sized ticket card.

The sky train ride was uneventful. I did notice that they had handrails attached near the ceiling. They snake high around the train coach, forming something like a bean pod outline. This way, even if you’re not near a pole or something to grab on, you can still reach upwards for a hand hold.

Which is unlike the Singapore MRT, where there’s nothing to hold on to if you’re unfortunately near the doors. What, you think I have magnetic stabilisers in my shoes? I’m tall and I have a high centre of gravity. I need a hand hold.

Alright, we’re there at Mah Boon Krong. I noticed many a shop selling iPod shuffles, hand phones and other gadgets. Use your own imagination about the authenticity. There were also many gold and jewelery shops, much more than I expected.

The deathly taxi ride

So we did our thing in Mah Boon Krong, and went back to CentralWorld. Then we took a taxi back to our hotel. The driver took a different route than the usual taxi route when we rode back from Siam Paragon. I thought that would maybe save some time, because there’s a particular turn that slows the traffic.

The driver just sped. And sped. And sped. This was where I was grateful for a seatbelt. The taxi wove between gaps in traffic, slunk down questionable alleys, and do abrupt turns like in those car chase movie scenes.

Then a car jumped out. The taxi driver slammed his foot on the brakes and threw my brother and I onto the back of the front seats. I had my hands out to brace myself, and then we were flung backwards from the aftershock.

Miraculously, nothing else happened. The taxi driver continued to plow along the street as if it’s a commonplace event. I’m just happy to be alive… flying on the evening flight back to Singapore soon…