Recent Projects

Weekly Digest, 3-29-09

Trevor’s Links

Ron Carmel explains 2D Boy by the numbers

2D Boy’s Ron Carmel opened up this year’s Independent Games Summit hoping to somewhat demystify the process of starting your own indie studio (which he summarized with the following three steps: "save money, quit your job, and make a game"), and in doing so divulged their own by-the-numbers breakdown of how their goo-built world was formed.

Tuning the Toad

As we wrote just over two weeks ago, Hoptoad was having a hard time keeping up performance when certain websites were submitting thousands of errors at the same time. Fixing this became out highest priority and, as I promised then, we will outline the changes we made that have helped us to be able to weather the error storm.

Most Time Management Is Rubbish. Here Are Ten Things That Work for Me.

Over the last few years, I’ve read a ton of time management books and tried out literally hundreds of systems and standalone ideas for maximizing the effectiveness of my time, particularly in terms of my work.

Now is a Great Time to Be a Media Maker

The distance we’ve come in the decade and a half since I was driving newspapers over highway 17 in a VW Bug is astonishing. I look at the tools available to media makers today and can hardly imagine a more ideal environment. So why is it that all we hear about the media industry is doom?

TwitterAuth: For Near-Instant Twitter Apps

The public beta of Twitter OAuth support has been released and I’m excited to introduce a new library that I’ve been working on called TwitterAuth. TwitterAuth is a Rails plugin that provides a full external authentication stack for Rails applications utilizing Twitter. Think of it as “Twitter Connect” for Rails, letting you create an application that may be logged into using only Twitter credentials.

How to handle exception while developing api in ruby on rails

If the request was made for an html page then rails will handle the exception and will show the appropriate error page depending on if you are running in development or production mode. However for .xml there is an issue. If it is an API request then ,in the case of an error, you still need to send an xml response with the error message. Question is how to handle exception in a generic way.

The Three20 Project

Last week I released my first iPhone open source project, Facebook Connect for iPhone, and today I’m ready to start talking about the next one. Five months ago I talked about open-sourcing as much of the Facebook iPhone app as I could, and as you can see by the delay, that has turned out to be easier said than done.

Why Facebook has never listened and why it definitely won’t start now

Let’s say you’re walking down University Ave. in Palo Alto, California in a couple of years (or, really, any street in the world) and you’re hungry. You pull out your iPhone or Palm Pre or Android or Blackberry or Windows Mobile doohickey and click open the Facebook application. Then you type “sushi near me.” It answers back “within walking distance are two sushi restaurants that more than 20 of your friends have liked.”

Why Small Payments Won’t Save Publishers

Meanwhile, back in the real world, the media business is being turned upside down by our new freedoms and our new roles. We’re not just readers anymore, or listeners or viewers. We’re not customers and we’re certainly not consumers. We’re users. We don’t consume content, we use it, and mostly what we use it for is to support our conversations with one another, because we’re media outlets now too. When I am talking about some event that just happened, whether it’s an earthquake or a basketball game, whether the conversation is in email or Facebook or Twitter, I want to link to what I’m talking about, and I want my friends to be able to read it easily, and to share it with their friends.

Ruby’s Biggest Challenge for 2009

When new developers come to the Ruby world, lets greet them with Ruby 1.9.x. In the long term, doing so will improve our growth as a community more than any marketing effort ever could (and the two efforts are not mutually exclusive either). Ultimately, Ruby’s biggest challenge may just be our greatest opportunity to improve.

Newspapers and Thinking the Unthinkable

With the old economics destroyed, organizational forms perfected for industrial production have to be replaced with structures optimized for digital data. It makes increasingly less sense even to talk about a publishing industry, because the core problem publishing solves — the incredible difficulty, complexity, and expense of making something available to the public — has stopped being a problem.

Timothy’s Links

T-Mobile "My Account" App

