Yay: python

May 14, 2008 20:17

After putting the results of last week's sewage wading (tidying up 40 separte copy/pasted/edited perl scripts with multiple copies of the same functions each with varying levels of bugs) up for review, it turns out that I'm the closest my team now has to perl expert. So the entire "I suppose it's better for me to learn perl than for the rest of the team to learn python" rationale is no longer valid. So I've now got go ahead to do all further scripting in python. Yay!

- It will be obvious what's a string and what's a keyword/function.
- state can be obtained from well thought out functions/singletons, rather than a global variable whose name is made up of whatever two character combination of punctuation hasn't been used yet.
- said functions/singletons being easy to look up in book indexes/google when you encounter them for the first time, as opposed to aforementioned two character combinations
- I won't suffer from the script guessing what I want to do in face of ambiguity and getting it right just often enough to not be obvious in testing
- I won't encounter a never ending stream of bugs from forgetting that strings have to use . and eq, and absent mindedly using + and = will silently convert the string to a number - usually 0
- fellow programmers can pick up the language in a couple of days, as opposed to the months it's taken me to learn perl even to the pitiful level I've achieved
- I can stop asking embarrassing questions to the internal perl mail group every couple of days
- I don't have to worry about the exact combination of $, {} and -> to use when using anything even remotely complicated (e.g. taking the first member of a list returned from a method on a reference I've just looked up in a hashmap. Python would be hash[foo].method()[0]. Still don't know how to do it in perl without trial and error)
- and all in all I can stop trying to think in the same way as someone who's view on how to program seems to be diametrically opposed to mine on almost all levels - possible as a result of extreme overdoses of sh, grep and awk.

On the minus side
- whitespace is significant. Oh Noes! Except I indent any code I write anyway.
- there's no incentive for the rest of my team to ever learn perl, so I'll be lumbered with maintaining the existing scripts in perpetuity :-(
Previous post Next post
Up