The Mac user's last words: "More RAM!" ;)

Mac Mini; CC-licensed; Source: http://flickr.com/photos/darice/85759173/After using the Mac Mini for quite a while, I switched my primary Operating System to Linux/PPC (more exactly, Ubuntu Linux, but this might change over time).

Meanwhile, I found out that Java is a pain on Linux, especially on the PowerPC architecture. The Sun Java packages are not available, so the only ones you can use are the GNU Java Compiler or a commercial Java variant from IBM. As the GNU version is very unfortunately quite slow (and some applications do not even run on it, for numerous reasons), I managed to install the latter. For that, I followed a Java PPC Howto in a Ubuntu forum. Quite frankly, the fact that the howto is in Chinese didn't make the process any easier, but I managed to read the important information out of the few code snippets on that site.

Now, the Java programs I want to run work quite flawlessly most of the time. Unfortunately, one of the components seems to have a memory leak. And I am not quite sure if it's the Java JRE or the (always very memory-greedy) Java-coded software I am using. Recently, it even filled up my whole system memory, including Swap, preventing me from accessing the system for almost five minutes, until the Java program crashed and I was able to work again. The system load had reached the truly magical number of 49 at this point. At least, the whole system did not crash: Respect to the stability of the PowerPC Port of the Linux OS.

In any case, even though I really like Linux on my Mac, I wanted to use OS X at some time again. But since "it is just no fun to run OS X with less than 1 Gig of RAM" (German quote), I ordered some this week. This means, I will address the challenge of opening the Mac Mini soon.

Especially as the hard drives shipped with the Mini are not pretty fast either (and therefore the Swap space is even slower than it "usually" is), I expect the upgrade to be a true relief -- because currently, the constant swapping of memory content to the hard drive and vice-versa is the most annoying thing about the little barebone sitting on my shelf.

I'll keep you posted.

P.S.: The "last words" up there I just made up myself, but they are an intentional reference to the last words attributed to the German poet Johann Wolfgang von Goethe: ("Mehr Licht" = "more light"), just in case you didn't notice ;)...

Read more…

A Mac Mini does not only look cool, it is also very, very quiet and therefore, recently I got one :) So far it works pretty well and I like it.

However, my opinion of OS X changes over time: When I don't use it or see somebody else working with it, I like thinking of the "eye candy" user interface and the easiness of usage. Most of the stuff in there "just works". And, thanks to fink and other extensions, the underlying UNIX (named Darwin) is quite mighty, too. No clicking around in the GUI if you want to grep for something in a couple of code files somewhere. And it does not only work, it also looks good at doing that. In other words: OS X is fun.

Most of the time. <!--more--> When it comes to details, it can become pretty annoying. Everytime I use it, I almost break my fingers using the totally unintuitive keyboard shortcuts that usually involve pressing shift, apple and some character that has nothing to do at all with the name of the function that is actually executed. What also drives me nuts is that weird spinning beach ball that appears when I do some sort of operation like accessing a network device that is currently unavailable in the OS X finder. It stops every single finder window (and some of the other applications, too) until the network device responds?!

Not to mention the response speed: I consider 1.5 GHz and half a gigabyte of RAM at least enough to have three applications open at a time. When I open another Firefox tab, though, everything apparently starts to be swapped to the hard drive. Hello? Where has all my memory gone?

To cut a long story short, just as much as the Mac Mini (the hardware) itself is what I was looking for: small, quiet, yet enough hard drive space and wireless as well as wired connections... as much the operating system keeps annoying me.

I have no problem with a GUI that "just works" (as opposed to Linus Torvalds ;) ), but I want it to be at least quick enough for me not to fall asleep when doing something "usual".

Therefore I decided to give Linux on PPC a shot (the "Ubuntu for PPC" CD I picked up two weeks ago in Portland seems to be predestinated for that). It will be a dual-boot installation (just as with Windows on any of my other machines back home). The biggest problem that used to be there was that the Airport Extreme WiFi card was not supported at all on Linux. Big problem, as I use WiFi exclusively in my apartment. But this problem got solved just two weeks ago, too.

Another option would be to give Gentoo Linux a try, especially because a few of my colleagues would probably help if I asked them about it. On the other hand, the Mac is still not the fastest machine and I am not quite sure if I want to compile all of my stuff myself... you know: ("Ubuntu is an ancient African word and it means I'm sick of compiling Gentoo" - Jeff Waugh ;) )

I will let you know about how much progress I've made.

Read more…

NSLU2; source: nslu2-linux yahoo groupRecently, I bought a Linksys NSLU2 network attached storage device and installed Linux on it. I have it boot over a 64 MB USB flash stick that I had to spare and I connected a ext3-formatted USB harddrive to it. It works flawlessly with Samba, serving the USB drive to all of my client OSes.

