Thursday, April 23, 2009

More Mandelbrot fun

I modified the viewer so that the coordinates of the region being displayed are shown. I also changed the color scheme to show more variation in points close to the set.

Wednesday, April 22, 2009

C#, Mono/Monodevelop, Mandelbrot set

I am teaching a section of CS 101 here at YCP this semester, and we're finishing up the course with a few weeks of C# using Visual Studio. The current assignment is to write a program to display the Mandelbrot set, so of course I had to write my own implementation, which I did. I can definitely recommend it as an enjoyable way to spend an evening

Being a geek, I decided to use multiple threads to speed up the computation, but VMware player (which I use to run Windows XP within Linux) does not appear to emulate multiple CPUs. So, I decided to see if I could compile and run the program using Monodevelop. Sure enough, Monodevelop had no trouble importing a Visual Studio project. I had to fix a couple bugs that hadn't manifested under Windows, but then it worked perfectly.

Obligatory screenshot:


[Yes, I'm still running KDE on my desktop machine. It will be replaced with Xfce after the semester ends.]

Monday, April 20, 2009

Using ncurses and unicode

Here's a useful post explaining how to output unicode characters in an application linked with the ncursesw library:

http://mail.nl.linux.org/linux-utf8/2004-08/msg00001.html

Xfce under Debian!

After my recent switch from using Ubuntu to Debian on my laptop, I decided to try installing Xfce. The standard Gnome environment that Debian provides is nice enough, and refreshingly free from the various broken and unintuitive add-ons that Ubuntu adds (e.g., compiz). However, I've never exactly loved Gnome, and the philosophy of Xfce --- a simple and easy to use desktop environment --- sounded extremely appealing.

Well, all I can say is that using Xfce was like coming home after years in the wilderness. It's plain, it's simple, people who like all sorts of desktop effects would probably say it's boring, but my god, things just work. It reminds me, in a good way, of using fvwm back in the late 90s, except that modern conveniences (e.g., wicd to manage network connections, xfce4-battery-plugin to monitor the battery) are easily available and integrate unobtrusively.

When I started using Ubuntu, I can remember reading articles that expressed the opinion that Ubuntu was trying to turn Linux into Windows. I thought that view was alarmist at the time, but given the recent efforts of both the Ubuntu and Kubuntu projects to drastically reduce functionality and usability in the name of "modernizing" the user experience, I'm forced to conclude that the alarmists were right. There's a quote from Marge Simpson that I think summarizes the situation nicely: in an episode taking place in the near future, she says "Fox turned into a hard-core pornography network so gradually, I didn't even notice."

Friday, April 17, 2009

Debian!

I got fed up trying to figure out why Xubuntu 9.04 beta couldn't connect to the wireless network at work, so I installed Debian 5.0.1 (which is the latest stable release).

The installation went smoothly. (I had to put the firmware blob for the wireless adapter on a USB drive at one point, but that was no big deal.) The default desktop environment is a very plain and boring version of Gnome (2.22.3 according to the "About Gnome" menu item.) I love it! No fancy effects, no stretchy or wobbly windows, no plasmoids, just plain vanilla buttons, menus, and windows. Ahhhhh.... :-)

After a few minutes of fiddling with /etc/apt/sources.list, I was able to install the wicd network connection manager (over ethernet), and a few minutes after that, I was back on the wireless network!

So, Ubuntu, thanks for the memories, and fare thee well. I salute your attempt to become both feature- and bug-compatible with Windows. In the meantime, I'll be getting some work done.

Ubuntu, the Linux desktop, and the second system effect

I'm depressed.

I've been a Linux user since 1994, and the Unix philosophy is an essential part of my lifestyle. The main reason I've used Linux is that it is simply the most productive way for me to get things done.

Since 2005, I've been an enthusiastic user of Ubuntu. At the time, and for several years thereafter, it was (IMO) the best Linux distribution, combining the careful design and usability of Debian with up-to-date hardware drivers and frequent high-quality releases.

However, for the past two years, using Ubuntu has been an increasingly frustrating experience.

The problem began with Ubuntu 7.10, which added Compiz. The precedent that was established by this release was that the addition of useless "eye candy" was considered an adequate justification for major regressions in functionality and usability.

At this point, I abandoned the default Gnome-based Ubuntu in favor of the KDE-based Kubuntu. Version 8.04, based on KDE 3.5, was outstanding. Yes, there were no fancy desktop effects. But everything worked.

Then came Kubuntu version 8.10, with KDE 4.1 as the default desktop environment. In terms of the sheer number of regressions in functionality and gratuitous interface differences, this release eclipsed even Ubuntu 7.10. The backport of KDE 4.2 helped somewhat. But I still spent considerable effort finding work arounds for software that was simply broken. For example, the very nice kpdf program for viewing PDF files was replaced by something called "Okular", which I suppose works OK unless you want to print, in which case you're pretty much screwed. Drag and drop between Linux and Windows XP (running in VMware player) stopped working. The mechanism for configuring panels changed drastically. I could go on and on.

I'm now pinning my hopes on Xubuntu, the version of Ubuntu based on Xfce. I'm now running the beta version of 9.04 on my laptop, and I'm cautiously optimistic, although I have not had any success connecting to the wireless network I use at work. (There appears to be a bug in scanning for wireless networks, and the dreadful Gnome network manager appears to be as buggy as it was the last time I looked at it.) I'm hoping that the release version of 9.04 will prove to be a stable platform. It's simple and configurable, and seems designed with usability in mind.

The evolution of Gnome and KDE, and hence Ubuntu, recalls the Second System Effect. Somehow maintaining a working, stable system is not sufficient, even though that has been the strength of Linux (and Unix in general) for many years. The developers responsible for creating the Linux desktop experience feel that it is necessary to make lots of crazy, unintuitive changes. To put it another way, both Gnome and KDE are beginning to feel a lot like a certain desktop OS from a corporation in the northwest US. And that's not a good thing.