Showing posts with label tech. Show all posts
Showing posts with label tech. Show all posts

Sunday, August 5, 2007

Dude, I Got a Dell!


I've been saying for years that if someone would just sell a Linux laptop with full hardware support out of the box, and no Windows tax, I'd buy it. I can't believe it was Dell that called my bluff, but there you are. Now I'm the proud owner of a Dell E1505N, and to my surprise, I really like the thing.

It's not particularly heavy. (It's heavy compared to my snow-white G3 iBook, with which I have a love/hate relationship, but that's an unusually light laptop. By normal laptop standards, the Dell is not heavy at all.) It runs a shade warm, but not hot. It's zippy, it's quiet, and the 3-D graphics run smoothly. (And that's with the Intel 950 GMA; I skipped the NVIDIA option to save money and so that I could stick with free drivers as much as possible. I use 3-D only for screen savers anyhow.)

The screen is big, bright, and gorgeous -- razor-sharp. I sprung for the 1440x900 display, and I'm glad I did. And I got the upgraded, 9-cell battery, which seems to be giving me at least 4 or 5 hours of battery life when sitting on the couch and surfing the Web. They managed not to make it feel or look cheap, and, importantly to me, the keyboard is spacious and has a nice clicky feel.

The nice part is how everything Just Works. The 3-D acceleration, the little scroll-bar areas on the trackpad, the volume and brightness keys, you name it. It even ships with some goodies I didn't expect -- FireWire and an integrated flash card reader.

For some reason, though, even though I got the 1440x900 display, the screen resolution is set to 1280x768 out of the box, and you can't simply increase it. Still, it was easy to find the fix on the Web, so I had that taken care of in minutes. (To save you the Googling, just "sudo apt-get install xserver-xorg-video-intel", then restart the X server.)

The only other thing that didn't Just Work was connecting to my wireless network, and that's not really Dell's fault. The wireless card works perfectly -- I mean, the drivers do -- but connecting it to my WPA2-protected wireless network was a bit of a pain, because WPA2 isn't supported by GNOME's network GUI tools. (Nor by KDE's, as I discovered when I installed the Kubuntu packages.) I don't mind that terribly; it was a fun learning experience for me, but it might be too much hassle for some people. If I'd had a WEP-protected or unsecured wireless network (not that there's much difference, given WEP's weaknesses), the wireless configuration would have been as easy as everything else.

And it cost me only about $1100, including tax and shipping. Displaying my usual flair for good timing, I dithered over buying it just long enough to miss the $200 introductory discount. But it was well worth it at full price; I'm very happy with my purchase. Dell more than earned their money.

The laptop comes pretty close to being a Grandma Experience -- that is, something you could buy for your grandma and expect her to get along without much help. At least, without needing more help than she'd need for another OS. The screen resolution and wireless issues I mentioned above are the only things I've found that don't make the cut, and even those might not be showstoppers. The stereotypical grandma doesn't know from screen resolution and isn't likely to have a particularly advanced wireless network setup -- and if she does, she's likely to be able to find and apply the fixes as well as I did.

My only other gripe is that you must manually restart wireless networking when you wake it back up from Suspend or Hibernate. Presumably, that will get fixed at some point, and it's not hard to work around it in the meantime. But, being used to Mac laptops, which get this (and so much else) right, it is a bit annoying. To be fair, I expect this isn't Dell's fault so much as it is Linux's -- and maybe there's an easy workaround; I haven't had the laptop long enough to go looking.

I won't quite say Dell knocked one out of the park with this system, but it's at least an inside-the-park home run. Despite a few quibbles, I really love the box and consider myself a very happy customer. Well done, Dell!

Alas, the E1505N apparently is no more; they seem to have replaced it with the Inspiron 1420N, which looks even better. Yep, I've got good timing, all right. Well, I might just have to buy that one next.

Thursday, April 12, 2007

Free Java Compilers for GNU/Linux

For some time, free Java compilers for GNU/Linux have been disappointing. (As with anything in the world of free software, I want to moderate my criticism: if you really don't like something, at least you can fix it, and besides, you should be only so rude about stuff you get for free.)


Where We Stand

The state of things as I see it is this:







CompilerSpeedWarnings/ErrorsLanguage Coverage
javacSlowLousyGreat (1.5)
gcjMediumGreatLousy (1.1/1.2)
jikesBlazing fastOutstandingGood (1.4)
ecjPainfully slowVery goodExcellent (1.5)


So each of these has at least one problem that will drive you crazy. Sun's own javac is slow and gives you the same error message ("unknown symbol") for practically everything. GNU's gcj supports only an older version of the Java language: no generics, no enums, etc. IBM's jikes, too, is falling behind on the language feature front, and is apparently no longer maintained, so that's only going to get worse. Finally, the Eclipse project's ecj is so slow, you can actually brew a cup of java every time you run it.

(Kaffe's compiler, by the way, is just plain hopeless.)

As a result, I wasn't really happy with any of these. For a long time, I stuck with jikes as being the overall best contender, but I was increasingly unhappy about its lack of support for generics, enums, annotations, and other new language constructs.


Finding a Better Solution

When I looked at the alternatives, I was least repelled by ecj. If only there were some way to make it faster ....

Happily, there is. A little investigation showed that the problem was in the JVM startup time. Ecj itself is written in Java, and thus it must start up a JVM every time it runs. So a native-code version of ecj has a chance of being the Holy Grail of free Java compilers: fast, with good feedback and up-to-date language support.

And there's even a way to produce such a thing: gcj. Gcj can't compile ecj itself, because ecj's own code uses language constructs that gcj doesn't support. But one of gcj's many nice features is that it can compile a .class file, or a .jar file full of .class files, to native code. After a bit of experimentation, I was able to compile ecj's .jar files to native code. The resulting compiler is about as fast as jikes, offers feedback almost as good as gcj or jikes, and supports the language as well as javac. It's a winner.


Regrets

There are still some things I miss about using jikes:
  • Spell-checking. If you mistyped a symbol (a method name, variable name, class name, etc.), jikes offered reasonable alternatives. If you accidentally typed mystring.substrng(...), jikes would suggest mystring.substring(...). Its suggestions were nearly always correct, and the feature was a huge time saver. Ecj has nothing like it.
  • Jikes also behaved better when compiling multiple files. It correctly detected and compiled dependencies, didn't care if you specified a file more than once on the command line, and would compile file N+1 if file N didn't compile (more useful than you might think). Ecj does none of this.
Still, a natively compiled ecj is a really nice option, definitely the cream of the current crop.