However, as I only need the USB harddrive maybe twice a day, I did not want it to run all 24/7. The main reason is, of course, that it wastes electricity, and additionally running all the time might have an unnecessary impact on the longevity of my drive. Especially because it is used only now and then.

Almost all the pages I found about this on the net mentioned that currently (and maybe forever) it is impossible to have a spindown time for USB harddrives, due to the SCSI driver emulation in the Linux kernel.

Today, however, I found an interesting thread in the nslu2-linux mailinglist. Robert Demski has provided a kernel patch as well as a binary package for the OpenEmbedded system (which is the base for the OpenSlug distro).

I managed to patch my openslug image accordingly and now USB spindown with scsi-idle works flawlessly for me with a Kernel 2.6.15-2. Once it is patched in the main images, you are good to go; If you want to build your own flash image right now, instead, here we go: <!--more-->

  • To add scsi-idle spindown functionality to the OpenSlug, we have to set up a cross-compile environment for the NSLU2 as shown on the NSLU2 Development Homepage as well as the Master Makefile documentation.
  • Unfortunately, the whole process is very, very poorly documented so that it is pretty hard to find out how to patch the kernel and simply have the flash image rebuilt. But once you get it, it's not that complicated anymore.
  • So after we got all required packages, we run make setup followed by make build-openslug-image.
  • Then we have to apply kernel-patch-scsi-idle.patch provided in the file section of the nslu2-linux yahoo group (member access only...). We find the kernel files in openembedded/packages/linux/nslu2-kernel/$version. The patch must be copied in here.
  • Now add the patch file name to the BitBake file for your kernel version: nslu2-kernel$version.bb, located in the packages/linux directory.
  • In order to have the kernel rebuilt, we have to remove some files from the stamps directory. This dir contains dummy files that indicate if a specific step was already taken by the make process. We remove the files nslu2-kernel-$version.do*, so that the whole kernel package will be patched and rebuilt.
  • Then run a make build-openslug-image again out of the cross-compile environment's base directory. It should tell you that it compiled the kernel package again and it built a new flash image.
  • You will find the flash image(s) in openslug/tmp/deploy/. Please make sure you fetch the right (newest) one as there are most likely at least two images in there.
  • With that image you can reflash your NSLU2.

Afterwards, you want to install the scsi-idle package also provided in the executables section of the nslu2-linux group. Afterwards, you can configure the idle timeouts in /etc/default/scsi-idle and start the corresponding daemon. It should spin down (and up) your hard drive as intended!

P.S.: The kernel patch will be included in the main OpenSlug images soon. Update: I also sent in a patch for the OpenEmbedded source tree in order to have the scsi-idle package available in the main tree shortly.

Read more…

We are using DB_DataObjects as the database abstraction layer for Maintain. It's a pretty convenient way to access databases, in most cases preventing you from writing ugly SQL strings at all. So far, so good.

However, when handling lots of database entries (in my case a couple of ten thousands), you might easily run into PHP's memory limit. Imagine the following scenario:

$books = DB_DataObject::Factory('books'); $books->type = 'novel'; $books->find(); while ($books->fetch()) {     do_something(); }

It will magically query your database for you, taking some memory for caching and, when you made your way through all of the returned records (what should actually happen at some time, considering that you have got a while clause here), it should destroy the cached information, setting the memory free that was used for it.

It does not.

Imagine the above code sample being inside another while() statement. It will start constantly leaking memory until it runs into PHP's memory limit. In my case, the script finally took 56 Megs of space.

The solution is to run $books->free() after you've iterated through the records, even though the associated man page claims: "DataObjects stores result sets as a private global variable, normally this is free'ed after you have run through the results, or at the end of the request.".

By that, I cut down the memory usage of my script to barely 3 1/2 megs. Sweet! :)

Update: Bug filed. Update 2: The bug was fixed and a new, stable release is available now. Go ahead and upgrade :)

Read more…

I just read about CGI::Ajax for Perl and was curious if there was something like it for PHP already?

And, look what's there, an alpha version of a PEAR AJAX library was released just this week.

Cool. We should have an eye on this as it could make AJAX stuff in PHP much, much easier.

(via Jeremy Zawodny)

Read more…

Oh, short notice:

The German Telekom seems to have hired the same "web designer" for the administration interface of their WiFi routers, too. I just tried to change basic settings like IP address and WPA password, which turned out to be a quite complicated task as the admin interface was overly filled with useless JavaScript stuff as well as a couple of hard redirects to the IP of the router.

