That's the second biggest monkey head I've ever seen

A thousand times yes! The Secret of Monkey Island, revisited. My eleven-year old self is jumping with glee. Awkwardly.

See also, ScummC and The Secret of Monkey Island, The Play.


How did SQL get so popular?

Many developers, especially of the younger generation, dislike relational databases and their business-partner, SQL. It is regarded by some as the new assembly language. With all this distaste going around, how did it gain such a strong foothold in industry?

I offer you two answers: ACID and surface area.

ACID

Atomicity, consistency, isolation and durability. It’s not something most folks want to think about. To a rookie developer, it’s overwhelming. They’re not yet familiar with the semantics of the systems their programs run upon. Is fread thread-safe? “How should I know, I just learned C last semester and about fread’s parameters last week!”

The promises of a modern relational database include a compelling bullet point: your data is safe with us. Use our APIs, don’t break the rules, and we will make sure you never blow away some data and get a call at 3 AM. Rather, the DBA will, but what do you care about that guy?

So I submit to you that most programmers don’t use databases because they’re great. Rather, they have come to rely upon them because the canonical tome on transactions is heavy enough to maim small mammals and rife with formalisms. So they skip the nine-hundred page textbook and pick up the six-hundred page O’Reilly book.

Surface Area

Most programs that people will pay you to write involve side-effects. Further, many of those side-effects have to do with saving data off so you can perform further side-effects on it in the future.

The rookie developer typically leans first to files. Files are familiar and pervasive. But files leave a lot to said rookie. How should I structure my data? How do I load and save the data? How do I manipulate the data once it’s in memory? Even in scripting languages, with their simplified APIs, this means the rookie is faced with APIs like this:

  • fopen
  • fread
  • fwrite
  • seek
  • fclose
  • encode
  • decode
  • hash_set
  • hash_get

When I was bit a wee lad o’ programming, I found this Gordian knot difficult to cut. But then, one day, I was told by a programmer of greater wisdom to use a database. That API looked like this:

  • connect
  • execute
  • fetch
  • next
  • select
  • insert
  • update
  • delete

It was a lot easier to understand, even though the last four are a completely different language.

So, I submit to you, that SQL also won because it was easier to understand how one might structure their programs, make them work and, if they’re lucky, get them to run quickly.

Inflection point

I’d wager that five years from now, the generation of developers who are now upcoming won’t take the database tier for granted. Key-value stores, distributed file systems and document databases will all play into the question of “what do we do with the important data?” Sometimes, relational databases will prove useful. But increasingly, other things will too.

In the end, there’s two ways to look at this: we will soon throw down the shackles of our relational overlords, or, prepare yourself for the database renaissance in programming fashion that will occur in a decade or so.

Everyone wins!


Shippin' ain't easy

Shippin’ web apps ain’t easy. The Contrast guys lay it out. Garrett Dimon shows what goes into an iteration on Sifter. My experience with Dash matches what these folks are saying: building web apps is exciting, but a lot of the work is below the waterline, per se. A lot of work goes into support and infrastructure, but doesn’t manifest itself as new functionality.

Neat because you can: living frugally, JavaScript pixel art and hand-built microprocessors. Also, C as a functional language is nicer to think about than I’d first thought. If you ever get bored, check out the C output of the Glorious Glasgow Haskell Compiler it doesn’t even look like C. This makes my brain hurt even more.

Finally, for future reference: my mantra for the week was “cut the Gordian knot.”


The Roots on tour

24 Hours With The Roots - The Roots are totally my new bicycle lately.


Design: it's important

Via Konigi, David Malouf:

Great design in the end will give us something to relate to, to feel connected with, and to reinforce our humanity. Tapping that right balance between emotion and logic, chaos and control, analog and digital, is the key to this success. We can no longer rely on “form follows function”. Form has to be parallel to function, as function is growing in commodity.

Enjoy some Wu

Ooh, baby, I like it raww… - Some Wu-Tang Clan for you. I’ve been finding Yes Yes Y’all [sic] an excellent source of music that I otherwise wouldn’t come across.


Put your objects in space

Space-based Architecture - on building and scaling your system with a tuple space, the kissing cousin of the messaging queue. I didn’t know that tuple spaces are used much in finance apps, but I’m not surprised. They’re a worthy idea.


The non-existent tension between FP and OOP

Is the Supremacy of Object-Oriented Programming Over?:

The fact is, for a lot of these applications, it’s just data. The ceremony of object wrappers doesn’t carry its weight. Just put the data in a hash map (or a list if you don’t need the bits "labeled") and then process the collection with your iterate, map, and reduce functions.

I wish I’d had a “pocket Dean Wampler” when I was first learning Haskell and trying to reconcile idiomatic Haskell with what I’ve become so accustomed to with Ruby, JavaScript and, well, everything.


