Electricmonk

Ferry Boender

Programmer, DevOpper, Open Source enthusiast.

Blog

Dvorak at it again…

Tuesday, May 17th, 2005

NOTE: John C. Dvorak is NOT the inventor of the Dvorak keyboard layout. That would be giving the guy to much credit.

In his latest brainspasm misfit, which was accidentally mistaken for an article by PCMagazine.com, John C. Dvorak goes at it again. More ludicrous nonsense by Dvorak! Read all about it! This time Dvorak takes a pretty weak stab at the same Linux community that ridicules him each time he spouts his nonsense into something resembling a tech-column. Here, check it out:

Linux Community Implodes
By John C. Dvorak

The weirdest thing I’ve seen lately has been the craziness provoked by a feud between tech writer Maureen O’Gara of LinuxGram/Linux Business News and her apparently bitter rival, blogger Pamela Jones (PJ) of Groklaw. It began some time back when the two exchanged barbs over intimations that Jones was somehow a stooge for IBM in the SCO-Linux battle and that O’Gara was somehow a stooge for SCO.

So over the past week O’Gara tracked down and photographed PJ’s home and PJ’s mother’s home and posted pics in her column, with veiled accusations that the entire Groklaw site is a front for IBM in its battle with SCO. Once this article appeared, all hell broke loose in the Linux community, with editors scrambling.
Well, duh! There’s something the Linux community has that seems to be missing from most of the rest of the world. Ethics. Stalking and posting somebody and their mother’s personal information on the internet seems kinda, well, unethical. It could even border on harassement.

Oh, brother. In the olden days, O’Gara would have been given a medal for generating readership. But in today’s world of the so easily offended, she’s apparently let go instead, and things calm down as the hissy fit subsides.
The times, they are-a-changing. For the better.

That said, the Linux community figures that O’Gara is being paid by SCO or Microsoft or someone bad
Bzzzzzt! Wrong! Sorry Dvorak, you don’t make it to the next round. The Linux community said (in general) they wouldn’t be surprised if she were. Crazier things have happened. Try crawling out of your cave sometimes.. strawmen are real and so is using them for the purpose of spreading FUD (Fear, Uncertainty and Doubt).

It appears to me that O’Gara is just being overly provocative to get readers.
Oh, you mean like that one guy.. Uhhhmm, what’s his name? DVORAK, that’s right!

I can tell you that my mere mentioning of any of this will result in incredibly hateful attempted postings on this forum and on my moderated blog. What is wrong with these people?
Oh right, it’s not like you were asking for it, is it? Please Dvorak, stop being a little child who’s mad because the group of cool kids won’t play with you and think you’re a loon instead.

PCMagazine would do good firing this guy. Dvorak makes me want to puke, really. In fact.. I think I’ll ban PCMagazine from now on just because they carry articles by Dvorak.

BAN DVORAK

Update: Slashdot article. Read all +3 posts and above for my oppinion voiced by other people. Thank you.

Update II:

cat /etc/hosts | grep pcmag
127.0.0.1	pcmag.com	www.pcmag.com

cat news.php | grep -C2 dvorak

