Insufficiently Random

The lonely musings of a loosely connected software developer.

Saturday, September 23, 2006

MythTV's Deletion Logic

There must be a bug somewhere in MythTV's show deletion logic.

I hate to admit it but I find Stargate Atlantis to be entertaining, so I record the new episode every Friday night. Because I may not be able to get around to watching the show rigtht away I asked MythTV retain two copies of the show, deleting the oldest.

So right now my MythTV box has the episodes from Aug 25, Sept 18, Sept 16. But not last night's episode, Sept 22. First off, why do I have 3 episodes when I asked for 2? And secondly, why do I have an old episode but not the most recent?!?

Looking at the oldrecorded table in MySQL it shows that the Sept 22nd episode was in fact recorded. But it must have been deleted just a few minutes after it finished recording. :mad:

Sunday, September 3, 2006

On Sandwich Making

I have never seen a discussion on sandwich making which was as worth reading as this one. Nicely done.

Sunday, August 20, 2006

MySQL Recovery Blows

I'm running MythTV at home. Since May it has replaced our trustworthy ReplayTV in the living room as the primary TV viewing apparatus.

Thus far its worked rather well for us, despite some odd user interface quirks that probably have more to do with the way I designed my Pronto panels than with MythTV itself.

But its use of MySQL is another story...

pg version 0.1.7 Released

A little while ago I discovered pg 0.1.6 had some issues with more recent GIT versions, such as GIT 1.4.1 due to some changes in command line parameter handling.

Consequently pg 0.1.7 is now available. Here is the shortlog of changes:

* When backing up into a new directory GIT 1.3.1 won't copy
* Corrected diff-index usage for GIT 1.4.1.
* Add raw diff support to pg-files.
* Add --base=foo option to pg-new.

Wednesday, April 26, 2006

That's Legal?!

Today I found this gem on the GIT mailing list:


Timo Hirvonen wrote:
> Linus Torvalds wrote:
>
> > +void verify_filename(const char *prefix, const char *arg)
> > +{
> > + const char *name;
> > + struct stat st;
> > +
> > + if (*arg == '-')
> > + die("bad flag '%s' used after filename", arg);
> > + name = prefix ? prefix_filename(prefix, strlen(prefix), arg) : arg;
> > + if (!lstat(name, &st))
> > + return;
> > + if (errno == ENOENT);
>
> Extra semicolon.


Just what were the authors of C thinking when they decided to allow:


if (errno == ENOENT);


as a legal statement? It clearly has no real purpose as the "then-clause" of the if statement is completely empty.

What's really bad is this language feature is also available in C++, Objective-C, Java, Perl, etc. I'm so glad modern language designers have kept the warts intact.

pg version v0.1.6 Released

I've made quite a few changes to pg since the last listed release of v0.1.1, I just haven't published it on my website.

What Ever Happened To LaTeX?

So I'm reviewing this paper written by a group of students in a senior-year computer science class. It has some math equations, data tables, and some plots and bar graphs. So why is it written in Microsoft Word?

The equations look horrible. In fact I think one of them is a screenshot taken from the assignment (which was written in LaTeX and distributed in PDF) then doctored in Microsoft Paint, pasted into Microsoft Word and resized to take up the desired amount of space. Needless to say it is impossible to read the superscripts as they are quite blurry.

As a graduate student LaTeX is practically my bread and butter. It handles math equations exceptionally well, its page layout rarely needs to be questioned, and it makes cross referencing within your document a breeze. Yet when I talk to many students they don't even know what LaTeX is. When I show them a LaTeX document file they cringe at the thought of not using a GUI editor to write their content.

So what did happen to LaTeX? Why aren't students learning how to use good publishing tools which will save them time, produce better quality output, and not lock them into proprietary file formats? Why is Microsoft Word the only known method of writing documents?

I think its the "Word comes preinstalled, LaTeX doesn't" mentality. Or its the "if I can't click on an icon with a mouse, its too hard to use" mentality. The former is somewhat reasonable; perhaps RPI should be preinstalling LaTeX on all Windows laptops that it sells to students. The latter is simply not a valid execuse for a computer science major.

Or perhaps I'm just discovering that I am already an old fogey and this is a new generation of whippersnappers.

Friday, February 10, 2006

pg version v0.1.1 Released

I'm finally making the first public release of pg (aka Patchy GIT).

pg is a shell script wrapper around GIT to help the user manage a set of patches to files. pg is somewhat like quilt or StGIT, but it does have a slightly different feature set. For one thing pg may not have everything you want. Yet. On the other hand pg does things differently then StGIT. :-)

Thursday, January 26, 2006

Two Down, Three To Go!

I passed two of the five qualifying exams required for a PhD in Computer Science. Go me! Now I just have three of them left. I'm taking one as a course this semester and the other two will just have to wait until August when the oral exams are offered again. I opted to put those exams off so that I could spend more time studying, as I will only get one attempt to pass them.

Tuesday, January 24, 2006

Applied Cryptography on Amazon?

I'm taking a course this semester on computer network security. One of our texts is Bruce Schneier's Applied Cryptography. The campus bookstore wants $51 for this book in paperback. Searching by the ISBN on Amazon came up with a price of $31.80 for the paperback edition. A savings of $19.20, roughly equal to the cost of 4 lunches on campus. Reason number 1 not to purchase your books on campus.

Schneier (wisely I would say) offers links to his books on Amazon through the Amazon referral program. Except that the hardcover edition link is currently jumping to the paperback edition and is listing at full price ($60.00) while the paperback link is listing for $31.80.