Personal website patterns

I was thinking about the sorts of personal sites I’ve enjoyed on the web. They roughly fall into two sorts, roughly dividing “website”-ish websites from “weblog”-ish websites.

h2. Websites

These are often a handful of pages, at most a dozen.

  • Landing page - These sites give you a little bit of biographical info, maybe a page or two on specific points of interest. They rarely link to any other web presences.
  • Personal ecosystem - These sites serve as a trampoline to send you to other sites representing the person’s online personality. c.f. Pat Nakajima or Merlin Mann.
  • Collection of works - These sites are, essentially, portfolios. They show off the cool things the person has done.

h2. Weblogs

Chunks of content in reverse chronological listing, time and taxonomy-based archives. Sometimes comments, sometimes no. Usually a few other pages for the “potpurri”.

  • The “Classic” weblog - Writing on some focused topic or a cluster of topics. Sometimes they are a cult of personality, sometimes it’s just a person’s dedication to an idea. c.f. Daring Fireball, Garrett Dimon
  • Curated text - Interesting bits found on the web, aggregated and summarized. Usually higher volume than a classic weblog, but not as bad as a “professional” weblog. Always focused around the author’s personal fascinations. c.f. Kottke
  • Curated links - Just a collection of links, followed by a few words describing them. c.f. Trivium
  • Tumblelog - Another sort of curation, this time with little or no summarization and a focus on a tone, subject or personality. c.f. Projectionist, Ideas for Dozens (tiny)
  • Lifestream - An aggregation of the author’s activities online. Like the personal ecosystem, but without the lazy linking. c.f. Adactio Elsewhere

My personal site (hint: you’re reading it) will probably continue to evolve to include a little of each of these.


The State on DVD, finally

It would appear that, after long last, The State DVD is forthcoming. I cannot wait. The State and Daria were probably the two best works of original programming ever on MTV. (Via Coudal Partners)


Three sides of language geekery

Ted Leung’s notes on the JVM Language Summit, Dynamic Language Summit and Lang.NET. Great reading for those interested in what makes programming languages tick.


LOST in-joke


Your Friday Jam

Here is your Friday Jam: The De La Soul Dugout. Quite good. See also: WEFUNK radio.


A console for any Ruby project

I’ve been finding this little snippet extremely useful lately:

$ irb -Ilib -rmy_library

If your Ruby app or library follows the idiom of requiring all the files for your app in a file named after the library, this will load everything up. If you’re being clever, you may need to invoke said cleverness before you can really get started poking around.

Anyone doing something similar?


John Mayer, closet software developer

“The idea is to run as many concurrent streams of production as we can." - Is John Mayer recording an album or bootstrapping an indie app?


More harmful than harmful

We are lucky to live in a time when 99.9% of programmers will never have a legitimate argument for using GOTO (hi kernel programmers!). But in case you’re feeling nostalgic and/or ornery, there’s always COMEFROM. You can even implement it in Ruby via @callcc@!


Elevating the art of language implementation

Suppose we can take the following statement as true:

Whether you use it or not, the state of the programming craft has been elevated by many of the ideas bundled in Ruby on Rails.

ActiveRecord in particular brought many ideas that made it easier for more people to program with a database. Whereas before most people thought in terms of mappings or extracting data from hashes, AR gave a more fluent and object-like notation to work with. Thus, more interesting applications were born.

Right now, good VM technology is limited to Sun and Microsoft, while Apple, Google and Mozilla are re-inventing it for their web browsers. Open source languages, mostly, lack this VM technology.

ActiveRecord improved the state of the programming craft by spreading ideas that make working with a database easier. Could a similar improvement in the programming craft be realized by diffusing the knowledge of how to implement a good VM through a library? Is this a worthwhile aspiration?


Postmodern comedy gold

The Nietzsche Family Circus - random Nietzsche quote + vintage comics = comedy gold.


When technical discussions get intense

Pro-tip: trying to unwind contentious technical discussions is a losing game. There are really multiple things going on: people discussing trade-offs in absolutes, personal vendettas being aired, missing tact filters and turf protection. If you’re lucky, there’s also some useful information hidden in the turd tossing.

Solution: don’t read too deeply, go do something useful instead.

Bonus tip: talking it out, face to face, over good drinks in a nice environment is “something useful”.


Think

tn_213BLUES_BROTHERS-155.jpg

The scene in The Blues Brothers where they are recruiting Matt “Guitar” Murphy is quite possibly my favorite of the movie. From the start of “Think” to the first “Freedom!” chorus, I get all sorts of musical tingles. I highly recommend it, if you have the means.

Since I can’t link to any video of the scene, why not listen to “Freedom” by Charles Mingus. It’s goodness.