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 27, 2004

Always Something To Do

It seems like there is always something to take care of. Take today, for example, I don't think I accomplished one major thing, just a bunch of little stuff that had to get done. Of course if I try to remember everything I got done today, I can't, but at the time it seemed like it needed doing.

The funny part is that if someone asks me..."What did you do today?" I'd probably just say "Not much." :-) That seems easier then trying to remember.

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

January 26, 2004

Super Monkey Ball

Sega gave up on making their own console and went back to simply making video games. This was as great idea because out of the unholy union of Sega and the Nintendo Gamecube, comes Super Monkey Ball! I think "addictive" might be a euphamism. This game is a blast!

Check out the game site. If you have flash installed (why wouldn't you?!?) then you can play a fun little online version!

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

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)

Busy, Busy, Busy...

I have been rediculously busy lately. I mean, no free time at all...not even for blogging. Well, today has slowed down a little, but I still have tons to do. I don't think I have ever been this busy before, and if I have, I certainly forgot what it was like. Bottom line, grad school = busy.

The real challenge is figuring out what order to do stuff in. You don't want to procrastinate, but you can't do everything first. Do you work on what is due next? or what will go the fastest? It's a tough call. This week I made the wrong call and put off working on my graphics assignment until Monday and yesterday. That was a mistake! I discovered a problem with the assignment yesterday (the day it was due) and couldn't really get it clarified before I had to turn in my assignment. Next time, I'm going to start graphics earlier.

Posted by enigma at 09:53 AM | 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 18, 2004

What If Santa Were Real?

Like most wacky thoughts I have, this one started in the shower. Maybe it's because I have one foot in dreamland and another in reality, or maybe it's because I haven't eaten for ten hours. Whatever the cause, I got to thinking, what if Santa were real? At least real enough to make the news. Imagine Santa on CNN, Fox News, even the Wall Street Journal.

If Santa were real, I think we could expect headlines like this:

"Homeland Security Ellicits Santa's Aid In War On Terror"...Known for his state-of-the-art survellance equipment, Santa is the latest world-power to join the War On Terror.

"Santa Accused of Favoring Judeo-Christian Ethics"...In a suprise move, Scientology officials accused Santa for favoring those considered "good" by Judeo-Christian ethics. The officials demanded more representation for Scientology and other world religions in Santa's moral classification.

"ACLU Sues Santa For Alleged Widespread Privacy Violations"...Warning that Santa is a widescale privacy threat, the ACLU has sued Santa in an attempt to prevent him from using survellance or monitoring equipment within U.S. borders.

"Santa Switches To Immitation Coal"...After terror groups used the carbon-rich coal delivered to their stockings to make bombs, Santa decided to switch to "immitation" coal to prevent further problems and to "promote a healthier, cleaner environment."

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

Grading Is An Art

I spent 4 hours yesterday and 4 hours today grading programs for CS 480. I've learned two things. People have wildly different programming styles, and grading is an art.

It's easy to grade something that is correct. The student is right, end of story. It's much more difficult to grade something that's wrong. How "wrong" is the error? How many points should be deducted? What sort of helpful comments should I write?

Fortunately, I'm TAing for a very experienced teacher (Dr. Budd) who is exceptionally helpful when I have questions or dilemmas. I'm just hoping I'll be a much better (and faster) artist by the end of the term.

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

January 17, 2004

I Like My Desk

Since I'm a TA, OSU assigned me a desk. I share the desk with another TA and there are a total of three desks in the office. It's convenient because the office is in a building adjacent to the Computer Science building. Giving graduate assistants a desk is a great idea! It gives me a place to go where I can get work done with some more privacy and quiet than the computer lab. Plus, I have a big window right next to my desk! You can't beat that!

Today was the first time I spent significant time at my desk. I was correcting programs for CS 480. I was amazed how much I could really focus by getting away from everything. There really isn't anything to distract me there, so I just buckle down and work. In short, I like my desk. Pictures to come....

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

January 16, 2004

English Is Weird

The opposite of "on" is off, and vis-versa. So if something is not "on", it's "off". So why do we say "not on-time" instead of "off-time" or "do not have time-off" instead of "have time-on"? And why do "on-time" and "time-off" have nothing to do with each other?

Strange...very strange....

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

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 13, 2004

Automata, Automata, Automata

Well, I just finished grading a bunch of papers for CS 480. I knew how to construct automata before, but if grading 29 homework assignments doesn't hammer it in, I don't know what will. It's funny how they say one of the best ways to learn something is to teach it...well, grading must be one of the best ways to get it down cold.

And for the record, a DFA does *not* have epsilon transitions! Repeat after me..."A DFA does not have epsilon transitions...."

Posted by enigma at 08:44 PM | Comments (0)

January 12, 2004

Photo Contest

The Oregonian is having a photo contest for pictures from last week's big winter storm. The winners get free stuff, so I submitted a few pictures. Here are the ones I sent in.

Posted by enigma at 09:26 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 07, 2004

Snow, Snow, Snow, Ice

I got a chance to upload and index my winter weather photos. You can check them out in the photos area. The snow was beautiful, and the ice was amazing! The freezing rain coated everything in a shell of ice. I have never seen anything like it before.

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

OSU Closed Again

"OSU will be closed Wednesday due to inclement weather conditions." What a great word: "inclement". Leave it to a university to expand your vocabulary through a press release.

Yesterday I didn't miss any classes. Today, I'm missing classes.

Posted by enigma at 08:39 AM | 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)

OSU Closed

We are having freak weather up here, so OSU closed for the day. The press release says that this has only happened a few times in OSU's history! My favorite quote is: "The decision to close the university is always difficult," McCambridge said. "It's only the second day of the term, so there shouldn't be many midterms scheduled."

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

January 05, 2004

New Assistantship

Well, today was my first official day as a teaching assistant. I'll be assisting Dr. Timothy Budd for Translators (CS 480). I'm exciting about this since I ultimately want to be a college professor. It looks like my duties will entail lots of grading and whatever else Dr. Budd assigns.

Assistantships are really the way to go. They cover tuition as well as a monthly stipend. OSU has both research and teaching assistantships. Essentially, you get paid to go to school!

I thank God for providing this assistantship. I wasn't expecting an assistantship this early in my grad career although I have tried for a TA position since I applied to OSU. I had already written off this winter term until I found out about it at the last minute. It's a blessing because I'll save thousands of dollars and have extra income.

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

Let It Snow, Let It Snow, Let It Snow...

It snowed most of the morning today. It was beautiful! Apparently this much snow is unusual for Corvallis, but I'm loving it! How appropriate for the first day of winter term. I'll post some pictures when I get a chance to upload them.

Posted by enigma at 12:30 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)

Here Goes Nothin'

Well, I'm starting a blog. Yup, a blog. I hope to keep things short and interesting and up-to-date. Happy reading.

I'm using this ecclectic blog engine called "Movable Type". Installation isn't for the faint of heart, but it has lots of features. :-)

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