Wednesday, April 29, 2009

Announcing The Ruby Conference Ratings Board

DHH on the GoGaRuCo drama-fest:

It's already out of control. Indignation and outrage are powerful drugs and they're working their magic right now. There will not be any civil discussions possible before the high subsides and people get some distance.

...

Here's one proposal: Start rating your conference or track according to the material. The movie standards of PG, M, and R would do just fine. Then people can self-select on the type of content that they're willing to hear.

I, for example, can just make sure that I only attend or speak at M and R rated conferences and tracks. If you're offended by profanity, for example, you'd be forewarned that sitting in on an M or R track would be a bad idea.

That's how a movie theater manages to cater to all kinds of people from all kinds of backgrounds. I think that fits well for this.


Nothing I love more than going to see a good rated-M movie. Good old M. It hasn't been used since 1969, but it's a classic. They don't make M like they used to.



DHH isn't just the guy who revolutionized Web frameworks forever. Oh no. That's not enough. He's also every bit as good at handling people as he is at developing features, deciding what features to develop, and building a top-notch business. Because all these skills are really the same skill: the skill of being awesome. And his proposal makes a lot of sense.

After all, it's not as if what Matt Aimonetti did was wrong in any way. It would be insane to suggest that all the guy needs to do is learn a little bit about communication skills so he can stop making people angrier every time he tries to apologize to them. Only a crazy person would say that.



It's true that if Aimonetti's presentation had been done at work, he would have been fired and slapped with a lawsuit that he would have had no chance of winning and barely any chance of even surviving. But just because you can lose a job over it, and a judge can punish you for it, doesn't mean it's wrong. It doesn't mean you've been a complete dick, and if you can't see that then you need to find somebody who can explain it to you. Not at all! There isn't even any porn in the presentation, except for the blow job in slide 7. And that hardly counts because you can't actually see the guy's penis, so she could be doing anything down there. Maybe she lost a contact.



Like an arty foreign movie, a bold, innovative presentation should carry a special warning: Be careful! This might be too awesome for you.



And that's what the Ruby Conference Ratings Board will provide. After all, somebody has to put in the time to make these ratings. It'll take a group of volunteers. I am now assembling that group of volunteers. And oh yes: we'll be using M.



Seriously, what the fuck is this M shit? What is he even talking about? Is that some crazy shit they have in Denmark?

Oh hey. Wait a minute.

Speaking of crazy shit, what do you bet neither Denmark nor France have any kind of sexual harassment law?

In Denmark, the rules about sexual harassment are not so strict as you know it in your country but we are in the middle of a process. It is only 5 years ago when a court rule that a man could not be punished if he did beat his wife up if she had accepted it for years. Our politician had since changed the laws. But making jokes and signs about once sex or origin is still allowed.

Across the channel, it's hard for women even to initiate litigation. For a person to sue for sexual harassment in France, he or she would have to prove that it resulted in some form of professional or emotional damage, says Marie-Hélène Fournier-Gobert, an employment lawyer at Barthélémy et Associés in Paris. "An isolated attempt to kiss someone or a sexist comment would not be considered sexual harassment," she says. Americans find such distinctions disturbing. "The French definition of sexual harassment is what we Americans would call assault and battery," says Michael Rubenstein, co-editor of the Equal Opportunities Review in London, who wrote the European Commission's code of practice on measures to combat sexual harassment at work.

Welcome to America, kids. You're not in your respective Kansases any more. Speaking as a first-generation American with a name Americans can't even say, I know it can suck. But when in Rome, do as the Romans do, and shut the fuck up about it already.

Speaking At Aloha On Rails

I'll be presenting How To Work Less at Aloha On Rails. I think it's going to be awesome.

Sunday, April 26, 2009

Diversity Cures Isolation-Related Information Disease



The Rails community should pay attention to this.

Saturday, April 25, 2009

Caption This Photo





Every time I see this pic, I want to tweet @wbruce with some kind of epic zinger, but nothing comes to mind.

Flying Robot Penguins Are Awesome

Thursday, April 23, 2009

No TechCrunch Links On Hacker Newspaper