This another of those "it should have come out with the launch of the phone, but what they hey–now that it’s out, all’s forgiven" kind of apps. Basically, it’s your complete T-Mobile account data in application form. Very Apple-like.

The politics of the command line

Pass this along to friends and family who need a primer in F/OSS, GNU, etc. Tell them that taking 10 minutes to read it carefully is easier than watching an hour long Stallman documentary. For a number of reasons.

Fox News Pictographic Synopsis

Normally I try not to think or care about infotainment–I just sort of hope Jon Stewart and Bill O’Reilly will cancel each other out and the whole phenomenon will un-happen–but this is too good a compilation of Fox News screencaps to leave it un-bookmarked.

Teleportation, the last battle, and the Creator talks: How the world ends inside an online game

This is a fun blurb from CT on "eschatology as a design challenge" that, unlike good sci-fi, suggests an interesting idea, hangs just enough metal on it to make it run and then walks away from it without beating it to death.

Op-Ed Contributor – Dear A.I.G., I Quit! – NYTimes.com

lolcano. Nice try, PR guys, but if a heartfelt resignation letter full of dubious logic, apple pie cliches and evasive non-facts is the best you can do by way of laying out a decoy and deploying chaff, then you have, once again, failed utterly to succeed.

Election Fraud in Kentucky

Normally I wouldn’t bookmark a Schneier post, but this one is kind of special. Using clips from other articles, he basically makes the point (in a very reductive, minimalist, Bonsai-gardener kind of way) that the security "industry" is 90% sales, 5% hype and 5% actual security solutions: there’s a lot of talk about the implications of this, the vetting of that and what it boils down to is the fact that the entire commercial edifice is just an elaborate front end for one poorly designed user interface.

Core Duo Vista Powered Super Famicom

I’m pretty sure that this is a modern computer inside a Super Famicom case. Which, I’m also pretty sure, makes it the coolest case mod I’ve seen in a long, long time.

Hitachi Settles Price-Fixing Case for $31 Million

In case you didn’t know, Korea’s LG, China’s Chunghwa and Japan’s Sharp constitute something of a cartel. Not unlike the old-timey RAM cartel, these Mega Corps work as a sort of monopoly of convenience, setting (i.e. fixing) prices on LCD’s in everything from phones to monitors in order to maintain a balance between profitability and existential security (too much freedom in the marketplace, while potentially good for consumers, isn’t in the best interest of government-subsidized Mega Corps whose business models depend on anti-competitive legislation in order to maintain profitability). Add Hitachi to the list.

gcalcron

This is a fun kind of "get your toes wet with linux" type of project that you could suggest to your "I want to learn about linux, but I’m not ready to junk my MacBook just yet" friends. The gist is that you "install" this cat’s .py script on your remote machine and this script acts as an interface between the box and a Google calendar you set up. You enter bash commands into the calendar entries and it uses the times you set with the gCal interface to tell cron when to pop them off. What it lacks in simplicity (by being an incredibly convoluted "work around" for spending 10 minutes with the cron man page) it makes up for in colorful, user-friendliness.

Randomize Filename in Paperclip

Here’s a quick tip that Jonathan Yurek, author of Paperclip, was kind enough to help me with. It’s a simple way to have a randomized filename for uploaded content. This is useful for security through obscurity, especially when used with Paperclip’s id_partition interpolation helper:

class Photo < Asset

  has_attached_file :image, :path => ":class/:attachment/:id_partition/:basename_:style.:extension"

  before_create :randomize_file_name

private

  def randomize_file_name
    extension = File.extname(image_file_name).downcase
    self.image.instance_write(:file_name, "#{ActiveSupport::SecureRandom.hex(16)}#{extension}")
  end

end

That would, for example, change an uploaded image named “DS_100.JPG” into:

http://example.com/photos/images/000/001/204/e15f64f5e7gjdo3e4ae58f4ed9j925f5.jpg

