November 02, 2006

New Linux Supporter

What major software company is now offering sales support for Linux and collaborating with Novell for Linux technology? That's right, you guessed it Microsoft.

WSJ article
the joint open letter
the FAQ

I'll file this in the "unexpected and interesting turn of events" category.

Posted by enigma at 06:33 PM | Comments (1)

3D in JavaScript!?

Yes. I've been ridiculously busy with my PhD qualifier. Hopefully blogging will recommence after Monday, Nov 6. In the meantime, you have to see this crazy demo of implementing a triangle based 3D model in JavaScript in realtime!

Posted by enigma at 02:21 PM | Comments (2)

September 15, 2006

Wireless Corvallis?

Might Corvallis become a wireless city? It looks like the city has a call for proposals. I think municipal wireless is cool, but I always wonder about bandwidth issues. What I really wonder if this wireless infrastructure might be sufficient to replace a per-house Internet connection.

Posted by enigma at 10:19 AM | Comments (0)

August 10, 2006

I Want Java to be More Like PHP

Is PHP ugly? Often. Is PHP well designed? In some respects yes and in some respects no. What is arguably the best feature of PHP? It's just so easy to get started. Just edit a file and reload your web-browser. No compiling. No deploying. No restarting Apache because the file changed and Apache has a cached version of the wrong thing. Just edit and hit reload.

So what's the state-of-the-art with Java web applications? Running them as an entirely separate process in a wanna-be-a-full-scale-webserver-but-I'm-just-a-servlet-container tomcat instance (or JBoss or Websphere or whatever.) You want to start using the Java language to create dynamic websites? It's so simple! All you have to do is download an entirely unfamiliar program (tomcat), edit a "user-friendly" XML format, start the tomcat daemon, learn the servlets' API, edit a Java source file, build it with an unfamiliar "make" tool that supports ".war" files, and tell tomcat that you want to deploy the file so that it can reload it's internally cached version. Yup, just 7 easy steps with hours of reading and learning just for "Hello World." And strangely enough, this user experience is brought to us by the same people who brought us the simplicity of the Apache web server.

Gosh, why even bother with Java at all? Well, the Java community might point you to excellent performance and process isolation (which is true), but you'll probably get at least one answer involving babel like "enterprise integration of application stack technologies to support high-performance web frameworks." But good luck with the simple question, "Why do I have to perform 7 complicated steps just to write and execute 'hello world'?" You'll probably just get a blank stare. What, you don't get a warm feeling in your bosom every time you learn an API? You must not be a real Java hacker!

In response to this insanity, there's mod_gcj. That's right, an Apache module that lets you run Java just like you would a PHP script, or a Python script, or a Perl script, etc. No more "It's cool to have my web server take 3 seconds to respond because my CGI has to launch a JVM with every hit!" No more "we use servlets because that's what good Java programmers do." Simply write Java code, compile it, reload your web page. No really, just that. You might even be able to get up and running faster than you can say, "But Sun didn't tell us to do it this way!"

It will be fun to see where all of this goes. One strange back-alley of mod_gcj is Rhinola. Have you ever wanted to use JavaScript on the server-side to develop web-based applications? That's right, server-side JavaScript! What a strange idea, but at least it's way easier to deploy than Java...ahem...than Java used to be. (Thanks mod_gcj!)

(Note: I'll keep you all updated as I play with mod_gcj some more.)

Posted by enigma at 01:50 PM | Comments (2)

June 13, 2006

To Check or Not to Check

In an email thread, David Castro brought up the question: When should one use checked exceptions in Java? On that note, check out this paper and then read below. It think the paper is well written and helpful: Exception Handling: Common Problems and Best Practice with Java 1.4

On that note, I don't entirely agree with the article. Let me elaborate.

A checked exception mechanism is a way for the compiler to force the programmer to provide code blocks for any number of named possibilities. Presumably, the compiler needs to enforce this because the programmer is: 1) lazy, 2) forgetful or 3) uninformed. Personally, I've seen all three traits in programmers (including myself), so I think it's a reasonable assumption.

A problem arises when the programmer is none of the three. Take the following example (which I'm stealing from the paper):

  DateFormat format = DateFormat.getDateInstance(SHORT);
  private final static String DEFAULT_DATE_STRING=01.01.1900;
  try {
      Date defaultDate=format.parse(DEFAULT_DATE_STRING);
  } catch( ParseException pexc ) {
      // Cannot happen: if it works once, it will always work!
  }

As the author of the paper points out, even though the format is initialized by a constant, it might be possible for that exception to be thrown in some unusual circumstances: code maintenance affects the constant or there a configuration issue with localization code. Both of those cases are candidates for what the author says are "untreatable situations", however the author of the DateFormat class decided that because the exception *might* be treatable, the exception should be checked. In this case, the programmer is forced to do something with an exception will almost never happen and if the exception occurs, it should probably should just propagate to the top of the application.

Due to the aforementioned problem, I would revise the rule to state that checked exceptions should be used in the case where the options are always treatable. When is something always treatable? Good question. It seems a bit hard to make that assumption. So I tend to favor unchecked exceptions unless you really have good reason to assume all the exceptional cases should be dealt with.

Now, for a completely different line of reasoning. The guiding idea for checked exceptions is that the compiler should force the programmer to deal with the exception, but if it really makes sense to leave it alone, the programmer can just add a "throws" clause and be done with it. Aside from the annoying implication that you have to modify all the calling functions to have the "throws" clause until you get to the place where you are finally ready to deal with the error, there is still the problem that the exception might have to traverse ground that is not controlled by you. For example, suppose you open a file in response to the user pressing a button. You might get a "FileNotFoundException". Well, here, just try the following code out:

  public class EventException {
      public static void main ( String [] args ) {
          (new JButton()).addActionListener(new ActionListener() {
              public void actionPerformed(ActionEvent e) {
                  throw new FileNotFoundException("Oops");
              }
          });
      }
  }

The complier complains that you didn't declare the checked exception, but if you try and declare it then the code won't link because the event handler class that calls the "actionPerformed" method doesn't declare the exception.

So, we are left with a modified version of the ideal: if it makes sense for the programmer to leave the exception alone, the programmer can just define the a "throws" clause unless the programmer doesn't control all the methods up the calling stack. Contrast this with the idea of code reusability where we don't want to have to control the code for everything because we want other people to write code that we can use. Put those together and we have a problem.

Now of course, you can wrap the "FileNotFound" exception up in a so-called "evil" unchecked exception, and that's where we started from in the beginning of this conversation.

In summary, you should use checked exceptions if you can guarantee the programmer can deal with all exceptional conditions in the immediate context and will not have a reason to handle the exception further up the calling stack.

Wow, this post ended up being really long. If you are still reading this email at this point in time you should just give up and admit you are a serious programming geek. ;-)

Posted by enigma at 12:58 PM | Comments (0)

May 23, 2006

Photo Management

Does anyone have suggestions on a photo management tool? I would like to know two things: 1) Regardless of platform, what is your favorite photo management tool? 2) What is your favorite photo management tool that can be run in Linux? Maybe your answers to 1 and 2 are the same, maybe they are different. I would love to hear.

I've thought about dumping stuff in flickr, but it bothers me to have some company own all my data and that I can't access my photos offline. The same concern has stopped me from using del.icio.us and gmail.

Posted by enigma at 10:57 AM | Comments (3)

March 14, 2006

I Want It Now!

I'm a big Gentoo Linux fan, but over the years, I've gotten irritated about how much time I have to spend compiling during the installation process--and I'm not not talking about a stage1 install either. Theoretically, I could use GRP to get going a little faster, but I've never had much success with it and I'm not willing to stick with its list of USE flags and slower release cycle.

What I want is a Gentoo installation tarball that is already up-to-date, includes a *working*, generic kernel, and takes almost no-time to install. So, I setup a build machine at my house to do this very thing. You can now find my Gentoo snapshots at:

http://neumannhaus.com/gentoo/snapshots/

On a side note, another interesting solution that I'm not presently exploring is the based Gentoo variant Kororaa. Maybe one day I'll have time to actually install it and give it a go.

Posted by enigma at 09:51 PM | Comments (0)

March 02, 2006

That's Why Eclipse Takes Forever to Load