if (
  strpos(strtolower($item["title"]), "google") === false &&
  strpos(strtolower($item["title"]), "dvorak") === false
) {
  // Show news item

In other words. No more dvorak in my RSS newsreader and no more visiting www.pcmag.com.

Joel On Software linkdump

Monday, May 16th, 2005

I regularly read Joel On Software because Joel is somebody who, for a change, has a brain of his own and who isn’t afraid to bitch on certain programming conventions even if the rest of the world thinks they’re the Ultimate Solution. I usually tend to agree with Joel.

This time he explains how coding conventions can make your wrong code look wrong.

He also explains the difference between ‘Apps Hungarian notation’ and the ‘Systems Hungarian notation’. Systems Hungarian notation is the notation we all know and love to hate. Apps Hungarian notation is the way the Hungarian notation was actually ment to be, and the one that makes some sense. Apps Hungarion notation is the one where you add useful information to your variable names (e.g. cBeers is countBeers, bufRead, bufWrite, etc). Systems Hungarian notation is the one where you add totally useless information to your variables, like: long int liSubTotal is longintSubTotal.

In college, we were taught to use the (Systems) Hungarian notation and I always found that to be a completely braindead way of hinting your variables. But college professors don’t really care, because they have no brain of their own so they just do what all other educational facilities do: teach you bullshit. To quote Mark Twain: “I have never let my schooling interfere with my education.

Anyway, the original paper on the Hungarian notation (clearer, shorter version here) is what later got bastardized into the Systems Hungarian Notation. The original paper still has some, IMHO, idiotic things like prefixing a character variable with ch, but it’s a whole lot more useful than that daft Systems Hungarian notation.

Joel also bashes Exceptions again, which I love (the fact that he bashes them, not Exceptions themselves), and then links to this blog post on ‘Exceptions: Cleaner, more elegant, and harder to recognize’.

Clearly, Joel is a Practical Programmer and you should read the stuff he writes about, because he’s always right. Don’t go arguing now! He’s just right.

Firefox Fuckups

Wednesday, May 11th, 2005

Watch me mother[CENSORED], here we go again..

Latest Firefox fuckups:

  • Two major security holes that, in combination, allow remote execution of code, which is nasty to the max.
  • A bug in the extension updater caused Flashblock extension to break during update, which might be the cause of the following problems.
  • Every time I start Firefox for the first time just after I booted my PC, I get a completely garbled window. It’s missing the location bar, search, tabs and my start-up page.
  • I found a bug (no idea if it’s known yet) where, when I disable ‘Allow sites to install software’, the auto updater hangs during installation without showing an error or anything.

That’s it. I’m switching to Mozilla Suite.

Proms v0.11

Monday, May 9th, 2005

Proms v0.11 has been released. Many, many changes went into this release, amongst which are:

  • Many bugfixes.
  • Many security fixes.
  • Completely new interface.
  • Better E-mail notification. (Faster, more features)
  • File management.
  • Many improvements in the discussion module.
  • BBcode support in the discussions.
  • Many navigational improvements.

IT’s Logic

Sunday, May 8th, 2005

Some years ago I spent half a year doing an internship at a company named “IT’s Logic”. I wasn’t particularly happy at this company due to the way they did business. In my (and not just mine) humble oppinion, this company had a very unethical way of doing business. The way they treated competition, employees and clients seemed quite devoid of any morals.

Therefor I must link to an article about IT’s Logic at http://xo.inborn.net in the hope of boosting its google pagerank. The article is in Dutch, so some of you may not be able to read it, and I’m too lazy to translate it, but basically it comes down to the fact that they are bad news. If you have any gripes with IT’s Logic, please take the time to link to the article on your website/weblog.

Update: I don’t consider boosting the linked article’s Pagerank unethical because of two reasons. One is that it appears that IT’s Logic itself is using its customers webpages to boost their own Pagerank. The second is because I fully support the oppinions stated in the linked article and feel it deserves more attention.

Debian GNU/Linux ‘Sarge’ frozen

Wednesday, May 4th, 2005

Well, it finally happened. Debian GNU/Linux ‘Sarge’ has been frozen. This means that no new packages and no newer versions of packages will be added and that Sarge will become the new stable in a short while. The timeline is as follows:

  • 3rd May: Freeze time and security support now available for testing
  • 5-8th May: BSP to bring bug count down from ~85 to ~60/70
  • 15th May: Debian installer finalised
  • 27th May: Zarro RC boogs
  • 30th May: Release

While this is nice, I see a big problem coming up. You see, a lot of people have been complaining that Woody, the current stable release, is too old. It doesn’t contain packages like X.org and Apache 2, and a lot of packages are pretty out-of-date. Personally this has never really bothered me. I run Debian as both a desktop and server distribution but use Stable on the server and Unstable on the desktop, which works out pretty well. True, some of Woody’s packages are a little out-dated like, for instance, PHP, which is only available at version 4.

The problem is, however, that Debian Sarge still doesn’t contain PHP5. This means that Debian will be unsuitable as a viable LAMP(hp) platform.

I’m not one to make predictions, and I’m also not really aware of how many users/companies are using Debian as a LAMP platform, but I predict that not including PHP5 in Sarge will cause a major drop in the usage of Debian and a major decrease of new adopters of the distribution.

I find this a sad thing because I really really like Debian. But I simply don’t have the time to compile everything from source each time a bug is discovered in PHP. Nor can I rely on third-party Debian PHP packages from different ‘vendors’.

PHP Cheat Sheet

Tuesday, May 3rd, 2005

Downloaded it today, and it’s already indispensable:

PHP Cheat Sheet

PHP Function Overloading

Tuesday, May 3rd, 2005

The other day I was looking if it was possible with PHP5 to do function overloading. For those that don’t know, function overloading is the technique of being able to call a single function in different ways.

Suppose, for instance, that you’ve got a function formatDate($date) that returns a date formatted as a string dd-mm-yyyy. The date could be specified using a string ‘yyyymmddd’ or an integer representing a unix timestamp (number of seconds sinds the epoch, which is January 1 1970, if I recall correctly). Function overloading then allows you to define two different functions with the same name, that can be called both with a String argument or an Integer argument. The functions would be defined as (pseudo-code)

String formatDate(String) {;}
String formatDate(Integer) {;}

Unfortunatelly, PHP5’s Object Oriented capabilities do not seem to support this, which is a shame. I assume the reason for this is the fact that PHP is typeless, which means a string is no different from an integer. So when we define the formatDate function in PHP, it would always be the same thing:

function formatDate($string);  /* Same as next declaration */ 
function formatDate($integer); /* Same as previous declaration */

But, there is a way around this, even though it’s a quite ugly one. Check out the following code:

class Atom {
/* Ways this function can be called:
 *
 * new Atom(   int $id)
 * new Atom(string $name)
 * new Atom(   int $id, string $name, string $contents, array $categories)
 */
function Atom() {
	$argc = func_num_args();
	$argv = func_get_args();
	
	if ($argc == 1) {
		if (is_int($argv[0])) {
			/* new Atom(int $id); */
			$this->id = $argv[0];
		} else
		if (is_string($argv[0])) {
			/* new Atom(string $name); */
			$this->name = $argv[0];
		}
	}

	if ($argc > 1) {
		$this->id = $argv[0];
		$this->name = $argv[1];
	}
	if ($argc > 2) {
		$this->contents = $argv[2];
	}
	if ($argc > 3) {
		$this->categories = $argv[3];
	}
}
}

Care must be taken to make sure that the base type of a parameter you pass to the function is the correct type. This is because types can be something else than they appear to be. For instance,

$integer = "10";

is actually a string, while

$integer = 10;

is a real integer.
This poses problems when receiving input from the client-side, because there is no way to accurately determine the type of the variable. Thankfully, it’s possible to do type casting in PHP:

$integer = "10";
$a = new Atom( $integer ); /* Calls like Atom( string ) */
$b = new Atom( (int) $integer); /* Calls like Atom( int ) */

Granted. The resulting code is a lot less readable then usual, but it is a possible way for doing function overloading. I tend to only use this in object constructors, because litering my other functions with all this overhead is not something I like to do.

For other functions, I rather use:

function getThingyById($id) { }; /* Integer */
function getThingyByName($name) { }; /* String */

Interesting Free (libre) Software I

Tuesday, May 3rd, 2005

I don’t know about you, but I regularly visit sites like freshmeat.net and Gnomefiles.org for my daily dosis of new and improved Free Software announcements. Sometimes you run into things that are ideal for trying out on a lazy Sunday afternoon. So I decided to start posting any interesting software I see here in a weekly/monthly/yearly installment. Lets see if I can hold up to that promise ;-)