That makes it effectively impossible to guess the location of an image, provided that you don’t allow people to browse around the directories on your server. This is the same method of privacy protection that Flickr uses, and it ought to be enough for most non-governmental privacy needs :)

Weekly Digest, 3-22-09

Trevor’s Links

Twitter OAuth Ruby Example

This is the first of what I hope to be several examples of using OAuth as a developer. Our OAuth server implementation is in open beta and I want to show an example of how to use it. As the implementation is still in beta, feedback is appreciated as you begin your integration. If all goes well I’ll post on using OAuth from other languages in the future.

The Great Rails Refactor

Yehuda Katz at Confreaks: MountainWest RubyConf 2009.

Google Reader hacks

I’ve come up with a system that seems to work for me on OS X, at least for extensive testing purposes…

smartly save stashes in git

I seem to be using stashing more and more, and I’ve found that seeing the stash list output looking like this isn’t very helpful…

3 Simple Guidelines for Contributing

I promise you that if you do these three things each time you contribute to a project, your changes will not only get pulled in faster, but you will become a more rounded and skilled programmer.

Timothy’s Links

I left a linux machine online with ssh open for a day. It dropped incoming login attempts after the username. These are the usernames tried. : reddit.com

I know it’s kind of weirdly meta and redundant to bookmark a reddit, but this one has a list of names that might be useful in creating a security policy for linux user names on Internet-facing boxes.

NSLU2 Debian Lenny Upgrade – solving the possible network problem

I’m bookmarking this because it taught me something I managed to not learn in spite of having had a slug on my home network for over a year now. To wit: if you bork your network setup, reboot your slug and find that you can no longer dial in with SSH, simply power it down, pull the USB drive you’re using as /, slot it up in another machine and edit your slug’s conf files in your favorite editor. Nice.

Weekly Digest, 3-15-09

Trevor’s Links

timocratic’s test_benchmark

