Family, Friends, and a Ferret

11 PM August 30, 2003

The whole family travelled across Sydney today for a BBQ at Alan and Pam’s house. Alan was my best man and has remained a close friend, despite life being seriously busy for both of us. Pam and Karen get on famously too. Alan and Pam have two children – Joel (my god-son) and Rebecca. Joel and Rebecca are just a few years behind Mitchell and Connor.

Don and Jennie, also dear friends of ours, were there too. Their daughter, Bronte, is another of my god-children. Bronte is ten years old, almost taller than her mother, and prefers jeans and T-shirt to dresses.

The five children play well together. They spent most of the time hiding from their parents.

Us six adults spent the entire afternoon enjoying the warm sun and blue sky, while discussing the serious and the inane, and grazing our way through a meal of lamb, chicken, vegetables and salad. And three different rounds of dessert. Perfect.

At some point, Bronte brought out an ornamental ferret fur1 and laid it across her father’s head. Karen was inspired to take a picture of Don’s new mohawk:


1 No, not very politically correct. It also has a genuine tortoise-shell clip. Must be thirty years old, if not more.

By alang | # | Comments (1)
(Posted to Stuff)

Things to like about EJBs

3 PM August 29, 2003

These are the things I like about J2EE and EJBs:

  • J2EE is easy sell to technical management. No justification is required because Sun have already done all the marketing for you.
  • Many developers know how to program with basic J2EE: The JSP/Servlet/EJB is ubiquitous. Projects don’t have to scratch around to find the skills, or spend time bringing people up to speed.
  • J2EE provides many Java programmers with their introduction to architecture.
  • J2EE incorporates a broad swathe of Internet-style technologies – Web, ftp, email, CORBA, Web Services – as well as providing a strong culture of “scalability”.
  • J2EE can solve a wide variety of problems, even if the individual solutions are not optimal. The same technological platform can be used to solve many kinds of problems.
  • J2EE is, to a large degree, standardised. Several good commercial and free implementations are available and, to the same degree, compatible. The standards are improving all the time.
  • J2EE is based on Java, and, as computer languages go, Java is not too bad.
By alang | # | Comments (6)
(Posted to Software Development and Rants)

Things That Annoy Me About Gentoo Linux

5 PM August 26, 2003

I really like Gentoo Linux. I enjoy using it, and I have said so many times in this blog. However, in a quest to provide balance of opinion to this blog, I must now present a list of things that annoy me about “Gentoo“Linux.

Compared with, say, Windows XP, Gentoo Linux has these problems:

  • The installation is highly technical. It requires the user to understand hard disk drive partitions, find the chipset that their network card uses and to make choices about which kernel source tree they want to compile.
  • The installation takes a long time. The fastest I have ever got an install done is about two hours.
  • Even when the installation is “finished,” the system has no GUI, no sound support and only very basic networking capabilities.
  • Like any Linux, Gentoo is very unforgiving of even slight hardware problems.
  • The concept of compiling things from source scares off many potential users, despite Gentoo’s simple “emerge” interface.
  • Gentoo needs to be online during installation and updates. (Not a problem for me, since I have cable :)
  • The user is often required to choose one from many available options, often without understanding the full ramifications of those choices. Some examples are: file system (ext2, ext3, reiserfx, xfs or something else?); cron daemon (dcron, fcron or vcron), system logger (msyslog, sysklogd, syslog-ng or metalog); and desktop environment (gnome, kde or X + window manager like enlightenment). This is not bad in itself, except for the lack of explanation.
  • Setting up each new feature takes an age – half a day for X windows and Gnome, a day for Samba, half a day for the printer. It all adds up to a time intensive hobby. Sure you learn a lot, and sure, the second time around is much quicker, but this is not a Linux distribution that “just works” out of the box.

PS: If you are looking for a more postive take on Gentoo, I invite you to search my blog for other Gentoo entries.

By alang | # | Comments (5)
(Posted to Software Development and Rants)

Things to Like About Windows

7 PM August 25, 2003

In order to provide some balance on my blog, I hereby point out that there is plenty to like about Microsoft Windows:

  • Windows – especially XP – often just works, even on hardware that is a little dodgy.
  • MS do usability testing, and the results show in better and better UIs with each release.
  • The individual releases are well defined and publicised ahead of time.
  • Binary compatability between releases is pretty good.
  • With a minimal amount of training, most users know enough to be able to do all the basics: edit a file, save it and email it.
  • NT/2K/XP is a solid Java platform.
  • More software available than any other OS. Most new software appears on windows first.
  • Runs on the PC, the most popular computing platform in the world. In fact, windows is largely responsible for the popularity of the PC.
  • Windows XP brings multi-media functions to more users than
  • The bundled web browser Internet Explorer is full featured and extendible with plug-ins. Almost every web site in the world is Internet Explorer compatible.
  • Better than MS-DOS for almost any given task.
