Recent Projects

How to get started with Rails

I’ve got a buddy that wants to learn Rails. He doesn’t have much (if any) experience with web development, but he’s a smart dude and I expect he’ll be able to pick this stuff up quickly.

So, I’ve concocted a 3-part “getting started with Rails” class that he’s taking… where by “class he’s taking” I mean I’m sending him 3 emails, 1 at a time, and forcing him to go through all of the headaches and bullshit associated with “getting started” with as little help from me as possible. This is a good thing because it’ll take less of my time, sure, but mainly because you can’t learn anything about anything when someone is holding your hand the whole way through.

Step 1: Complete the Getting Started with Rails tutorial

First, I’ve sent my friend to the absolutely fantastic (and free!) Rails Guides. The instructions I’ve provided are essentially to skip the first “assumptions” section (since he’s using OS X) and to email me when he’s finished. This is a great way to get someone started quickly. Sure, they’re going to miss out on some of the finer points about the Ruby language itself, but we’ll come back to that after getting him hooked on Rails first.

Step 2: Push your app to GitHub and deploy it to Heroku

Second, I told my friend to figure out how to push his code up to GitHub for me to review, and then to deploy it to Heroku for me to play with. The hints I’ve given him are to start by installing Homebrew and then Git with Homebrew. This is a great way to get someone familiar with the tools they’re going to be using if they stick with Rails. Plus, I know from first-hand experience that there’s a great feeling of accomplishment associated with putting your first app up on the world wide webs.

Step 3: Make something

Third, I’ll be telling this friend to think up a project and to make it happen. This is the most important step, in my opinion. At this point, he knows the bare minimum necessary to “get started” so it’s time to remove the training wheels and to go for a ride. Of course, I’ll be available to help him out when he gets stuck along the way, but what better way is there to learn than by doing?

Extra credit

Finally, I have in mind 3 additional things that I’d like my friend to consider while he’s embarking on his journey. The first is to apply for membership into docrails, because he’s in a great position to help improve the documentation and guides with his fresh set of newbie eyes. The second is to read the fanatically helpful (and short) Learn to Program book. This should help fill in the gaps that we smoothed over when we skipped ahead to building Rails apps right out of the gate. Finally, I’ll guilt him into reading the Guide to Testing Rails Applications because testing is super important ;)

Conclusion

That’s about it, then. I’m hoping that this little strategy will work, and I’m interested in hearing your experiences about getting people started with Rails or web development in general. Shouldn’t there be some kind of online school for this sort of thing? It surely doesn’t take a masters degree in computer science to get started building web apps, but I feel like there’s some kind of middle ground that’s missing…

Links for 10-25-10

Extensible Autocomplete « jQuery UI Blog

The release of the Autocomplete widget in jQuery UI 1.8 was a pretty important milestone for the jQuery UI team. If you’ve looked at the widget, you may have noticed that there are only four options, far fewer than our other plugins. Unlike progressbar, our plugin with the fewest options, Autocomplete’s small API isn’t a direct result of the plugin’s simplicity. In fact, Autocomplete is quite complex.

Create your own CarrierWave processors

As you can see, CarrierWave allows us to create generic processors so you can get your images exactly as you want them. I’m actually quite surprise to see there’s not a lot of open source processors running wild.

Readme Driven Development

Consider the process of writing the Readme for your project as the true act of creation. This is where all your brilliant ideas should be expressed. This document should stand on its own as a testament to your creativity and expressiveness. The Readme should be the single most important document in your codebase; writing it first is the proper thing to do.

In Praise of Quitting Your Job

Creativity is the manifestation of lateral thinking, and without tangible results, it becomes stunted. We have to see the fruits of our labors, good or bad, or there’s no motivation to proceed, nothing to learn from to inform the next decision.

NginxHttpProxyModule

The cache honors backend’s “Expires”, “Cache-Control: no-cache”, and “Cache-Control: max-age=XXX” headers since version 0.7.48. Since version 7.66, “private” and “no-store” are also honored. [Somewhat of an alternative to Varnish, built right into nginx.]

Skinny daemons

