I don’t know what you’d do with business cards carved from meat, but I can’t stop giggling at these Frank Frazetta recreation photos:

(h/t JWZ)
My journey through Haskell is on something of a lull, but John Wiegley's got you covered. He's documented his own journey learning Haskell, and it's very accessible.
John starts with simple stuff like Fibonacci sequences and splitting strings, then jumps straight into modeling Schroedinger's cat using a monad. Next he gets pretty practical, for Haskell at least: doing text manipulation ala scripting languages to drop command-line arguments and then to MacPorts packages. Finally, he reflects on thinking lazily and using infinite streams.
If you've been wondering what this lazy, pure, strongly typed functional thing is all about but keep falling asleep through the intense theoretical bits (there's a lot of it!), these are a great starting point.
I believe that writing code using testing1 as a design activity yields long-term benefits that make my life easier.
Though I’m a strong believer, I’ve struggled with TDD in the past. I’ve found I get bogged down in keeping the red-green-refactor cycle going. Sometimes I have to work with code that is lacking sufficient tests, but I know I can’t boil the ocean before I proceed to whatever I’m really trying to do with the code. Other times, I’m not sure if I’m testing the right things; I could be missing tests in one place and writing too many tests in another.
Last week, I read three insightful pieces and made one discovery of my own that deepened my understanding of the practice of TDD. Allow me to share.
First off, Kent Beck has been exploring the phases in the life of a startup. The earliest stage is proving the idea. He later asserted that when you’re doing stuff like this, you can drop TDD, temporarily. I thought about this and it clicked. If you’re working on a prototype, where you’re trying to explore an idea and see if it works, you don’t want to iterate on the code, as TDD would have you do. You want to iterate on the idea. TDD will just slow you down.
On the other end of the spectrum, you’ve got maintenance programming. Once a startup, company or project has proven their idea and shipped a system, you are maintaining software. Keeping it working, living, breathing. For this sort of development, where you’re making small, focused changes without adding significant functionality, Tim Bray pointed out that TDD is critical. Using it to drive the process of fixing bugs, cleaning up the system and adding minor functionality is really handy for figuring out if you’ve broken something in some dark corner. It also helps the next guy to do the same. It’s a win, and I suspect it’s the sweet-spot of TDD.
If you imagine prototyping and maintenance as opposite ends of the software life-cycle spectrum, adding significant new features to existing software probably lies somewhere in the middle. You may need to “poke around” to decide if what you’re doing is right, like when you’re prototyping. But once you’re done, you want some way for others who have to maintain the software (such as yourself) to figure out what it’s supposed to do and whether assumptions have been broken.
Then I read an anecdote by Uncle Bob about how he worked out an ambitious new feature in Fitnesse. He and his pair got a new feature working, celebrated, and called it a night. When he woke up, he realized they weren’t actually done; they still had to clean it up, by writing tests.
This was the missing link, for me. Sometimes, you need to iterate on the idea first. If skipping the tests helps you, so it goes. Once you’ve got the idea working (and committed!), then start writing tests2. Once you’re happy with the structure and coverage of your code, you commit again and then push it to your peers3.
The crux of my revelation is this: you get the benefits of TDD-as-a-design-activity by doing it. When you do it is immaterial. You just have to do it.
My own revelation is blindingly obvious in retrospect. If the going gets tough, proceed in this order: get it to work, write some tests for it, then clean up the code. Sometimes you can break this cycle if what you’re working on doesn’t take too much cognitive capacity. But if you overflow your mental buffer, you have to break it down into steps and work through the cycle. Failing to realize this was one of the causes of me bogging down in TDD.
Adding context to answer the question of when you start writing tests is something I haven’t found much writing on until recently. I’m increasingly finding that considering the situation is a great ninja-move in my quest towards writing beautiful, useful code.
1 Call it a test, example, behavior, or story. Whatever.
2 Jim Weirich did a great presentation on how to backfill tests on existing code.
3 Pardon the Git-centric terminology4.
4 If you are not already, please start using Git immediately.
The Red Bull headquarters in London has a slide going between floors.
I want to go to there. Photo credit: Alexander K.
In August and September of 1984, Berkeley Breathed’s comic strip Bloom County ran a series of strips in which the fretful penguin Opus ends up befriending Michael Jackson and then trades places with him to let him live a normal life for a short time. This was a couple of years after the release of Thriller, around the time when the strangeness of Jackson’s life was becoming apparent to the world. Maybe I’m reading too much into the strips, but in retrospect I think they expressed a common yearning to make sure that he would be okay. It only seemed fair that someone who had delivered such joyful pop music to the world could be somehow saved from the emotional costs of exceptional parental pressure and superstardom at a young age. Of course, Opus was a fictional character, and whatever help Jackson might have needed, he never got it.
Here are the strips, click on one for the lightbox:
Wow, where to start. Nu-metal autotune? Headbanging keyboardist? This is either the biggest joke song ever, or the most influential band of the next ten years. I’m appalled and thrilled and scared all at the same time.
Too cool - Super Mario stepper motor music:
Of course, an Arduino is involved.
The web makes it easier to publish media that would be considered too graphic to appear on CNN or in the New York Times. Andrew Sullivan ran a lot of photos of people tortured to death by American hands over the past year, and now on YouTube, we have tremendously upsetting footage of an Iranian girl, shot by a member of the Basij, apparently dying on video:
I’m inclined to say that this is a good thing. Horrible things happen in the world and it’s useful to be reminded of them. But being reminded of them certainly isn’t easy.
If you’re interested in more, less graphic information about the girl, Neda Soltani, is being collected on Wikipedia.
Just like being awake is more than just having your eyes open, going to work should be more than just being at a workplace trading time for money. It should be meaningful. But where does meaning come from? Of course, it comes from ourselves. We put meaning into things, and share our meanings with others, and teach each other how to build meaning out of what is in front of us.
Buster's on to something here. He's articulating one of the qualities I find in the best developers: what they do has meaning and matters to their personality. They are working to make things that result in greater happiness for themselves and others. Their passion is manifest in the quality of their code.
You should also check out Buster's personal site. He's got a neat info-graphics, personal data-mining thing going on there.
For the like-minded aficionados of the non-traditional: A Redis implementation of Twitter, designed for learning about non-relational datastores and Clojure's creator Rich Hickey on state (bonus track: Jonas Boner on the same). Derek Sivers on the fatal determinism of declaring a goal or as I like to say, “the reason you find so many weblogs with one post promising to post a lot”. Michael Heilemann on the lack of good fiction in contemporary games.
Via Andrew Sullivan, again: BBC Persian has footage of a pitched battle between a crowd and Iranian police, which ends with the police turning and running away. Inspiring stuff.
My talk from Ignite Phoenix IV is now up on Blip TV: Building cross-platform desktop Wii applications
You can also download it as an mp4 file here
BTW, I am granting release of the video under a Creative Commons license

Cross-platform desktop Wii applications by James Britt / Neurogami is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 License.
So the Yahoo Pipe I made is turning out to be a bit of a bust, at least for me since I was hoping to use its RSS feed. Nothing for hours and then 300 new entries at once. I’ve ended up just using my Twitter account to follow this reduced set of Iranian Twitterers.
A few people on Twitter are now talking about a protest in solidarity at Washington Square Park today, 5:30 p.m. Hopefully that’ll happen. I don’t have anything green to wear, though.
As an experiment, I made a quick Yahoo! Pipe that collects the Twitter accounts listed here. The pipe is here, and it has an RSS feed too. Not sure about how quickly Yahoo! is aggregating these feeds, most likely not any faster than you’d get if you signed up with Twitter and followed all those accounts, but maybe this’ll come in handy if, like me, you’re not much of a Twitter user.
Seriously, what the fuck.
He opens his keynote with one of those “Ignite”-esque presentations — where you have 5-minutes and 20 slides to tell a story — and the first and last are a close-up of a woman’s lower half, her legs spread (wearing stilettos, of course) and her shaved vagina visible through some see-thru panties that say “drink me,” with Hoss’s Photoshopped, upward-looking face placed below it.
At the upcoming Desert Code Camp in Phoenix, AZ, there is to be a session titled Open forum with Community Leaders
But there’s also an invite-only after gathering.
I can understand wanting to keep the attendance restricted, to help boost the signal out of the noise. But I’m curious about the selection process. I was among a list of about eight people who got an E-mail invitation to the second session. Certainly there are more people in the Phoenix area whose input would be just or more valuable , and who are just as deserving as being on that CC list.
So, who are the “community leaders”? Why would you call them that? Who and what are they leading? Do we have community followers? Do the followers agree on who are the leaders?
I don’t see myself as leading anyone, and have no interest in doing so. I find the term “community leader” , um, misleading. Few people are doing any real leading. Me, I organize or instigate or simply help out. I may take the lead on this or that project, but I’m not leading any people, except maybe over to a free seat over in the back of a user group meeting.
What I try to do is give people a hand in leading themselves, if they are interested. From ruby-doc to rubyaz.org to the talks I’ve given and articles written, I’m much more interested in providing tools and resources than in telling anyone what to think or do.
Yes, I’m opinionated (like everyone else on the planet), but I seriously expect everyone to take everything I say with a good deal of skepticism. One reason for writing is for me to find out what I think, and hopefully get feedback to learn where I’m wrong.
Maybe I’m leading by example, but I don’t think that’s what is meant when labeling people as “community leaders”. It seems intended to declare a specific distinction among people, something of, for lack of a better term, a class distinction. Not to be all Marxist theoretical here, but the leader/follower distinction partitions people, and does not encourage useful gradations. It’s something like an orchestra; you are either the conductor or you’re not; you are either giving directions or taken them. Rarely does the first violinist swap places with the conductor; everyone has their assigned role and they stick with it.
I much prefer a jazz improve jam session approach. People are leaders for certain things at certain times. No one assumes that the leader at this moment will be be the leader later on. Each person not only believes they could lead, but is expected to do so by the others. Back when punk wasn’t total laughable bullshit, it was common for people to be the band one night, and in the audience the next. You were expected to participate; that was the whole point.
You are not on this Earth to be a spectator.
Certain distinctions are practical, and many of the people who get tagged “community leader” have some aspect worth noting. Often that aspect is having done something. Doing is important, and worth recognizing, but there are degrees of doing, whereas leading is pretty much an all or nothing behavior. Emphasizing a vague notion of “leading” isn’t useful. But people can do in varying degrees, with varying skills, and should be so encouraged.
Maybe a better term is “community doers.” Or just “doers.” It’s more objective, more open to participation, and presents a more valuable goal.
I’d rather see people doing than leading or following any day.