In the interest of information hygiene, any TechCrunch stories that appear on Hacker Newspaper automatically get their links removed.

Acupuncture As Heart Disease Treatment

A World Health Organization meta-study [PDF] ran a huge survey of available literature on acupuncture. Check it out. Of the studies treating angina pectoris, the only one that didn't show favorable results for acupuncture was the one which compared acupuncture with sham acupuncture. This seems like a strong argument for a placebo effect, except that one of the studies which did show favorable results for acupuncture found valid auricular acupuncture outperforming invalid auricular acupuncture.

Wednesday, April 22, 2009

$:.unshift(File.dirname(__FILE__))

This shit is evil. People are undecided as to how evil, but evil it is.



$: is a way-too-Perl-y special variable alias for $LOAD_PATH. You could change it like this:

$LOAD_PATH.unshift(File.dirname(__FILE__))

The upside: you're now doing something more comprehensible. The downside: that "something" is editing an all-caps global. That doesn't feel wrong to you?

This code pops the local directory name (relative, not absolute) onto the load path. Then you can require filenames as relative paths. This is not such a good idea.

Say you've got a gem which provides an interface to the Twitter API, and this gem uses this convention. This is just an example; I'm not thinking of any real code out there on the githubs. Say you're enabling your web app with some Twitter-related functionality. Maybe you've got files like lib/twitter.rb or app/models/twitter.rb. The problem comes not with this idiom, but from what it makes possible. It enables you to do this:

require 'twitter'

In this particular example, that shit breaks all over the fucking place.

Yay! I saved myself the effort of typing an absolute path and/or code which would generate an absolute path! And in the process, I guaranteed myself unexpected load bugs. The code attempts to load lib/twitter or app/models/twitter and you get MethodNotFoundErrors and similar problems. This idiom is only a good idea if your filenames are like the Highlander and there can be only one.



You can make it a little nicer:

$LOAD_PATH.unshift(File.expand_path(File.dirname(__FILE__)))

But you're still looking at a mess, and if you're going to go to all that trouble, you're better off doing this:

require File.expand_path(File.dirname(__FILE__)) + "twitter"

Of course the nicer thing is to do this:

class File
def self.here(string)
expand_path(dirname(__FILE__)) + string
end
end

require File.here "twitter"


I think in reality File is a module, but you get the idea. You see File.expand_path(File.dirname(__FILE__)) all over the place, and it's ugly as sin. You see $:.unshift(File.dirname(__FILE__)) now and then, and it's not just ugly, but also vulnerable to annoying breakage. Any time you're faced with a choice between ugly shit and ugly shit that doesn't even work, the only sane response is to say "fuck no" and rewrite the rules so you're not faced with that kind of dilemma again.

Tuesday, April 21, 2009

Invert Conway's Law

...organizations which design systems ... are constrained to produce designs which are copies of the communication structures of these organizations.

Or, to use active voice, since passive voice serves Satan:

Organizations which design systems can only produce designs which copy the communication structures of those organizations.

I once built a system for two groups in a corporation to automate a process. Part of the process in real life: butting heads between the two groups at every step. I could have been an idiot and designed a system which had opportunities for that legacy to persist. Instead I asked both sides to give me their point of view and created a system where both sides could get what they wanted from the other in a simple, efficient way.

The corporate politics dissipated - or I should say, those corporate politics dissipated, as the organization had plenty of similar troubles that this system didn't affect - and people found it easier to work together. People described me as a guru in the language I was using (Perl) despite the fact that I was not. Perl is a hard language to be a guru in, since in Perl, anything can mean anything. I was really only a good scripter with a strong grasp of regular expressions and a judicious sense of diplomacy. But that judicious sense of diplomacy made me a star in that company, because everybody was happy with the system.

The irony, of course, is that people gave me too much credit for my technological achievement and not enough for the diplomatic achievement. If people have come to accept that fighting with each other is as much a part of their daily life as fighting the traffic into work, making them peaceful collaborators is something to be proud of. Either way, though, if you want to see your project succeed way beyond anyone's expectations, find ways to invert Conway's Law. Think about it: what's the opposite of this statement?

Organizations which design systems can only produce designs which copy the communication structures of those organizations.

