Admission is the first step in recovery
Sorry about the gap between posts. I’ve been super busy. I know, that’s not a good excuse. I’ll try to do better the future. Really, I will. I’ll tell you what though, I’m glad that we’ve made up.
Hugandkiss.
A few weeks ago I needed a data set to test with. A really big one. Thousands and thousands of files worth of big one. And all those files needed to have lots of revisions. In the end we’re talking about millions of database rows.
So I wrote a little script to make a bunch of random changes to an old source tree. The rub is I wrote the script the Perl and attached it to the defect.
Not ten minutes later Jeff walks in, points toward the door and says, “Get out.” Not quite a text book intervention but he tried his best and his heart was in the right place. I knew as I was writing it I didn’t want to use Perl because it drives me crazy as a language, but it was familiar and easy. Never mind that a month from now I’ll have better luck translating sanskrit than reading what I wrote. I even said so in the bug report:
“I wrote a quick Perl script (I know, no one is more sad about it than I am) to edit each checked out file.”

It’s been about fifteen years since I was first introduced to Perl and I think that’s about all any one person needs. I need a change.

The problem now is what do I use? Python? Ruby? Squirrely academic language du jour? I know the only way I’ll change permanently is to pick a new one and use it whenever I can on the little junk development tasks.

So I put it to you the reader to decide. The only requirements are that it has to run on Mac OS X, is reasonably flexible and is easy to maintain. (Bonus points if it can run on Windows as well.) Whatever has the most votes by Thanksgiving is the one I’ll use. I’ll even give periodic updates on my progress, kind of like my own twelve step Perl detoxification program. See, I feel better already.


Of course, Python. It comes installed on the Mac by default, along with just about every Linux distro. Available on Windows. There is a wrapper for Surround already written. Perl was designed by linguist, Python by a mathematician. Plus, it’s named after Monty Python with all the examples using spam and eggs rather than foo and bar. Top that.
Comment by Jeff — October 31, 2008 @ 9:57 am
You might as well not even count my vote, because I would use Perl. Perl always gets a bad wrap, but for quick, simple tasks I don’t see the problem…
Comment by Jonathan — October 31, 2008 @ 10:03 am
Clearly LOLCODE
http://en.wikipedia.org/wiki/LOLCODE
Its mor awsum
Comment by Pete — October 31, 2008 @ 10:34 am
c# - http://mono-project.com/Main_Page
Comment by Tim — October 31, 2008 @ 3:47 pm
In answer to your question and an homage to Tim.
Perl is the past - much like the GOP revolution. Some things in the past (like RMS, Newt and Larry Wahl) are best left in the past.
Python is the present. It really isn’t going anywhere, but many people are comfortable with it. It isn’t very forward thinking. Continuing to use Python is like a vote for McCain - more of the same. But if Larry dies, all hell might break loose as you don’t know who is in control of the state of the onion and it might be a cultural revolution (by golly, we will finally get objects as first class citizens).
Ruby is the future if you are willing to accept CHANGE and put your faith in the promise of a better scripting language, and hope that it isn’t a pipe dream. All of the cool kids, famous people and intellectuals are jumping on the Ruby bandwagon. And it has a charismatic leader named Matz (who, ironically, has more in common with Mitt Romney)
Cast your vote - but choose wisely.
Comment by Michael — October 31, 2008 @ 6:53 pm
Er… use perl, just use it well. You know it better than you know the others, so it should make your writing time quicker. It fulfills all your other requirements.
You can write obfuscated code in any language — I’m not even sure that perl makes it easier, although that seems to be the consensus. Just don’t write the sort of perl that you have trouble reading.
If you MUST try something else, try them all (including perl/c/whatever). Head over to projecteuler.net and solve the first 20 problems in each language. You might want to make up your own sample problems to stress other functions — I/O, file automation — things euler doesn’t do. Copy the comments between languages (so that comments aren’t a factor). Then go back through them and figure out which of your code bits you like best. Use that language.
Comment by Chip — November 1, 2008 @ 2:43 am
It’s pretty easy to use Python on Windows, if that counts for anything.
Comment by Fernando — November 3, 2008 @ 2:12 pm
Where is the Libertarians analogy? F#?
http://research.microsoft.com/fsharp/fsharp.aspx
Comment by Tim — November 4, 2008 @ 11:18 am
Use Python. Guido won’t let you down, but if you cross him he might break your knees.
Comment by Mitch Oliver — November 10, 2008 @ 11:02 am
So - I’m not a code monkey or one who regularly writes code. Having said that I DO read code almost every day. Perl is VERY VERY hard to read if not impossible ! I suggest staying away from Perl even if it’s something well loved and adored.
Python or Ruby would be suggestions.
Comment by Jeni — November 14, 2008 @ 6:36 pm