Rails plugin (and/or ruby gem) for benchmarking your test::units. [This has to be one of the best gems I've come across in a while. A+++]

Slow tests are a bug

Most Rails projects I’ve worked on have ended up at around 3,000-15,000 lines of code, with a roughly as many lines of test code, and most have test suites that take a minute or more to run. Our test suite for Tumblon, for instance, churns along for 2.5 minutes. This is a too slow. And slow tests are a problem for at least two reasons: they slow down your development and decrease code quality. [Note the awesome plugin linked in the comments!]

Sinatra block parameters

The latest master Sinatra now supports optional block parameters. It captures any parameters in the URL and passes them into the block that defines the action.

When Overusing self Turns Into self.pity

Wow, so simple. Much easier on the eyes, and the intention is clear right from the start. My rule is simple: When assigning to an instance variable, use self, calling a method on the other hand should stand all by itself. Now, you could argue, that assigning to an instance variable using its accessor is also a method call, but if you really want to argue about that, you should really read this blog entry again.

Temporarily disable ActiveRecord callbacks

I was recently working on a client project and I had to create a rake task to import a large set of data from a spreadsheet. One of the models that was being imported had an after_save callback that sent out an email notification. I didn’t really want 3500 emails to be sent out whenever this rake task was ran, so I needed to disable the callback while the import task was running.

Readability

Reading anything on the Internet has become a full-on nightmare. As media outlets attempt to eke out as much advertising revenue as possible, we’re left trying to put blinders on to mask away all the insanity that surrounds the content we’re trying to read.

state_machine

After 2 1/2 years… I’m finally officially announcing a project I’ve been quietly working on: state_machine… This is a project which has undergone many rounds of rewrites, but which has finally met its goal, in my opinion, to become the easiest, sexiest, yet most powerful state machine library for the Ruby language.

The size of social networks – Primates on Facebook

Several years ago an anthropologist concluded that the cognitive power of the brain limits the size of the social network that an individual of any given species can develop. Extrapolating from the brain sizes and social networks of apes, Dr Dunbar suggested that the size of the human brain allows stable networks of about 148. Rounded to 150, this has become famous as “the Dunbar number”.

The 5 P’s of Twitter’s runaway success

Actually, I think we enjoy claiming we can’t describe what Twitter is, yet a closer inspection of it yields not only a better understanding of it but also why it’s become so prevalent in the media lately. And when that kind of inspection occurs, it’s not surprising to the inspector why Twitter is where it’s at today.

Twitter = YouTube

YouTube now gets more searches than Yahoo, Google’s closest search rival. YouTube was the single fastest growing new form of search on the Web, and Google pretty much outflanked (and outspent) everyone to buy it. Not to get into video monetization, per se, but to harvest and control the most important emerging form of search. In short, Google could not afford to NOT own YouTube.

Timothy’s Links

Monsanto is Putting Normal Seeds Out of Reach

This week’s "Rage at the Mega Corps like Lear on the Heath" post is about Agricultural Goliath, Monsanto. Monsanto, a Mega Corp whose operational expenses are almost fully subsidized by our federal government here in the States, has gained much notoriety for sabotaging independent farming operations and, more importantly, running anyone who doesn’t farm their brand of genetically modified corn out of business by installing puppet legislators in important positions or simply using its powerful lobby to write its own legislation and have dupes (like Illinois’ own Michael Madigan) push it through.

contxts – mobile sms business cards

This is my gadget/widget par excellence du jour: basically, you give their database your basic contact info and then, if anyone SMSes your username to 50500, they get your contact info back. Nifty.

High Performance Web Sites

This is a good checklist to run through whether you’re working up a framework from scratch and need to keep optimization principles on a front burner or whipping up a quick, stop-gap kind of ap that needs to work lickety-split with a minimum of fuss.

7 Badass Cartoon Villains Who Lost to Retarded Heroes

What else can you say about cracked.com? They’re on focus, on message and on point.

Secure deletion: a single overwrite will do it

This article has some simple stats that supposedly debunk the urban legend that you’ve got to write zeroes (or whatever) over the whole disc to securely delete a HDD. It doesn’t so much debunk, however, as it makes a point not unlike PGP’s point: the obscurity provided by a single over-write is /pretty good/, but not perfect. Your best bet is still the Gauss rifle…I mean degausser.

Wildwood Survival – Fire Basics

The original survival skill is, of course, making fire. You can never know too many different ways to a.) start or b.) build a fire: file this under "urban, suburban and rural survival tips"

24 Samsung SSDs get strung together for supercomputer fun

This is an article with still pictures (instead of moving ones) that outlines the viral video sweeping the Interwebs in which a plucky admin wires 24 flash drives into a single, desktop-size case.

10 common mistakes using robots.txt

This is totally rudimentary–it’s written more for the copyeditor/SEO enthusiast in your shop, not for the cowboy/console man–but it’s a good reminder of syntax for ye olde robots.txt file. Remember: there’s no notification if your robots.txt file doesn’t parse right…except for deprecated levels of your site showing up in Google.

Mdadm Cheat Sheet | MDLog:/sysadmin

This will be utterly useless to anyone who isn’t experimenting with software RAID on 2.26 kernels. For those of you who are just getting your feet wet with mdadm (e.g. YT), this crib-sheet is a nice resource. That might just point out some things you would otherwise have to plumb the dreaded man page for.

Nick and the Button

Nick explains CLICK.

I helped out with the clicking backend for the site. It’s a disgusting mess of PHP and MySQL, or else I’d share the code… :P

It’s amazing to think that this thing just under 3 million clicks!

We’ve caught a few people cheating, and sparked some debate on Hacker News. Still, it looks like a lot of people really love to click the stupid thing. There’s just something about it…

Nick has been doing some awesome screencasts about productivity and some other stuff… You should go check them out if you’re into GTD or Merlin Mann.

After you watch the video – GO CLICK THAT BUTTON!