The inverse is that designing business process software gives you the ability to design business processes. If you take responsibility for that and give your users a business process which is better for everyone, people will wonder how they ever did their job without your system. That's how they're supposed to feel.

Saturday, April 18, 2009

Thursday, April 16, 2009

Reason Conference: Los Angeles, 5/09/09

The day after I get back from CabooseConf, there's a short conference on Reason in Los Angeles.



The star of the show, depending on your point of view, is either Bon Harris or Peff. Peff wrote the fantastic Power Tools for Reason. Bon Harris started Nitzer Ebb, and used Reason while producing for Nitzer Ebb, Marilyn Manson, and Smashing Pumpkins.

Teabagging == Racist Idiots + Corporate Manipulators

Exhibit A:

if people knew that those behind the demonstrations were the very same lobbyists and influence peddlers the teabaggers claim to decry, the whole thing would be revealed to be what it is -- a hollow excercise in extremist right-wing hypocrisy.

Exhibit B:

Wednesday, April 15, 2009

Speak Softly, Drive A Sherman Tank

They Might Be Giants, the two-time Grammy-winning mighty nerd rock duo, have written a staggering number of songs. Their first album, which I discovered when I was in junior high - yep, I'm that old - had 19 tracks on it. That's unusual today, and back then, it was unheard of. Here's track #19, "Rhythm Section Want Ad":



"Rhythm Section Want Ad" comes from TMBG's first album, but TMBG broke a weird kind of new ground with their first album: they skipped the rhythm section, and worked against a backdrop of drum machines and DAT tapes. They toured like this, and didn't have the funds to hire a rhythm section until at least their third album. I've seen them live at least four times and only seen a rhythm section twice.



Combine this fact with the incredible number of songs they write, and you'll see the logic in my "Rhythm Section Want Ad" conspiracy theory: They Might Be Giants doesn't have a rhythm section because they were so into songwriting that when they realized they needed a rhythm section, they wrote a song about finding one, and then when they were done, they wrote a song about something else.

TMBG have never been flashy, but a big part of their success is very solid songwriting. Their demo tape got in the national mainstream media. This is the "Speak softly, drive a Sherman tank" school of productivity: one good way to get good at something is to do it over and over again.



If you want to talk about how to use lambda in Ruby, I understand it better than a lot of people. But what about simple shit? What about putting an app on a server? I'm currently pursuing the Sherman tank approach with my miniapps side project and my "Twitter a new beat every day" side project as well. I'm skipping that whole Pragmatic Programmer "learn a new language every year" thing because I spent a lot of time learning lambda and all the rest of it and I figure that's already my strong suit. There's a very clear pattern in my skills: I suck at anything that bores me. That's fun to a point, but overall, it's a weakness. "Learn a new language every year" is good up to a point, but you want to make sure it doesn't trap you in a useless mastery of esoteric voodoo. If you want to get good at something, you should work on every part of it, not just the parts you already do well.

Police State Here/Happening Already

The Department of Justice is using secretive prison facilities on U.S. soil, called Communication Management Units, to house inmates accused of being tied to 'terrorism' groups. They overwhelmingly include Muslim inmates, along with at least two animal rights and environmental activists.

Tuesday, April 14, 2009

We Didn't Start The Flame War

Teabaggers

"Burn the books!" she yells from off-camera. The surprised camera man asks if she's serious, and which books she'd burn. "The ones in college, the brainwashing books, like the evolution crap."

The tea parties, he points out, are funded by typical Republican billionaires and promoted by Fox News.

Maybe they're afraid that if people knew that those behind the demonstrations were the very same lobbyists and influence peddlers the teabaggers claim to decry, the whole thing would be revealed to be what it is -- a hollow excercise in extremist right-wing hypocrisy.

...

In 2004, a woman who identified herself as a "single mother" in Iowa, Sandra Jacques, appeared at a George Bush town hall and gushed about his plan to privatize Social Security. She left out the part about being an employee of Freedomworks, who were lobbying on the issue at the time.

Miniapp: Hacker Newspaper

