Yearly Archive: 2007

Doomed!

Anyone still playing Doom out there? I came across a custom level I made way back in 1995 (give or take a year) and realized that the world shouldn’t be deprived of this great treasure.

I think it’s a decent, playable level, with good “texturization.” There are two difficulty levels: 1-2 is fairly easy, and 3-5 should be challenging.

Although the Doom source code is free software under the GNU GPL now, I don’t think that includes the main Doom “wad” with all the textures.

I haven’t tried running one of the GPL versions. To get the map and screenshots included here, I ran Doom95 under Wine. That worked ok except that I didn’t get any sound.

Check it out!

scar1.tgz (37 KB)(includes scar1.wad and scar1.txt)

Spoiler alert! You can see a map of the level, but I wouldn’t look if …

Ruthless Massively Parallel Trial-and-Error with a Feedback Cycle

Glyn Moody points to Simon Willison pointing to an old 2001 post by Linus Torvalds. An oldie but a goodie, I’m including it here for greater memory permanence.

In response to a comment that “Linux really isn’t going anywhere in particular and seems to be making progress through sheer luck,” Linus writes:

Hey, that’s not a bug, that’s a FEATURE!

You know what the most complex piece of engineering known to man in the whole solar system is?

Guess what – it’s not Linux, it’s not Solaris, and it’s not your car.

It’s you. And me.

And think about how you and me actually came about – not through any complex design.

Right. “Sheer luck.”

Well, sheer luck, AND:

Free availability and crosspollination through sharing of “source code,” although biologists call it DNA.

A rather unforgiving user environment, that happily replaces bad versions of us with better working versions and thus culls the herd (biologists often call this “survival of the fittest”).

Massive undirected parallel development …

Playing the Leeann Chin Gift Card Investment Game

(Part of being on break means I can write totally inane, off-topic posts…)

We get takeout from Leeann Chin once per week, usually on Fridays. This is about the third Christmas season now (that I can remember) where they offer a gift card deal: buy a $40 gift card and receive an additional $10 “free” in gift cards.

So let’s do the math:

Our usual bill: $13.81. (Includes Bourbon and Mongolian Chicken, umm…)

$13.81 x 52 = $718.12 per year

If I was willing to pay for a year’s worth of meals in advance:

$718 / $50 = 14.3624 gift card deals. (Let’s round down to 14.)

14 cards x $40 = $560 actual outlay

$560 gets us $700 worth of meals. That’s a $140 return on a $560 investment, for a very crude and approximate 25% annual return. With the risks being mainly that Leeann Chin might go under or that service or quality might fall below acceptable levels. I’m discounting inflation risk based on past …

Updating the Linksys BEFSR41 Router Firmware from GNU/Linux

One of the challenges you run in to when moving to GNU/Linux is that simple little things may not be supported. For example, updating the firmware on your router. Linksys provides some rinky-dink program to install the firmware from Windows, but doesn’t tell you how or if you can do it from GNU/Linux. (At least there wasn’t anything I could find on their site about this.)

I’ve had a Linksys BEFSR41 4-port wired router since 2000, and in the early days I upgraded the firmware from Windows a few times, but now haven’t touched it in many years, getting by just fine with the 1.37 firmware from Jan ’01. Recently I’ve been trying out OpenDNS, and from their site gathered that a newer firmware might allow me to statically set my DNS servers in the router, rather than having to set them on each computer.

So I went to Linksys, where I found that my router is so …

Long Canyon Trail

Long Canyon Trail, Sedona, Arizona

Picture Filer: A free Java program for naming and sorting image files

I made this program to go along with my process for handling incoming digital pictures, but I hope you might find it useful also.

I copy files from my camera in to a working directory, and bulk rename them using my Nautilus script: rename-with-exif-date.sh. This gives me a bunch of files with a timestamp in YYMMDD_HHMMSS format, for example: 071125_090623.jpg.

Next I need to give them additional descriptive tags, and then sort them in to their permanent homes. I like to keep one big directory of originals for each year, and then a smaller subset sorted in to categories, which I might then crop and fix red-eye and etc. Let’s say the end result of a naming/sorting session results in these files:

~/pics/original/2007/
071125_090845 UFO Encounter- Saucer Landing.jpg
071125_090853 UFO Encounter- Saucer Landing.jpg
071125_091026 UFO Encounter- Colorful …

On the Sharing of Free Software

Hi, loyal readers. I’m still here. Last week was busy at work, and getting up at 3:30am tends to make my evenings shorter. Any time I’ve had, I’ve been working on writing a Java utility to help with naming and sorting my pictures. It’s always a battle between finding time to write blog entries and finding time to write code. I like doing both, but writing articles tends to crowd out programming time. It hasn’t been as often that writing software has crowded out blogging time. And since I really want to write free software as well as write about it, I’m going to have to work on that balance.

I’ll be sharing my program here, with some trepidation. It’s not perfect; nothing ever is. I always imagine writing some elegant and beautiful work of art, but the words on the page never match up with that ideal. Even if posting software here won’t result …

Martin Sexton, ‘Hallelujah’

Martin Sexton, Hallelujah

Absolutely loving Black Sheep and Wonder Bar, and I’ve already ordered two more of his albums: In the Journey and The American. I may have missed out on years of listening enjoyment, but now I get to experience it all for the first time. Woo Hoo!

I read some of the comments on Amazon about Black Sheep, and see that lots of squares like me first discovered Sexton by hearing “Diner” on Scrubs. At least one nimrod complained because every song on the album wasn’t just like “Diner.” Oh, man. It’s so sad that this philistine was given the opportunity to enjoy such emotional and powerful music, but failed to appreciate it. Not that everyone should feel the same way about his music, but to me this stuff is amazing. It’s true, and it’s …

Displaying a Scaled Image with Java Swing

I’m working on a small application to help me with naming and sorting my pictures, so one of the basic things it needs to do is load and scale an image. Found lots of information here and there on this, and this post is to share what I came up with.

When searching around trying to figure stuff like this out, it’s hard to credit where you found everything. A lot of search results point to forum.java.sun.com, with discussions that are alternatively helpful and abusive to newbie questions. When I started leaning towards a solution based on overriding the “paint” method, one of the forum threads pointed to a good tutorial: “Lesson: Performing Custom Painting,” and an in-depth explanation: “Painting in AWT and Swing.”

The core of this is a class that extends javax.swing.JPanel, uses javax.imageio.ImageIO to read the file in to a java.awt.Image class, and then calls the Image.getScaledInstance() method to scale the image. We override the JPanel’s paintComponent(Graphics g) method …

NetBeans Gotcha: GUI custom component problem when package and class named the same

Let’s say you have a project with package Example, and in that package you have:

Example.java // troublemaker!
ExampleUI.java // “form” – extends JFrame
LabelExample.java // extends JLabel

One of the cool things about the Matisse GUI Editor in NetBeans is that you can add LabelExample.java as a custom component to the widget palette and then drop an instance of it on your ExampleUI.java form in design mode. NetBeans will generate the source code for you.

However, there is a little hitch. When NetBeans creates the variable declaration, it will use the fully qualified path of your class, in this case Example.LabelExample, and then the IDE (which is chanelling the compiler), will complain with:

That is, here is your generated code block:

// Variables declaration – do not modify
private Example.LabelExample labelExample1;
// End of variables declaration

And this is the error:

cannot find symbol
symbol : class LabelExample
location: class Example.Example

I guess it’s confused about which “Example” you mean, …