I've been doing quite a bit of development in Eclipse lately. Eclipse is a decent IDE, but one of my pet peeves is how long it takes to load. I just sits there loading and loading and loading. Now, I have a reasonably fast computer, so that's not the problem. Today, I noticed all the disk activity. I got curious about how much stuff Eclipse was loading into memory. Then I saw it! A huge memory footprint. No wonder it takes forever to load. How fast can any laptop hard drive copy 270 MB into memory.

Posted by enigma at 04:04 PM | Comments (0)

January 17, 2006

All Your Rights Belong to Us

I have a friend who recently bought video editing software (Power Director 5) and a DVD burner so he could transfer his VHS library to DVDs. He was able to capture the video to the computer, dump it into a timeline, and even create an MPEG-2, but when it came time to burn, I would only burn the copyright notice.

I find it fascinating that the video editing software has detection code that recognizes a copyright screen. Since the fair-use of copying a video depends entirely on the ownership of the video, and since the software has no way of determining ownership, it seems quite presumptuous that their software should try to stop you at all. Certainly, I never saw "Prevents you from making copies of your own stuff" on the "features" list.

On a related note, my father-in-law, John, bought an MP3 player recently. He tried to copy his music from his hard drive to his media player. The media player just displayed "Permission Denied" and would not play. Turns out he had ripped his CDs with Windows Media Player which, by default, enables a "copy protection" feature. Since defaults are *supposed* to reflect the most commonly desired behavior, one must wonder who, at Microsoft, thinks users don't want to be able to copy their own music to their own player. Oh but wait...I'm assuming they care primarily about the user...my mistake.

All this invariably brings me back to software created by users, for users: open source. :-) Sure, it can be rough around the edges, but it doesn't decide for you which rights you should have.

Posted by enigma at 09:58 AM | Comments (2)

October 20, 2005

Cool DXML

That's right. Dynamic XML! Not all the people who read this blog probably read Kevin's blog, but you have to check out his post about his recipe system he just wrote (note: Mozilla-based browser required). He coded up some javascript that interactively filters what XML is fed into the the XSLT. Very cool stuff.

Posted by enigma at 11:10 AM | Comments (1)

OpenOffice 2.0 Is Here

Hurray! OpenOffice 2.0 is finally here. Check out the features, then download it. They even have bittorrent downloads!

In particular, I'm eager to check out the retooled database support. It was hidden behind the scenes before, but now it's supposed to be more prominent and look more like MS Access.

Posted by enigma at 10:59 AM | Comments (0)

October 07, 2005

Greg Is Hysterical

When it comes to bleeding edge kernel development, I live in a technical black hole. Don't get me wrong--I love the Linux kernel. I think hacking on the kernel for a living could be awesome, but I don't make a living from it presently, so I don't really keep up.

Every now and again, I get a glimpse of the kernel development community that makes me laugh out loud and say "You guys rock!" Due to my timewarp, this isn't exactly *recent* news (Dec 2003), but it's new to me.

So, with not further delay, read Greg Kroah-Hartman's article on udev vs. devfs. I only have good things to say about Greg after talking to him on several occasions during visits to OSU.

Posted by enigma at 09:43 AM | Comments (0)

September 13, 2005

From the Cinelerra Changelog...

"Blond theme has not been updated. Instead it has been replaced by the
SUV theme. The SUV theme is extremely manly and dark and should make
the media stand out more." ROTFL!

That's right, cinelerra 2.0 is out. Yippee! Read all the details in the changelog.

Another funny quote on the main cinelerra page about the relationship of cinelerra to cinelerra-cvs:
"They moderate what parts of our fork get into their fork while contributing anything they want while we moderate what parts of their fork get into our fork while putting in anything we want, which makes it pretty much even."

Posted by enigma at 01:25 PM | Comments (0)

September 02, 2005

DVD Authoring

Once again, I find myself on a DVD authoring kick. The only difference is that this time I have a wiki for all my notes. If you are interested in DVD authoring in a 100% Linux environment, then you might want to check out my DVD Authoring area in my wiki. (Yeah, yeah, just accept the SSL cert. I'll have to get a Thawte cert one of these days.)

Posted by enigma at 02:04 PM | Comments (2)

August 17, 2005

Wiki Junky

Back in 2003, James Janssen tried to get me hooked on wikis--or at least he would continually share his unbounded enthusiasm for wikis. Now, in 2005, I'm a self-professed wiki junky. Graduate research did what James couldn't: give me a reason to need a wiki.

I'm using MediaWiki to keep track of information pertaining to my research. The wiki is indispensable. I'm particularly fond of being able to maintain loosely organized blurbs of information with very little effort. Previously, I kept notes in text files on my hard drive, but I'm finding that much less effective than dumping everything in my wiki.

However, I still have a need to keep some notes on my computer and not online. For this, I discovered tomboy. Think of tomboy as a hybrid of post-it notes and a wiki--or even just a personal wiki for your desktop. I'm finding it useful for lists of things (todo, blog ideas, little inspirations, etc.) It's a little irritating that tomboy doesn't get reloaded automatically across gnome sessions, but I'm sure that bugfix is just a matter of time. (Gentoo folks: It's in portage, so just "emerge tomboy".)

Here's to you and your wiki.

Posted by enigma at 02:47 PM | Comments (1)

July 13, 2005

RSS Readers, Again

After Mozilla Thunderbird started misbehaving on me, I renewed my quest to find a good RSS reader. Thunderbird would add all the articles (seen and unseen) to the feed list; this resulted in massive duplication. Quite annoying. I've found two RSS readers that look good: RSSOwl and Liferea.

RSSOwl is written in Java and seems to have all the features I want. The only downside I've found is that I can't simply emerge a Gentoo package to get it installed.

Liferea is written specifically for GTK and Gnome. It seems to have good integration with other Linux programs such as Mozilla's rendering engine. Offhand, it doesn't seem as featureful as RSSOwl.

Anyone out there have an experience with either they want to share? I'll post back later with my reviews.

Posted by enigma at 08:08 AM | Comments (1)

June 01, 2005

hdf: dma_intr: error=0x40 { UncorrectableError }

I'm sure you've seen it before. In my case, that's my media harddrive dying. I wouldn't be surprised if it had finally croaked of old age, but this sucker is only a couple months old. In fact, this drive is my fresh replacement from the drive I just RMAed.

Who's to blame? I blame Western Digital for making a crummy harddrive. Come on! This is my second drive to die in almost as many months. It seems that WD's jump to 250 GB wasn't without it's problems.

Needless to say, I'm transferring as much as I can on to the Maxtor 120 GB drive I recently bought as a backup drive. Given my success with Maxtor in the past, I hope this drive has a more positive future. Of course, I'll keep RMAing my Western Digital drives until I finally get one that works!

BTW, if you haven't discovered "smartmontools", then open a terminal and type "emerge smartmontools" right now! (Or use "apt-get" if that's your thing.)

Posted by enigma at 11:19 PM | Comments (2)

April 13, 2005

Get Perpendicular

Wow! It's been a while. I've been busy with school, company, church, and other things, and I guess I've been too lazy to blog. (Sorry about that.) So, what better way to recommence the blogging with an easy entry.

If you haven't seen Hitachi's "Get Perpendicular" flash cartoon, then you need to drop whatever it is you are doing and watch it right now. I mean it buster, RIGHT NOW!

Get Perpendicular

Posted by enigma at 11:23 PM | Comments (2)

March 18, 2005

Converting Automata to Regular Expressions

I wrote a paper for my algorithms class summarizing the 3 key techniques for converting deterministic finite automata to regular expressions. I spent quite a bit of time in the last couple of weeks wrapping my head around this problem. If you are interested in reading my paper, maybe you can benefit from what I learned. In particular, you may find the Brzozowski method interesting. Of course, if you are like me, you find great entertainment in just trying to pronouce Brzozowski. My only dissappointment is that I never got a chance to present my paper and say Brzozowski a bunch of times.

You can find the paper here.

Posted by enigma at 09:56 AM | Comments (0)

February 20, 2005

ID3 Tags

After messing with some files in my MP3 collection yesterday, I got frustrated with all sorts of inconsistencies in the ID3 tag information. Artists names weren't always capitalized the same way between album rips. Sometimes I had changed the v1.x and not the v2.x tags. Some files didn't have v2.x tags defined at all. I couldn't tell which tags mythmusic was favoring to get it's information. I decided things had to be consistent and that everything is going to be ID3v2. After hunting around for a while and bemoning poor ID3v2 support, I discovered two great utilities which both support ID3v2.

The id3lib project comes with the great command line tools: id3info and id3tag. By default, they simultaneously manipulate *both* v1.x and v2.x tags! Nice! Great for scripting, touch-up tagging or batch tagging. id3lib also features a wonderful command id3convert which allows you to convert v1.x tags to v2.x tags and vice-versa. You can even strip out v1.x tags and leave v2.x tags. (Which I what I prefer.)

easytag is a great GUI tool that supports filling in tag information from filenames, mass tagging, and, most importantly, renaming files based on the ID3 info. Very nice for cleaning up whole batches of files all at a shot. I've been somewhat fickle with my naming conventions, so easytag's file renaming has really rescued me there. And, of course, I told easytag to strip out v1.x tags and only write v2.x tags.

I can't end without mentioning the trusty mp3info utility. Even though it doesn't do ID3v2 tags, it is the only command line tool I'm aware of that can give me that data rate statistics for VBR MP3s. Maybe there is another tool out there that one of you could tell me about? (sox tells me about everything but the data rate.)

In the whole process, the most interesting fact I found was that ID3 tags aren't just for MP3 files, but for a whole other host of media files. Cool!

Posted by enigma at 11:21 PM | Comments (0)

February 12, 2005

Xkeyboard and Gnome 2.6

Turns out Gnome 2.6 uses the Xkeyboard extension. In the end, this is good thing, but until I figured that out, I was going nuts.

I wanted to run a script when I pressed the "Mute" key on my HP zt3000 notebook. I had used gnome's "Keyboard Shortcuts" GUI to associate actions like "Raise the volume" and "Lower the volume" with the correct multimedia keys, but the "Mute the volume" action wasn't muting the right ALSA channel. My HP has some nice hardware tie-ins when you mute the special channel "External Amplifier". The ti-ins don't work when you mute "Master". So naturally, I wanted to write a mute toggle script myself and have gnome use my script instead of gnome's built-in muting feature.

I found a great article about associating arbitrary commands with hotkeys in Gnome. Hint: It requires setting property values directly using the "Configuration Editor" (a.k.a. gconf). Yeah, that's real user friendly. (Not that I'm saying gconf is bad. I agree with this article, gconf is a good thing.)

