August 21, 2006

My way into scripting stuff

I thought I'd spend a couple of minutes recounting how I got into scripting languages since it was quite a quirky way to get there. When I got started with computing (post "BASIC on an Amstrad") I was using the turbo products, notably Turbo Pascal on the PC which was a really nice environment. I truly miss the simplicity of that interface many many times, in particular I miss how extremely simple it was to write simple graphics to. Those were the days.

Anyway, Turbo Pascal and later Fortran at the university, running through compilers and all that, instilled the notion "software is difficult" in me, which of course is really stupid. Latex and Tex, other environments one is heavily subjected too when doing math, didn't change that perception. I worked a little in matlab and also in mathematica and really, really liked mathematica. Mathematica uses just what you'd expect from functional programming if you're a math major and the convenience of that tool was for me unrivalled at the time.
After University I needed a job, and luckily one was available, but still in the "software is difficult" world, namely doing derivatives pricing in C. The company I worked for had a department for doing systems engineering however. They had done a lot of tooling for our development process - an intricate make based cross platform build system, documentation compilers, memory leak checkers and more. What they were doing was all based on unix tools - but unix tools from way back when. Their celebrated platform of choise consisted of korn shell scripts embedding AWK scripts as HERE documents for text manipulation when required. It wasn't pretty, but they had grown accustomed to it. Intrigued by this I stared learning AWK, which is really a nice language, even if it is kind of limited.
At first I did mainly reporting stuff and the occasional total file or variable renaming, but after a while I started doing heavier stuff. A particular thrill was when I built a code generator, which could take C-style type definitions and output all the boilerplate required to present these C types as structured data to Excel formulas. We used this to replace a horrible handwritten mass of Excel interface code. This was clearly one of the finer hackathons I've taken part in: 2 guys 2 days, 16 hours per day. Total workload 64 hours. And it's just so much easier to get right in 2x2x16 tan in two weeks done by one guy.
All of this was done in AWK, including the parser for the template output generator. Clearly the mix of AWK limited capabilities and my limited experience did not produce a very maintainable result.
I did one other very nice project in AWK though, which was a LaTex code extractor that would take sample code from LaTex documentation, wrap the sample code in setup and teardown code and run unit tests on the code. In this way we always knew that the sample code in the product manual compiled and ran as described.
It's still easy to remember the thrill and almost sinful enjoyment in not having a compile cycle. towards the end of my time at Simcorp we were working in template heavy C++ using Visual C++ and the compile times and tremendous ugliness of the error messages was just painful.
Finding AWK restrictive, I turned to perl and has since spent many happy hours with perl. And many painful gutwrenching "I just don't get why this doesn't work" hours too. The plan has been for a long time to switch to python or ruby - we're using ruby at Imity - but recently I have to say that it seems thaty python/ruby just isn't far enough to go. It seems that its time to go fully functional, only I have to admit I haven't yet been able to choose a language to invest in.

Posted by Claus at August 21, 2006 1:39 AM

The days of the "Turbo" family from Borland. I have used many hours in front of that blueish screen. I really, really liked that simple interface. Since i have never been a big fan of Pascal, i mostly used Turbo C. I also remember that Turbo C had a preprocessor called _asm. When used, you could write assembler code directly inside your C. Used that alot :OD

Btw. the "Turbo" name was given because of the high compilation & linkage speed, at that time.

Posted by: Bo at August 21, 2006 10:01 AM
Post a comment