Recently I’ve had the misfortune of being exposed to a multitude of software packages constructed in PHP and I have to say that I am very disappointed. I’m not talking about the language specifically as it is capable, even though I haven't always been a fanatic regarding it as some one-language-only developers have, who wax poetically about the only tool in their toolbox. I’m talking about code that unless run in absolutely perfect conditions (a.k.a. the developer’s machine/environment), the code fails to work as described by said developer. This point alone stresses the importance of proper testing and the benefit of peer-based code review.
I have noticed this issue as being more common in what I refer to as the ‘lazy languages’. These are your weakly typed dynamic languages, specifically those lacking any real enforcement of data constructs, and lacking proper exception handling. The lack of these two key language features don’t necessarily cause bad coding to transpire, but what they do is allow poor programmers (and non-programmers alike) to continue on with poor practices because nothing (on the compiler/interpreter end of the code) will dare to call said programmer(s) on his/her problems. Careless coders will naturally gravitate to these languages as it lets them continue to live in their own little make believe world, the world in which they are competent coders and/or designers.
This isn’t to say that there aren’t good or even great coders that didn’t start out in the same manner as mentioned previously. It is all part of the learning process through which we grow. This isn’t exclusive to coding obviously, but it most definitely is applicable. The most important point which I need to stress is that recognising poor habits and working to eradicate said habits is paramount to becoming a better coder. Don’t wait, act now. The code you save may be your own.
No comments:
Post a Comment