Give attribute_mapper a try


Just For Fun


Curated Awesome, the 2nd


The Kindle's sweet spot


Testing declarative code

[sourcecode language=“ruby” gutter=“false”] class Issue

include MongoMapper::Document

key :title, String key :body, String key :created_at, DateTime

end [/sourcecode]

[sourcecode language=“ruby” gutter=“false”] class IssueTest < Test::Unit::TestCase

context ‘An issue’ do

should_have_keys :title, :body, :created_at

end

end [/sourcecode]


Texas is its own dumb thing


Curated awesome, the 1st


Chance Encounter

Another meme-ish “film” by yours truly. This time, the idea is you do something in five seconds, plus a two second intro and a one second outro. Here’s what I came up with:

This is an adaptation of possibly my favorite improvised joke. I deploy this joke when a conversation is interrupted by some disturbance or noisy distraction. Right before the conversation is going to continue, I say “…and that’s how I met the president and the pope on the same day.” Works pretty well.

Funny aside: I found out about this on the Vimeo site, thinking there was a competition this weekend. Turns out, it was last weekend. Figures.


Dallas could get a pedestrian bridge

Trinity gift is $10 million for pedestrian bridge. Catering to pedestrians, in Dallas? Surely you jest!

I’ll just sit here and quietly hope that the plans for an urban park around the Trinity aren’t derailed by everything that is politics.


Ghostbusters then and now

What happens when you take scenes from Ghostbusters and see how New York used to look and how it looks today? Pretty awesome, actually. In two parts.


Birthing Born to Run

The birth of Born To Run. On the creation and evolution of the song and album. Great read for Bruce-o-philes.


Representing time in our programs

Time is the New Memory:

I’ve been thinking about how we represent time in programs for a while. The problem is that concurrent programs are all about time, but mostly, we only use two mechanisms to represent it in our programs.

The semi-explicit way is through locks. When we insert locks around some bit of code, we are giving hints to the system that things should only proceed in a certain order. This ordering gives us a notion of time, but it’s not horribly comforting.

The completely implicit way we represent time in our programs is by ordering calls to functions and the lines of code within those functions. Line 10 always executes before line 11, etc.

The problem that Rich Hickey, who has some fantastic ideas about this time stuff, has in the article I quoted is that time is managed manually and implicitly. When you start writing large concurrent programs, this falls apart. We need better constructs to deal with it.

Think of it like the shift from unstructured programming to structured programming to object-oriented programming. At first we just had a long code listing; no functions, just line after line of code. This became mentally untenable, so we shifted to structured, procedural programming. But some of our data was global and it was often hard to tell what functions belong to what data. So we moved to object-oriented programming and encapsulation.

Hopefully Rich Hickey, Simon Peyton-Jones and other functional programming folks can lead us to is a nice way to structure our programs around time. I’m eager to have my brain melted by what they conjure up.


Ain&#39;t talkin&#39; &#39;bout the man

Here’s a fun game. “The Government”:

Often, simply striking out “government” reveals a completely different, and far more useful, commentary.


Polyglottin&#39; your data

Polyglot persistence:

Ben Scofield’s spot-on here. One of the many transitions we’re undergoing is from “I’ll use MySQL most of my career” to “I’ll tinker with a different database for every project over a couple years and then pick and choose the best as time goes on”.


Tons of FP fun

A programming language zoo, a week of FP heaven, rewriting PHP with Haskell and a game for kids of any age to learn the untyped lambda calculus. Did I ever mention it’s a good time to have a fascination with functional programming languages?


iPod Spaceman

(With due apologies to the creators of New Math, the writers of 30 Rock and the lovely iPod people.)


Tracking your own context switches

Why I do Time Tracking

At one point, I tracked every context switch during my work day. I kept a legal pad next to my mouse and I would write down the time whenever I switched between coding, emailing, surfing, talking to someone in my cube or walking around to find someone I needed to talk to.

People thought I was odd. They’d ask what I was jotting down when I noted my context switch, so I briefly explained it. “Okaaaayyyyyy?”, they’d say. An unintended side-effect was that people did end up bugging me about random things less. In fact, it was way more effective at that than putting up a sign that said “unless something is on fire, email me”. So it goes.

I never ended up running any aggregate numbers on the data. But, it did give me an idea about the frequency and cost of my context switches. I wish there was a better way to track this sort of thing passively. I’m sure it would still shock me how much time I go in and out of focus.

If you’ve never tried this sort of experiment, it’s worth running for a week or two. You’ll almost certainly notice something worth trying to cut out by glancing over the list of things you’re spending time or wasting focus on.


Fred, in a nutshell

Fred in depth.


On American political insanity

Still crazy after all these years:

The Economist does well to explain the insanity that is propagated by American political media. Reading articles like this help me stay sane. Also: ignoring media with deadlines shorter than a week, and consuming as much constructive satire as possible.


It&#39;s not NoSQL, it&#39;s post-relational

Almost five years ago, we were witness to the reinvention of web frameworks. A couple upstarts named Django and Rails appeared at almost the same time, espousing many of the same values. In the typical Gandhi-cycle, they were first ignored, the incumbents fought them, and then they achieved victory over the incumbents. Today, any framework that’s used on new projects is likely to have more than a hint of Django and Rails in it.

Today, we’re seeing the same thing for databases. Something is going on and things are changing. Barring an unprecedented departure of fashion from software development, I’ll look back five years from now and write about some other shift in the development landscape.

But, all shifts like this need a name. Right now, the best we have is NoSQL. The problem with that name is that it only defines what it is not. That makes it confrontational and not amazingly particular to what it includes or excludes.

Damien Katz, the creator of CouchDB, has noted the need for a better name for this storage revolution. Allow me to proffer mine:

Post-relational

What we’re seeing its the end of the assumption that valuable data should go in some kind of relational database. The end of the assumption that SQL and ACID are the only tools for solving our problems. The end of the viability of master/slave scaling. The end of weaving the relational model through our application code.

We’re seeing an explosion in the ideas about how one should store important data. We’re looking at data to see if it’s even worth persisting. We’re experimenting with new semantics around structure, consistency and concurrency.

In the same way that post-modernism is about reconsidering the ways of the past in art and architecture, post-relational is a chance for software developers to reconsider our own ways. Just as post-modernism didn’t invalidate the entire history of art, post-relational won’t invalidate the usefulness of relational databases.

However, it’s likely that those working in some domains will decide that non-relational databases better fit their needs. That’s progress in our field. It’s fun to watch.

Say it with me: post-relational databases, post-relational storage, post-relational thinking, or simply, post-relational.