By alang | # | Comments (11)
(Posted to Software Development and Rants)

Java Programmers Unite: Say NO To Python

11 PM August 19, 2003

In his comparison of Java and Python productivity, Steve Ferg notes that:

A programmer can be significantly more productive in Python than in Java. How much more productive? The most widely accepted estimate is 5–10 times.

Do really we really want programmers being 5–10 times more productive? Will this not equate to 80–90% job losses?

Any developer coding in Python is a traitor to his IT brothers.

By alang | # | Comments (20)
(Posted to Software Development)

Welcome To Another New Blogger

11 PM August 19, 2003

My friend Andrew is now blogging. He kicks off with a nice UI rant.

By alang | # | Comments (0)
(Posted to )

Ctrl-C, Ctrl-V: Time to Confess

11 PM August 16, 2003

Last July, I came across Matt Quail’s World’s best cut-copy-paste preventer post. I immediately inspected my own keyboard, and was bemused to find that the most worn keycaps – in order – were “C”, “V”, “X” and the left control key.

Right now I’m looking at my home PC’s keyboard, which is just six months old, and I notice that the “C” is starting to fade a little.

What are the most worn keys on your keyboard? Be honest.

By alang | # | Comments (8)
(Posted to Software Development)

Quick Linking

12 AM August 15, 2003

Charles gave me a login to his QuickLinks blog, published right on the front page of fishbowl. This saves me walking around to his desk and asking, “did you see that link to <X>?” several times a day.

By alang | # | Comments (0)
(Posted to Stuff)

Java Linux Applications in Production (Links)

11 PM August 12, 2003

To consider when deploying a Linux application in production:

  • Redhat Enterprise Linux. Ways to spend money. “Enterprise Linux AS” does 8 CPUs and 16Gb. “ES” does 2 CPUs and 4Gb. “WS” is for workstations and does not include “server applications, such as DHCP, DNS and ypserv”. Main difference between ES and WS is the amount of support.
  • Gentoo Linux. An impressive distribution, well supported by a large community of users. I think this distribution will start making inroads into the commercial scene in about 12 months time.
By alang | # | Comments (0)
(Posted to Software Development)

Converstational Links

10 PM August 10, 2003

I recently had after work drinkies with a few good friends. Many of the conversations seemed to finish with “I’ll send you a URL”. Here are some the batch I emailed on afterwards:

  • 100best-web-hosting.com. A list of ISPs. Contains the immortal words, “Top 100 Hosting Search… Found 185 Results”
  • XP Exaggerated Funnier than it should be. (Note: sadly, the site appears to be down just at the moment. Try again in a few days, if still b0rked).
  • Star Wars Songs You can’t properly call yourself a nerd if you can listen to these with a straight face.

The other good thing to come of that night… Keith and David each took solemn oaths to begin a blog.

By alang | # | Comments (1)
(Posted to Stuff)

How to Write Unmaintainable Code

10 PM August 10, 2003

Cedric reminded me of Roedy Green’sHow to Write Unmaintainable Code”. Roedy writes:

In the interests of creating employment opportunities in the Java programming field, I am passing on these tips from the masters on how to write code that is so difficult to maintain, that the people who come after you will take years to make even the simplest changes. Further, if you follow all these rules religiously, you will even guarantee yourself a lifetime of employment, since no one but you has a hope in hell of maintaining the code. Then again, if you followed all these rules religiously, even you wouldn’t be able to maintain the code!

From a comment Cedric left on one of my little rants.

By alang | # | Comments (1)
(Posted to Software Development)

Another Blog!

10 PM August 8, 2003

Neat! Keith is now blogging.

That’s two in one day.

By alang | # | Comments (0)
(Posted to Stuff)

Australian Geography

10 PM August 8, 2003

Charles on Australian Geography”:

“Below the line is New South Wales. Its capital, Sydney, has the big bridge and the opera house that you see on postcards. I live in Sydney now. It has a lot of pubs. Baywatch almost moved to New South Wales, but the locals told them to bugger off.”

By alang | # | Comments (1)
(Posted to Stuff)

Quality only happens...

1 AM August 8, 2003

From one of those internal company knick-knacks beloved of ISO9000 accreditation teams:

Quality only happens when you care enough to do your best.

This slogan stands out against other quality mottos I have seen over the years: it contains both truth and half-truth, on several levels.

By alang | # | Comments (2)
(Posted to Software Development)

Linux Driver for NetGear FA311 Network Cards

1 AM August 8, 2003

The correct Linux driver for the NetGear FA311 card is the National Semiconductor one. It is an option in the kernel “make menuconfig” utility.

I initially had some trouble with this driver; the card would only come half-way up, pause, then go down again. Tried the tulip driver, with no luck, and also rebooted a few times too. Eventually went to bed.