Apparently Amazon doesn't have hardcover editions available and is instead offering the paperback edition at full price, hoping that you won't notice since you might be willing to pay more. :mad: If I'm going to pay more for a book I want something in return, such as a hardcover. I would rather have the hardcover version of good books like Applied Cryptography as hardcovers tend to last longer around me than paperback covers do.

Sunday, January 15, 2006

Why Isn't 1983 Online?

I'm trying to find an electronic copy of Cook and LeBlanc's 1983 paper "A Symbol Table Abstraction to Implement Languages with Explicit Scope Control", originally published in IEEE Transactions on Software Engineering.

Guess what: 1983 isn't on the Internet! :-x The IEEE online archives only go back to 1988 right now. Google sure as hell can't find the paper either, as it hasn't been posted in electronic form by the authors. So all I can turn up is the citation for the article, and Cook's homepage.

I've gotten so used to having things online that I find it odd when something isn't available online. One good thing about being associated with RPI is that we have access to both the ACM and IEEE online archives through the library's research subscriptions. ACM is really quite good; just about everything has been digitized and made available online with full text search. IEEE seems to have made a cutoff at 1988 leaving some important work in computer science (and I'm sure electrical engineering) unavailable.

When its 3 degrees F outside and the library is closed I sure as heck don't want to drive over to campus to lookup the dead tree version of something! IEEE - please finish your online archives!

Programming Languages @ RPI: I'm Feeling Cheated

I took RPI's "Programming Languages" course in the spring of 1999. It was the end of my second year at RPI. The course was supposed to teach us about important concepts in programming languages as well as introduce us to different genres of programming, such as OOP, generic, functional, logic, etc.

The Importance of Pict?

What is the practical importance of The Pict Programming Language? Because I have an exam next week which might be asking me exactly that.

The Perils of JavaSchools - Joel on Software

I just finished reading one of Joel's latest: The Perils of JavaSchools. He's right.

I'm not a graduate of a Java school, but I am a graduate of a C++ school. Where C++'s STL library is taught before dynamic memory allocation. Or recursion. Or data structures of any type.

By the time students actually get to the data structures course they have been writing all of their assignments with std::vector and std::map. They don't understand how generic types work, but they can use them to implement a very poor spell checker. They have no desire to learn how std::map might be implemented, as they think that all they really need to know is #include <map>. It might as well be Java, where at least they have to deal with the challenge of downcasting when accessing a java.lang.Map.

What's With Tom?

My wife is a member of MySpace, as are many of her friends. Apparently it actually is a semi-useful website for people who don't own their own websites. Perhaps it was a good purchase for Murdoch's News Corp.. Personally I find the homepage to be cluttered and uninteresting. Google's homepage is much better.

But that's not the interesting part - what's with Tom? He's got 49,077,564 friends as of Jan 15th. How can one person really have almost 50 million friends? Even if he only talked to each one for only 1 minute per day it would take him 93 years to talk to each person, without sleeping. So there's no way Tom has 50 million friends. More likely MySpace has over 50 million users, all of whom have Tom as their friend for one reason or another. I wonder what he's worth now that News Corp. has bought the website for $580 million.

Wednesday, January 11, 2006

Switching to WordPress

So i just spent a few hours converting my blog (if it could even be called that!) from MovableType to WordPress. It was pretty easy but still a lot more painful than it should have been.

Tuesday, January 10, 2006

Why a ScreensavRz?

Apple's got a little issue with their current PowerBook line. The keys press into the LCD when the lid is closed. Which isn't good because then you get finger dirt and such on the screen, in a nice keyboard configuration. Unless you are into such types of modern art (I'm not) you really don't want this to happen as it makes the screen harder to see.

I've had my 15" PowerBook for a year now. About a month into owning it I started to see my keyboard in my screen, rather than say the Terminal window I was currently working in. Not good.

Doing some research on the web I found Notebook ScreensavRz, a microfiber cloth you can place between your keyboard and your LCD. A year later I can't be happier; its saved my LCD from looking exactly like my keyboard. But yea, it wasn't cheap.

Given how much Apple charges for their PowerBook line you would think they would have this issue solved by now. Or at least include a ScreensavRz free. But nooooo. I guess they figure their end users can afford to either replace the LCD or purchase their own ScreensavRz. Sort of like a country club charging high membership rates and then high rates to actually play on the course.

Monday, January 9, 2006

Serenity on DVD!

I finally got my hands on a copy of Serenity on DVD. Widescreen of course. I received it as a christmas present this year from family, so now I just have to find time to crack open the plastic wrap and settle down in front of the 8' screen for some good viewing. :-)

I went to go see it opening night at the movies. I never see movies in the movie theaters anymore (it just isn't worth it) but I figured Serenity just might be worth it. I was right. If the DVD transfer is even halfway decent it will look and sound pretty good here at home too. Though it could look even better if I ever actually could get around to adjusting the convergence on my projector.

Too bad the box office numbers for Serenity weren't as good as what the browncoats were hoping for. Flightplan really took away from Serenity, as has been said before. I don't think it was really marketed as much as it could have been. Maybe if some of the cast was able to do more of the talk show circuit the movie would have fared better. Hopefully the DVD sales will go well. Its currently #3 on Amazon.com's DVD sales, and has been in the top 10 since it was released. The TV show box set is currently at #4. Not bad for the little series that could! Especially when one considers the fact that the TV show box set has been available for years, and its the box set's sales which helped get the investment in the movie. You would think that everyone who wants the boxed set already has one.

Hmm. I don't have the TV series box set yet. And I want one. But $34.99 for a boxed TV series that I've seen before is likely not the best investment for a poor graduate student. Maybe next year.

I'm definately looking forward to more from Joss Whedon and crew.