In 2008 I took on one of the worst jobs of my life, at a major metropolitan newspaper in Southern California. My managers were inept. One of them was a two-faced political schemer. The other one was spotted at 10am carrying a bottle of Jack Daniels the size of a small child. Not only that, I had actually been working with this particular manager for over three months before I realized they were a manager at all. I thought they were a leftover journalism person who was curious about the Web and had lots of free time.

The environment was if anything even more dysfunctional than you would expect of a dying industry. We played out all the rituals of Scrum, with none of the spirit. We had "standups" where everybody waited until the standup was over so the de facto status meeting (the "parking lot") could begin. During the "parking lot" (status meeting), managers sat and everyone else stood. This frequently happened in the actual "standup" as well. Things got worse. At one point a developer kicked my desk with no warning and then smiled innocently at me in the creepiest way. The job ended when I lost my temper with somebody and emptied a bottle of cream soda in their face.

So when I see the hate that newspapers get from certain corners of the Web, I understand. When I hear that newspapers are dying, I'm less upset than some people. But now matter how awful my personal experience was, I'm not dancing on the grave of the newspaper industry either. I think there are a lot of people on the Web right now throwing the baby out with the bathwater.

And the baby is kind of beautiful.



The typography and layout of a newspaper add a complex, structured hierarchy to the information in the text and photographs.



Let's geek out on this sucker and turn it into an outline.

  1. Tony Blair faces defeat
    1. Labour rebels shred his plans, challenge his future
    2. More detail
    3. A sidebar highlighting his terrorism plan's failure
  2. Child prodigy
  3. Cocaine
  4. Sketch: Hubbub then humiliation
  5. Shit that matters less
    1. Jordan
    2. Nurses
    3. Tesco
    4. Planet


Compare that to Hacker News.



  1. DiggBar
  2. Geolocation DB
  3. TC Tablet
  4. Neural networks
  5. Sorting algorithms
  6. Power
  7. Cleantech/VC
  8. TC Tablet
  9. DiggBar


I personally never read the newspaper, but I read Hacker News every day (and frequently complain about it). Actually not every day. I have a love-hate thing with Hacker News. When I'm not reading it every day, I have it mapped in my hosts file to 127.0.0.1 to prevent myself from seeing it at all. But that's not the point. The point is: compare the outlines. If you are a geek, you are probably consuming information in a less sophisticated structure then your non-geek peers.

For all the bells and whistles in this UI, there's nothing to connote the information's structure, other than a plain, unadorned vertical list.



April's miniapp fixes that problem, or at least a subset which was for me particularly aggravating.



It uses a resizing-friendly CSS grid setup called Typogridphy. The grid leverages the hundreds of years of honed and refined typographical knowledge that most news sites on the Web ignore - even newspaper sites - and since the CSS is done well, you can zoom the page out to tiny font sizes.



Even at tiny font sizes, the top three or four headlines on Hacker News are actually still more readable on Hacker Newspaper.



It's faster, too. It's much faster. Hacker Newspaper runs on a cron job. Every hour, it uses a Python script to download the RSS feed from Hacker News, plus every page that the feed links to. It then uses a Ruby script to parse the feed, pass it through a template, and produce flat HTML.

It serves the HTML statically, which makes it much faster than Hacker News, which runs dynamically in real time on Arc. It is a faster, compiled alternative. Y Combinator has millions; I'm running Hacker Newspaper off a $20 Slicehost account. But switch to Hacker Newspaper for one day and you'll never go back, because Hacker News is a slow-ass beast.

Hacker Newspaper is a superior user interface for Hacker News. It's more performant, more readable, it doesn't turn visited links damn near invisible for some insane reason, and it makes it much easier to skim the headlines and avoid getting into useless, time-wasting blather. As is usually the case with my monthly miniapp side projects, I created it to scratch my own itch, but you are more than welcome to use it too. You'll enjoy it best if you have the classic Bodoni SvtyTwo ITC TT on your machine, but it degrades gracefully as well.

