May 2000

The New Programmer's Road Map: Branching Out Into GUI Languages (by design)

Trying Out GUI Scripting/Programming

One thing I never expected, being such a geek and all, was to actually like creating a Graphical User Interface of any sort. The reason I might not like it is quite simple, I never really used them a lot (with the exception of running X windows so I can have, lots of xterminals). It occured late one night when I was bored out of my mind. I picked up some unleashed book that was laying on the floor and just thumbed through it to find something interesting.

I stumbled across an introduction to tcl/tk GUI scripting and tikered with it for a bit, I was very surprised . . .

tcl/tk

Tcl/Tk was fun, I really like the interactive scripting side of it, which I can tell would be difficult for a large project. In case you are wondering exactly what the heck I am talking about, please allow me to explain.

Tcl/Tk has an interactive mode (not unlike Python or LISt Processing for example). You can build objects just by typing in the syntax in interactive mode. So in effect, I would type in a bunch of syntax and suddenly off somewhere on my X display a little box pops up; then a button, a label, some more buttons, more labels etc. Eventually I made it do something (I honestly cannot remember now what that something was - I am sure it was cool though).

At the time, I thought this was just too nifty and really, still do. It was a heck of a lot of fun and I saw why tcl/tk had become so popular. Not unlike other GUI languages, a lot of people found it a blast to hack on and shared the results (whether useful or not).

GTK+

The other popular GUI language I am going to discuss is GTK+. While GTK does not offer the interpretive interface that Tcl/Tk does, it is still quite rewarding: anyone who has worked even with interpretive languages realizes you must enter all of the syntax in a file anyway on larger projects. So making the change was not exactly difficult. The reason I tried out GTK+ is simply because, well, I had to or else I could not possibly write about it, could I?

GTK+ uses a C-style syntax where most of what one does in the way of generic operations is done by using the libraries. To me, this is no different than doing my homework with the glibc documentation, and for this I see why GTK+ is so popular. A C or C++ programmer should have no problems (after a bit of reading) getting up to speed with GTK+. Since I have a preference for C/C++ of course I really enjoyed it and definitely recommend it for a C/C++ programmer on UNIX.

Others

Are there other programming languages? Heck yes. Thousands, literally. Not only are there thousands, there are variants of existing languages. So what among these thousands, would I recommend learning? Well, for starters, I strongly recommend learning one of the LISt Processing (or LISP if you will) languages to the point of creating a recursive function for one simple reason, LISP uses recursion by default; once you understand this you do not really have a need to go further, but if you wish to, please do so. The sheer elegance of LISP, aside from it's more well known acronym of:

Little Irritating Special Parenthesis

is truly an eye opener--bluntly, it is a beautiful language and I liken learning it (even at a basic level) to learning a new human language.

Finally, I also recommend not necessarily learning per se but at least reading some of the associated documentation for Intercal. Yes, Intercal. The hell of all languages and bane of many a geek's existence. In all honesty, I never got past the third line of code and one comment before I simply could not stop laughing (after digesting many an intercal white paper) and just dropping to the floor. Intercal reminds us (not unlike Pascal) that just about any language can be defined.

Next: Wrap Up Previous: More programming