After a good sleep, I was able to notice that I had unplugged the ethernet cable from the card. As soon as I attached the cable, the card started to work.

Doh!

By alang | # | Comments (0)
(Posted to Stuff)

By and Large

1 AM August 8, 2003

My good friend David has started blogging, kicking off with an explanation of the nautical origins of his domain name, By And Large.

Welcome to the blogosphere, David!

By alang | # | Comments (0)
(Posted to Stuff)

Setting up DHCP on Gentoo

12 AM August 6, 2003

Finally figured out DHCP server on my Gentoo Linux router. I used the ISC DHCP package (emerge dhcp) Some helpful resources were:

PS: Gentoo sticks dhcpd.leases in /var/lib/dhcp, not /var/state/dhcp.

By alang | # | Comments (1)
(Posted to Stuff)

Unmaintainable Java Technique

9 PM August 1, 2003

Inspired by Cedric Beust’s thoughts on coding conventions, I present my contribution to the discipline of writing unmaintainable Java code. These hints and tips have been collected from a variety of Java projects, over many years.1 In the hands-on spirit of industry-standard, panic-driven development, this list concerns itself purely with low-level coding and cowboy-style pseudo-design techniques.

In no particular order:

  • Declare classes and methods ‘final’, for no good reason. If you are have trouble coming up with some bad reasons, here are two: performance, and distrust of the abilities of the developer who comes after you.
  • Initialise class members where they are declared, and then initialise them again in the constructor. This practice is without any defensible rationale.
  • Initialise class members with zero, false and null. The maintenance difficulties created are slight but gratuitous.
  • When coding with arrays, use null rather than a zero length array. This causes every for loop iterating over the array to need wrapping with if (array != null). A similar effect can be achieved when coding with collection classes.
  • Separate function from the data it operates on. Insist all data be stuffed into logic-free Java beans, and all logic into data-free utility classes. Have the courage to repudiate the OO-paradigm.
  • Design in such a way that programmers need to write code in the form of object.getX().getX(). For bonus unmaintenance points, ensure that getX() and getX() return different types.
  • Write 9 line if statements.
    if (something1()
        && something2()
        && something3()
        && something4()
        && something5()
        && something6()
        && something7()
        && something8()
        && something9()) {
                ...
  • Here is a trick for storing numeric values in database rows. Allow only positive values to be stored into the row. If the value is allowed to be negative at runtime, have the programmer indicate the sign of the value with a flag stored elsewhere in the database row.
  • Use as many EJBs as possible, wherever possible. Some ideas to get you started: each table in your database schema can support at least one CMP EJB; a stateless session bean makes an ideal interface, so use one to front each CMP EJB; finally, tie together your entire system with a further layer (or two!) of EJBs.
  • When coding long constants, use a lower-case ‘l’ in preference to upper-case ‘L’. Even with plain font such as Courier, 1l can cause all kinds of havoc. And with proportional san-serif fonts being supported by more and more IDEs, things can only get less clear and more unmaintainable.
  • Never use a raw boolean values in a condition. The classic example is ”if (number.isEven() == true) {…”, a trifle which is easily ignored by a maintenance programmer. However, given the right opportunity and a small amount of thoughtlessness, this simple device can finesse one line of code into five:
    if (number.isEven() == true) {
        return true;
    } else {
        return false;
    }
  • It is a little known fact that many commercial J2EE servers are quite resilient to references to unused or non-existent classes and methods in configuration files. Recently, while working on an EJB with three finder methods, I was pleasantly surprised to find five finder method definitions amongst the ejb-jar file extensions.2 Experiment to see what kind of cruft your app server allows.
  • Unusable programmatic interfaces should be natural consequences, not brute-force design decisions. When developing library code, concentrate on least-effort implementation, performance, or—if all else fails—internal elegance.
  • “Ctrl-C, Ctrl-V” is your friend.
  • And finally, make sure that at least one of the applications classes exceeds five thousand lines. This is especially important if the IDE in use cannot handle such large files gracefully.

PS: Most of these are not fatal—they are simple to correct, and would be caught in even a cursory code review. Even so, I am thankful that I haven’t come across a single project that has put all of these into practice.


1 It’s just a bunch of notes really, but there would be too much irony in any more formal presentation.

2 I couldn’t be bothered to work out which two were not being used, so I left them all there while I added a new one.

By alang | # | Comments (11)
(Posted to Software Development)

Connor's Story

9 PM August 1, 2003

My son Connor is five. I asked him about his week at school.

Connor’s favourite thing for the whole week was ‘Toy Time’. Every toy time he played with the Duplo; he says he “never takes a break from it.” Today Connor made a boat. The friends who helped him were Jarrod and Thomas.

The boat was not very big, but it was very long. It went across the whole room. Connor tells me they used it as a boat, but it actually was a bridge.

By alang | # | Comments (0)
(Posted to Stuff)
© 2003-2006 Alan Green