The basic idea here is to use the thin webserver as a container for whatever app or service you want to run inside it. The whole thing can then be packaged as a rubygem, and you end up with an easily installable service which can be used by any programmer who can send an HTTP request – not just Rubyists.

35 Lessons in 35 Years

My father always told me that the day we stop learning is the day we die. I wrote this as a sort of preparation for my 35th birthday last week.

Why Free Plans Don’t Work

If we have thousands of users that don’t increase awareness and will never pay for our product, why do we insist in offering something that’s going to hurt our business? Maybe we should just skip that free plan and focus on making money instead.

jQuery Mobile

The jQuery project is really excited to announce the work that we’ve been doing to bring jQuery to mobile devices. Not only is the core jQuery library being improved to work across all of the major mobile platforms, but we’re also working to release a complete, unified, mobile UI framework.

Dynamo and CouchDB Clusters – Cloudant

For a while, CouchDB was described as a “distributed, fault-tolerant and schema-free document-oriented database accessible via a RESTful HTTP/JSON API.” The story about CouchDB’s ‘distributed’ description has always involved its multi-master replication. In this sense, it is not truly a horizontally scalable database, as noted here. With the availability of Cloudant’s new hosted service, a new option has entered the scene. Our clustering is similar to Voldemort, Cassandra, or Riak, as it implements a version of Amazon’s Dynamo.

Consumers Find Ways to Spend Less and Find Happiness

“The idea that you need to go bigger to be happy is false,” she says. “I really believe that the acquisition of material goods doesn’t bring about happiness.”

4 years at Engine Yard, what a long strange trip it’s been.

So by now most folks who know me know that I have resigned from the startup I co-founded, namely Engine Yard Inc.

CoTweet

CoTweet is a platform that helps companies reach and engage customers using Twitter.

Slicehost Articles: Basic Linux task scheduling with cron

Sometimes you want to run commands nightly or weekly. You could just log in and run them yourself, but scheduling those tasks with cron is less hassle in the long run. [Awesome 3 part series on cron basics.]

Reward your zoomers!

When you’re viewing content on a mobile device one of the most common uses is to zoom in on content to view it larger so it’s easier to read or tap. This makes text look crisp and beautiful, especially on the latest high resolution mobile screens, but a side effect is something terrible: images look much much worse. Why should mobile users be punished for zooming in?

Easy ajax forms with Rails 3 and jQuery

Here’s a little trick you can use to dynamically create remote forms with very little effort. This particular example shows how to create checkboxes that, when clicked, will submit the form and update the record in the database all without leaving the page.

First, we’ll create the form anywhere in our app:

Note the remote => true form option and submittable css class.

In order to accept the form, we’ll need to create the corresponding controller action:

Then, we’ll use a little bit of jQuery that tells the browser to submit the form if any element with the class submittable is clicked:

Finally, we may want to perform some action after the form is submitted:

This is just a quick little example, but you can imagine how the technique could be applied to a lot of different things. Rails 3 and jQuery make it really, really easy to submit forms on the fly without reloading the page or even having the user click submit.

Links for 8-5-10

Not weekly, officially.

Quickly Generate Random Dates in Ruby

It’s easy to use and obviously gives you more varied results than doing Time.now like most of us do all the time we need a date. Just say Time.random instead.

What the HTTP is CouchApp?

This blog post is in response to a lot of well-deserved confusion in the community around CouchApps. We haven’t been clear enough in the past (either in technical description or in the notion of the project). I hope to change all that (with your help). This is just the beginning.

Bootstrapped, Profitable, & Proud: GitHub

Q&A with Chris Wanstrath, CEO and Co-Founder of GitHub. This is part of our “Bootstrapped, Profitable, & Proud” series which profiles companies that have $1MM+ in revenues, didn’t take VC, and are profitable.

Introducing rollout: Condionally roll out features with redis

When we’re ready to alpha the feature, we’ll roll it out to staff. For beta, we might roll it out to some specific friends or people who request access. Then, when it’s time to go live, we’ll roll it out to a percentage of people at a time to make sure that any remaining performance issues are caught without bringing down the entire application. If we do find a problem, we need to be able to disable the feature in real-time. We do all of this using a tool we put together called rollout.