I wonder if this might be Geithner’s problem in a nutshell:
U.S. Treasury Secretary Timothy Geithner is renting his home in Westchester County, New York, for $7,500 a month after failing to find a buyer …The inventory of similar homes for sale in the area may have affected the property's prospects, said Debbie Meiliken, a broker at Keller Williams Realty New York.
“There was a lot of competition,” Meiliken said. “Sometimes people will put the house for rent if they're not prepared to sell it and take a loss.”
Does Geithner think his own house price has been artificially depressed by a temporary liquidity crisis? I wonder if he realizes that asset prices will have to come down eventually and someone, somewhere, will have to bear that loss.
…thinking about an enigma. There it is before youâ��smiling, frowning, inviting, grand, mean, insipid, or savage, and always mute with an air of whispering, â��Come and find out.â��
— Joseph Conrad, Heart of Darkness
Brian Fitzpatrick and Ben Collins-Sussman have done a couple great talks on probing the important social aspects of software development, especially in the open source arena. Open Source Projects and Poisonous People talks about how to survive “that guy” joining the community of your favorite project, be it open source or not. Their most recent jam, The Myth of the “Genius Programmer”, tries to temper the romanticism that developers can magically put forth reams of brilliant code. By proceeding with humility, one can appear as a genius without all the hubris and potential for downfall.
See also: my OSCON 2007 talk on PeopleHacks.
We're just wrapping up that nice time of the year in Texas. Technically, we get two nice parts of the year: the one after "winter" and the one after SUMMER. It's nice in that you can sit outside with the dogs and just enjoy the air, the sounds and the fact you can sit idly without wishing you were in a climate-controlled environment.
This year I'm actually taking advantage of this part of the year by golfing. All the public courses are blooming: the fairways are green, the bunkers are as sandy as they'll get and the greens are in peak condition.
My golf game is improving; a novel experience. I’m hitting some fairways, some greens and making the occasional nice putt. It’s like seeing an investment pay out. Hopefully I’ll finish the summer hitting under 100 on a regular basis.
Golf is nice, for me, because it’s as close as I get to meditation. I don't think about code, politics, or finance. I just think about the previous shot and the next shot. In fact, the less I think, the better I do. Golf is my chance to attempt nihlism.
Golf is relaxing. It’s a little vacation. I sometimes see guys out with their wives. They’re doing it wrong. The point of golf is to spend some time away from everything. By this definition, professionals like Tiger Woods are doing it wrong too. Maybe I’m on to something here.
There's a moment in my game, somewhere on the last three holes, where I realize I’m going to have to go back to being responsible. This moment is like hitting a bad shot; you think you can do better. On the other hand, it takes a long time to play eighteen holes, so getting back to responsibility is a good thing.
What would I do if I didn’t play golf? I don't know. Golf, as lame as a lot of people think it is, does good things for my brain. Maybe that explains my obsession/addiction. Luckily, I’ve given up my Call of Duty 4 addition. This Old Republic game could prove troublesome though…
fhwang.net: Reading Andrew Sullivan’s 200 posts a day, so you don’t have to.
In the wake of George Tiller’s assassination, Sullivan has been collecting a number of personal stories about abortion. I found this one, from the husband of a Tiller patient, the most moving:
... I remember being puzzled about a T-shirt he was wearing, which said “Happy Birthday Jennifer from team Tiller!” or something similar. Turns out it comemmorated the birthday of a fifteen year old girl who was raped, became pregnant, and came to Tiller for an abortion. As luck would have it, she was in the clinic the same week as her birthday. So the clinic threw her a party.The walls of the clinic reception and waiting room are literally covered with letters from patients thanking him. Some were heartbreaking – obviously young and/or poorly educated people thanking Dr. Tiller for being there when they had no other options, explaining their family, church etc. had abandoned them.
And there’s this, from a Catholic mother:
At 17 weeks gestation our baby had been diagnosed with major heart defects requiring a minimum of three risky open-heart surgeries beginning at birth, and would later require a heart transplant. At 19 weeks we were finally given our amnio results which revealed our baby also had Trisomy 21.
A surgeon at the major teaching hospital where we’d had our fetal echocardiogram informed us that even if our baby somehow survived his palliative surgeries, this latest diagnosis meant he would not ever be eligible for a heart transplant. As we sat talking quietly in our living room, our priest shared with us that he'd spent time at the same hospital where we'd had our fetal echocardiogram and where our son would have had surgery.
He was there to support the family of a three-month-old who was having heart surgery. In the three weeks or so that he tended to this family, he also met 10 other families in the waiting room, each of whom also had young babies undergoing heart surgery. Sadly, within the short space of time our priest was there, every single one of those babies died.
Our priest came away from that experience feeling that this world-renowned children's hospital was basically experimenting on babies. He saw their futile suffering and likened it to being crucified. The family he had gone there to support later told him that if they had only known what their baby would be forced to go through before dying, they would never have chosen surgery. Our priest told us that he believed we were not choosing our son's death, only choosing the timing of his death in order to spare him a great deal of suffering. Something he said that brought us great comfort was “God knows what is in your hearts.” God knows our choice was based on mercy and compassion. Who would better understand our hearts than God, who made the choice for His own Son to die?
Many more here, here, here, here, here, here, here, here, and here.
If November comes around and you don’t hear from me or see me for a while, you can blame these two:
I don’t know what it says about me that Call of Duty 4: Modern Warfare is my main shooter: It’s a paranoid, twitchy chaotic experience but I love it. The lefty in me gets sort of freaked out about all the teenage suburban boys who play this, but I can’t deny it’s a phenomenally well-done game.
Some gamers are hating on Valve for coming out with a L4D sequel soon, but if the deets in this preview are correct, they’ve added a ton of awesome stuff. Dynamic weather effects, campaign scenes in full daylight, pathways that change depending on the whim of the AI Director, panic events that force you to move forward to finish instead of hiding out, and, oh yeah, more realistic and gory damage modeling. Also, is it just me or are half the characters black? That’s a nice touch too.
And yes, I am only 15 years old. What’s your point?
Guillaume Marceau has done some excellent work crafting the data from the venerable Computer Language Benchmark Game into visualizations that quickly show the trade-offs of using each language. The speed, size and dependability of programming languages puts each language in a small graph that simultaneously shows the execution speed and program size of each test for every language. From there, the characteristics of each language is manifest. He then goes on to consider whether functional languages display unique performance/size characteristics.
This is a must-read. It's also great information design, proving that programming language esoterica needn't bore the reader.
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.
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.
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.
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:
fopenfreadfwriteseekfcloseencodedecodehash_sethash_getWhen 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:
connectexecutefetchnextselectinsertupdatedeleteIt 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.
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’ 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.”
Food for thought from Nick Paumgarten’s New Yorker article “The Death of Kings”:
A prevailing belief is that there has been some conspiracy on Wall Street to bilk people out of their money. If there was a conspiracy, it was an extremely broad, disorganized, decentralized, and, in some measure, inadvertent one. In other words, there was no conspiracy, unless that’s what you call the establishment of an oligarchy, over several generations and with the assistance of a blinkered populace.
Looks like I’ve been selected to give a presentation on developing Wii desktop apps at the next Ignite Phoenix.
Now my heart’s all aflutter …
Better get cracking on those slides.
Thanks to all who voted for my talk!
On this Memorial Day, with the debate about American torture still deeply unsettled, Andrew Sullivan finds some choice words about liberty from Abraham Lincoln:
“And when … you have succeeded in dehumanizing the negro; when you have put him down and made it impossible for him to be but as the beasts of the field; when you have extinguished his soul in this world and placed him where the ray of hope is blown out as in the darkness of the damned, are you quite sure that the demon you have roused will not turn and rend you? What constitutes the bulwark of our own liberty and independence? It is not our frowning battlements, our bristling sea coasts, our army and our navy. These are not our reliance against tyranny. All of those may be turned against us without making us weaker for the struggle.“Our reliance is in the love of liberty which God has planted in us. Our defence is in the spirit which prizes liberty as the heritage of all men, in all lands everywhere. Destroy this spirit and you have planted the seeds of despotism at your own doors. Familiarize yourselves with the chains of bondage and you prepare your own limbs to wear them. Accustomed to trample on the rights of others, you have lost the genius of your own independence and become the fit subjects of the first cunning tyrant who rises among you.”
Happy Memorial Day, everyone.
For some reason, when I first heard that The Onion was going to be doing video I thought it would somehow less than awesome. Seriously, what was I thinking.
This can’t possibly keep up, can it?

These are from a recent Gallup poll which show that, yes, you are reading it right, since George W. Bush took office the GOP has not gained ground with any demographic. Not with people over 65 or with people who describe themselves as conservative. Even people who go to church weekly only held steady at 0. Maybe the margin of error gets a few of those groups into positive territory but this a really terrible record.
Not surprising, really: My dad was a lifelong Republican but became a frothing-at-the-mouth Democrat when the Bush administration was done with him, and I’m sure he’s not the only one. A bit disappointing, I will say, though, because it’s probably better for the country to have healthy opposition. Don’t get me wrong, I’m not hoping the current, horrifying GOP gets any more traction in this country. I’m just saying that I hope that the GOP has whatever internal civil war it needs to have for the non-insane conservatives to take over soon, and with a minimum of fuss. Or that the GOP just explodes in flames so some other party can take its place in the American duopoly. Then we can talk about the Republicans the way we can talk about Whigs or Know-Nothings, and maybe national politics can be a little less of a circus.
Seriously, this blog has been going for a year and I’m just hearing about now? I’m doing something terribly, terribly wrong. I’m talking about Artificial Owl, a site dedicated to abandoned man-made creations. It’s only the awesomest new thing ever. To wit:
Mexican church consumed by lava:

Abandoned ships in the dead Aral Sea:

Acoustic mirrors:

Communist flying saucer monument on a mountaintop:

The giant hand of the Atacama desert:

(via JWZ)
Infinity advertisement, 2009:
Add-on content for the video game “Mirror’s Edge”, released in 2009:
Video for “Star Guitar” by Chemical Brothers, directed by Michel Gondry, 2008:
“It ain’t easy bein’ greazy in a world full of cleanliness.” —Method Man
migreazy is a tool that helps manage git branches and Rails migrations.
http://github.com/fhwang/migreazy/tree/master
Right now it support three actions:
Diff will compare two sets of migrations and tell you what the differences are.
Show the differences between my development DB and the git branch called my_branch:
$ migreazy diff my_branch
Show the differences between my development DB and my working copy:
$ migreazy diff
Show the differences between the git branches master and my_branch:
$ migreazy diff master my_branch
Down will apply down migrations to get your development DB to be a suitable state so you can switch branches. For example, let’s say you have the branch “master” and the branch “my_branch”, with the following migrations (using the old-fashioned migration numbers for purposes of illustration):
| master | my_branch |
|---|---|
| 1 | 1 |
| 2 | |
| 3 |
If you’re working in “my_branch”, your development DB will have migrations 1 and 2, but not 3. If for some reason you have to go back to “master” to do a quick bugfix or something, you can do this:
$ migreazy down master # this rolls back migration 2 $ git checkout master $ rake db:migrate # this runs migration 3
Find takes a migration number as an argument and digs through your git branches to see which branches contain this migration.
$ migreazy find 20090512132032
This can come in handy if you do a ton of branching and then occasionally make the mistake of switching a branch without first migrating down from that branch’s migrations.
For example, let’s say you’re in master but you’re getting test failures that you think are being caused by having your migrations out of sync. Here’s how you might fix that:
$ migreazy diff Missing in development DB: (none) Missing in working copy: 20090512132032 $ migreazy find 20090512132032 Migration 20090512132032 found in my_branch $ git checkout my_branch $ migreazy down master
Got a letter the other day from my health insurance company:
Your certificate of coverage has been updated to include the following definition of Spouse:Spouse: A person’s partner (husband or wife) in a legal marriage. For purposes of Dependent eligibility under this Certificate, spouse includes same sex partners who are married in jurisdictions that recognize same sex marriages.
Uncle Bob delivered a compelling keynote at RailsConf last week that put forth the argument that what we need most in programming is more professionalism. I loved the delivery, but I disagree with the conclusion.
I originally never wanted to be a programmer exactly because I thought the only type of programmers that existed where the kind that Bob talked about: The engineers with the proud professional practices that never wavered under pressure.
While I deeply respected that stature, it just never felt like a place that I belonged. I didn't identify with the engineering man or the seriousness of the efforts he pursued. Before I discovered Ruby, I felt in large parts that I was just faking my way along in this world. Here at a brief time for rent.
But that all changed when I found Ruby and a community consisting as much of artists as engineers. People waxing lyrically about beautiful code and its sensibilities. People willing to trade the hard scientific measurements such as memory footprint and runtime speed for something so ephemeral as programmer happiness.
That's where I found an identity that I could finally relate to directly. That's when I finally got really passionate about what I do for a living and started to blossom my own participation.
Now the wonderful thing about this new age of programming is that we need and prosper from both types of programmers. I believe Ruby is such a fantastic community and platform exactly because both types are coming together and sharing with each other. The bazaar is so much richer when the cultural backgrounds of the participants are diverse.
So while I love the idea of Bob's green wristband that reminds him always to do test-first development and his own personal professional oath, that level of adherence has never worked for me. I never had the discipline it takes to fulfill such a lofty goal of professionalism.
Now Bob may think that there's no place for people like me in programming (I sure know plenty of people who do!), I obviously think that would be a mistake. Not just because I've grown rather fond of what I do, but because I've seen so many other unprofessionals just like me come in and add those delicious twists that can really change things.
We aren't perfect. We often swear, act unresponsively, and can certainly be characterized as unprofessional a lot of the time. But I think that together with professionals like Bob, we stand a good chance leaving the world of programming in a better condition than we found it.
Two pretty great links via Naked Capitalism:
Psychologists Are Better Stockmarket Speculators Than Economists:
... they scrutinised the share-buying behaviour of about 6,500 persons in an Internet experiment. They found no signs of ‘herd instinct' during the experiment – on the contrary, some of the test subjects decided against buying those specific shares which had just been bought by so many other players. Psychologists, particularly, mistrusted those shares which they regarded as overvalued. This strategy benefited them enormously: on average they were markedly more successful in their speculation than physicists or mathematicians – or even economists.
The experiment seems to involve trading shares of fictitious companies, so you could argue that somebody with specific domain expertise in, say, finance or economics, would be unfairly disadvantaged because there’s no underlying fundamental reality that can be studied in such an experiment. Of course, you might also argue that given how much information and analysis is freely available about publicly traded companies, the ability to do your own analysis might not be worth much in a competitive sense.
Even better, Rats Outperform Humans in Interpreting Data:
The experiment consists of drawing green and red balls at random, with the probabilities rigged so that greens occur 75 percent of the time. The subject is asked to watch for a while and then predict whether the next ball will be green or red. The rats followed the optimal strategy of always predicting green (I am a little unclear how the rats communicated, but never mind). But the human subjects did not always predict green, they usually want to do better and predict when red will come up too, engaging in reasoning like “after three straight greens, we are due for a red.” As Mlodinow says, “humans usually try to guess the pattern, and in the process we allow ourselves to be outperformed by a rat.”
Again, would you rather be roughly right, or precisely wrong?
Now that the internet hysteria is dying down, I'd love to explore some of the more concrete things that we could do to actually get more women involved. As I've stated earlier, I doubt simply refraining from having saucy pictures of pole dancers is going to do the trick. If that was all it'd take, it'd be easy beans.
There's going to be a session called Women in Rails at RailsConf next Tuesday, which is bound to be focused a lot of this, but there'll undoubtedly be a lot of good ideas outside of that group as well that we shouldn't wait to get going on. Here are a few ideas to get started with:
Share your discovery story
For the women already in Rails, it'd be great to hear what in particular attracted you to the platform. Highlighting areas of the ecosystem that could get even more support. Perhaps there was an especially well-written introduction that just made everything click. Perhaps a screencast or an interview or something else.
Highlight local communities with women
There are a bunch of local Rails user groups all over the place. If women could get an idea of which groups already had other women present there, it'd probably be a less daunting thought to attend. Knowing that there's at least going to be one other woman in attendance could help a bunch.
Can we pair up with other communities?
Programming communities may indeed often be awfully short on women, but programmers interact with plenty of other professions that are not. I wonder if there are ways where we could get women from, for example, the design community to intermingle on projects like Rails Rumble day. Sorta how the police academy and the nurses in training always throw joint parties in Denmark.
I'd love to hear more and would be more than happy to help promote and push it. Despite the spasm over that one talk and the underlying differences of opinion exposed by it, there's no reason we can't use this as a jumping point to do something about the actual, core issue.
So either email, tweet, or blog your suggestions and stories and I'll use this space to help point it out. Let's treat the low number of women in the community as a bug, cut-out most of the needless bluster, and work on some actual patches. Onward and upwards!
Now that the internet hysteria is dying down, I'd love to explore some of the more concrete things that we could do to actually get more women involved. As I've stated earlier, I doubt simply refraining from having saucy pictures of pole dancers is going to do the trick. If that was all it'd take, it'd be easy beans.
There's going to be a session called Women in Rails at RailsConf next Tuesday, which is bound to be focused a lot of this, but there'll undoubtedly be a lot of good ideas outside of that group as well that we shouldn't wait to get going on. Here are a few ideas to get started with:
Share your discovery story
For the women already in Rails, it'd be great to hear what in particular attracted you to the platform. Highlighting areas of the ecosystem that could get even more support. Perhaps there was an especially well-written introduction that just made everything click. Perhaps a screencast or an interview or something else.
Highlight local communities with women
There are a bunch of local Rails user groups all over the place. If women could get an idea of which groups already had other women present there, it'd probably be a less daunting thought to attend. Knowing that there's at least going to be one other woman in attendance could help a bunch.
Can we pair up with other communities?
Programming communities may indeed often be awfully short on women, but programmers interact with plenty of other professions that are not. I wonder if there are ways where we could get women from, for example, the design community to intermingle on projects like Rails Rumble day. Sorta how the police academy and the nurses in training always throw joint parties in Denmark.
I'd love to hear more and would be more than happy to help promote and push it. Despite the spasm over that one talk and the underlying differences of opinion exposed by it, there's no reason we can't use this as a jumping point to do something about the actual, core issue.
So either email, tweet, or blog your suggestions and stories and I'll use this space to help point it out. Let's treat the low number of women in the community as a bug, cut-out most of the needless bluster, and work on some actual patches. Onward and upwards!
Martin Fowler weighs in:
My observation is that most men in the software business think that there isn’t much sexism left in the profession – that this curse is a memory from a previous generation. Yet when I talk to women, I hear a different story. Nearly every one can tell me recent stories where they were clearly expected to feel degraded and belittled because of their gender. So some sexually suggestive pictures aren’t a joke to them, they are a pointed reminder of disturbing behavior, and a reminder that such events can happen again at any time. One of the great difficulties for white guys like me is that we haven’t been in that position; where prejudice can appear out of any corner, reinforced by the fact that every other face looks different.
As does Tim Bray:
I'm a technology generalist who attends every flavor of gathering. It's impossible to avoid noticing that, even by the lopsided standard of high-tech culture, the Ruby and Rails communities are dramatically, painfully short of female members.
Josh Susser apologizes, though I’m not sure if he has anything to apologize for:
First off, I want to apologize. The technical program at GoGaRuCo was my responsibility. I could have done a better job and prevented this from happening. Everyone had the best of intentions and there are good reasons why things happened the way they did, but that doesn’t excuse the lapse. As a first-time conference organizer there was a lot that I had to learn as I went, and this is definitely an important lesson. I haven’t yet figured out the best way to prevent this from happening again, but I’m determined to find a way to do better next time.
And Sarah Allen proposes some plans.
I think that if we had monthly events, specifically targeted at women, and were able to effectively spread the word, then we could make it so the SF Ruby events has a more balanced audience and that at next year's Golden Gate Ruby Conference, half the audience and speakers could be women. I'm not saying every person who attended a workshop or meetup would fall in love with Ruby, but some of them would. It would bring in all sorts of new energy to the community drawing from all different areas of tech.
Fifty percent female attendees in one year sounds, well, impossible, but what do I know?
Let me try to put this in terms that might be of interest to your average guy programmer: So let’s say you have a girlfriend, and from time to time you say something that upsets her, when that wasn’t even what you intended. This is a bit of a sitcom cliche, but I dare say that life is gendered enough that this sort of thing happens a lot in the real world too. There are basically three ways you can deal with this:
1. You can say “what’s the big deal”, and not try to change at all, and try to convince her that she’s being oversensitive or uptight or she’s overreacting or whatever. You’ll probably get further with this tactic without actually using the words “oversensitive” or “uptight” or “overreacting” in the conversation. This might work a few times in the short term, but if you do it a lot, it’s not inconceivable that one day she’ll say to herself “he doesn’t care about my feelings” and break up with you.
2. You can say “bitch, you crazy” and break up with her. Always an option, and some differences are genuinely irreconcilable.
3. You can say “wow, I didn’t realize you felt that way”, and try to have a genuine discussion about what you intended by what you said, and how she reacted, and how you can find some sort of middle-ground with your desire to say whatever comes to mind and her desire to not have her feelings hurt by her boyfriend.
This third option can be unbelievably time-consuming, so why would you go to the trouble? Ideally, it’s not because she’s screaming “apologize or I’m leaving right now”. Ideally, it’s because you give a shit about her, and recognize that her needs and emotions matter. And that since you aren’t dating your clone, her needs and emotions will sometimes differ from yours, and then you’ll both have to do some work to bridge those gaps. People are different, but we still have to work to get along. This shit ain’t new: Read up on the Tower of Babel if you don’t believe me.
So, back to the pr0n incident: _why’s recent post, A Selection Of Thoughts From Actual Women, jibes with my own, limited sample set of the female programmers I know personally. A few women think the talk was nothing and we should move on, but most of them seem to have reactions that range from irritation to outrage. To me, if the mean reaction of female open source programmers to something is drastically different than the mean reaction of male open source programmers, that’s worth discussing.
As time goes on, this becomes less about Matt and his talk, and more about how the community as a whole deals with it. I don’t find Matt’s recent apology entirely satisfying, but I don’t even think it’s as important as how the rest of us are reacting to it.
There are a number of people who don’t think this incident is a big deal, and that we should just be done with the topic and move on. Some of these are people I consider friends, and I imagine many of these people are probably pretty cool to women in their personal lives. But I can’t help but feel like many of these people are taking the first strategy. They want to move on because the extensive conversation that some of us are having consumes a lot of time and energy, and they want to spend their time and energy on other things. This is an understandable and common reaction, but I think it’s not very effective in the long term if you care about the health of the community. Now, maybe you don’t care that strongly about the health of the community, which is fair I suppose, but if you were that sort of person you’d probably be absent from the discussions on blogs or mailing lists or Twitter in the first place.
The second strategy seems to be hinted at by those people who are using words like “overreaction” or “uptight” or “self-appointed moral crusaders”—there isn’t a lot of attempt to find common ground when you use words like that. (To be fair, many people on many sides have been excessively heated about it, and I hope that the heat fades but the discussion stays.) But if you’re going to say that, I wish you’d have the candor to actually say “if you’re the sort of person who finds this unwelcoming, and that makes you less involved in the Ruby scene, that’s fine, I won’t miss you.”
Me, I’d prefer the third approach, which is where people first honor other people’s expression of emotions, and then try to find common ground. There are people who are trying to do that now. This is all just talk in a community that values code, but guess what? Sometimes talk is valuable.
You know why I’d prefer that third approach? Because I’ve met a number of female Ruby programmers, and I’m glad to have met them. And I want them to come to the same Ruby events I go to or help host, and I want them to hang in the same IRC channels I hang out in, and I want them to enjoy themselves just as much as I enjoy myself. Because I want them to stick around, and because I want the next non-typical Ruby programmer who shows up to feel just a little bit more comfortable for that incremental increase in diversity.
Now, you could make the case that there are plenty of people in the Ruby world as it is, and if I were hard-pressed I don’t know that I could say that the female Ruby programmers I’ve met are concretely more awesome than the male Ruby programmers I’ve met, or that they’ve given me any specific insights that a male programmer would not have been able to, or anything specific like that. There are people who make arguments for the general value of having diverse perspectives in a community, and that diversity on many axes matters for that reason. I like that idea in general, but that’s not why I care about women in the Ruby scene.
I guess my motivation is far more selfish and subjective. I don’t want to spend a lot of my time in a scene that’s only guys or only straight people or only white people (or maybe in my case, only Asian people). This isn’t really a grand point about justice or oppression or whatnot: I just would like to go to conferences to share my passion for coding with other people, and not feel like I’m walking into a ghetto. Open source communities might actually be the least diverse communities I’ve ever spent time in, and I wish that would change. Life’s more fun when there are more women around, just like it’s more fun when there are more black people around or gay people around or whatnot. Is it more work? Absolutely. But what’s the point of living in the world if you’re not going to try to learn about all of it?
Now, obviously, my cultural priorities are my own and they’re pretty obvious to anyone who knows me. I’m a Korean who grew up in the Midwest, and I live in NYC on the same block as Latinos, Koreans, a half-Jordanian girl from Kansas, an Indian girl from Texas, and my next-door neighbors who are Eastern European in some way I can’t quite identify. I can imagine that there are others in the scene who don’t prioritize diversity so highly as a quality-of-life issue the way I do. I’d like to say I respect that difference of opinion. But to be honest, I actually find it pretty baffling.
Every so often I get prompted (more or less) for my thoughts on Haml. Someone suggested I write them up.
I’m not a fan. Some vocal number of people are big Haml enthusiasts, and while I think I get what they see as its virtues, it just doesn’t work for me.
In no particular order, here’s what irks me.
I already know HTML. I have no trouble reading it, no trouble writing or editing it. I have an editor, vim, that makes working with HTML fairly simple. I’ve no compelling reason to learn another syntax in order to end up with markup that’s already easy to write. (BTW, if you are not using an editor with auto-tag completion and other HTML/XML helpers you are making a mistake). I get the impression that many Haml fans are programmers who don’t already know (or are not comfortable with) HTML, so they have a learning curve no matter what, and Haml may be less onerous than HTML. Me, I’m not afraid of HTML or XML, and I find Haml Perlishly cryptic.
It seems to grab the worst features of Python and Perl: Magic indentation and write-only syntax. No, I’m not interested in debating the merits of either. I view static indentation as I do most forms of static typing: needlessly restricting in an attempt to solve problems that don’t come up much in Real Life code but make for nice pedantic rants about “But what if?”. I also know that one man’s cryptic is another man’s poetry. Much poetry is an acquired taste, and often bad.
I have a hard time navigating Haml documents. With HTML I can easily jump from the start or end tag of a element to the matching one. This is quite handy when I want to insert something at the end of an element; from the start tag, hit %, and jump to the end tag. Perhaps this is also possible in Haml, but I’ve not figured it out. Instead, in Haml, I do the Dance of Matching Indentation, and sadness follows.
It seems that whenever I see examples of Haml (or Yaml, for that matter), they are pretty short. That’s because the allure of magic indentation wears thin for large docs. (Cute anecdotal tale that preaches to the choir: I made this observation about Python code to a Python fan, and was told that it worked to ensure you kept your methods short. That was the first and only time I was told that the white-space tax had a punitive purpose.)
I can hit some keys in vim and auto-format my HTML docs. I can easily cut and paste chunks of markup and move them around, and have my editor handle the formatting. Not so with Haml, where there is constant risk of offending the gods of The True Indentation.
I often work with Web designers who will send me HTML pages that need to be re-worked into templates. Having to covert that into some other format just so I can get HTML in the end is dopey.
I like HTML over XHTML. See http://hixie.ch/advocacy/xhtml (though the suggestion to use the still “Working Draft” HTML5 is somewhat puzzling).
I’m sure I could do something clever and make sure I send my pages using the application/xhtml+xml MIME type, but I don’t. I don’t see the benefit when I can use HTML 4 and the default Web server configuration. It Just Works FTW.
I used to use XHTML, largely because I could more easily check my Web pages using an XML parser and XPath. But tools such as WWW::Mechanize have become really good at handling HTML 4, so the charm of XML has faded.
Just for gits and shiggles I spied on the headers exchanged when fetching http://haml.hamptoncatlin.com
My browser sends this (indicating that it will accept assorted XHTML-friendly MIME types)
GET / HTTP/1.1
Host: haml.hamptoncatlin.com
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.14) Gecko/20080419 Ubuntu/8.04 (hardy) Firefox/2.0.0.14
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: UTF-8,*
Keep-Alive: 300
Connection: keep-alive
Referer: http://www.google.com/search?q=Haml&ie=utf-8&oe=utf-8&aq=t&rls=com.ubuntu:en-US:official&client=firefox-a
Cache-Control: max-age=0
It gets back this:
HTTP/1.x 200 OK
Date: Sun, 22 Mar 2009 01:34:55 GMT
Status: 200 OK
Server: Mongrel 1.1.5
Content-Type: text/html
Content-Length: 4734
... followed by an XHTML file.
I don’t mean to single out the Haml site. This is quite common. If you’re going to go the XHTML path, though, consider doing it in earnest, or it comes off as posturing.
That’s basically it. For those who like Haml, more power to you, just please don’t hand it to me to work with.
If you think I’m wrong on any of my points, please drop me a line with some specific, factual, technical information.
Every so often I get prompted (more or less) for my thoughts on Haml. Someone suggested I write them up.
I’m not a fan. Some vocal number of people are big Haml enthusiasts, and while I think I get what they see as its virtues, it just doesn’t work for me.
In no particular order, here’s what irks me.
I already know HTML. I have no trouble reading it, no trouble writing or editing it. I have an editor, vim, that makes working with HTML fairly simple. I’ve no compelling reason to learn another syntax in order to end up with markup that’s already easy to write. (BTW, if you are not using an editor with auto-tag completion and other HTML/XML helpers you are making a mistake). I get the impression that many Haml fans are programmers who don’t already know (or are not comfortable with) HTML, so they have a learning curve no matter what, and Haml may be less onerous than HTML. Me, I’m not afraid of HTML or XML, and I find Haml Perlishly cryptic.
It seems to grab the worst features of Python and Perl: Magic indentation and write-only syntax. No, I’m not interested in debating the merits of either. I view static indentation as I do most forms of static typing: needlessly restricting in an attempt to solve problems that don’t come up much in Real Life code but make for nice pedantic rants about “But what if?”. I also know that one man’s cryptic is another man’s poetry. Much poetry is an acquired taste, and often bad.
I have a hard time navigating Haml documents. With HTML I can easily jump from the start or end tag of a element to the matching one. This is quite handy when I want to insert something at the end of an element; from the start tag, hit %, and jump to the end tag. Perhaps this is also possible in Haml, but I’ve not figured it out. Instead, in Haml, I do the Dance of Matching Indentation, and sadness follows.
It seems that whenever I see examples of Haml (or Yaml, for that matter), they are pretty short. That’s because the allure of magic indentation wears thin for large docs. (Cute anecdotal tale that preaches to the choir: I made this observation about Python code to a Python fan, and was told that it worked to ensure you kept your methods short. That was the first and only time I was told that the white-space tax had a punitive purpose.)
I can hit some keys in vim and auto-format my HTML docs. I can easily cut and paste chunks of markup and move them around, and have my editor handle the formatting. Not so with Haml, where there is constant risk of offending the gods of The True Indentation.
I often work with Web designers who will send me HTML pages that need to be re-worked into templates. Having to covert that into some other format just so I can get HTML in the end is dopey.
I like HTML over XHTML. See http://hixie.ch/advocacy/xhtml (though the suggestion to use the still “Working Draft” HTML5 is somewhat puzzling).
I’m sure I could do something clever and make sure I send my pages using the application/xhtml+xml MIME type, but I don’t. I don’t see the benefit when I can use HTML 4 and the default Web server configuration. It Just Works FTW.
I used to use XHTML, largely because I could more easily check my Web pages using an XML parser and XPath. But tools such as WWW::Mechanize have become really good at handling HTML 4, so the charm of XML has faded.
Just for gits and shiggles I spied on the headers exchanged when fetching http://haml.hamptoncatlin.com
My browser sends this (indicating that it will accept assorted XHTML-friendly MIME types)
GET / HTTP/1.1
Host: haml.hamptoncatlin.com
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.14) Gecko/20080419 Ubuntu/8.04 (hardy) Firefox/2.0.0.14
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: UTF-8,*
Keep-Alive: 300
Connection: keep-alive
Referer: http://www.google.com/search?q=Haml&ie=utf-8&oe=utf-8&aq=t&rls=com.ubuntu:en-US:official&client=firefox-a
Cache-Control: max-age=0
It gets back this:
HTTP/1.x 200 OK
Date: Sun, 22 Mar 2009 01:34:55 GMT
Status: 200 OK
Server: Mongrel 1.1.5
Content-Type: text/html
Content-Length: 4734
... followed by an XHTML file.
I don’t mean to single out the Haml site. This is quite common. If you’re going to go the XHTML path, though, consider doing it in earnest, or it comes off as posturing.
That’s basically it. For those who like Haml, more power to you, just please don’t hand it to me to work with.
If you think I’m wrong on any of my points, please drop me a line with some specific, factual, technical information.
UPDATE:
Thanks to Arthur and Nathan for pointing out that Haml allows for different output types by setting, for example,
Haml::Template.options[:format] = :html4
someplace or other.
UPDATE 2:
This is a nice thread on the trouble with Haml Haml doesn’t like javascript
While I appreciate people trying to help me get a grip on Haml, the discussion tends to look like this:
Anti-Haml: It's hard to work with
Ham'l Qaeda: But look how beautiful it is!
Anti-Haml: It imposes superficial constraints
Ham'l Qaeda: But look how beautiful it is!
Anti-Haml: It gets in the way of doing things I want to do
Ham'l Qaeda: But look how beautiful it is!
Anti-Haml: It makes embedding JavaScript annoying
Ham'l Qaeda: Your are a flawed being for desiring that.
And look how beautiful it is!
:)
I was having problems when adding unpacked gems to the load path in a Monkeybars app. On Windows, if the expanded path that had spaces, items added using the add_to_classpath or add_to_loadpath methods would end up with %20 where the spaces should be. The packaged file would not get loaded.
resolver.rb is a file created as part of a Monkeybars app skeleton. It lives in the src/ dir of your app.
Here’s my path-adjusting version: http://gist.github.com/103874
I added line 30 to the original version of the file.
This should get added back to the main Monkeybars repo (I have it in one of my forks, which I use in place of stock Monkeybars), but until then if you are having odd file loading issues with files in jars, see if it isn’t because of borked spaces in expanded paths.
I just can't get into the argument that women are being kept out of programming because the male programmer is such a testosterone-powered alpha specimen of our species. Compared to most other male groups that I've experienced, the average programmer ranks only just above mathematicians in being meek, tame, and introverted.
When I talk to musicians, doctors, lawyers, or just about any other profession that has a fair mix of men and women, I don't find that these men are less R rated than programmers and that's scaring off women from these fields. Quite the contrary in fact.
When I sit down with any of these groups, I usually find that I'm the one blushing. Yet that atmosphere some how doesn't keep women from joining any of these fields. It's from that empirical observation that I draw the conclusion that this argument is just bullshit.
Now that doesn't mean the underlying problem isn't worth dealing with. It absolutely is! I think that the world of programming could be much more interesting if more women were part of it. I wish I knew how to make that happen. If I find out, I'll be the first to champion it.
But in the mean time I don't think we're doing anyone a service by activating the WON'T SOMEBODY THINK OF THE CHILDREN police and squash all other sorts of edges and diversity in the scene.
You certainly have to be mindful when you're working near the edge of social conventions, but that doesn't for a second lead me to the conclusion that we should step away from all the edges. Finding exactly where the line goes — and then enjoying the performance from being right on it — requires a few steps over it here and there.
I've found that the fewer masks I try to wear, the better. This means less division between the personality that's talking to my close personal friends, socializing with my colleagues, and for interacting with my hobby or business worlds.
Blending like this isn't free. You're bound to upset, offend, or annoy people when you're not adding heavy layers of social sugarcoating. I choose to accept that trade because my personal upside from congruence is that I find more energy, more satisfaction, and more creativity when the bullshit is stripped away.
This means that it leaks out that I love listening to Howard Stern, that Pulp Fiction is one of my favorite movies, that I laugh out loud at Louis CK's Bag of Dicks joke, that I whole-fully accept my instinctual attraction to the female body, that I think drugs should be legal, that I really like the word fuck and other gems of profanity, and on and on.
Now I get that lots of people find much of that crude and primitive. I'm okay with that. I do take offense when yet another lame stereotype is thrown out (like that porn by definition is misogynistic), but I've learned to deal with that.
What I'm not going to do, though, is apologize for any of these preferences and opinions. I'm happy to be an R rated individual and I'm accepting the consequences of the leakage that comes from that. If you can deal with that, I'm sure we're going to get along just fine.
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.
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.
I have a long-running background process of trying to learn German. I can understand a fair amount, but have difficulty calling to mind the words when I want t say or write something.
I wrote a Monkeybars app to do a sort tof flash card thing with German vocabulary (see my IBM devWorks article), but for whatever reasons I don’t run it much.
I do, however, have a Twitter client running most of the time, and I figured I should be able to get Twitter to teach me German: http://twitter.com/teachmegerman
If you follow @TeachMeGerman you’ll get a tweet every hour with a vocabulary item.
I may adjust the interval, but so far this seems OK.
I’m not sure how many words are in the list; maybe 100. Each tweet is randomly selected.
Now the experiment is to see how well this sort of ambient education works out.
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.
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.
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.
These are often a handful of pages, at most a dozen.
Chunks of content in reverse chronological listing, time and taxonomy-based archives. Sometimes comments, sometimes no. Usually a few other pages for the “potpurri”.
My personal site (hint: you're reading it) will probably continue to evolve to include a little of each of these.
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)
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.
Here is your Friday Jam: The De La Soul Dugout. Quite good. See also: WEFUNK radio.
The Ruby Best Practices blog has gone live
My first post is Solve the problem, not just a problem
You can read the comments on Disqus
I’m quite flattered to be among the initial group of people contributing to this project. Big props to Greg Brown for getting this together, and his sharing his O’Reilly limelight with us.
His book, Ruby Best Practices, is really good. I’ve looked at many Ruby books, and most are mediocre. A few stand out, and RBP is in that small collection.
I’m typically skeptical of things claimed as “the best” way to do this or that, and what I write for the RBP blog will not be claiming anything to be the One True Way (and, incidentally, neither does the book; instead, it examines various options, details pros and cons, and presents a well-reasoned example).
What I hope to do is explore the thinking process involved in coding, examine how different problems may be solved, and give readers something to ponder.
I’m open to suggestions on topics, and welcome all comments on my posts.
eastern_timezone = ActiveSupport::TimeZone["Eastern Time (US & Canada)"]
mon_before_market_opening = eastern_timezone.parse "3/23/2009 07:59:59 AM"
A Mac Mini, actually. For occasional development work.
Many things are quite nice and well done. Others, annoying. It looks very nice, but I was amazed that my choice of simple desktop background colors was limited to one of 8 shades of melancholy. There’s a difference between subdued and drab, and while I would really want a gradient background (as I have on my Kubuntu laptop), even a solid shade of a vibrant rust or golden green would be nice.
Likewise for “spaces”, the Mac version of multiple desktops. KDE3 lets me give each a unique color—makes it easy for me to place myself. Puzzling that the Mac, which seems to otherwise excel in UI goodness, falls down here. And one more “why isn’t a Mac more like <foo>” complaint: To resize a window you have to use the One True Corner. You can’t (as far as I can see) simply grab any edge or corner and adjust freely. Makes for more work.
When I switched from XP to Kubuntu a few years ago, I had a similar experience. I liked XP as a general OS, and there were a number of apps that did not have suitable counterparts in Linuxistan, but one BSOD too many made me decide that, being a developer, I needed the stability more than the pleasantries. I had been using Linux via VMware for a while so it wasn’t a sudden radical leap, but making it my daily OS (with KDE3 as the desktop manager) was jarring.
I first tried the stock Ubuntu install, which uses Gnome, but I was not able to tweak the UI as I liked. I could not, for example, give each desktop a unique background, and the menu system seemed hard to customize. KDE was more to my liking, but it, too, had a fair share of quirks.
I think KDE3 gives you Dolphin as the default file manger. Dolphin seemed heavy on white space and icons and weak on more useful information, and I ended up using Konqueror instead since it seemed to have more of the better features of the XP file manager. While spending time getting things “just so” I was thinking about the little things that worked or didn’t. Changing your OS + desktop manager seemed to entail swapping annoyances more than a clear move to better or worse. What was annoying depended on what you were used to. I figured someone moving from KDE to XP would be finding the same number of nits to pick.
Over time I just got used to how things worked. I also found things that were so much better on KDE. For example, to move a window, you hold Alt and click anywhere, and drag. Very nice. I sometimes do this on my Vista box with amusing effects. (I tried this on my Mac; no luck.)
I need now to get acquainted with various Mac tools and keyboard shortcuts. I imagine that over time I’ll stop gnashing my teeth over funky Mac UI decisions, get used to the Mac Way, and be enjoying the good parts while ignoring the bad.
I have Synergy running, so I can use the Kubuntu laptop as my base and switch over to the Mac or the Vista boxen as needed. Very handy. Now I just need to install all those extra dev things …
Try Jay’s demo at home.
Jay Phillip’s talk at MWRC attempted to get the audience involved in actually running an Adhearsion demo on their own laptops. Unfortunately, the demo at MWRC was plagued with firewall and network problems, but eventually I was able to get it working. Here are the steps needed.
Go ahead, try this at home. It’s a lot of fun.
You can do that here: http://adhearsion.com/signup
You will need a skype account to complete the sign-up. After signing up, you should get an email with a link that you need to click before your account is activated. Go ahead and activate the account now.
Run:
gem install adhearsion
I’m running the 0.8.2 version of the gem.
Run:
ahn create project_name
Run:
cd project_name ahn enable component sandbox
Edit the file: components/sandbox/sandbox.yml and update the username and password you used when you created the Adhearsion account in step 1.
Edit the dialplan.rb file to contain the following:
adhearsion {
simon_game
}
sandbox {
play "hello-world"
}
The adhearsion section should alread be in the file. You will be adding the sandbox section.
Run:
cd .. ahn start project_nameYou should see:
INFO ahn: Adhearsion initialized!
Errors at this stage might mean that your adhearsion account isn’t setup properly, you don’t have the right user name and password (in step 5), or that you have firewall issues preventing you from connecting to the Adhearsion server.
Using Skype, call the Skype user named sandbox.adhearsion.com. You should hear a hello world message.
Just for fun, change the dialplan.rb file to contain:
adhearsion {
simon_game
}
sandbox {
play "hello-world"
play "tt-monkeys"
}
(Add the tt-monkeys line to the sandbox dial plan).
Now call the sandbox again (skyping user sandbox.adhearsion.com) to hear the change in the dial plan. Monkeys FTW.
Here’s a example of what can be done in a dial plan. I was just goofing around with my dial plan.
adhearsion {
simon_game
}
sandbox {
play "vm-enter-num-to-call"
digits = input 1, :timeout => 10.seconds
case digits
when '1'
play "hello-world"
when '2'
play "tt-monkeys"
when '3'
play "what-are-you-wearing"
when '4'
play 'conf-unmuted'
when '5'
play 'tt-weasels'
when '6'
play "pbx-invalidpark"
when '7'
play "1000", "dollars"
when '8'
play "followme/sorry"
when '9'
simon_game
when '0'
play Time.now
else
play "demo-nomatch"
end
sleep 1
play "demo-thanks"
}
See http://adhearsion.com/examples for more dialplan examples.
Think about what you are doing. You are calling the Adhearsion server and controlling how that remote server responds by the adhearsion program running on your own local box. That is wild.
The adhearsion sandbox makes it easy to play around with telephony programming without any investment in the associated hardware.
I hope this demo encourages you to give Adhearsion a try.
All Rails Conf 2009 speakers are invited to a special event.
Anyone speaking at RailsConf 2009
Sunday, May 3, 4:00PM – 6:00PM
(The day before RailsConf 2009 officially begins)
Las Vegas Hilton in Pavilion 1
Presentations for Presenters.
You’ve come all the way to Las Vegas to tell the world about your latest Ruby/Rails project or idea. You want to make sure that you really get your message across. So, how do you do that?
The Presentations for Presenters session will give you practical tips for improving your RailsConf presentation. We will cover all aspects of planning, preparing, creating and delivering your talk, so that your unique message will get across to your audience.
Plus we will have a lot of fun. Hope to see you there.
Start planning now to attend. Since this session is actually the day before RailsConf officially begins, make sure that your travel plans gets you there in time.
I had a blast at MountainWest RubyConf 2009.
Some random thoughts:
Big thanks to Yehuda Katz for taking the time to explain the changed planed for Rails 3. (I copped to not fully paying attention to his talk because I was still hacking on my own presentation.) Things look really interesting.
A lengthy dinner with Jim Wierich, David Brady, and Matthew Nielsen. Aside from the top-notch geekery, there was much laughter watching oddball videos and discussion favorite TV shows. I also learned that goofy off-the-cuff remarks can find their way on Twitter very quickly. :) Monster props to Dana Gray for picking up our tab, too.
Dinner with Brain Marick and associates the night before was a treat as well. I mean that in multiple ways, as Kay Johansen grabbed the check that night. Be sure to watch Brian’s lightning talk on Micro-scale Retro-futurist Anarcho-syndicalism when the video comes around.
The talks were amazing. The shorter format made for punchier content, with more topics covered. Mike Moore and Pat Eyler did a great job of keeping things running and on time.
The hackfest was great. Big thanks to Engine Yard
Remi Taylor did a remarkable lightning talk on rackbox After losing time due to video hookup issues, he still managed to blaze though without complete composure. True lightning. The crowd was quite impressed.
I more or less made a point of not hanging with folks from Phoenix. Nothing personal, but conferences such as these are the among the few chances to meet new people or to hang with folks I’ve only interacted with on-line.
I need to re-think my presentation style. Many people whose opinion I respect had good things to say, and I had a nice chat with James Edward Gray II about ways to fix some issues in my code. Still, I felt I was too stiff, and the talk lacked a clear focus. I’m thinking I need to drop the slides and do more live coding with more demonstration apps.
There was a discussion on the back channel about talks and slides, and a few people (including me) seemed to think that having no slides at all would be a good thing. Dave Brady, for example, was too sick to give his talk at the schedule time, but he came to the conference the next day and gave his talk right at the start of the lunch break. Without having brought his slides, he demoed his code and used Emacs to show a few text notes to reinforce his words. It was great.
It would be nice to have a conference along those lines. 20-30 minute talks, with no slides. Use your editor to display text if needed, but focus on what is said and code being run. Might need a catchy name. RawCamp. RawConf. LiveConf. SomethingSomething. Or something like that.
PS: Videos are starting to appear! http://mwrc2009.confreaks.com
At MountainWest RubyConf 2009 I gave a talk on using the Wii controllers to drive Ruby code.
Video should be appearing on the Confreaks site before too long.
The code for the Wii libraries are on GItorious: http://gitorious.org/users/neurogami
Food!
During the conference, folks will have to fend for themselves to find food. To make life a little simpler I Googled up some maps of various restaurant types near the SLC library.
The library on Google maps: http://is.gd/mlN2
Restaurants http://is.gd/mlO8
Italian http://is.gd/mlOR
Indian http://is.gd/mlP3
Vegetarian http://is.gd/mlPn
Mexican: http://is.gd/mlQ0
Bars and stuff: http://is.gd/mlS7
All restaurants: http://is.gd/mlRt
Veg: http://is.gd/mlQd
Indian: http://is.gd/mlQy
Mexican: http://is.gd/mlPS
Italian: http://is.gd/mlR3

