Category Archives: essay

Essays

Defaulting to customizable

In Java, many of the the standard library’s objects have configurable settings, like timeout settings, boolean behavior flags, and so on. Sun’s documentation never says what these are set to by default. Does the timeout default to infinity? Zero? Thirty seconds? One hour? Is a new connection set to accept input, or output, by default? What’s the default buffer size of this object? Am I expected to write a little test program to figure out what the defaults are? Am I expected to grep through the Java standard library source code to find out?

On top of this, lots of the configuration values have getters, setters, and a method to set the default value for all future instances of that class for the lifetime of your application. This must have taken some time to implement. But did Sun bother to put the factory defaults in the documentation? No.

This is a classic example of over-engineering; Instead of focusing on choosing a reasonable default and writing complete, useful documentation to make the user’s (coder’s) life better, they focused on a level of configurability that is only rarely (if ever) necessary.

Rethinking the Progress Bar

Rethinking the Progress Bar doesn’t really rethink it so much as prove what should have been obvious; people prefer progress bars that speed up as they reach the end, rather than progress bars that slow down towards the end. Execute your unpredictable-duration activities, like network transfers, at the beginning of your code, and your predictable-duration activities at the end.

I wonder why we’ve never seen progress boxes or regions, that express two simultaneous processes by growing in two (or more) dimensions simultaneously, at different rates. Seems like you could map one dimension to radius and the other to angle, and have a progress region that progresses from a single center point, to a wedge, and finally to a filled circle. Probably too complicated, but I’d love to find a use for that.

http://d+w+.com

The number-noun name has got to be the least creative of all the silly website naming patterns:

  • Six Apart
  • 8 Days (hot-or-not)
  • 9 rules
  • 30 boxes
  • 37 signals
  • 43 folders
  • 43 things
  • 88 miles

Just for fun I want to make a site called 0 points, or maybe 3.25 dollars. -7 employees?

Internet, meet Spydentify

spydentify-400x107Spydentify is a new experiment/side project of mine. It fills a niche that I first identified over at the Typophile Type ID Board: people love looking a pictures and trying to figure out what’s in them. The site’s interface is designed to be as addictive as possible, with a neverending, rapid flow of interesting images, big, shiny buttons to click, and instant feedback on your actions. I’m going to add more ego-stroking, viral-spreading and moderation features soon.

The interface also follows the MVC pattern I laid out in this article. It uses one static HTML file, all dynamic data is loaded through XMLHTTPRequest (AJAX, for those of you who speak Web 2.0), and all HTML generation is done via JavaScript manipulation of the DOM. The backend uses Pylons, which gave me a chance to learn Pylons, Paste, Routes, SQLAlchemy, FormEncode, and Mako. And comments are rendered with my own PottyMouth.

I also designed the logo all by myself.

Check it out.

Don’t let your metaphors lead you

Great passage from a great article, The Autumn of the Multitaskers, by Walter Kirn:

In the days of rudimentary chemistry, the mind was thought to be a beaker of swirling volatile essences. Then came classical physical mechanics, and the mind was regarded as a clocklike thing, with springs and wheels. Then it was steam-driven, maybe. A combustion chamber. Then came electricity and Freud, and it was a dynamo of polarized energies—the id charged one way, the superego the other.

Now, in the heyday of the microchip, the brain is a computer. A CPU.

The early psychologists also described the mind in terms of hydrodynamics. I wonder what the next metaphor will be — I’m surprised that the brain as world wide web, full of ephemeral interconnections and communicades, between actors who rise and fall in influence and activity, hasn’t surfaced as a metaphor yet (not that such a metaphor would necessarily be any better than the old ones). Maybe that metaphor is not simple enough.

Update 2008-02-20: My friend Kelly pointed me at Your Brain Works Like the Internet, which shows that this metaphor is present in the wild.

New music genres to watch out for

Conversation between music nerds, overheard, 2037:

A: “What kinda music do you like?”

B: “Oh, mostly Folkwave and Waltzcore these days. I used to be into Dark Country, but then it got dumb.”

A: “Yeah, me too. I like a little Punk-Hop and Crackabilly, but you know, the scene is so tired.”

B: “When did this Soft Metal thing start getting popular again? It’s so, like, 2033.”

A: “That and Polkabilly. Nerds.”

B: “Laaame.”

The next big thing, part 1: Resolving the conflict between Model-View-Controller and AJAX design patterns

or, how I learned to stop worrying and love the XMLHTTPRequest…

This is the first part of what will become an ongoing series.

If you’ve built a website in the last few years, most likely you’ve adopted an architecture similar to Model-View-Controller, or MVC. If not, well, either your website is terribly simple, you haven’t had to modify it yet, or your code is spaghetti and you should be fired. Just kidding. (Or maybe you’ve come up with an even better architecture, in which case you should share your insights with us mere mortals.)

In MVC architecture, the model reads and writes data to and from a back-end data-store, and organizes the relational data in a nice, hierarchical fashion to be used by the controller. The view accepts input from the controller and generates output HTML, XML, RSS, JavaScript, SVG, PDF, or whatever you want to send to the user’s browser. And the controller accepts browser input, figures out what to query the model for, and picks which view to use and what data to send it.

figure 1: The traditional MVC architecture.

Continue reading

Why I’ve stopped reporting bugs to Ubuntu

I’ve largely stopped reporting bugs to Ubuntu because of the condescending and dismissive attitude from their developers.

I cut my Linux teeth on RedHat back in 1998, and soon after settled on Debian as the best of several flawed but promising choices of Linux distributions. When I switched to Ubuntu 4.10 in October 2004, I was excited by the promise of a distribution with the quality of Debian and frequent releases and a focus on the desktop.

Today I stumbled across what unfortunately seems like another typical example of what happens when you report a bug to them: aumix in Ubuntu 7.10 was compiled wrong, such that it won’t even launch. Recompiling the source package without making any changes to the source fixes the problem. Instead of just doing that, the Ubuntu developers spent far more time and effort bickering on the bug report and justifying their inaction by referring to official protocol. Shallow thoughts outlines the issues with aumix and contains this quote:

Continue reading