This might fall on deaf ears, but if there's anything Web geeks could use more of, it's typography. Imagine how much nicer it would be to read log files if your log file reader automatically reformatted your log files to emphasize the information you were searching for, not in a garish, clumsy way but in an elegant, readable way. Imagine how much nicer Google searches would be if they exploited the sophisticated structure of newspaper-style layouts. A lot of what people on the Web are doing with typography reinvents a smooth, polished, and very round wheel. Since it's existing knowledge which loads of people have failed to notice, you can get a technological edge on your competition using technology invented in the 1800s. We might be done with the printing press for day-to-day news, but disregarding the craft of typography is a ridiculous mistake.



Update: Hacker Newspaper's on GitHub.

Update: Any links to TechCrunch articles on Hacker News automatically get turned into null links on Hacker Newspaper.

Update: Hacker Newspaper now just skips any links to Coding Horror or TechCrunch. It doesn't set them as null links any more, it just skips the stories entirely and treats them as if they weren't even there. The same is true for skorks.com. In general, you should consider Hacker Newspaper a biased and curated version of Hacker News. For instance, when the iPad was released, I briefly banned any stories with "iPad" in the title. There were simply too many.

Update: Hacker Newspaper looks pretty great on an iPad, btw.

Saturday, April 11, 2009

iPhone-Controlled RX-8: Epic Want



On-board Arduino, always-on-Internet, all that jazz.



An RFID reader is mounted in the back right window of the car, and when it detects an authorised RFID tag it unlocks the car and starts the engine automatically. I have an RFID tag surgically implanted in my left arm so I can unlock and start the car simply by putting my arm near the window.



Also check out the O'Reilly book Car PC Hacks by Damien Stolarz - an LA local who built and sold an interesting company around in-car mp3 PCs - and an epic issue of Make a few years ago, issue 3, which contained several stories around the theme of car hacking. Both have incredible ideas and loads of implementation details from successful projects like this RX-8.



I've always been a fan of heavily modified vehicles.



I want my next car to be a heavily customized, AI-enhanced Lamorghini.

Friday, April 10, 2009

Neither Have You Tasted My Jesus

Impromptu: What Archaeopteryx Wants To Be When It Grows Up

Glenn Beck Was Always Crazy

Check out this crazy muppetfucker. It seems like he's gone extra-crazy since Obama got in. Jon Stewart did a great rant recently on how the Republicans are going crazy and Fox News is going crazy, calling Obama a tyrant because they really have no idea what the difference is between tyranny and democracy.

The connecting thread in all this is that the money for Fox News and the Republican party doesn't come from people. It comes from corporations. Glenn Beck was always this out of step with the minds of the American people. It's just that Republican demagoguery used to be more effective. It was never about what people wanted to buy; it was always about what Rupert Murdoch wanted to sell.

What Fox News is mostly about isn't actually feeding people bullshit; it's creating the impression that other people believe it. They're not just telling us that various lies are true; they're also about a sneakier message: look, everybody else believes this shit might be true. It's a tactic that works. If people think that other people believe something, they're more likely to believe it themselves. We're also less likely to call bullshit on their more outrageous claims if there's peer pressure telling us their bullshit is somehow legitimate political debate.

Everybody knows this is happening. But the important fact many people are missing: these assholes know what they're doing. They're not all batshit loons. You'd have to be crazy to follow Dick Cheney, but that doesn't mean Dick Cheney doesn't know where he's going.

Thursday, April 9, 2009

How To Take Questions At A Tech Conference

All questions at tech conferences come from one of two sources:

1) Yehuda Katz.
2) Yehuda Katz.

The best thing to do with questions at a tech conference is to ignore them completely. The second best thing is to turn them into advertising for yourself, your company, your favorite language or open source project, or, if there are attractive women in the audience - rare but it happens - your sexual prowess.

However, you may, in your foolishness, decide to take questions seriously, think about them, and see if you can learn something. Maybe Zorak have mercy on your soul. (Zorak is the parking god, who prepares spaces to park. All glory be to Zorak.)

God I forgot what I was going to say.

Oh yeah. The real way to take questions in a tech talk. Don't be like ok are there any questions. People will be like, oh shit, I had something I wanted to say, but I forgot what it was. Other people will be like, I've got the only good question in the room, but I'm shy and kind of weird in the head, so I'm going to cautiously half-raise my hand and then drop it and hide it the minute I think you might actually call on me. Still other people will be like oh look at me my question is stupid but I can talk for a really long time before anybody figures out how stupid it is because I know lots of obscure terms even though I don't know how to arrange them into an intelligent sentence.

