This is the first in a series of first impressions that I’m going to write each time I learn a new language or start using a new set of tools. I hope to keep track of what I thought and reexamine each in a few years. It will be interesting to see how my opinions change over time. This post is about Java. As I’ve been working in Python for the last few years, that colors my opinions about Java quite a bit.
Category Archives: essay
Farscape’s loose ends
I just rewatched Farscape’s Peacekeeper Wars, the miniseries that followed the fourth season. The show was intended to run for five seasons, and the story was left unfinished after the fourth. The miniseries tried to finish up the story, but it left a lot of loose ends. (Don’t keep reading if you haven’t watched all of Farscape — the rest of this post contains some major spoilers.)
You’re a crappy programmer, your language sucks, and I’m better than you
I agree with all twelve of Damien Katz’s Signs You’re a Crappy Programmer (and don’t know it). I’d even add two more signs:
- You want to reinvent the wheel.
You look forward to implementing all the building blocks of your program without first checking for libraries and packages that can do most of the job for you. You are so excited about building an object-oriented email-sending library that you don’t even notice that the language you’re using already has all the email-sending functions you’ll ever need in its standard library. This is a failure to focus on getting the task at hand done, and it’s also a variation of talking just to hear the sound of your own voice. Get over it. - You use language constructs without really understanding what they are for.
You use multiple inheritance from a large set of empty classes, or multiple empty interfaces, as configuration “flags” for your classes, and then test for the flag’s presence withissubclass()
. Or you encapsulate related data into an object, and then write a function that takes that object as an argument and operates on it, instead of a method on the object. Or you buffer input and output between short strings and regular expression operations. You are just like those annoying people who simultaneously overuse and misuse some big word like obsequious or audacious. Get a manual, and learn the language you’re speaking.
Revolutionary and wrong
What Larry Wall is doing (or has been doing, for the last seven years) with Perl 6 is revolutionary:
There needs to be a universal root language, and ways of warping that universal root language into whatever dialect you like.
It’s incredibly valuable to examine all the ways in which a (programming or natural) language can vary. I’m sure they’re learning a lot that will be useful to language designers everywhere. Perl 6 will undoubtedly be a great tool for quickly prototyping new languages, too.
It’s also wrong for a production language. The last thing I want in a programming language is diversely variable and configurable syntax and semantics. Sitting down to maintain or debug someone else’s Perl 6 sounds like a nightmare. Not only would you have to figure out what they are trying to say, you’d have to figure out what dialect of Perl 6 they were using, and exactly how that dialect works.
For this reason I’d tend to avoid Perl 6 for new projects, nor would I want to join a Perl 6 project mid-stream. If I had to work in Perl 6, the first thing I’d do would be to convince the entire team to stick to the standard dialect (or maybe some other, popular dialect) and never re-configure it.
I doubt we’ll see much traction for Perl 6 outside of research settings. The benefit of picking PHP and Java over Python or Ruby is that it’s easier to find PHP and Java programmers, than it is to find programmers for even the relatively popular Python or Ruby. Trying to find a programmer who knows not just Perl but Perl 6 and your dialect of Perl 6 is going to be even harder.
Happy Birthday from LiveJournal
I woke up this morning to five identical emails from LiveJournal. Here’s my LiveJournal inbox:
What’s wrong with this picture?
- I don’t ever need to be notified of my own birthday. It’s on my driver’s license if I forget it.
- I don’t need to be notified of anyone’s birthday more than once. And five times in two hours? Really excessive.
- I never asked LiveJournal to share my birthday with anyone, yet upon further investigation, I found that my birthday was set to be “shared with everyone.” Birthdates are often used to verify identity; they are a common target of identity thieves. No site should ever default to sharing user’s birthdates (or any other private information) with the universe. One nice way to mitigate this threat is to not include the birth year, which is not important when reminding people of each other’s birthdays.
- The messages show my birthday as the nonexistent “December 00,” even though I entered my birthday as January 1st. (I never enter my real birthdate on any site; January 1st works because it’s easy to remember, and anybody who actually knows me will know January 1st is not right.)
- If I actually wanted this feature, it would be nice to have more than two days to find a gift for someone.
I don’t actually use LiveJournal; I’ve only occasionally used my account to post a comment. I assume this is not indicative of the quality of the rest of their site.
Maps & tubes, tunnels & movies
This Transit Map of the World’s Transit System, a promotional poster for Transit Maps of the World (amazon) by Mark Ovenden, discovered over at my new favorite blog, Strange Maps, cleverly shows all of the cities in the world with rail transit systems connected in the style, and the layout, of the London Tube.
Strange Maps has great stuff, most of which I’ve seen before. The classic Newyorkistan, pretty The Colourful Side of the Moon, The Blonde Map of Europe for those gentlemen who allege a preference, the disturbing Europe, If the Nazis Had Won, Chris Yates’ A Diagram of the Eisenhower Interstate System, C. Etzel Pearcy’s The Thirty-eight States of America, and XKCD’s Online Communities Map.
They should link to my Seeing stars post about the historical designs of Moscow transit maps. And they don’t yet have The Great Bear, the Rude Map, or the Convenience Map.
I also stumbled across a reference to The Tunnel, a 1935 science-fiction film about the construction of a tunnel from New York to London. The Tunnel joins Cargo 200/Груз 200 and the short film Microgravity on my list of films not available on Netflix.
So there you have it. The internet’s not done yet. There are still some things not organized, categorized, or digitized.
Facing pages
Ars Technica would have you believe that the lack of facing pages in “e-book” gadgets like Amazon’s Kindle is the missing killer feature.
The solution to this problem is obvious and straightforward: design all e-book readers to display pairs of pages in the traditional, facing-page format in which books were designed to be read.
Installing VMWare Workstation 6.0 on Ubuntu 7.10 “Gutsy”
As a general rule, I don’t install applications on my system outside of the package manager. It litters your system with mysterious files that cannot be traced to any particular piece of software, and eventually the files will conflict with packaged files or other manually-installed software. Therefore, Ubuntuforums’ instructions on how to install VMWare Workstation 6.0 are useless to me. But it turns out it’s relatively easy to convert VMWare’s .rpm to a .deb and install VMWare inside the package manager. Here’s how:
The dark future of Mac OS X code-names
There’s a really serious issue that Apple’s facing with the future of OS X: they’ve only got two more Big Cat names to use as code names for OS X versions: Cougar and Lion.
Why XML is an inferior data-interchange format
XML is a poor format for exchanging data for a few reasons.