giant robots smashing into other giant robots

We are thoughtbot. We make web & mobile apps.

Tagged:

Comments (View)

How grep got its name

thoughtbot is pairing up with Ben Orenstein to present a Vim course, this time at WorkBar. As part of this collaboration WorkBar is offering $50 off your first month’s membership if you register for the Vim course.

One thing you will discover at this course is the history of the command `grep’. This all starts back with `ed’, the original unix editor. ed was a command-line editor that worked identically to the colon-commands in vi and vim—in fact, you can press Q to get into ed mode (then type vi to get back into vim). From the ed editor you can issue common line-oriented commands like s, d, y, and so on:


:%s/rdoc/docr/g
:/include/d

Mr. Ed

If you’re following along at home you may wonder “how can I see the contents of this file?” Well if you just want to see every line you can use %p (% is “the whole file”, and p is “print to screen”), though it’s more likely that you want to see a small series of lines. 10,20p will show you lines 10 through 20, but maybe it makes more sense to see all lines matching a regular expression.

From ed, to see all lines matching “include”, use g/include/p. To see all lines matching “docr” use g/docr/p. In general, to see all lines matching the regular expression “re”, use g/re/p.

… And that’s how grep got its name.

Sign up now for the Vim course at WorkBar with Ben Orenstein on September 1st from 5PM to 9PM.

Tagged:

Comments (View)

Boston.rb redesign

Boston.rb was recently re-designed. It went from this…

Boston.rb old

… to this:

New Boston.rb

I know, I know… you’re thinking: that must have cost a fortune! What’d you do, hire Sterling Cooper?

Nope. I’ll let you in on a little secret but I want you to hold on to your horses… it cost $0 to redesign.

Bucking Bronco

That’s right. It was done using a new-fangled technique called “open source.”

Boston.rb code review

After the redesign, I lead a code review of the Boston.rb source at the Boston Apple Store.

Apple Store code review of Boston.rb

All the slides are available online. You will need to register to see them.

Tagged:

Comments (View)

Umbrella Today?

The Lone Star Ruby conference is about a week away. Chad, Jon, Matt, Tammer, Jared, and I will be running a training session on Thursday.

Our approach to teaching thoughtbot’s Rails Best Practices is to go through our development process for a real application called Umbrella Today?, which we began building two weeks ago. After each 45 minute lecture, we’ll give participants the chance to feel the process in 15 minute hands-on workshops.

Umbrella Today home page

The concept of the app is simple: enter your zip code, get a yes or no answer to the question “Do I need an umbrella today?”

Umbrella Today SMS subscription page

Sign up to receive SMS alerts on days when you’ll need an umbrella.

Hidden complexity

Seems like a simple app, right? Famous last words. Simple enough to take from concept to launch in a few weeks there’s always hidden complexity until development begins.

For Lone Star purposes, we’re happy about the complexity. In addition to best practices like CI, TDD, MVC, and TLC, it gives us a chance to share many small but collectively powerful topics such as:

Umbrella Today confirmation text message

  • attr_readonly
  • Rails template to get things like Factory Girl “for free”
  • modules vs. classes
  • security bugs
  • shoulda_macros directory
  • timezones
  • SMS
  • rake tasks and cron
  • confirmation codes that don’t suck
  • the importance of database indexes

Lone Star to Boston

thoughtbot’s Ruby on Rails training formally kicks off October 14th in Boston. We’ll be building upon our Lone Star/Umbrella Today experience so if you can’t join us in Austin next week, come visit Boston, which is beautiful in the fall. I recommend making a week of it and staying for the Head of the Charles.

Note: register for Boston training by August 31st and get $100 off.

Boston is beautiful

Tagged:

Comments (View)

Getting Strong Now

We’re psyched to have been selected to give a 6 hour training session, thoughtbot’s Rails Best Practices at the Lone Star Ruby Conference, September 4-6, 2008 in Austin, TX.

Tammer, Jon, Jared, Dan, Matt, and myself will be the trainers. With 6 of us, there will be a lot of hands-on training, and we hope that you can attend.

Flying High Now

We’ve been exploring the idea of offering classes for some time now, and we’ve used LSRC as a kick in the pants to get it off the ground. So, I’m happy to announce that on October 14th, we’ll be running our first class, at our office in Boston, MA. The first session will be Advanced Ruby on Rails, and will focus on:

  • Rails Best Practices and AntiPatterns
  • Refactoring
  • Writing Plugins and Gems
  • Using components of Rails outside Rails
  • Test Driven Development

If you register before August 31st, you’ll receive $100 off the cost of registration. The session includes Breakfast and Lunch, a free copy of the book Pro Active Record, and your choice of one t-shirt from Tee-Bot.

We plan on offering sessions for Test Driven Development, Beginning Ruby on Rails, and more soon. If you are particularly interested in one of these future sessions, please let us know.