Thursday, February 16, 2006

Speed is the unstated requirement

I hate unreadable code. So, whenever I see developers doing things like using StringBuffers instead of plain vanilla strings to make a couple of concatenations and tell me it’s to make the code run faster, I start to get nervous.

And very ugly problems have been caused in the name of speed and scalability. Remember when everyone was high about distributed objects? The fever is back again with xml web services in service oriented architectures. You wouldn’t believe the amount of useless serialization and deserialization I’ve seen in some systems.


But speed is one requirement that users will not state explicitly (like easy of use). If they do, it’s because the problem has already reached scary dimensions. And we need to understand that speed will play a major role in the likeability of our applications.

So optimize often. Optimize well. Be fanatic about speed.

Thursday, February 09, 2006

A day in the life...

This morning at work we discussed and sketched a class diagram and an entity diagram on the whiteboard. With hibernate we tend to think just on the class diagram, but some of us still need to think in tables.

After we started implementing it, we remembered that the information would have to be remoted across to the client. We would also need to create the admin interface to manage this and some db script to provision default values.

We used the eraser on the whiteboard and decided that we would implement those collections as hard coded enumerations and let our code generator handle the conversion from Java to ActionScript.

We will only have one early adopter client for the next few months and there were no real requirements to make this easily configurable yet.

A comment from a colleague of mine:


- In uni I would never have imagined that I would have a nice class diagram and entity diagram defined and that then I would want to dumb it down to an hard coded enumeration!


Hard coded values are not bad: hard coded unorganised values are bad.

Also if we had used word or visio to create the diagrams we would have felt that we needed to implement it the way it was first drawn. Whiteboards rule!

BTW all the logic and most of the complex UI has been successfully pair programmed today based on the specs that we had discussed yesterday with the client. Agile methodologies rule!