On 02/04/2010 14:39, Valdis.Kletnieks@vt.edu wrote:
On Fri, 02 Apr 2010 13:48:48 BST, Michael Dillon said:
So, what are you having your up-and-coming NOC staff read?
In an attempt to wean them off of unmanageable PERL scripts
There is not, and there never will be, a useful programming language that makes it the least bit difficult to write totally abominable creeping-horror unmaintainable code in.
+n "Whatever language you write in, your task as a programmer is to do the best you can with the tools at hand. A good programmer can overcome a poor language or a clumsy operating system, but even a great programming environment will not rescue a bad programmer". (Kernighan and Pike) Although language zealots are loth to admit it, certain languages are better suited to some things than to others. Perl's syntactical support for text processing are second to none, but for web stuff, it's hideous. PHP stinks on the command line and text processing, yet its web integration makes it a good candidate for small web projects. Shell scripts are designed specifically for command line tool management, pipes and all that sort of thing, and just because other languages support popen() and system, that doesn't necessarily make them good choices for stuff which involves unix scripting. I write readable and maintainable code in all three. Java elicits strong reactions. No doubt, you can use Java plumbing libraries to scale to impressively large systems. On the other hand, Cisco Configuration Professional (the new SDM) provides an excellent example of how badly you can screw up a good idea by using the wrong tool - I'm not interesting in using or recommending a desktop tool which takes 2 minutes to start on a fast computer. You can write unimaginably awful code in python and ruby, and irrtoolset's code is a prime example of what you can do with c++. Yet, we all acknowledge that python, ruby and c++ are high quality languages. In short: less zealotry, more pragmatism and a realisation that each language has its own strengths and weaknesses. Bad code is bad code in any language. Nick