Every so often I find a need for some small script that will reduce or eliminate some annoyance.
One case is running out of disk space. I really could not tell you what in the world is consuming my laptop drive, but 200G is evidently not enough.
Every so often I think to check the amount of free space, and move off or delete this or that. But sometimes I suddenly find myself with zero free space, and some applications just don’t handle this well.
I decided to create a cron task that would check the disk usage and warn me when free space fell below some set amount.
The Ruby code was simple (though potentially hackish. If there’s a better way to get the amount of free disk I’d like to hear of it).
Here’s grabbing the disk space
def free_diskspace drive
results = `df -h #{drive}`
# Filesystem Size Used Avail Use% Mounted on
data = results.split( "\n").last.split(' ')
value = data[3]
value.sub!( /G$/, '')
value
end
To issue an alert when space is low, I used KDE’s built-in kdialog command. There’s a Ruby lib that wraps this, but invoking it directly is simple enough.
def alert msg
puts `kdialog --display :0 --error "#{msg}"`
end
The logic is basic:
space = free_diskspace '/dev/sda1'
alert "Running low on disk space: #{space}" if space.to_f < 2.0
One point that wasn’t obvious when I wrote this: the cron task may not be using the same X display as the user, so the message box may not be seen. The fix is the explicit use of --display :0 when calling kdialog.
I’m putting together a sample app, trying to pay attention to all the little steps, all the things that need to be in place if you want a Wii-enabled Monkeybars app.
I’ve written a few small such apps, but each time there was some variation. Over time I’ve sort of settled on Here’s How You Do It, but, sadly, the reference for this is the set of previous examples. What I really want, at some point (if not by the time of my talk, then soon after) is that creating a basic Wii app is reasonably stupid simple. Getting started so you can play around should not be a pain in the ass, or no one (i.e. me) will do it.
For example, after you generate the basic Monkeybars app layout you need to have the WiiUseJ jars in place. Where do they come from? Well, right now, it’s “one dir up and two dirs down”, as I snag them form a previous project. I’m not so sure that’s a long-term solution.
Should these jars (and .so and .dll files) by in the git repo? I first though not, since those things are not my code, and folks would be better off grabbing whatever is the current version from wherever they call home.
But, seriously, what a pain in the balls. I have some idea what I need and I find it annoying to have to go find the right project with the right files. Now I think I’ll push then up with the Ruby code, ensuring that the all the files are right there, and that they are compatible. I could then go a git pull to slurp down the files and have them dropped off where they need to be. Or make a gem that provides a script for copying over all required files from a common local directory.
When a program wants to talk to a Wiimote it first needs to connect to it over Bluetooth. The Java code throws an exception if it doesn’t catch a connection signal coming off the Wiimote. To send that signal a user needs to press the Wiimote 1 and 2 buttons at the same time. You can watch for a (vague) message at the console telling you when to do this, but for a real application you really want some sort of message box.
My programs so far were having the controller kickoff the Wiimoting, with a signal to the view to toss up a “spinner” dialog box asking the user to hit 1+2. I used a retry loop to allow for some number of attempts before giving up should no signal come.
Some of this code is in a module that is part of WiiUserJRuby, but you still have to wire a few parts up. Writing yet another program, I’m wondering how to make this easier. My current inclination is to write a generator that gives you a controller and view with the default Wiimotable code in place. As part of my explorations with Jimpanzee (AKA my fork of Monkeybars) I added, in addition to code to allow an inline Swing DSL, some extra generators to take advantage of the inline Swing option.
I ended up taking that out and putting it into a tool called Rhesus (it made Rhesus pieces; assorted MVC tuples for use in Monkeybars).
Rather than keep adding a series of Groovy Cool Monster features to Monkeybars, I’d rather see a set of optional tools. <stong>Rhesus, for example, could provide a generator for kick-starting Wii Monkeybars projects.</stong>
This would allow me to keep the core code in WiiUseJRuby from being Monkeybars-centric. I saw how ingrained things were when I tried to hook my Wii code into a Gemini game. Among the assorted issues I ran into was the realization that it made zero sense to have core Wii Ruby code trying to signal a view; none of that exists in Gemini. I settled for just writing to the console. It’s hacky, but the Wii code was not set up for flexible notifications.
Now, I don’t want to spend that much time trying to account for numerous what-if’s, but I do want to encourage people to try things, and that means making things inviting. Make basic things simple, interesting things possible, keeping the barriers low.
I’m still not quite sure what the theme of my MountainWest RubyConf talk will be. I have ~30 minutes, but realistically I need to plan for fewer, perhaps 15-20 minutes.
I’m glad the talks are shorter. More topics covered, less chance of a talk getting too bogged down. It’s more of an opportunity to toss out numerous ideas and situations than to expound on one or two in any detail. I’m currently inclined to make my talk a mix of demos and observations, in the form of design choices and unanswered questions.
Working with the theme of “Play” there are two threads. One is to use Ruby to create apps with which you play. Specifically, showing how to use the Wii remote with JRuby. I’ve been working on audio synthesis apps controlled by a Wiimote. I’m also (perhaps too ambitiously) looking to hook in the Wiimote to a demo Gemini game.
The other thread is the idea of creating an API that affords playing with code. The Java libs for using the Wiimote expose behavior with a certain granularity. You can use that to get stuff running, but it does not always make for easy tweaking. I’ve written some Ruby code to wrap the Java calls, with an eye on making it easy to get up and running.
Designing an intuitive API is not simple. It’s a bigger issue with the Java audio libraries I’ve been using. JSyn, for example, is quite flexible, but there’s a notable learning curve for even basic noises.
I’ve been hacking around some, making up code as I go. I first see what I can do, how hard it is, how useful the results, and after a few experiments think about how to encapsulate common behavior. The catch is that I’m still too inexperienced to really know what is common behavior with this code. A more subtle problem is that “common” can be self-fulfilling. I’ve had discussions with Rubyists over the use of $:. One opinion was that it was cryptic, not self-descriptive . It was claimed that some people would have to keep looking up its meaning, wasting time. My counter to this was that you only have to look it up a few times before you just remember it. Basically, if you treat it as arcane then it becomes arcane. If you just use it, it becomes mainstream, for better or worse.
With an API there comes a point when people just adapt to what’s available, develop habits and practices, and start to consider those practices as the right way to do things. If you then propose a change to the API it can feel wrong or awkward because of how it conflicts with established practices. What’s often not seen are the different practices that would evolve with a new API, and whether those new practices would be an improvement. (As an example, consider people trying to learn touch typing after years of hunt-and-peck. Or trying to change code editors [vi <-> emacs]. It all seems so hard and wrong, until you break though and internalize the new behavior.)
As I play around with Ruby wrappers for JSyn or WiiUseJ I have to keep in mind what affordances I’m creating (e.g., super-ease of creating a certain kind of tone or grabbing remote data) and what possibly interesting pathways I’m obscuring. I want it to be easy to play with the code. I don’t want to presume too much about how it should be used. Options should be discoverable (so one isn’t wasting time figuring out basic behavior) but not rigid. One should feel encouraged to explore what can be done while not getting bogged down in how to do it.
There may be an inclination to think of Wii libs as meant to help write games, but biasing the code for game development would be short-sighted. What’s more interesting are all things that aren’t obvious, all those quirky unexpected things that come out when playing with code is easy and fun. You can’t help biasing code; all code comes with a point of view, but one can try to keep the bias fairly benign. If you think of code as a open field, you want paths, not fences. Making new paths should not only be possible, but encouraged.
(Side note: MWRC registration ends today. Still a few seats left. Well worth attending.)





