[personal profile] flexibeast
i used to love playing with computers. i have fond memories of my high school's BBC micros, with their 6502 CPUs, their (to me) friendly and functional version of BASIC, and their built-in word processing and Logo programming language. (In fact, i have such fond memories that i've asked [livejournal.com profile] naked_wrat to set up a watch on eBay to notify us when a machine comes up for sale. :-) )

At the end of my first year of high school - in 1986 - my parents bought an Amstrad PC-1512. It was quite an impressive machine for its time - an 8086 CPU, 512K RAM (expandable to 640K, of course, which "ought to be enough for anybody" ;-) ), CGA graphics (with a machine-specific extension allowing it to display 16-colour graphics - unfortunately, it didn't use EGA), a single 5¼" floppy disk drive, MS-DOS 3.2, and GEM, a GUI. No hard disk was included.

My parents and i assumed for quite some time that i would eventually become a computer programmer. Although i didn't have access to any decent programming languages - such as C or Lisp - i did enjoy writing programs in BASIC. (If i remember correctly, the version of BASIC that came with the PC-1512 was Locomotive BASIC, which had excellent graphical capabilities, but included no facilities whatsoever for sound creation.) i say "enjoy", but that was only true to a certain extent: i would often get frustrated by near-invisible bugs preventing my program from working the way i wanted it to. One day, when i found myself in just such a situation, and was yelling at the computer, i realised that i could never become a computer programmer. After all, i reasoned, it would hardly be appropriate for me to be sitting in an office environment and yelling at a computer, would it? (Of course, since computers have become ubiquitous in the office environment, this occurence is perhaps all too familiar to many of us.)

So my interest in computers, and in computer programming in particular, waned; and the final nail was put in the coffin when, upon enrolling at uni, i discovered that, in order to do Comp. Sci., i would have a mass of mathematics inflicted upon me (about which i wrote in an earlier LJ entry). And that was that.

Except, of course, it wasn't. Not long after i started full-time work, i came across an issue of Byte magazine which had a cover story on Java: the language, the virtual machine, and the platform. This turned my becoffined interest into an undead, and it rose from the grave, haranguing me into purcashing a copy of Exploring Java1 - my first O'Reilly book!2 - a new PC, and a copy of Borland's JBuilder, just so that i could mess around with Java.

Well, JBuilder turned out to be a buggy piece of crap, and, having become a regular reader of Byte mag, it wasn't long before i heard about this upstart OS called 'Linux'. i bought a copy of Red Hat Linux 5.2, and soon discovered a world of programming i had hitherto not realised existed. Perl quite rapidly became my programming language of choice, and Java was all but forgotten.

i'm still interested in programming languages. i recently read an excellent tutorial on Haskell, and have been reading up on Common Lisp and Scheme (which are both dialects of Lisp)3. i still like Perl, though i suspect that the GNU HURD kernel will be usable before Perl6 becomes production-ready. i haven't liked programming in Python, although maybe i haven't given myself enough of a chance to get used to it. i like Ruby, which is probably no surprise, since i like Perl. i like Smalltalk, having played around with GNU Smalltalk and Squeak. i started reading this tutorial on OCaml (Objective CAML), which didn't enthuse me (and no, it's not because of the static typing). i've done a lot of paid work with Visual Basic for Applications - mostly in the context of developing MS Access databases - which was cool one minute and hair-pulling-frustrating the next4. And i still haven't gone back to Java.

Well, that's not quite true. Sometime within the last year or so, i tried to write a little Java applet which would pull a regularly-updated image from its server. i thought it would be trivial. It wasn't. i can only assume that i was missing something very simple, but i seemed to need to go to an awful lot of work for such a simple program. Suddenly, it felt like i was back on the PC-1512, programming in BASIC. When i try programming in other languages - even C - and something doesn't work, i am able to either:
  • quite rapidly ascertain what i'm doing wrong, and fix the problem, or at least make a step towards doing so; or

  • patiently sit and stare at the code, or the documentation, for possibly hours on end, quietly pondering, pondering, until i either find a solution or shrug my shoulders in resigned defeat.
When trying to program in Java, i felt like i was back programming in BASIC on the PC-1512: to wit, i quickly found myself being driven troppo (or more troppo). Why had the designers of Java decided that class X was final, when subclassing it would mean i could do exactly what i wanted to do? Why had those same designers made class Y abstract - why should i have to worry about implementing it, and couldn't they at least have created a subclass that did implement it? What scaffolding did Java demand i erect before i was allowed to do what i actually wanted to do? In the end, i decided i couldn't be bothered; it seemed a lot of work for very little gain.

i've since discovered that there are other programmers who feel similarly.
Philip Greenspun wrote in his blog that he views Java as the SUV of programming tools:
A project done in Java will cost 5 times as much, take twice as long, and be harder to maintain than a project done in a scripting language such as PHP or Perl. People who are serious about getting the job done on time and under budget will use tools such as Visual Basic (controlled all the machines that decoded the human genome). . . . If a programmer is attacking a truly difficult problem he or she will generally have to use a language with systems programming and dynamic type extension capability, such as Lisp.
Noted Perl programmer Michael G. Schwern, who has contributed a number of Perl modules to CPAN, has written an essay entitled "Why I Am Not A Java Programmer", in which he notes that a simple "Hello World" program in Java
drags in the concepts of class, privacy, types, methods, the magic ``main'' method, the String class, arrays, class methods vs object methods and chained method calls. And on top of all that it, it has to be saved in a file called ``HelloWorld.java''. One must know all this (or cut & code it) just to get moving.
Finally, just this morning, i came across an article entitled "Maintainable Programmers", in which the author writes that Java, whilst being good for ensuring that mediocre or crappy programmers don't write bad code, also gets in the way of decent or excellent programmers writing good code.

So that has given me all the more reason to continue avoiding Java as much as possible, and to express my deepest sympathies for those who have to program in it. In the meantime, there are lots of other programming languages for me to explore: languages with just as much - if not more - power than Java, but which are much more of a joy to program in.
 


1. Subsequently retitled Learning Java.
2. As someone once wrote on IRC, "now that I think of it, O'Reilly is to a system administrator as a shoulder length latex glove is to a vetinarian." :-)
3. i'd always thought of Lisp as being the (language (of (too (many (parentheses (and (enforced (recursive (programming))))))))), but the book Practical Common Lisp gave me quite a different perspective, and softened me up in preparation for discovering that Lisp Is Cool. :-)
4. For example, there was one situation where i had to write a six- or seven-line comment to explain two lines of code. And lest you think that my coding abilities were less than handy, the person who was brought in to maintain the code that i wrote - who lectured in VB programming at TAFE - told me that he wished his students would write code like mine; and that although he wouldn't have done something the way i did, my way was better.

Re: you should read this.

Date: 2006-01-01 05:58 (UTC)
From: [identity profile] flexibeast.livejournal.com
Heh, yes, i saw that, thanks - have you seen this response (http://codestories.blogspot.com/2005/12/what-you-need-to-know.html)?

Profile

flexibeast: Baphomet (Default)
flexibeast

Journal Tags

Style Credit

Powered by Dreamwidth Studios