Skip all that. Instead, open the talk with your Twitter username, and be like, at the end I'll take a look at Twitter for questions. That way you can screen out all the stupid questions. You can also screen out the questions you disagree with or which you find personally annoying. But it's better to answer a few of those, otherwise people will stand up and yell them at you anyway.

The real win is that it allows people to ask the question when they think of it, and since they're right there in the room, if they ask a question which is interesting but not totally coherent, you can ask them to elaborate. It makes life easier for shy people, and it also allows you to focus on the best questions, since you see the question before you choose the person who speaks, rather than vice versa. It's great for the backchannel, because people can discuss what question to ask before they even ask it. The 140 characters is also good discipline for the excessive verbiage crew. No matter how good their point might be, you as the speaker have to be fair to every other person with a question too, so if you get them to use their brains for brevity and clarity instead of verbosity and vocabularity, it's like converting a supervillain to truth, justice, and the American way.

Apparently Insomnia May Prolong Lifespans

Sleep duration and mortality

A survey of 1.1 million residents in America found that those who slept 7.5 hours or more had an increased rate of mortality whereas those who slept 6 hours or less had a reduced mortality ratio. Getting 8.5 or more hours of sleep per night increases the mortality rate by 15%. Severe insomnia - less than 3.5 hours in women and 4.5 hours in men - leads to a 15% increase in mortality. However, most of the increase in mortality from severe insomnia was discounted after controlling for comorbid disorders. After controlling for sleep duration and insomnia, use of sleeping pills was also found to be associated with an increased mortality rate. The lowest mortality was seen in individuals who slept between six and a half and seven and a half hours per night. Even sleeping only 4.5 hours per night is associated with very little increase in mortality. Thus mild to moderate insomnia for most people may actually increase longevity and severe insomnia has only a very small effect on mortality. As long as a patient refrains from using sleeping pills there is little to no increase in mortality associated with insomnia but there does appear to be an increase in longevity. This is reassuring for patients with insomnia in that despite the sometimes unpleasantness of insomnia, insomnia itself appears to be associated with increased longevity. It is unclear why sleeping longer than 7.5 hours is associated with excess mortality.


However, insufficient sleep is also linked directly to heart disease, so take this with a grain of salt.

Wednesday, April 8, 2009

Dear Twitter: Awesome, Cheap Feature

You know what would fucking ROCK? When you convert those URLs to tinyURLs, add the original URL to the new <a href="" title=""> tag in the title attribute. That's a really easy change and it would make using the site sooooooooooooo much nicer. At least half the time I only want to know the domain anyway.

Monday, April 6, 2009

Iron Man vs. Bruce Lee

Use script/about



It's been in there since late 2005.

Sunday, April 5, 2009

iPhone Graf



Hand-drawn on iPhone with Brushes tonight.

Saturday, April 4, 2009

Thursday, April 2, 2009

Pets vs. People

My family's always had a lot of pets, and I like having pets, but there's a class of people who irritates me, and that's people who say pets make better friends than actual friends. Their logic is very flawed. If you took an average person, paid for all their food, shelter, and toys, and allowed them to sleep all day and watch cartoons, with the only catch being that they're not allowed to shit on your rug, they'd show you amazing loyalty too. It's not really reasonable to compare pets to human friends, and people who use words like "friend" or "buddy" when they talk about their pets are being intellectually dishonest with that implicit comparison, unless they have highly unusual personal lives. The danger in the intellectual dishonesty comes from the fact that it could lead you to the erroneous conclusion that the best way to calm your friends down would be to cut their balls off. Many of my friends over the course of my life have at various times expressed their opinion that I should calm down at one moment or another. None of them would have made me calmer by attempting to cut my balls off. I guarantee you, that would have made me the opposite of calm. It's very important to observe fundamental rules of logic to avoid serious mistakes like this.

Los Angeles Dubstep: Wobble 4/3