I imagine the "non-functional requirement" the code writer had to fulfill was something like: "Make remote administration of this device as complicated as possible". This is especially sweet if you want to access it from a distance of a few thousand miles...

Anyways, with a few tricks I managed it finally.

Thank you for wasting my time, German Telekom...!

Read more…

If there was an award for the largest company with the most unusable website, I would consider recommending T-Mobile for the award.

The American cellphone branch of the German Telekom obviously doesn't like its compatriots in the U.S. - or maybe they don't like their customers at all.

One might guess, ordering some new minutes for a prepaid cellphone card should be a common task. Far from it! Not only that I had to switch from Firefox to MSIE (and this hurts, believe me) because the "okay" button didn't show up (MSIE shows a big red cross meaning "image not found" that you can click instead). When I proceeded entering my data, the page was reloaded with every click on one of the numerous dropdown fields, constantly reminding me of the fact that there are securely encrypted and unencrypted parts of the page mixed. - click no, I do not want to display insecure parts of the page.

After I finally entered my whole address - the German one, using the dropdown box to select Germany, then, after another reload, selecting the only state "other - German" in the State dropdown box - a nice little Javascript information insists on: "Please choose a valid state".

So I have to go back and re-enter all the information again with an American address and I wonder if anyone has ever tested the site before making it available on the net.

Wow. This can't be coincidence. T-Mobile must virtually have spent a tremendous amount of money to build a website with so many obvious errors that it must be intentional. I seldomly got pissed off as much by a company website as today.

Read more…

Today I went to a tiny little ACM workshop at OSU. One of the other OSL guys1 was talking about building accessible web sites with CSS.

Pretty interesting stuff. And, even though I should already know all that, I am always glad to hear stuff from different perspectives.

Pencils, CC licensed from flickrHowever, it make me wanna play on some CSS again. I wanted to rebuild the website of my high school graduation class since some months anyway. After a weird incident2, I had to take the news script off the site, making it more or less static and not truly informative anymore.

At the same time, I wanted to try out Textpattern as a somehow lightweight, but also mighty content management system. A friend of mine really prefers it for her websites (therefore recommended it to me more than once), and she recently did some very nice CSS magic on her blog.

For today, I only made my laptop carry a lighttpd webserver and snagged some old website source code. But I am going to hack on textpattern soon3.

Thanks for bringing "CSS mojo" to my mind again, Morgamic!

Ah, if you want to read more about it, Mike made a nice "Accessible CSS" wiki page with quite a bunch of useful links for you.

Oh, and thanks for reading the article with the most footnotes I ever made ;)4

[1] by the way, I should bug someone to include me in this list - have to take a photo, though :) [2] some script kiddie defaced the site through a security flaw in the news script we were using. [3] maybe on the OSLUG hacking social? If I go there once after band rehearsal on wednesdays... ;) [4] I'm serious!

Read more…

How cool was that?

To celebrate 100 million firefox downloads, the OSU LUG and the NASA launched a weather balloon today called "Firefox One". I've been there on the MU quad with quite a bunch of other people who were celebrating the Firefox jubilee (or just thought "cool, what a nice balloon").

The balloon is a latex thing weighing something like 3 kilograms in total. It is filled with helium and will go up to the final height of 100 000 feet, which is right at the edge of space. During all its flight, the digital cameras mounted to the balloon will take pictures of where they are. Eventually, when going too high, the balloon will rupture and on a parachute, it will go back down to the earth. Someone will hopefully find it and call the number that's written on it.

And then - there will be photos of "Firefox One"'s fantastic journey :) I will keep you posted on that.

I made quite a few pictures during the launch today, too. I will post them as soon as I get home later.

The whole launch was also recorded by the Oregon State Webcam by the way. But as quite a lot (millions?) of firefox users clicked on it in order to see Firefox One launch, I am not quite sure if anyone was able to see any picture ;)

Go Firefox!

Update: I uploaded some photos on my photo page (see: USA -> 2005-10-22 Firefox...)! However, there are even more photos on the LUG website.

Read more…

That's kind of nice. Two very nice pieces of software hit "magical mile stones" these days.

My favorite web browser Firefox finally got unbelievable 100 million downloads. Celebrations! It's one of the most wonderful open source software products I've ever seen. Go spread the word! :)

Another nice one - closed source though - is the voice over IP service Skype (not a google or yahoo toy, by the way, but soon an eBay one) that will finally break the four million users mark this week. In my opinion, it is still the best possibility to call home so far. It works unbelievably smooth even though the people I'm usually calling are roughly 5000 miles away.

So, it seems to be totally the right moment for me to get employed at the OSU Open Source Lab soon. It's a good week, really :) w00t!

Read more…