The Drugs Are Good
Demazin is a wonder drug as far as I’m concerned. I’ve been sniffling and struggling to breathe all week until today I gave up and went to the chemist to get something, anything, to make it stop. He gave me Demazin and some 7 hours later I’m still breathing easy (it only claims to work for 6 hours). Of course, from about the 5 hour mark it seems to make you very drowsy so I’m very much considering just crawling into bed and going to sleep even though it’s now only 4:30 in the afternoon.
Bachelor Pad
I was just wondering what to have for dinner and realized that I just don’t give enough credit to the good folks who keep me fed, so having grabbed a quick bowl of cereal (Sultana Bran for what it’s worth) I came back upstairs to investigate who invented that traditional food of the bachelor – 2 minute noodles. I couldn’t find anything even vaguely related to that, but I did stumble across this amusing thread. Among my favorite quotes:
Trackback Fixes
Just noticed that ever since I moved trackbacks onto the same page as the article (ie: got rid of the stupid little pop-up window), trackbacks weren’t being displayed. Apparently MoveableType doesn’t rebuild the page when a trackback is registered. Oh well, a quick php ‘include’ later, I’ve got the trackback page being included directly and trackbacks should be working normally again. Shame, I did find Brian McCallister’s pseudo-trackback somewhat amusing.
import humor.bad.*;
I may have missed the mark on my attempt at an over the top, yet at least vaguely humorous reaction to Marc’s comments about explicit or implicit imports in Java. The golden rule of coding styles should apply: do what the rest of the team is doing. Having said that, I have to point out a couple of things in response to Marc’s update:
Code get’s read (at least) 100 times more then it gets written. (Forgot where I catched this quote) So the bit of time *you* win in typing is asking for a tough pay-back on wasted time on reading/interpretation. Please abondon the idea that you are doing someone a favor. Code gets read 100 times more than it gets written, but imports should never be handled by humans at all. Seriously, when I read Java code I never look at the import statements. Why would I? My IDE can read them, parse them and use that information far more efficiently and accurately than I ever could. It doesn’t care if explicit or implicit imports are used, it doesn’t care if it’s seen that particular package before or not. When I want to know what package a particular class is in I just hover the mouse cursor over it’s name and my IDE tells me the full package name. If I want to see the source of that class I control-alt-click the name of the class or usually the name of the method I’m interested in. The use of implicit or explicit import statements only affects readability of those people who don’t have a decent IDE and those people are sacrificing so much in productivity that the type of imports used are the least of their worries. For the record, both emacs and vi can be configured to use ctags and get an understanding of the contents of your project’s source code, so you don’t necessarily have to abandon those if you find their keyboard shortcuts make you more productive. Emacs users however will probably find that most IDEs support emacs key bindings anyway.
The Problem With Our Schools
I’ve always been very critical of the fact that private schools in Australia often receive as much or more government funding than public schools and particularly of the fact that it’s getting worse, not better. This comment I recieved in a private email really hit me though:
but as i said… mega mega awesome…. as far as cleveland musicals go coz we don’t really have a budget seeing as it is a public school etc. It’s just wrong that some of the private schools around Brisbane have so much spare cash around that they have professional quality theaters and even full size pipe organs whereas the public schools are struggling to put on a musical at all. There are kids in those public schools that are absolutely passionate about music, arts, theater as well as sport and academia but they aren’t getting the same opportunities and experiences that “rich kids” get.
import flamewar.*;
Marc Portier discusses the current recommended practices for import statements in Java. This is a never ending argument that is so completely irrelevant to development that only fools get involved in it. So let me jump into the argument. The rule is very simple, always use .* until you hit a conflict then add the appropriate specific import. Mostly with my code that means you wind up with:
import java.util.*;
import java.util.List;
import java.awt.*; Why is this rule in place? Because my time is more important than some fool who doesn't either use a half decent IDE or know the APIs well enough to guess where a class is. I don't think about import statements when I'm coding – I've got better things to think about. Every time I hit compile and get an error back (or get a red squiggly underline in the code) that amounts to “You're missing an import statement” it's a waste of my time. I hit control-shift-O the import is added and I get back to being productive. If I use specific imports that interruption happens every time I use a new class, if I use .* imports, that interruption happens every time I use a new package. The interruption is even worse for the people who don't use an IDE because they have to manually navigate to the top of the file, add the import and then find where they were again. I'm doing them a favor! If you don't like my rule, that's fine. Just hit control-shift-O or your IDEs equivalent and it will reformat the imports to however you prefer them. While you're there you may want to hit the reformat button and the position of braces will be what you want too. What? Your IDE doesn't do that? Tough.
Egos And Opensource
It’s incredibly sad when people let their egos get in the way of developing something useful. I haven’t run into this in Apache yet but I’m seeing a really bad case of it in the on-going quest to create an opensource replacement for HyperCard, Apple’s now abandoned rapid application development system. There are now four or five different projects each struggling to get something up and running, none succeeding because the developer resources are stretched so thin. Even my latest efforts to get them to work together by saying I’m happy with any language, any architecture – just get a 1.0 out the door has been shot down because people are so insistent on writing it all themselves and doing it precisely their way that they’ll cut off their own nose to spite their faces. I’m very much on the verge of giving up on the whole idea to be honest. I’ve got enough skills in Java that something like HyperCard isn’t exceptionally useful to me anyway – I’m not sure I should waste any more time trying to create something like that anyway. It’s sad though, HyperCard is the best way I’ve ever come across to get people interested in programming and start them learning and thinking about what their computer can really be made to do. No other language provides that kind of opportunity for creativity and power to Joe User.
Profiling and Optimization
Recently there has been a very interesting and at times heated discussion about optimization on the HUMBUG mailing list. It’s worth reading the archives (look for the “Which is better?” thread) to get the whole picture.
There were two main topics being discussed:
- Whether you should look for optimizations as you code and implement them if they don’t affect readability and
- Whether or not memory allocation in Java is slow and thus efforts should be taken to avoid it.
Issue 1 – Premature Optimization
Inside The Loop or Outside The Loop?
Most people argued that premature optimization is the root of all evil, and that in Java particularly it’s a waste of time because you almost always predict what the compiler and the JITC are going to do incorrectly. There were a couple of people (one in particular) who thought that optimizations that didn’t affect readability were a good idea. The example:
To The Shows!
So I made the mistake of checking out VISA Preferred Seating, promptly followed by QTIX, promptly followed by spending money and wanting to spend more. I’ve booked tickets to go see The Carer staring the delightful Charles “Bud” Tingwell. I very nearly managed to go see it in Lismore on my recent road trip but the uncultured locals didn’t even realize they had a theatre let alone be able to give me directions to get to it. Sadly the fact that noone knew there was a theatre would have significantly improved the chances that there’d still be a ticket left, but alas despite searching every publicly available map in the town and driving around for an hour or two, I couldn’t find the theatre either. The other shows I’d like to see are:
Stupid Systems
Every so often you come across a system that is just ridiculously stupid. Telstra’s</a billing system is one of these. It means well, but just gets in the way. The particularly problematic feature is the fact that if checks to see if you’ve already paid the particular bill you’re trying to pay and warns you if you already have. That would be great, except for two major flaws: 1. It warns you even if you haven’t paid the bill already. 2. The “I know what I’m doing and you’re just a stupid computer” button, which suggests it will process your payment anyway, just loops you back round to the warning page that you may have already paid the bill before. This makes it impossible to pay your bill online. So I pick up the phone and fight my way through their phone payment system, and finally after narrowly avoiding being bored to death by the slow talking recorded voice, I successfully pay my bill. That slow talking recorded voice then tells me how much faster it would have been if I’d paid online. Sigh.
The Proprietary Catch Revealed
It seems that the proprietary hooks in .Net are becoming more and more clear. This Netcraft interview with Miguel de Icaza ends with the comment:
Longhorn has kind of a scary technology called Avalon, which when compounded with another technology called XAML, it’s fairly dangerous. And the reason is that they’ve made it so it’s basically an HTML replacement. The advantage is it’s probably as easy as writing HTML, so that means that anybody can produce this content with a text editor. This is the great proprietary catch that ties .Net solely to the Windows platform. No language is useful without a solid set of libraries to work with and the best libraries for .Net (XAML and Avalon) will be Windows only and managed solely by Microsoft, not a standards organization. It’s not like people haven’t warned about this before though…. Some people still think they can get a good deal out of the devil.