Turns out the "multimedia" keys have non-standard key codes, so their symbolic names ("XF86AudioRaiseVolume", "XF86AudioMute", etc) they aren't defined for standard PC keyboard configurations. For some reason, the "Keyboard Shortcuts" GUI was allowing me to use the hex value of the key code without the need for a symbolic name, BUT I could not use the hex value when editing the configuration directly with gconf. Yeah, go figure. Who know's what black magic goes on behind the scenes in gnome. (Yeah, yeah, yeah..."read the source, Luke.")

I searched online to figure out how I could define my key mappings. I was told to use "xmodmap" to associate symbolic names with particular key codes. No sweat. I simply did "xmodmap -pke > .Xmodmap" to get a list of all the keycodes that are defined. I then used "xev" to figure out which keys generated which key codes, and edited ".Xmodmap" to associate the right symbolic names with the key codes. (Search for "xmodmap" on Google for more info.) I then installed the new definitions by hand doing "xmodmap .Xmodmap". This worked great, until I logged out and logged back in.

According to the "way things should be", the definitions in ".Xmodmap" should be loaded automatically. But no, that wasn't working. So, I tried forcing them to load in my ".xprofile". Nope, that didn't work either. I tried having gnome automatically run "xmodmap ~/.Xmodmap" when gnome is starting my session. That didn't work either. Basically, the only thing that worked was loading my custom definitions from a terminal, by hand, after gnome had started. Clearly, that wasn't acceptible.

By this time I got smart enough to search for "xmodmap gnome 2.6" on Google and I discovered that gnome 2.6 use the "new way": the Xkeyboard extension. The Xkeyboard extension supports all sorts of keyboards including so-called "multimedia" and "Internet" keyboards. I grepped around and found the definition for these keyboards is in "/etc/X11/xkb/symbols/inet". And after looking to in "/etc/X11/xkb/keycodes/xfree86" to see the translation between the key code (ex. "160") and the new strange notation (ex. ""), I was able to find the "zt11xx" profile in the "inet" set that had all the keys I needed defined for the right key codes. Horray!

I used gnome's "Keyboard Preferences" GUI to set "HP Pavillion ZT11xx" as my keyboard. (Yes, I own a zt3000, not a zt11xx. I guess HP is somewhat consistent between models.) After logging out and back in, I was able to use gconf to associate my mute key with the "toggle_mute" script I wrote. Horray!

In summary, it was WAY TOO DIFFICULT to associate a command with a multimedia key. This was due to a few things: intentionally hiding features, inconsistency (sometimes hex, sometimes not), and outdated information.

Maybe there should be some sort of "keyboard finder" where you select the special function (such as mute) from a list and press the key on the keyboard. After you do that for all the keys you care about, the "keyboard finder" determines the predefined keymap that fits, and if one doesn't exist, it makes a custom one.

If I only had time to code....

Posted by enigma at 01:16 PM | Comments (0)

January 28, 2005

I'm Losing My Mind (Or Maybe Just Memory)