Auto-scale your Resque workers on Heroku

This app I’m working on, I’m hopefully going to have to pay for at some point, as I hope enough people will want to use it that the free stuff from Heroku just won’t cut it. However, the less I can pay the better, and background job workers aren’t free on Heroku. They are, fortunately, billed by the second.

Resque with Redis To Go

Resque is a queueing system that is backed by Redis. Common use cases include sending emails and processing data. This tutorial will cover setting up Resque with Rails and Redis To Go [and Heroku]

Kickstartup

Successful fundraising with Kickstarter.com & (re)making Art Space Tokyo

Agile the Pivotal Way

Ian McFarland, Principal and VP of Technology for Pivotal Labs, reprises his popular RailsConf 2010 talk. Ian describes the technical and social aspects of how Pivotal practices agile software development. [interesting talk. Subscribed to the podcast, too.]

Enslaving Branches: How GitHub Does Enterprise

FI is aimed at larger companies that want to host their own version of GitHub on their own hardware. We ship them a full, self-contained stack, and once installed they have their own private github.com on their network.

The Acceleration of Addictiveness

Most people I know have problems with Internet addiction. We’re all trying to figure out our own customs for getting free of it.

No Callbacks, No Threads & Ruby 1.9

In the talk he discusses the state of the Ruby VM and why we should standardize an asynchronous Ruby stack which takes advantage of Ruby 1.9, Fibers, and non-blocking database drivers to make Ruby (and Rails) more scalable.

500 Million Stories | Facebook

As of this morning, 500 million people all around the world are actively using Facebook to stay connected with their friends and the people around them.

Twitter Curve

Bad mornings are the ones where I sit at home compulsively unbolding things hoping that somewhere in there there will be the gem of connection and stimuli that gets me out the door.

Real Editors Ship

…and I grieve for the spirit of Work, killed by her evil child, Workflow.

On Camping vs Sinatra

[Makes me want to take another look at Camping, since I only checked it out when I was just getting started with Ruby.]

NoSQL, Heroku, and You

Why is NoSQL generating so much buzz? What does it mean for you, the application developer? And what place does NoSQL have for apps running on the Heroku platform?

Transloadit

Fantastic file uploading for your web application. [Resize images, encode videos, extract thumbnails, store in s3.]

wrttn.in

a simple online notepad

Dirpy

YouTube to Mp3 Converter and YouTube Video Downloader

Always ship trunk

I spoke at the O’Reilly Velocity conference this afternoon about using version control to manage web services.

rails-twelve-hour-time-plugin

This view plugin adds AM/PM (12 hour time) support to the core DateHelper methods.

What’s new in PostgreSQL 9.0

This document showcases many of the latest developments in PostgreSQL 9.0, compared to the last major release – PostgreSQL 8.4. There are more than 200 improvements in this release.

Why does Quora use MySQL as the data store rather than NoSQLs such as Cassandra, MongoDB, CouchDB, etc.?

What were the considerations they took into account when choosing MySQL as the data store?

InfoQ: 7 Lessons Learned at Reddit

Steve Huffman, co-founder of Reddit, shares the main lessons he learned scaling Reddit from a small web application to a large social website.

The Secret to Memcached

There are many ways to use this elaborate hash table and many ways which are more trouble then they are worth. In our experience the key to use memcached effectively is to ask it for the exact thing you want, but i’m getting ahead of myself.

Using Embedly the Quick and Dirty Way

The Embedly API allows developers to embed videos, images and rich media from 102 (and counting) services through one API. To me, it’s essentially a one-stop shop for getting oEmbed responses from just about every service that supports embedding rich media.

I know there are a few open source Ruby libraries that help you accomplish this kind of thing, but I’ve found that using Embedly in a quick and dirty fashion is really quite easy. Here’s an example that I’m using to embed videos on a new site I’m working on:

This uses rest-client and JSON. It’s about all I’ve needed so far.

I know I should be validating the provided URL against Embedly’s services API, but I haven’t gotten to that quite yet. I’ll whip up another post when I do, though.