Postgresql AutoDoc

Postgresql AutoDoc has the ability to output XML, which can be loaded into Dia to create a UML diagram of the database (complete with table relations and descriptive information), an HTML form for further detailed information, GraphViz .dot output, and Docbook 4.1 style SGML for inclusion with project documentation as an appendix.

In other words, generate documentation from a database. Too bad I don’t use Postgresql

QEMU

QEMU is a generic and open source processor emulator which achieves a good emulation speed by using dynamic translation.

It’s a Free VMWare clone. Preinstalled Operating System images can be downloaded here. I tried the Freedos image, and boy, does it boot fast. Pretty neat. Pity I couldn’t figure out how to get local software on the image. (And I was too lazy to recall how to mount an image using loopback under Debian)

VLC Media Mplayer

Yet another multimedia player for GNU/Linux et. al. Haven’t tried it out yet, but it’s supposed to be better than MPlayer. I sure hope so. Though viewing the screenshots reveals that it uses another one of those totally crap WinAmp interfaces. I hate those. (whine, whine, whine)

Well, that’s it for now.

Koninginnedag

Monday, May 2nd, 2005

Phew, that was one rough, yet fun, week(end). It was Koninginnedag (Queens-day) here in the Netherlands last Saturday, which is always accompanied with a lot of partying. The night before, known as Queens-day eve, is also a country-wide reason for lots of festivities. The two days before that I also had some parties that needed attending and, you know, who am I to turn down an invitation to a party?

So from Wednesday through Sunday, I’ve been doing nothing but broadening my alcoholic horizons:

  • Wednesday: Hard-rock party in my hometown, put together by my ex-girlfriend and some friends. Lots of beer.
  • Thursday: To the pub with Zetion. We hadn’t seen each other in a while, what with work intervening and all, so we just had to get a couple of beers together. Also shot some pool, but I couldn’t get in the game at all (which pissed me off somewhat) so we decided to just go to another pub and have a couple more beers.
  • Friday: Queens-day eve, Yet More Beer. Went to The Stairway in Utrecht with some friends. Music sucked, crowd sucked, still had fun.
  • Saturday: A day of ‘rotting’ (relaxing and recovering from a night of beer-drinking) with Wouter and Martin over at Wouter’s place. Not very surprisingly, we opened up another couple of beers. Had those damn-fine spareribs delivered again. Yummy.
  • Sunday: Another day of rotting to recover from the previous day of rotting, and guess what? Beer was once again involved, though only during the day.

After all this limitless consumption of alcohol, I was going for a quiet peaceful twelve hours of sleep from Sunday to Monday, in the hopes of regaining my composure by the time I had to get back to work again. Unfortunately, I went to bed much too late and got woken up at 2:30 in the morning and couldn’t get back to sleep. Still, I don’t feel tired or worn down which, frankly, surprises me somewhat. I guess having such a good time somewhat compensates for the lack of sleep and soberness.

It’s been a long time since I had such a partying extravaganza, and I can tell you it felt great, though it’s probably better to stay away from alcoholic beverages for the next couple of days.

Update: My friendly colleague Christiaan just remembered me of next Thursday: liberation day. I feel another beer weekend coming up.

The text of all posts on this blog, unless specificly mentioned otherwise, are licensed under this license.