I guess I'm a C++ novice. I'm certainly not a C++ expert. Every now and again I figure out a problem that makes me stop and wonder how I never learned this before. (Or possibly, why I didn't remember this when I learned it before.)

I'm take a graph theory class. It's been a lot of fun. Graph theory really isn't too difficult so long as you aren't afraid of lots of pointers and dynamic memory allocation. For homework, I had the option of using C or C++, so I chose C++ to keep everything beautiful. Well, almost beautiful. This is C++, after all.

I was plugging away on my homework when I got one of those dreaded "segfaults". As per my usual habit of diagnosing pointer problems, I started littering my code with asserts and then used ddd (my favorite debugger GUI) to see what's going on when the asserts fail. In the process, I discovered a better way...at least for memory and pointer issues: Electric Fence and valgrind.

Electric fence helps you find memory problems by stopping the program in it's tracks when pointers and deallocation run amuck--as opposed to letting the program run just fine until you get "lucky" and a pointer finally does something bad enough to bring the program to a screeching halt. It's one of those tools I'd heard about and never got around to using because I thought it would be complicated. Ha! It's not even close to complicated. To use it, simply compile like so "gcc -o my_prog my_prog.cpp -u malloc -lefence" and run your program. Note how electric fence replaces the malloc library.

Valgrind gives you a running tally of the cumulative evil of your program and halts the program if necessary. I found valgrind more helpful than electric fence because of it's verboseness. (Electric fence gives you about as much information as "your program is bad, fix it.") Another plus for valgrind is that you don't have to link against it, you just have valgrind launch your program like so: "valgrind --tool=memcheck --leak-check=yes my_prog".

In the end, what was my problem? The first problem I had was not initializing a pointer to NULL and then assuming it was NULL later on (oops). My second problem was that I was calling "delete" (delete a single element) instead of "delete[]" (delete an array of elements). How did I not learn about "delete[]" before? I suppose it does look vauguely familiar. I guess *I'm* losing my memory now. (Yeah, yeah, bad pun.)

Now I know even *more* about C++. Mu-ha-ha-ha-ha!

Posted by enigma at 11:30 AM | Comments (2)

January 17, 2005

X11 Access Errors

I just discovered something. I was trying to run XMMS on my media box over an SSH connection--like I have done for years--and xmms kept crashing with a "BadAccess (attempt to access private resource denied)" error. This was a new one to me. At first I thought it was related to Xorg versus XFree, but then I found the thread posted below.

Apparently, there were some security issues with X11 forwarding in SSH, so they broke backward compatability and implemented a new security model. The long and short of it is, if you really need the older forwarding model because of some misbehaving application (such as xmms), then you can use the "-Y" option instead of the "-X" option for "ssh".

Apparently I haven't run XMMS over SSH as recently as I thought I had. ;-)

http://www.cygwin.com/ml/cygwin-xfree/2004-04/msg00348.html

Posted by enigma at 09:47 PM | Comments (0)

January 16, 2005

Get Some Statistics With Your Gentoo

As I mentioned previously, I upgraded my desktop machine to Gentoo. Unfortunately, I discovered late last night that my hard drive was dying (40 GB 7200 RPM IBM drive). Fortunately, I have another 60 GB hard drive in that machine to pick up all the slack.

In the process of messing with the machine this evening to get it back up and on it's feet with the hard drive, I discovered "genlop". A great emerge log file parser that gives you all sorts of statistics on how long ebuilds took to compile and such. Very cool! For example, OpenOffice takes *forever* to compile:

Thu Dec 30 05:00:16 2004 --> app-office/openoffice-1.1.4
merge time: 6 hours, 35 minutes, and 17 seconds.

One particularly nice feature is that genlop can estimate the compile time of new versions of packages using the compile times for the versions you have installed. Great for upgrades!

Just "emerge genlop" and you'll be off and running.)

Posted by enigma at 10:03 PM | Comments (0)

January 15, 2005

Thunderbird Does RSS

I was just adding a new account in Thunderbird when I noticed that it supports RSS feeds! I added the RSS feed for my blog and tried out the interface. I like it. I have been using straw, but it seems that development has stagnated.

Posted by enigma at 04:51 PM | Comments (1)

Heat Death

After I got my media computer up and running, it was time to upgrade my desktop machine from RedHat 9 to Gentoo. I was very excited to finally migrate my last RedHat box! Other than running into one bug with the bootstrapping process, everything went quite smoothly. That is until I tried to install Xorg.

I started the Xorg compile, it ran for about 5 minutes and then just segfaulted. I went in to the build directory and restarted the compile, it picked up where it left off and plugged away just fine--for about 5 more minutes until it just segfaulted again. I was going nuts. The compile kept crashing at different times for no apparent reason. I suspected heat my be the issue--my 1.2 GHz Athlon Thunderbird makes ovens seem cold. I searched the gentoo forums just to make sure that there wasn't some other issue with Xorg. Yup, I found confirmation. Heat and bad memory are the primary causes for "segfaults" with gcc.

I had a great idea. Install distcc to spread the load around! I listed localhost as the last host in the configuration to force distcc to pawn traffic off the the other machines more. That worked beautifully. That kept the load down on my machine so I could install Xorg. Everything went along swimmingly, that is, until I tried to install OpenOffice.

The OpenOffice build didn't want to distribute. It only wanted to compile on the localhost. On top of that, the build really wanted to keep the machine's load around 3. Needless to say, I started getting "Bus Errors" and "Segmentation Faults". Fortunately, I had just bought a brand new CPU cooler from NewEgg. I thought I would need it for the Biostar system (I mentioned this here), but the system came with an awsome cooler. I installed the new cooler--LED's and all--and I'm off and running.

So far, so good. OpenOffice is compiling just fine and my computer has a happy green-red glow. :-D

Posted by enigma at 04:25 PM | Comments (0)

January 07, 2005

New Computer

For the last 6 months or so I've been wanting to buy a little computer to dedicate to media-related stuff. I finally got around to it! I picked up a niftly little Biostar iDEQ 210V from Newegg with a Sempron 2400+ and 512 MB DDR400 RAM to go with it. I'm very pleased.

The Biostar barbones system is a great deal. I was eyeing Shuttle computers for a while, but they are pretty pricey. (Most clock in at >$200), so I settled for a $140 Biostar. Runs quiet. Looks great. Works great. The model I purchased doesn't have a TV out, so I'm using an old nVidia card with TV-out. For some reason, the VGA port on that nVidia card died, so all the colors are messed up on a monitor screen, but the TV-out works fine.

I debated about going Sempron. Since this is a media computer, I didn't need a heavy hitter like a P4 w/HT or a Athlon64. After poking around the web for a while and talking with other computer geeks, I decided a Sempron gives great bang for my buck-even with less L2 cache. I chose the lower end model (2400+) since it's plenty powerful to do what I want to do while not consuming much energy and being cheap ($75). If it seems the CPU is way more powerful than I need, I might even underclock to get a cooler, more engergy efficient system.

Now I'm in the midst of getting my Gentoo Stage 1 install up and running. Things are going very well. I think I'll have a great little media box.

So, here's the stuff I bought. Some of this is destined for my desktop machine (DVD burner, video card, CPU fan).
Biostar Barebones $139 (I bought it on sale)
AMD Sempron 2400+ $75 (I paid more than the current price.)
Kingmax DDR400 512MB RAM $65
GeForce4 MX4000 128MB w/ VGA-out, DVI-out, and TV-out $45
Rosewill DVD+/-RW w/ DVD+R dual layer support $57
Tr2tt Tr2M1 CPU Cooler $10

Posted by enigma at 03:11 PM | Comments (0)

December 31, 2004

IR Madness

I got sick of my DVD player not being able to play DVD+R, DVD+RW, etc, so I went out and bought a new Wal-Mart special for < $40. The player claims to be a "CyberHome" DVD player. It's been working great except for one little minor problem. It uses some of the same IR codes as my stereo. So, when I press "enter" on the DVD remote, my stereo powers off. When I press "Fast Forward", it sets the stereo's sleep timer. I've found about 3 conflicts thus far.

Has anyone else out there had problems with this sort of madness? I've thought about returning the DVD player, but my stereo is aging and is already starting to break down. I guess I'll just have to mull over this one for a while.

Posted by enigma at 07:52 PM | Comments (1)

December 09, 2004

Stupid Comment Spam

Nate Jones informed me that my blog (and his consequently) was filling up with comment spam. I had never even heard of comment spam until Joey Lawrance told me that he put up a blog at OSU and it had comment spam within a day. I'm working on soving the problem for once and for all by installing a pluging that uses image detection to differentiate between humans and bots. I guess we'll see how that goes.

Posted by enigma at 10:39 PM | Comments (4)

July 12, 2004

Subversion

I set up my first subversion repository today. Very cool software! I highly recommend it over CVS. There are a couple of quirks about branching and tagging you have to get used to if you are a CVS junky, but well worth the powerful features. Read the Version Control with Subversion for more info on setting up and using subversion.

Posted by enigma at 11:10 PM | Comments (0)

EXIF and ImageMagick

I'm using ImageMagick to scale down images for my photo archive. It looks like the "convert" command preserves the EXIF information stored in the JPEG. Cool!

Posted by enigma at 07:02 PM | Comments (0)

May 18, 2004

Don't Waste Time (Like Me)

For all of you Java developers out there, I have a tip. Maybe you know this already. But just in the off-chance I can save you an hour of frustration, I'll mention it anyway. When running Java Web Start applications, you *can* turn on the Java console! Yes! It's possible. It took me an hour to finally figure this out. And as you might notice from the time, I would have liked to have known an hour ago.

Enabling the console is easy. Simply run the "javaws" application (with no arguments). This brings up the Web Start Application Manager. Click on "File" -> "Preferences". On the "Advanced" tab, check "Show Java Console". That's it. Now you're off and running. Of course, you might want to turn the console off when you are simply using Java Web Start and not debugging your application.

I hope this information helps someone out.

Posted by enigma at 12:56 AM | Comments (0)

May 13, 2004

Evolution Connector Is Free!

The Evolution Connector (ahem "Novell Connector") allows you to connect to Microsoft Exchange using Evolution. Ximian used to charge something like $49 per seat. I loved the idea, but I thought the price was rediculous. Well, maybe someone in Novell (Ximian's parent) saw an opportunity to finally give all Linux users a chance to never need Outlook again. Starting tomorrow, May 14, Novell is giving away Evolution Connector for free! Ironically enough, I'm excited about this and I don't even use exchange anymore. Maybe I'll just live vicariously thorugh my APU buddies. :-)

Posted by enigma at 12:15 AM | Comments (0)

May 12, 2004

The Wonders Of Open Source

It's always fun when you post a bug and developers follow up on it. It's exciting. You feel like you are helping to make an open source project better. So, imagine my surprise when I recieved an email today about an Evolution bug I posted two years ago!

I suppose, in all fairness, it wasn't a "bug" so much as a feature request. I didn't like the way Evolution's interface handles account name headers in the folder tree. At the time, I found it really annoying, so it seemed like a bug. Funny how I don't find it annoying anymore--probably because I quit using Evolution.

Thanks to the open source process, I could contribute. Thanks to developers being in short supply, I didn't get what I wanted. But hey, maybe they'll fix it one day and I'll have that satisfied feeling. I might even start using Evolution again. Although, I hear Thunderbird is very good.

Posted by enigma at 11:54 PM | Comments (0)

May 07, 2004

Going Through the Motions

This past week I implemented a motion capture viewer. The program reads in motion capture data from a Biovision BVH file and displays the animation using OpenGL. Very fun stuff. You can watch movies of my results.

I had quite a bit of fun writing the parser for the BVH file. It was a bit of a throwback to my compiler design days. However, I had Boost.Spirit in my tool belt this time. Using Spirit, I was able to automatically create the parser from the BVH grammar. For even more coolness, Spirit uses template metaprogramming to generate the parser at compile time and allow the programmer to specify the grammer in C++ notation. Very cool stuff!

Posted by enigma at 11:16 PM | Comments (0)

April 21, 2004

Practical Linux

It's always nice to hear a practical endorsement of Linux--one that isn't based on techs having a flame war. A member of the LUG at OSU pointed me to this article on Ernie Ball's recent adoption of Linux. Ernie Ball is well-known for guitar related equipment. The article is a bit dated (Aug 2003), but a very good read none-the-less.

Posted by enigma at 11:10 PM | Comments (0)

April 12, 2004

Wiki Wiki Wiki

Yes, "wiki" sounds like something the Ewoks would say, but none-the-less I'm diving into the WikiWikiWeb. Hystrix pointed me to a few promising wiki engines, but I'm still looking around for good ones. I need a wiki that supports access control. I want it to be easy to install and easy to use. If anyone has suggestions, please feel free to post them.

The wiki's that look promising so far are: SnipSnap, owiki, WakkaWiki, and MoinMoin. MoinMoin looks the best for me so far because it supports access control and revision control without requiring an SQL backend.

Posted by enigma at 11:26 PM | Comments (0)

April 06, 2004

Crazy News

Normally, I'm opposed to linking to news articles from my blog. It seems silly. I'm sure you check the news. I don't want to be a news aggrigator, that's what slashdot is for. But this time, I can't resist. Really, I can't.

Courtesy of Google News, I found out that Microsoft released it's first genuine open-source project yesterday (Monday). No really, they did. Check out the Windows Installer XML (WiX) project page on sourceforge. It seems like Microsoft is finally able to suck it up, bite the bullet, and admit that the open-source model can makes sense--even for a software giant. Of course, don't expect Microsoft to start open-sourcing a bunch of flagship products, but watch for the trend to continue for non-revenue generating software.

Oh boy! This is so entertaining! What will happen next? Don't you just love the software industry?

Posted by enigma at 11:50 PM | Comments (0)

April 05, 2004

Scala

In a conversation on Thursday, Dr. Erwig referred me to the Scala programming language. I had never heard of it before, but it piqued my curiosity because the research team claims to have solved the "expression problem". (See the paper here.)

Scala is a multi-paridigm programming language that seeks to combine functional and object-oriented language paradigms. It complies to Java bytecode or the .Net common language runtime (CLR) making integration with mainstream languages a breeze. I hope to do more investigation when I have a chance, but I want to point it out to those who are interested.

Posted by enigma at 11:17 PM | Comments (0)

April 01, 2004

Instruction Set Architectures

I ran across this fascinating article about the x86 and instruction set architectures (ISAs). It's a good read. The best part about the article is when it describes how modern processors are doing binary translations on instruction sets right before execution (think "just-in-time" compilation.) Because more optimization information is available at run time, these binary translations can result in significant speed improvements even if the executable is already compiled for the correct instruction set. Researchers have gotten up to a 20% increase in speed when optimizing a binary at run time.

Posted by enigma at 11:54 PM | Comments (0)

March 31, 2004

Object Oriented Programming

I wrote a paper on object oriented programming (OOP) for my OOP class last term. Since finals are long over and grades are in, I'm posting my paper on the web for all to read. If you are interested, give it a read. I would love some feedback.

I tried to write the paper for someone who is familiar with programming, but wants to understand OOP concepts. The paper is 9.5 pages, but it's quite conversational, so it should be a quick read.

Posted by enigma at 10:31 PM | Comments (1)

March 28, 2004

Watch Them Errors

There's something satisfying about cleaning up your hard drive. Today I rooted through my hard drive and got rid of old files, unneeded downloads, and digital cruft. As the reward for my labor: 850 fresh megabytes, free for the filling.

I like getting rid of stuff. Really, I do. It's liberating. That's why I was quite disturbed when I got in this evening and discovered those 850 MBs were gone! Where did they go? They just disappeared! Fortunately, I had du, ls, and grep on my side.

After lots of typing, I discovered ".xsession-errors" in my home directory. It had grown to a mere 1.2 GB! Woa! Thanks to a bug in nautilus's thumbnail generation involving an infinite loop and "fprintf" statements, I had lots of junk filling up my harddrive. Simply deleting the file didn't cut it because 9 different programs had the file open. After logging out of gnome and logging back in, 1.2 GB magically reappeared. Phew. I had my free space back.

I really need to upgrade my home computer. I have a very old version of gnome and I'd much prefer to have something more current. It's time to put Gentoo on my desktop machine. Now, all I have to do is find the time.

Posted by enigma at 10:57 PM | Comments (0)

March 12, 2004

Volume Rendering Project

After writing a paper on volume rendering for CS 551, I decided to do volume rendering via ray casting for my final project. You can check out some cool animations and snapshots I rendered. Also, if you want to brush up on volume rendering, you can see my presentation.

Posted by enigma at 11:35 PM | Comments (0)

March 11, 2004

Woa!

rm -f /usr/portage/distfiles/*

So that's where all the space went! I had about 500 MB tied up by the downloaded files. My dad tells me Gentoo keeps these around so you only have to download a patch for upgrades. I'll have to keep a closer eye on this directory in the future. Now I have more space to compile stuff. :-)

Posted by enigma at 11:13 PM | Comments (1)

March 10, 2004

The Return of LUFS

I installed the Linux Userland Filesystem (LUFS) on my new Gentoo box today. Might I add, it was done with great ease. I'm mounting space from my main computer's uber-disk drive so I can do video processing on the Gentoo box. It's slow, but Gentoo made it easy to install transcode with all the modules I need. So far I have had none of the wacky permissions issues I experienced when trying to connect to Solaris. Linux to Linux connectivity seems to work just fine. +1 for LUFS on Linux. +1 for Gentoo and transcode.

Posted by enigma at 02:28 PM | Comments (0)

March 09, 2004

Final Gentoo Thoughts (For Now)

I've posted quite a bit about Gentoo last week, but I never really summarized. I may have focused too much on my difficulties with Gentoo. All-in-all, I'm very impressed with Gentoo. Sure, the install is a bear, and I wouldn't recommend it to anyone who is not serious about Linux, but I love the flexibility. Ironically, the source of my greatest difficulty was the kernel configuration, so maybe I should just blame Linux. (Have I mentioned I hate compiling the Linux kernel? Well, I do.)

As a result of my experience thus far, I would like to see some things improved in Gentoo. There should be better integration for binary packages in the portage tree. Why not incorporate them right in? One should be able to use the source or binary for any package. "emerge" should have better support for uninstalling with dependancies. "clean" and "depclean" just don't cut it. Finally, regardless of the install stage chosen, one should have the option using a generic, pre-rolled kernel. It's nice to be able to get the system up and working and worry about the kernel later.

If I had more time, I would jump in and contribute. I like Gentoo's philosophy. I don't have the time, so I feel like one of those critics that just sits around complaining about the current state without pitching in to make things better. Hopeful I can make a difference in the future.

Posted by enigma at 10:55 PM | Comments (0)

March 08, 2004

Obscure Java Quirk

Java programmers be warned. Those ".class" files are not as flexible as you think.

When grading the programs for the compilers class, I ran across an interesting problem. The student's program was throwing an "IncompatibleClassChangeError". I thought it unacceptable for the program to throw an uncaught exception, so I deducted some points. Shortly after I emailed out the grade report, the student emailed me saying the program was not throwing any exceptions on his machine. After emailing back and forth, we ended up sitting down at the same computer to figure out what was going on.

The students in CS 480 were given a suite of ".java" files that provide a basis for their program. They were to only modify "SymbolTable.java" and "Parser.java" to complete the functionality. The exception was being thrown in "ClassType.java", a file the student had not modified. Even more perplexing, the "ClassType.class" file generated in the student's home directory was different than the "ClassType.class" file generated in Dr. Budd's directory--even though the "ClassType.java" files were identical!

After much frustration and "diff"ing, we finally figured out the student had changed "SymbolTable" from an interface to a class. "ClassType" contained a reference to "SymbolTable" as one of its data members. The byte code generated for a reference to an interface is different than a reference to a class, even though they are linguistically interchangeable. Although you can change an interface to a class and all your code will compile just fine, the byte code generated will be different. This means that if you write a library and you promote an interface to a class, you cannot use the old ".class" files to compile against library. Even worse, compiling against the old ".class" files will succeed, but running the program will cause run-time exceptions. Why doesn't the compiler check for this?

I find problem very interesting because in Java, a variable of an interface type is a replacement for a variable of the class type and visa-versa. (Yes, yes, so long as you are only calling methods that exists in both the interface and the class.) Essentially, the two are substitutes for each other. That might lead one to believe that it will be the same in the byte code. Well, it's not. Be warned!

Posted by enigma at 10:20 PM | Comments (0)

March 05, 2004

Gentoo Caveats

In my continuing Gentoo Linux saga, I have discovered a few things to be mindful of when working with Gentoo.

Don't forget to start your syslog daemon at boot time. One isn't installed by default. Although they tell you how to install one in the Installation Guide, don't forget to add it to the default runlevel. I forgot to add it and later discovered /var/log/messages was missing.

Don't use grsecurity unless you really know what you are doing. I couldn't get XFree86 to run. It would show its normal startup messages and then just say "Killed". I was going crazy! I've never had this much trouble getting X to run. After I got my syslogger working, I saw that "grsecurity" was killing X. After recompiling my kernel without "grsecurity", X works fine!

Posted by enigma at 11:10 AM | Comments (0)

March 03, 2004

Emerge, Unmerge, Oh My!

Due to my aformentioned space limitation, I have sought to understand the "emerge" package management tool to see how it might help me overcome my plight. What started as a simple strategy, uninstall almost everything, install X, and try again, has turned out to be far more complicated.

Emerge has the post powerful dependancy resolution engines of any Linux package manager I'm aware of. I'm really quite impressed with the "slotting" feature that allows different versions of the same package to be installed at once. I enjoy being able to do an "emerge -p somepackage" and see all the packages that will be built. Cool stuff.

What I found out about emerge surprised me. Emerge will not let you use it's wonderful dependancy engine for uninstalling things. So, suppose I want to uninstall "gnome", which has a bunch of dependancies, I would type "emerge unmerge gnome". Only one problem, it will uninstall gnome without uninstalling anything that depends on "gnome".

Now, I'm all for flexability. If I want to break dependancies, my package manager should let me, but emerge doesn't even give me a choice. I was reduced to using "qpkg -I -q gnome" to find all the dependancies by hand. (Note, "qpkg" is not installed by default, it's part of "gentoolkit".) I was shocked to find out I have no automated way of doing this! In this respect "apt" wins. I can install things with dependancies and *uninstall* them with dependancies.

Posted by enigma at 09:56 PM | Comments (3)

March 02, 2004

Even More About Gentoo

Somewhere during the middle of my "xfree" installation, I ran out of disk space. No one told me that 2.1 GB isn't enough space for Gentoo. I'm not quite sure what I'm going to do now, but hopefully I can uninstall a few things and try rebuilding.

Posted by enigma at 02:54 PM | Comments (0)

March 01, 2004

Going Gentoo [Update]

Still compiling.... X windows, gnome, and all the dependencies are still being compiled. Yes, it's been over 24 hours. I've been told this is "normal" for Gentoo. Maybe the official slogan should be, "Gentoo, because good things come to those who wait."

Posted by enigma at 11:04 PM | Comments (0)

February 29, 2004

Going Gentoo [Update]

The base system finished compiling today, so I set about building my kernel. Configuring the kernel isn't so bad except for the sitting around answering hundreds of questions part. Ironically, answering the questions took about as long as compiling the kernel on my 333 MHz box.

The funny thing about the kernel configuration is you never answer questions based on what you want to do, only on what features to include and exclude. To answer every question, I have think, "What does this feature allow me to do? Is that something I want to do?" More often than I'd like, I'm not sure what the feature does. Unless the help text provides something meaningful, I just make the feature a module. I've heard the 2.6.x series has a better config tool. I'll have to check it out sometime.

After getting the kernel compiled and installed, I went to reboot. Grub started just fine, but when it went to load the kernel, the machine immediately rebooted. I was going crazy! I messed with grub for an hour thinking I may have misconfigured it. That was a dead end. From everything I could find, grub was fine. I went back into my kernel configuration and disabled APM since I've heard that could be a culprit. But, disabling APM didn't work. Finally I resorted to stepping through all the configration menus again, one-by-one. When I hit the CPU options, I realized that I hadn't changed the default setting from "Pentium III" to my processor, AMD K6-2. (I could go on about how "make menuconfig" displays this option in a very non-obvious way, but I won't.) After a "make clean" and a recompile, all was well.

So, now I have working kernel on a working system...time to build X windows and gnome...oh boy!

Posted by enigma at 10:35 PM | Comments (0)

February 28, 2004

Going Gentoo [Update]

The Gentoo installation is progressing slowly on my 333 MHz K6-2, but things are going well. I had some initial trouble getting going because I was trying to install Gentoo 1.4rc4--that's the version I already had a CD for. After grabing the 1.4 (final) version, thing have gone quite smoothly.

My computer has been compiling for over 24 hours solid now. I'm looking forward to my super-optimized Linux box! I can't wait to see how fast (or slow) Gnome will be. What would really be entertaining is to install Fedora on that box and do some performance comparisons.

Somehow I feel more powerful using Gentoo...I'm not sure why, I just do.

Posted by enigma at 10:48 PM | Comments (1)

February 26, 2004

Going Gentoo

Today I'm making the big dive into Gentoo. I already have it running on my server, so I'm familiar with it. However, my Dad installed the sever instance for me. Now, I'm installing Gentoo on a workstation at home to really check it out. I'm doing the ominous "Stage 1" installation. So far, so good. I'll keep you posted as I walk down the Gentoo path.

Posted by enigma at 10:46 PM | Comments (0)

February 19, 2004

LUFS

A big thanks to Nate Jones who posted on secure remote file systems. I tried out LUFS today. It was very easy to install and worked reliably for me (no segfaults, kernel panics, or freaky behavior). I had some permissions problems with sshfs, but I couldn't figure out if this was due to me not providing the correct command line switches, using a different username remotely, or connecting to a Solaris server. Essentially, I was able to read all the directory information, but I couldn't view any files. Here's my command line:

lufsmount sshfs://neumann@flop.engr.orst.edu ~/lufs/flop f 666 -d 777

If anyone has success/failure stores or any tips, feel free to post.

Posted by enigma at 11:33 PM | Comments (0)

Volume Rendering

As I mentioned before, I wrote a mini research paper on volume rendering over the weekend. Essentially volume rending is a computer graphics technique that allows you to visualize three dimentional or higher order data. One of the most practical applications is to take CT scan and MRI data and display them as 3D objects that the user can manipulate.

If you are intesterested, you can read my paper (4 pages). Also, if you are curious and would like to see some pretty pictures, check out the Visualization Tool Kit, the Visible Human Project, and Bill Lorensen's home page. This page also has some nice pictures, but I'm not sure how long it will be around.

Posted by enigma at 11:23 PM | Comments (0)

February 17, 2004

AIM To Lose Revisited

Maybe your remember my previous entry about my frustrations with AOL Instant Messenger? Well, I figured out what was going on. Apprently, "gaim" was configured to use the "TOC" protocol instead of the "Oscar" protocol. To fix the problem, I zapped all my gaim configuration except the buddy list. I then hand-edited the "blist.xml" file and replaced all instances of "prpl-toc" with "prpl-oscar". Vola! My buddy list is now showing up in "AIM Express"!

I have dim recollections about AOL abandoning support for TOC protocol. They are focusing all their effort with the Oscar protocol. I've never had a problem with TOC before, so I'll chalk this one up for the record.

What I really want to know is when can I get support for "voice chat" in gaim?

Posted by enigma at 05:13 PM | Comments (0)

February 10, 2004

Down With Hierarchy

Perhaps you've heard this before, but I had this insight while I was taking my midterm in CS 582 over the weekend. It's about static versus dynamic typing. Ironically, in class on Monday, this is what was on the agenda.

Fundamentally, there is a great tension between static typing and code resuse. Sure, static typing gives you the compile-time assurance that your program is free of type errors, but it also limits you to writing programs that are only in a subset of all type-correct programs. This limitation poses problems.

Consider this: How can I make reusable components if I have to bind them to a particular type? A container class is a great example to illustrate this problem. Because of polymorphism, I can pick a class high enough up in the class hierarchy (a.k.a. "Object") so that virtually any class I want can be used. This only works if the languages has a singly rooted hierarchy (not C++), and it still doesn't free you of the pain of down casting everything on the way out of the container.

Java's use of interfaces is a clever approach to this problem. Instead of depending on the class hierarchy to determine validity, an interface can be used. This allows the programmer to create abstractions to handle problems that span classes. Take iterators for example. One may want to interate over many different classes, whether or not they are related. Using interfaces, this is possible. Without interfaces, this is a nightmare.

Of course, we can't forget data generics (a.k.a. templates) for some of these things too. They are particularly good for container classes, but can also be useful in place of interfaces too. I'm happy that Java 1.5 supports generics, but I hope it's not as messy to deal with as templates in C++.

Fundamentally, static typing is quite constraining. Perl is one of my favorite languages because it is dynamically typed, and I enjoy the liberty of not having typing constraints. So why do I like Java? Because interfaces and generics ease the static-typing enough while still guranteeing provable type-correctness.

Interesting stuff....

Posted by enigma at 11:12 PM | Comments (0)

February 06, 2004

cfengine

Yesterday, in the OSU colloquium, "cfengine" was referenced. It got my attention because it was in the context of managing large systems of computers. This morning I checked it out and found an interesting article in the Linux Journal on using cfengine to manage security settings.

Basically, cfengine allows you to keep the configuration of multiple computers in perfect sync with each other--following the change once, change everywhere philosophy. It looks like a useful tool, and I'll add it to my list of things to experiment with when I have time.

Posted by enigma at 09:14 AM | Comments (0)

February 05, 2004

I'm A C Double-Plus

Whenever I see "C++", I can't help but think of "Brave New World" and the "Alpha Double Plus" social strata. I'm not sure why I make that connection, but it's always there. I know, I know, the "++" is the postincrement operator...I get the pun, but I never think of it that way. It's interesting how this one-cut-above C mentality is so relavant to C++.

The most interesting thing about C++ is the incredible tension created by having an object-oriented language that worships efficiency. Kevin's comment on C++ culture prompted me to think more about this. C++ values the raw, no "frills" approach. The language is constructed so that you know where every CPU cycle is going. Hm...I have a "virtual" keyword, that will cost a few extra cycles and a slightly bigger footprint. Hm...I'm using "new", so the object will be on the heap instead of the stack and the memory will take longer to allocate. Even "iterators" are glorified pointers, not first class objects. Case and point...see how long it took for "string" to be a fundamental part of the language.

Whereas other languages focus on the programmer, C++ focuses on the binary code that will ultimately be produced. Rather than the language being an expression, it's a bitwise specification. Rather than allowing the compiler to choose anything for you, you must choose it all yourself.

Here lies the tension. Fundamentally, object-oriented programming cares more about the way code is expressed than executed, but C++ cares so heavily about execution. I think this is why Java is such a popular alternative to C++. With Java, you get very reasonable execution speed without the agony of dealing with a specification heavy language such as C++.

Remember, programming languages were created for man, not man for the languages.

Posted by enigma at 06:49 PM | Comments (1)

January 31, 2004

Now I Remember...

Now I remember what I hate about database programming...all the time you spend writing repetitious code to simply move the data from your program into the database and vis-versa. I know, I know...use an nifty tool like EJBs...but that's part of the point.

This last week I spent 26 hours writing programs in C++ for a solution guide for the MySQL chapter in a new book that will be published. Let me say, what a pain! I think it was fun for about the first few programs, but for the last 7 to 8 got real old, real fast! All I can say was that I missed Java's wonderful string library, database library, and nifty foundational classes. Why do people like C++? Oh yeah, the execution speed...certainly not the speed of development!

Posted by enigma at 09:20 PM | Comments (2)

January 29, 2004

Smarter Smart Cards

We had a guest lecture today in the OSU colloquium. The guest was Jean-Pierre Seifert from Infineon Technologies AG in Germany. He spoke on "Secure Mobile Solutions: Products and Their Security." Dr. Seifert spent most of his lecture describing smart cards Infineon develops and what they do to make the smart cards secure. This absolutely blew my mind.

For starters, they are concerned about all sorts of physical and electronic attacks on the card, and they want to protect the contents of the card. In order to do this, they have a variety of counter measures to prevent reverse engineering and intrusion. There are heat sensors, light sensors, voltages sensors, etc., and an IC dedicated to simply monitoring the sensors.

To prevent electronic probing, they have a shielding layer surrounding the card that is charged with random electronic pulses. To prevent inferring of the instruction set via voltage readouts on the contacts, they introduce randomized delays in processing and communication. To prevent attacks by monitoring voltage changes, they carefully guard the power draw to make it perfectly consistent no matter what the card is doing. They even put random data on the bus while the CPU is busy with other things! This is crazy stuff!

Now just imagine seeing over 100 slides about this stuff. Crazy! All-in-all, it makes me glad someone thinking about this, but I'm happy simply writing applications.

Posted by enigma at 09:06 PM | Comments (1)

January 28, 2004

MySQL C API

For the last couple of days, I've been programming in C++ using the MySQL C API. I'm helping a professor create "solution programs" to a book he is writing. Contrary to what I was expecting, the API is very straightforward and easy to use. I'm not sure why I was expecting database programming in C to be a horrendous nightmare, but it turns out it isn't so bad. Don't get me wrong, I prefer DB programming in Perl or Java any day of the week, but I found the C API to be quite tractible. I suppose C++ features like "string" help make it less hairy.

Posted by enigma at 03:14 PM | Comments (0)

AIM To Lose

I'm not sure what the "technical" reason for it is, but AOL Instant Messenger (AIM) lost my buddy list again. There was a period of time about two years ago where this was happening on a semi-weekly basis. In fact, I'm not the only one I know who has been afflicted by this.

Fortunately intelligent AIM client authors have features for this very predicament. I use GAIM (Gnome AIM) in Linux. It has quite a few features and works very well. Gaim saves my buddy list and then when it dissappears from AOL, my buddies are "automagically" reloaded onto the server.

This is all well and good, but it depends on me using Gaim. When I'm out and about I often use AIM Express--a Java applet provided by AOL. Of course if my buddy list disappears (like it did last week) and I don't remember to re-launch Gaim when I'm at home, then tough beans until I get a chance.

Posted by enigma at 03:05 PM | Comments (0)

January 26, 2004

Liskov Substitution Principle

The notion was familiar, but I hadn't seen this formalized until I was reading "An Introduction to Object-Oriented Programming", by Dr. Timothy Budd.

A "subclass" is simply a child class--a class that inherits behavior. A "subtype" is a subclass that could be substituted for the parent in any instance with no change in behavior. This idea that the child class should be substitutible for the parent is know as the "Liskov Substitution Principle."

An interesting argument is that useful applications of inheritance do not violate this principle, whereas dangerous applications of inheritance do. So, inheriting from a class simply to re-use a lot of the code while changing the fundamental behavior of the class, is largely considered a bad idea. Whereas using inheritance to make a more specific kind of thing is a good idea.

Posted by enigma at 12:17 PM | Comments (0)

January 25, 2004

Programmer Humor

I'm reading this book called "Go To" by Steve Lohr. It's a fascinating and entertaining book about the programmers who created the "Software Revolution." It's a good read. I recommend it.

In the book, there is a joke told by Lois Haibt, a member of the original FORTRAN team. "Why can't programmers tell the difference between Christmas and Halloween? Because Dec 25 = Oct 31."

Now if the humer isn't entirely evident to you, consider this..."Decimal 25 = Octal 31." Now do you get it? Ha ha ha! I love this stuff. Those of you not laughing can go back to your boring, non-geek lives.

Posted by enigma at 11:04 PM | Comments (0)

January 24, 2004

I Gan What?

I'm not sure if I've metioned this before or not, but I'm taking a computer graphics class. Last term, the computer graphics class was more like an introduction to OpenGL and graphics concepts--very fun, but not very technical. This term we are learning how to write our own graphics engine. Very interesting stuff!

I was reading in my execellent textbook, Fundamentals of Computer Graphics by Peter Shirley, when I ran across the chapter on matrix math. Most of the material was giving me linear algebra flashbacks until I hit the section on eigenvalues and eigenvectors. Now it's possible that my linear algebra class covered this, but it's also quite possible I missed it due to sleep deprivation. Either way, I finally understand what eigenvalues are--and they are cool.

Essentially, an eigenvector is a vector that does not change direction when multiplied by a vector, and an eigenvalue is factor the multiplication scales the eigenvector. The reason why this is important is because all tranformations (rotation, scale, translation, shear, etc.) can be represented by matricies. Those matricies are then multiplied by coordinates or vectors to "transform" them to new coordinates or vectors. So, with eigenvalues/vectors, one can determine what will and will not be affected by a particular tranformation. Some matricies, like the rotation matrix, do not have eigenvectors, others like the identity, have infinitely many eigenvectors.

If you are curious and want to know more, check out the eigenvalue entry at MathWorld. Also, if you want a really good textbook on computer graphics with some of the best math summary chapters I have read, then check out the book by Peter Shirley.

Posted by enigma at 09:22 PM | Comments (0)

January 22, 2004

CRC Cards

Maybe you have heard of CRC cards before, but I hadn't. Not at least until I encountered them in An Introduction to Object-Oriented Programming by Timothy A. Budd.

Basically, CRC cards are a tool to help you design object-oriented programs. You describe different components and their behaviors on index cards, and then, while you go through various scenarios, you can arrange the cards to help you understand how the components interact with each other.

What's particularly nice about the CRC card technique, is that it focuses on behavior-oriented design. Although similar to UML, CRC cards a distinct approach because you don't need very much detail to get going with CRC cards, and CRC cards are a physical representation whereas UML is almost always electronic.

CRC cards were invented by Kent Beck and Ward Cunningham and are described in the paper "A Laboratory For Teaching Object-Oriented Thinking". So, read the paper if you want the details. And don't worry, the paper is short. :-)

Dr. Budd had us do a class exercise using CRC cards. I enjoyed the exercise, but I found the physical representation to be a bit limiting. Having to physically record an idea made it seem to permanent--it was easier for me to organize my thoughts electronically. Apparently Beck discourages electronic tools in place of CRC cards because physically manipulating the cards is supposed to give designers a better idea of how the software system will function.

Posted by enigma at 09:14 PM | Comments (0)

January 19, 2004

Java Reverse Compiler

Over the weekend, I discovered JAD, the "Fast Java Decompiler". I set it to work on some ".class" files and I was impressed with the result. I could easily follow the output. When I compared the output to the original ".java" file, they were surprisingly similar.

One caveat, JAD chooses to host it's main site at Tripod, so you might get a "bandwidth usage exceeded" error from time to time.

Posted by enigma at 10:46 PM | Comments (0)

January 16, 2004

Behavior-Based Design

I've been wanting to blog this since Wednesday...boy have I been busy.

I was sitting in CS 582 on Wednesday morning when Dr. Budd set into his lecture on Object-Oriented Design. What he said got my attention: in order to understand the importance of object-oriented programming, one must program within a large software system. Now, it's not news to me that object oriented programming helps manage complexity, but what really got my attention was that Dr. Budd proceeded to explain why!

Personally, I have strugged with the complexity of large-scale software, and I have looked around for helpful design approaches. Dr. Budd said that from the beginning of a project, object-oriented programming allows one to design based on behavior. One doesn't need to define any data structures or finalize a specification before making design progress. Before one writes anything down, one can already be thinking about how the software behaves--this is a natural approach for how we as people think. This really makes sense to me.

Starting from behavior, one can evolve the design to be as detailed or and general as one would like it to be. But the key to managing the complexity is that one doesn't need to be detailed from the beginning and one can become more detailed as appropriate.

Read the slides, or read the book. I'm sure I'll be posting more on this in the future.

Posted by enigma at 06:01 PM | Comments (0)

January 11, 2004

Errors With A Smile

Things having been going quite smoothly with qmail. I've particulary enjoyed reading some of the errors that get sent to "postmaster" when people try to use my server as an open relay. For example:

Hi. This is the qmail-send program at mail.neumannhaus.com.
I tried to deliver a bounce message to this address, but the bounce bounced!

And

Hi. This is the qmail-send program at mail.neumannhaus.com.
I'm afraid I wasn't able to deliver your message to the following addresses.
This is a permanent error; I've given up. Sorry it didn't work out.

You just have to love the self-aware, first-person approach. It's even cordial. :-)

Posted by enigma at 03:34 PM | Comments (0)

January 08, 2004

Horde It!

At OSU they have this nifty web mail program. I had been using it for most of my first term (Fall 2003) assuming that it was a commercial product or custom software written by OSU. Well, to my surpise, I discovered OSU uses Horde, an open-source, LGPL project! After discovering this, reading good stuff on the web about Horde, and hearing good stuff about Horde from my dad, I decided it would be worth installing for my web mail app on my server.

Using Horde is a switch for me since I have only used squirrelmail before. Squirrelmail is OK, but I have had a number of problems with it and response from the development team about critical bugs has been lethargic. However, my experince with Horde has been great so far! And, Horde is more than just a web mail client. There are lots of modules being developed that integrate into the Horde framework.

Installation was a little involved, but the "INSTALL" docs are very good. You do need to understand PHP and how to use MySQL or PostgreSQL, and you need to know how to connect to an IMAP server if you want to use IMP. Although, you probably want to run your own IMAP server. See my entry on Courier IMAP.

All-in-all, I'm quite impressed. Horde works very well, has a great interface, and is being actively developed. I look forward to using it and watching it grow.

Posted by enigma at 10:34 PM | Comments (0)

Courier IMAP

As part of my qmail experiment, I set up Courier IMAP. Courier IMAP advertises to be a lightweight, highly functional IMAP server that is compatible with qmail. Most of my past experience is with CMU's Cyrus IMAP server. Overall, I'm quite impressed.

I was amazed how easy it was to install Courier IMAP. I actually spent more time tweaking my mozilla mail settings then configuring Courier IMAP. In addition to all the standard features one would expect with an IMAP server, Courier IMAP allows for an IMAP "Outbox" that will automatically send out messages that are copied there.

One notable difference between Courier IMAP and Cyrus is that, by default, Courier IMAP keeps all the mail in the user's home directory, whereas Cyrus keeps all the mail in a single repository. In my opinion, this simplifies system administration. Of course, Courier IMAP can be configured to have shared mailboxes and virtual user mailboxes too. Although, I'm not quite sure how the Courier IMAP permissions system works since I have not investigated it.

I'll post more as I learn more. For now Courier IMAP was a breeze to setup for personal use.

Posted by enigma at 05:23 PM | Comments (0)

January 06, 2004

qmail

I took the plunge and I'm learning qmail. Qmail comes with a very high recommendation from my dad and many other people. Qmail is very fast, very easy to configure, and very secure.

A particulary odd thing about qmail's configuration is that each configuration parameter is in its own file. So, each configuration section has a directory that contains files for the configuration parameters for that section. After you get used to this oddity, it's quite easy to work with.

A great reference for setting up qmail is Life with qmail, and for fellow Gentoo Linux fans, there is a Gentoo-specific install guide. Be sure to visit qmail.org for an excellent list of qmail resources.

Posted by enigma at 11:23 PM | Comments (0)

January 04, 2004

RSS Readers

I've been looking around for good RSS readers to aggregate blogs. I found a great page that lists a bunch of different readers and what features they have.

Right now, I'm using Pears as my reader. It is simple, clean and does what I want. Both NewsMonster and Aggreg8 integrate with Mozilla. I haven't gotten NewsMonster working yet, but it looks like it has a lot of potential. Aggreg8 is working fine, but it's almost too simplistic.

In the end, I might go with something web-based so I can aggregate wherever I am. I guess we'll just have to wait and see.

Posted by enigma at 12:53 PM | Comments (1)

January 03, 2004

Concise DNS Tutorial

Well, I don't get around to doing DNS very often, so when I do, I'm always hunting online for a refresher. When I was configuring my DNS settings on GANDI, I noticed they link to this:

http://www.rscott.org/dns/

What a great little DNS reference!

Posted by enigma at 09:56 PM | Comments (0)