December 2004

Write it 100 Times on the Blackboard

You Shouldn't Try To Shoehorn Print Design Into Web Pages.
You Shouldn't Try To Shoehorn Print Design Into Web Pages.
You Shouldn't Try To Shoehorn Print Design Into Web Pages.
You Shouldn't Try To Shoehorn Print Design Into Web Pages.
You Shouldn't Try To Shoehorn Print Design Into Web Pages.

Seriously. Crap like this was the reason we wound up with the <FONT> tag.

Latent Appliance Fetishism

We've been wanting a KitchenAid for quite some time, but have never quite been able to rationalize/justify the cost over various other household/appliance needs.

So, it was with great delight that we opened the large, heavy Christmas gift from my parents to discover an 'empire red' Kitchenaid Artisan series mixer. I have not seen something this well-made in a long, long time... the quality of the thing gives me as much satisfaction as its utility.

Dimebag Darrell

While I spent the last few days mulling over how best to write a small tribute to Dimebag Darrell Abbott, Jay Pinkerton wrote one that pretty much sums up everything I wanted to convey.

Pantera's Vulgar Display of Power was a cornerstone of my soundtrack for the summer of 1992; it would not be exaggeration to estimate that I listened to it pretty much every day, sometimes multiple times a day.

Like a lot of people out there writing Dimebag Darrell memorials, I haven't listened to the album in years; Dimebag Darrell's murder is not just a senseless tragedy, it's a sudden reminder of late post-graduation, pre-college summer nights spent painting on my new Amiga 500, driving around Keene, and playing many, many games of Abalone and Cosmic Wimpout with best friends I have long since lost touch with. Like those friends, my original CD is long gone; it was one of a couple dozen that I sold during lean times in California. I have MP3s somewhere, but I haven't loaded them into iTunes yet... the album will no doubt still rock my ass off, but now it will have the same sadness as watching reruns of anything with Phil Hartmann in it.

An interesting Analogy for Hacking

If you 'make computers do stuff' for a living, Hackers and Painters is well worth a read. Probably the best stand-out quotes from Paul Graham's essay (thanks to Jason Clark for posting them on his own site; they're what lured me in):

"For example, I was taught in college that one ought to figure out a program completely on paper before even going near a computer. I found that I did not program this way. I found that I liked to program sitting in front of a computer, not a piece of paper. Worse still, instead of patiently writing out a complete program and assuring myself it was correct, I tended to just spew out code that was hopelessly broken, and gradually beat it into shape. Debugging, I was taught, was a kind of final pass where you caught typos and oversights. The way I worked, it seemed like programming consisted of debugging.

For a long time I felt bad about this, just as I once felt bad that I didn't hold my pencil the way they taught me to in elementary school. If I had only looked over at the other makers, the painters or the architects, I would have realized that there was a name for what I was doing: sketching. As far as I can tell, the way they taught me to program in college was all wrong. You should figure out programs as you're writing them, just as writers and painters and architects do."

"In hacking, like painting, work comes in cycles. Sometimes you get excited about some new project and you want to work sixteen hours a day on it. Other times nothing seems interesting."

The doing has always been the attractive aspect of programming for me; getting a task or an idea, and going right for the text editor and banging out a code sketch that more or less works, and then going back to fix/polish it has always seemed like the natural way to do things.

It's not that I couldn't sit down and spend several months creating a giant UML diagram and functional specification, it's just that the process always gets mired in the minutiae of making sure Proper Software Development Procedures are being accurately followed, and attempting to anticipate every single possible task or user interaction that might conceivably be needed. When it comes time to implement the spec, it's terribly difficult to reach that trancelike, coding-into-the-wee-hours state because you're trying to force your abstract, idealized design into reality... and methodology dictates that Now Is Not The Time To Be Making Design Decisions, even if it's become apparent that implementing feature X is going to be torture because of some unforseen language/library shortcoming.

On the other hand, when you enter the realm of large, complex software projects the rosy picture of "Programmer as painter, working on the masterpiece as (s)he goes, free of constraints and able to make beautiful code" is not entirely realistic. I haven't done enough of this on a large scale to know where the balance between planning and execution is, but I do know that I absolutely feel more effective when I'm hacking away at something than when I'm trying to write it as pseudo-pseudocode in Microsoft Word... even with a language I know pretty well, it's just not possible to declare how X will work in a specification, and have complete confidence that the actual code implementation of X will be practical, or even possible. In most cases it is, but it's the cases where adhering to the spec is a problem that make the whole excercise so frustrating.

I still like Peter Norvig's Teach Yourself Programming in Ten Years essay, which points out that it takes a long time to figure this stuff out, even if you did go to school for it.

Enabling the 'Preferences' dialog for OS X Java Swing applications

I managed to figure out some of the vague details of Apple's com.apple.eawt.ApplicationAdapter class for handling the Application Menu in Java applications, thanks in part to this forum post, but the 'Preferences' menu wasn't showing up.

Fortunately, all that's required is to invoke your com.apple.eawt.Application object's setEnabledPreferencesMenu() method with a true boolean.

(See: Application (Apple Java Extensions))

Conquer Massachusetts, RISK Style

Massachusetts Lux Map Battle for the Bay State! 14 countries corresponding to the counties and islands of Massachusetts, divided into three continents. A small map, but surpisingly fun. (Cape Cod can be harder to hold on to than it looks!) Design-wise, I was inspired by the classic 1970's/early 1980's game board I grew up with. This was largely an excercise in the mechanics of map-making on my part, so although there are a few things that could use improvement (country and continent borders are a bit close together, theme graphics are choppy in places), this will probably be the only release of this map unless somebody finds an egregious error somewhere.

See the Lux site, or download it via the Lux plug-in manager.

Short Term Obsessions

I've written lots of stuff about all the personal projects I start and abandon... three years after starting this site, not much has changed in that regard.

This weekend it's been Lux, the best $20 I've spent in a while. I've been spending entirely too much time both playing it, and building a game map of Massachusetts. It's always gratifying to be able to take some project from concept to completion in the course of just a day or two.

Regular Expression for Lux Map Making

Dreamweaver's imagemap functionality is pretty handy for constructing the pairs of coordinates necessary to define countries on a Lux map.

The only problem is, the HTML coordinates are all strung together with commas, while the official spec for Lux maps requires that each coordinate pair be separated by a space.

Fortunately, splitting the long, comma separated string into nice neat pairs is easily accomplished with a regular expression search/replace. I used Smultron, but any text editor with regex search/replace should do. I put the coordinate string in a new document, searched for

'(\d+?),(\d+?),'

and replaced it with

'\1,\2 '

(The single quotes are only there to illustrate the space after the \2 backreference; don't include them in the find/replace fields.) This should turn a string like

156,406,148,363,139,365,140,349,

into a string like

156,406 148,363 139,365 140,349

Which can then be copy/pasted into the luxb file.

Syndicate content

Twitter

Older

Contact

Andy Chase
(978) 297-6402
andychase [at] gmail.com
GPG/PGP Public Key