With Happy Camper Studios and Rising Tide Software soon to be memories, the people who gave those entities life are moving on to other things.
I’m continuing with contracting/consulting/product development, but my former business partner Logan Barnett, AKA Logustus, is looking for a more predictable gig.
If you are looking for world-class Ruby talent in the Phoenix AZ area, do not delay.
Hire him.
If you are looking for a kick-ass Ruby developer, hire Logan.
If you are looking for a kick-ass application designer, hire Logan.
If you are looking for a kick-ass co-worker, hire Logan.
Seriously, he’s really, really good,
I tweeted that I had a $50 Amazon gift card and asked what one book would people recommend.
If you didn’t, or don’t want to, reply to that tweet, post a comment here. In 140 characters if you can, too.
The list so far:

Happy Camper Studios and Rising Tide Software are to be no more.
Everything is being done amicably; this was a pragmatic choice based on business conditions. I would have preferred this journey had a different ending, but it was still a good and valuable trip.
I think the world of David and Logan and expect them to go to greater things.
While the Happy Campers were prime movers behind Monkeybars and Rawr, as individuals we will still be looking after them. We may not all have the same chance to use them in daily production work, so enhancements may be slower in coming. On the bright side, the code has reached a stable state, so they're in good shape already.
Happy Camper also released the JotBot time-tracking tool. I'll be looking after it now.
Go read what Logan has to say on the demise of RTS and HCS. It's quite interesting, though I don't agree with all he says.
In particular I disagree about having a partner. So far my experience is telling me that the magic number is two. It really helps to have someone else to bounce ides off of, someone who can cheer you on when you're down, and vice versa. Sure, three people can do that, but for various reasons it gets unbalanced.
You really want to be sure that everybody gets to partake in discussions, but it's not as easy with two other people to grab the phone or to pull someone aside when something pops into your mind. With each extra person there's that extra bit of organizational friction, not in a personal sense, but in a physics lab “work and coefficient of friction” sense. You move a little slower, people get out of sync.
It's speculation, though. There's no way to know how any business would have been different with this or that organizational change. You can posit that there would be some difference, but not know if that difference would have been good or bad. (Excusing the pathological cases, of course.)
I'm reviving Neurogami as my consulting operation. I have some projects lined up, but I'm always interested in speaking to people about building things. Still hacking Ruby, plus working on Android apps, staying abreast of new tech, making stuff, and always looking ahead.
On one of the projects we're working on, we needed to occassionaly generate SQL from our migrations. Déjà vu, I thought. A few minutes of Googling later, I remembered why: Jay and I had been on a project a couple of years ago whence we had the same need. Jay's code didn't quite work any more due to some ActiveRecord changes, and a search for an alternative implementation turned up nothing.
I took his code and modified it to our needs. A short time later, I had the code pulled out into a rails plugin, migration_sql_generator. Install it (script/plugin install git://github.com/muness/migration_sql_generator.git) and then run the rake task:
rake db:generate:migration_sql
Running this task generates two sql files per migration in db/migration_sql in the form 20090216224354_add_users.sql and 20090216224354_add_users_down.sql.
I've used the plugin with success using the sqlserver adapter, less luck with the mysql adapter (change_column and rename_column blow up because the mysql adapter checks for the presence of a column first) and no luck with the sqlite adapter. Haven't tried it with the postgres adapter.
Chad mentioned that he'd gotten ruby 1.9.1 and 1.8.6 side by side on his workstation (his code for this is in his awesome spicy-config repo).
I took some time this morning to get a similar setup working. Now, on my prompt, I type, use_ruby_186 or use_ruby_191 to go back and forth between the Ruby 1.8.6 shipped with Leopard and a self-compiled install of ruby 1.9.1.
Steps for you to get there:
mkdir -p ~/tmp
cd ~/tmp
curl -O ftp://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.1-p0.tar.gz
tar xzf ruby-1.9.1-p0.tar.gz
cd ruby-1.9.1-p0
./configure --prefix=$HOME/.ruby_versions/ruby_191
make
make install
curl -L http://github.com/relevance/etc/tree/master%2Fbash%2Fruby_switcher.sh?raw=true?raw=true > ~/ruby_switcher.sh
echo "source ~/ruby_switcher.sh" >> ~/.bash_profile
Note that I use ~/.gem for my gems. If you don't do that, you'll have to modify the switcher to specify your GEM_HOME. Type gem env and look for GEM PATHS to figure out what you should set it to.
Here's the install script if you too want Maatkit at your fingertips (and you do. trust me.):
#!/bin/sh
# tested on Leopard with MySQL installed using the package installer
sudo perl -MCPAN -e 'install DBI::Bundle'
sudo perl -MCPAN -e 'install DBD::mysql'
# you may need to force the install as follows:
# sudo perl -MCPAN -e 'force install DBD::mysql'
mkdir -p ~/tmp
cd ~/tmp
curl -O http://maatkit.googlecode.com/files/maatkit-2725.tar.gz
tar xzvf maatkit-2725.tar.gz
cd maatkit-2725
perl Makefile.PL
sudo make install
/etc/udev/rules.d/*net.rules . The fix:
sudo rm /etc/udev/rules.d/*net.rulessudo shutdown -r now #to reboot
If you are speaking at RubyConf this year, we have a special opportunity for you.
If so, congratuations! And have we got a deal for you …
Wednesday evening, Nov 5, at 6:00 pm, (that’s the night before the conference) we are inviting all speakers to a special training session. I’m going to be sharing some ideas for putting together and delivering a good presentation.
After my talk, Patrick Ewing and Adam Keys are geared up to do some Powerpoint Karaoke with everyone there. I’m not even sure what Powerpoint Karaoke is, but it sounds like fun.
I hope to see everyone there.
I’ve talked to Adam today. He says that Patrick isn’t going to able to make RubyConf this year, but we will be ready to roll with Powerpoint Karaoke anyways.
It looks like the speakers training will be in the Olympic Room tonight. The Olympic Room is on the same floor as the registration desk. Go to the left past the elevators and turn right down that hall (or ask someone who looks like they know what they are doing).
I’ve received a lot of requests for my old articles …
When I changed to my new hosting machine, I moved all my blog posts but didn’t move any of the articles. Of course I intended to move them eventually but never got around to it.
A lot of people have been asking for this article or that presentation, or pointing out that a number of old bookmarked links are no longer any good. So due to popular demand the Articles and Presentations section of onestepback.org is now restored.
Enjoy
I’ve gone without comments on this blog for a long time …
I’ve gone through several commenting systems for this blog over time. First was the really cool TagSurf application that allowed commenting on about any web page on the internet arbitrary tags. Unfortunately, TagSurf died a (in the words of its creator) “well deserved” death.
Then I tried a wiki for comments. That worked pretty good (aside from spam issues), but setting up a new page for comments for each new post was just too much hassle.
Now I’m trying Disqus for comments. It only took an hour or so to integrate Disqus with my ancient blogging engine (anyone else still using Rublog?).
Kick the tires and see how it works. If you have feedback … well, just leave a comment.
I guess this means I’ll have to start writing some real content here so there will be something worth commenting on … let’s see if there is anything I feel like ranting about …
(Oh, and a hat tip to Ryan Briones for pointing out Disqus when I was ready to go out and implement something from scratch.)
The is now a RedMine setup for Rake, FlexMock and Builder.
As part of an effort to get better control of changes to the my open source projects, I’ve setup a RedMine issue tracking site for Rake, FlexMock and Builder. You can find it at http://onestepback.org/redmine.
I am changing host for the One Step Back blog.
This is just a quick little post to let you know that the One Step Back blog is moving. In fact, it has already moved. But don’t worry, we aren’t going far.
Originally this blog was hosted on a shared co-op system run by N2Net. It was dirt cheap and easy to maintain. The down side was that support was sporadic. As the hardware has aged, the Co-op has decided to let the current system run until the hardware dies, and then disolve the co-op.
Today there are tons more hosting opportunities available than there were when the co-op was first formed. I’m now leasing a Linode node and running the blog and other associated software from there. Its almost as inexpensive and the co-op and uptime should be better.
Write now the blog has been moved. As time passes I’ll move the article archive as well. Let me know if anything looks amiss.
—Jim Weirich
Looks like Joe O’Brien tagged me for answers to the following questions. He, in turn, was tagged by Josh Owens, who in turn was tagged by Jeff Blankenburg. It looks like Sarah Dutkiewicz and Micheal Eaton started this.
OK, sounds like fun. Here goes.
I was introduced to programming in high school by reading a book on the topic. The book taught me how to write machine code for a strange decimal-based machine. Unfortunately, there was no actual computer involved in the process. Shoot, who had computers back then? Certainly not our high school (the personal computers? not invented yet!)
In college, I learned a smattering of FORTRAN. Just enough to drive a Calcomp plotter to plot data from my undergraduate physics courses. But didn’t really get into programming until my junior year in college. (Story continued in next question)
So, I was planning out the courses for my junior year in college and I had a hole in my math courses. The math class I needed was not offered that semester, so my adviser suggested taking a computer programming course. He said it would be useful and, who knows, I might enjoy it.
So I signed up for an introduction to FORTRAN course, figuring it would be easy because I already knew a little bit of FORTRAN. I show up on the first day of class and after a few preliminaries the instructor jumps right into some code, that looked like this:
(de member (pip deck) (cond
((null deck) nil)
((eq pip (car deck)) t)
(t (member pip (cdr deck)))))
I remember scratching my head and thinking this was the strangest FORTRAN I had ever seen. I was totally confused for about three days, then something clicked on the third day of class. I suddenly “got” what the instructor was trying to get across and it all made perfect sense.
If you haven’t figured it out yet, the instructor taught us Lisp as part of an introduction to FORTRAN. The instructor turned out to be Daniel Friedman, the author of The Little Lisper, and was well known in the Lisp community. That small exposure to Lisp hooked me on programming from that point on. I took as many CompSci courses as I could in my remaining year and a half in college. I eventually graudated with a BS in Physics, but had a strong background in Computer Science as well.
Technically, FORTRAN was my first language. But Lisp is the language I fell in love with and is what got me hooked on programming.
I have a very clear memory of the very first program I wrote professionally. The reason it is so clear is that this was the first program I wrote that was intended for actual use by someone who wanted it. Everything else up to that time was done for my own personal enjoyment or to satisfy some course requirement.
The program calculated the “critical angles” of “pieces”. I was given the requirements by Anne Exline, a senior programmer, and proceeded to write the program to spec. It took a few days, but when I was done I showed the result to Anne and she was pleased with the result.
The funny thing is that I had no idea what a “piece” was nor what was so critical about the angles I was calculating. I was so excited about writing an actual program that I did not ask until the software was done. When asked, Anne just looked at me funny and said “Rocket Pieces”. When Cape Canaveral lauches a rocket, they track it very carefully to make sure it stays on course. If it strays, the range safety officer is required to activate the self destruct. The critical angles are those angles that would cause the “rocket pieces” to land outside the safety area of the flight path.
So, my very first professional program was not only useful, it might actually save lives.
Languages I have used as part of my professional career (in roughly chronological order) include FORTRAN, various assembly languages, FORTH, C, PL/M, C++, Java, Ruby.
Languages I have used in addition to those mentioned above: Pascal, Perl, Eiffel, and Lisp/Scheme.
Languages I can read, but never wrote anything significant in them: Ada, Python, Erlang, Smalltalk, SNOBOL, Algol, Pascal.
I was hired by the RCA Missile Test project in Cape Canaveral, Florida as a Near Real Time Analyst. Duties included programming various launch related software (e.g. the critical angle program mentioned above) and working launch support.
The launch support was the “Near Real Time” part of the job description. From the moment a rocket is launched until it reaches orbital velocity, any malfunction could cause it to fall back to earth. During this initial portion of the launch, the launch is monitored in “real-time” so that we know exactly where it would land if the engines were to cut off NOW. Trajectory calculations had to be done in fractions of a second and updated constantly in real time.
After the rocket reaches oribital velocity (usually somewhere between 8 and 14 minutes into its flight), it won’t fall back to earth. At this point the real time trajectory program is shut down and the near real time program is started. The near real time program can take a few minutes to calculate a more exact orbital prediction and then send that prediction to downrange radars (e.g. the the Ascension Island station) that won’t see the rocket until about 20 minutes after launch. It was the job of the Near Real Time analyst to run that program and provide oribital predictions for downrange station.
Find something that you enjoy and do that. Life is too short to work in a job that you dislike.
Oh, the fun I have had. This story still makes me smile.
My first computer was a single board Z80 microcomputer with 4 KB of memory. I wrote a small FORTH-like interpreter for it and hacked a version of the animal game in FORTH. The animal game is a program that plays 20 questions to figure out what animal you are thinking of. It constructs a binary tree where each node is a question and the subtrees are the yes and no answers to the question. To play the game, all the program does is walk the tree, ask the question at the current node and follow either the YES branch or the NO branch as appropriate.
If the program guesses wrong, it will ask you for your animal and a question that will distinguish your animal from the one it guessed. It then adds your question to the tree. By this extremely simple mechanism, it is able to expand its knowledge base. (see Ruby Quiz #15 for more details).
I had just finished the program and had seeded it with a single animal, a mouse. I turned to my wife and asked her to play the game. She thinks of an animal and starts the program, which immediately asked her “Is it a mouse?”. She turned to me with surprise and said “How did it know?”. Of course, the animal she picked was a mouse.
I don’t think I have ever impressed anyone with my programming skills as much as she was impressed with that game.
I’m tagging the following people. Remember, this is entirely voluntary so don’t feel obligated to answer. But I’m betting the answers are interesting:
Wow, what a great conference! There was a lot of energy flowing at RailsConf this year. Overall I’d rate this year as head and shoulders above last year. I’m not going cover much here, but will direct you attention to a Rails Envy VideoCase that Greg Pollack put together. The video is a series of very short interviews with a number of presenters giving summaries of their own talks. The only downside with the video is that I wish it was available before the conference. I see there were a number of interesting talks that I missed.
Joe O’Brien, Chris Nelson and myself did a dialogue style presentation on the difference between object modelling and data modelling. The most common question I got after the talk was requests for book titles to learn more about object oriented modelling. Here are the books that Joe, Chris and I have recommended:
The Musician’s Birds of a Feather gathering at RailsConf was great. We had a room full people, two guitars, a ukulele, a flute, several harmonicas and an improvised drum set. Unfortunately, one of the guitars was an electric travel guitar which had a dead battery, therefore no way to really hear it.
However, the other guitar was a nice Epiphone accoustic which was passed from player to player. It became the quickly became the basis for most of the music performed that night.
I want to thank Artichoke Community Music for supplying the guitar. Travelling with a guitar by plane is a big pain, so I arrived with nothing to bring to the music BOF. I called several local music stores looking for a guitar that I could rent for an evening. Artichoke music said they had a “not-for-profit” guitar that they would let me borrow for a day. Not many stores would do that for an out-of-town stranger.
So, if you’re in Portland looking for a good guitar store, check out the great people at Artichoke Community Music.
The flow of Merb ideas into Rails 3 is already under way. Let me walk you through one of the first examples that I've been working on the design for. Merb has a feature related to Rails' respond_to structure that works for the generic cases where you have a single object or collection that you want to respond with in different formats. Here's an example:
class Users < Application
provides :xml, :json
def index
@users = User.all
display @users
end
end
This controller can respond to html, xml, and json requests. When running display, it'll first check if there's a template available for the requested type, which is often the case with HTML, and otherwise fallback on trying to convert the display object. So @users.to_xml in the result of a XML request.
The applications I've worked on never actually had this case, though. I always had to do more than just convert the object to the type or render a template. Either I needed to do a redirect for one of the types instead of a render or I need to do something else besides the render. So I never got to spend much time with the default case that's staring you in the face from scaffolds:
class PostsController < ApplicationController
def index
@posts = Post.find(:all)
respond_to do |format|
format.html
format.xml { render :xml => @posts }
end
end
def show
@post = Post.find(params[:id])
respond_to do |format|
format.html
format.xml { render :xml => @post }
end
end
end
Cut duplication when possible, give full control when not
But the duplication case is definitely real for some classes of applications. And it's pretty ugly. The respond_to blocks are repeated for index, show, and often even edit. That's three times a fairly heavy weight structure. This is where the provides/display setup comes handy and zaps that duplication.
For Rails 3, we wanted the best of both worlds. The full respond_to structure when you needed to do things that didn't map to the generic structure, but still have the generic approach at hand when the circumstances were available for its use.
Dealing with symmetry and progressive expansion in API design
There were a couple of drawbacks with the provides/display duo, though, that we could deal with at the same time. The first was the lack of symmetry in the method names. The words "provides" and "display" doesn't reflect their close relationship and if you throw in the fact that they're actually both related to rendering, it's gets even more muddy.
The symmetry relates to another point in API design that I've been interested in lately: progressive expansion. There should be a smooth path from the simple case to the complex case. It should be like an Ogre, it should have layers. Here's what we arrived at:
class PostsController < ApplicationController
respond_to :html, :xml, :json
def index
@posts = Post.find(:all)
respond_with(@posts)
end
def show
@post = Post.find(params[:id])
respond_with(@post)
end
end
This is the vanilla provides/display example, but it has symmetry in respond_to as a class method, respond_with as a instance method, and the original respond_to blocks. So it also feels progressive when you unpack the respond_with and transform it into a full respond_to if you suddenly need per-format differences.
The design also extends the style to work just at an instance level without the class-level defaults:
class DealsController < SubjectsController
def index
@deals = Deal.all
respond_with(@deals, :to => [ :html, :xml, :json, :atom ])
end
def new
respond_with(Deal.new, :to => [ :html, :xml ])
end
end
It's quite frequent that the index action has different format responsibilities than the new or the show or whatever. This design encompasses all of those scenarios.
Yehuda has also been interested in improving the performance of respond_to/with by cutting down on the blocks needed. Especially when you're just using respond_with that doesn't need to declare any blocks at all.
All in all, I think this is a great example of the kind of superior functionality that can come out of merging ideas from both camps. We're certainly excited to pull the same trick on many other framework elements. I've been exploring how a revised router that imports the best ideas from both could look and feel like. I'll do a write-up when there's something real to share.
It seems that we thoroughly caught the interwebs with surprise by announcing that Merb is being merged into Rails 3. 96% of the feedback seems to be very positive. People incredibly excited about us closing the rift and emerging as a stronger community.
But I wanted to take a few minutes to address some concerns of the last 4%. The people who feel like this might not be such a good idea. And in particular, the people who feel like it might not be such a good idea because of various things that I've said or done over the years.
There's absolutely no pleasing everyone. You can't and shouldn't try to make everyone love you. The best you can do is make sure that they're hating you for the right reasons. So let's go through some of the reasons that at least in my mind are no longer valid.
DHH != Rails
I've been working on Rails for more than five years. Obviously I've poured much of my soul, talent, and dedication into this. And for the first formative years, I saw it as my outmost duty to ensure the integrity of that vision by ruling with a comparably hard hand. Nobody had keys to the repository but me for the first year or so.
But I don't need to do that anymore — and haven't for a long time. The cultural impact of what is good Rails has spread far and wide and touched lots of programmers. These programmers share a similar weltanschauung, but they don't need to care only about the things that I care about. In fact, the system works much better if they care about different things than I do.
My core philosophy about open source is that we should all be working on the things that we personally use and care about. Working for other people is just too hard and the quality of the work will reflect that. But if we all work on the things we care about and then share those solutions between us, the world gets richer much faster.
Defaults with choice
So let's take a concrete example. Rails ships with a bunch of defaults. For the ORM, you get Active Record. For JavaScript, you get Prototype. For templating, you get ERb/Builder. And so on and so forth. Rails 3 will use the same defaults.
I personally use all of those default choices, so do many other Rails programmers. The vanilla ride is a great one and it'll remain a great one. But that doesn't mean it has to be the only one. There are lots of reasons why someone might want to use Data Mapper or Sequel instead of Active Record. I won't think of them any less because they do. In fact, I believe Rails should have open arms to such alternatives.
This is all about working on what you use and sharing the rest. Just because you use jQuery and not Prototype, doesn't mean that we can't work together to improve the Rails Ajax helpers. By allowing Rails to bend to alternative drop-ins where appropriate, we can embrace a much larger community for the good of all.
In other words, just because you like reggae and I like Swedish pop music doesn't mean we can't bake a cake together. Even suits and punk rockers can have a good time together if they decide to.
Sharing the same sensibilities
I think what really brought this change around was the realization that we largely share the same sensibilities about code. That we're all fundamentally Rubyists with very similar views about the big picture. That the rift in many ways was a false one. Founded on lack of communication and a mistaken notion that because we care about working on different things, we must somehow be in opposition.
But talking to Yehuda, Matt, Ezra, Carl, Daniel, and Michael, I learned — as did we all — that there are no real blockbuster oppositions. They had been working on things that they cared about which to most extends were entirely complimentary to what Jeremy, Michael, Rick, Pratik, Josh, and I had been working on from the Rails core.
Once we realized that, it seemed rather silly to continue the phantom drama. While there's undoubtedly a deep-founded need for humans to see and pursue conflict, there are much bigger and more worthwhile targets to chase together rather than amongst ourselves. Yes, I'm looking at you J2EE, .NET, and PHP :D.
So kumbaja motherfuckers and merry christmas!




