Friday, December 14, 2007

Development Thoughts

Hey guys.

One thing I was thinking about today is that quality of the code is very undervalued in software. The code has to be maintained by developers on a daily basis. It can make things more difficult if some developers write code that make it tougher for others to work with.

My mentality to try to follow a set of established rules, and attempting to create code that is both readable (self-documenting) and modular. A clear separation of GUI and logic adds more flexibility between those layers. Writing tests and trying to following a process such as TDD can help turn difficult-to-find issues later into easy-to-fix issues now. Choosing the best tools for the job and avoiding the "golden hammer", while using known "best practices" I find extremely beneficial. I try to help things get organized so things that have been hinderances don't continue to be so. I also try to help increase communication as much as possible, share information.

There's some irony in this, because I've run into some very poorly written code before. One example off the top of my head is that I ran into this monster function that had 1000 lines of code. After tracking down the exception that was occurring based on an error log, I was astonished to find out that there were about 998 lines between that try and catch.

Development has a lot of dynamics; well-written code is a pleasure to work with. Poorly written code takes twice as long, and management doesn't always understand why since it "worked" before.

2 comments:

Ash said...

Agreed! Most programmers are accustomed to C with Classes rather than C++ in a pure object oriented manner as this language has been designed for. Most programmers don't care about the design at all. All they do care about is to get it down as fast as they can even if they have to pay for this ignorance in the long run.

I think it's solely because most programmers don't love programming. To them, it's merely a way to make a living.

Rydinare said...

Ashkan, thanks for the response. I hear you on that. It is definitely fun how prevalent the "it works" philosophy is. I don't know if it's out of a lack of love for programming, or laziness. It's tough to say. I think there's also a love for different aspects of programming.

Me, I love the black box concept. I want to see a beautiful interface, and not have to worry about the internals. Other people love implementation programming and aren't good with designing interfaces and so you see very complex implementations just to do simple things. Unfortunately, they don't realize that this style of programming drops maintainability.