giant robots smashing into other giant robots

Written by thoughtbot

adarshp

This Week in Open Source

High Voltage

High Voltage is a Rails engine for static pages.

You can now use it with Rails 4 thanks to Arvid Andersson (arvida) in 176895f.

Capybara Webkit

Capybara Webkit is a Capybara driver for headless WebKit so you can test Javascript web apps.

You can expect fewer bugs in it thanks to Matthew Horan (mhoran) in 7289a8e and f20d32d.

You can use it with Qt 4.8 thanks to Matthew and Joe Ferris (jferris) in 67b8a33, cbb58d0, f95e4eb, ecfa783, e9a4b77, and e531c1a, and cae5119.

You can expect nodes hidden with css rule visibility: hidden to correctly return false on visible? thanks to Timur Vafin (timurvafin) in 3bab97d.

Dotfiles

Dotfiles are a set of Vim, zsh, git, and tmux configuration files.

You can now tab complete in Vim even faster thanks to Dan Croak in c7efed4.

You can do some awesome git things in Vim thanks to fugitive.vim in d836af8:

  • :Gblame for interactive vertical split with git blame output.
  • :Ggrep to search the work tree (or any arbitrary commit) with git grep.
  • :Glog to load all previous revisions of a file into the quickfix list so you can iterate over them and watch the file evolve.
  • :Gbrowse to open the current file on GitHub, with optional line range (try it in visual mode) .

You can safely ignore certain files in git repositories machine-wide thanks to Dan in 0060e0a.

You also now have a clear strategy for managing files with personal information like ~/.gitconfig in a shared dotfiles repo thanks to Joe and Dan in 52b2ee1.

Bourbon

Bourbon is a lightweight mixin library for Sass.

You can now optionally use Rails’ asset pipeline in the font-face mixin thanks to Phil LaPier (plapier) in f93cf9e.

Suspenders

Suspenders is a CLI for creating Rails apps with thoughtbot defaults.

When you use Suspenders-generated Rails apps, you’ll now automatically track your slowest-running specs thanks to Dan Croak (croaky) in 69c7fdd.

You will also automatically track your test coverage thanks to Joe Ferris (jferris) in 2787281 44c51c1.

The validity of your factories will always be tested first thanks to Dan in 52444eb.

Your Ruby version will be determined by your Gemfile thanks to Dan in 389ceda.

You will bundle using binstubs and the 37signals’ bin/stubs directory convention thanks to Dan in 4b7e40a.

You can format time through localization thanks to Dan in fbf3fcd.

Your Postgres database will automatically be configured to encode using UTF-8 thanks to Yi-Ting Cheng (xdite) in c2c46a7.

You can use these new features in Suspenders version 1.1.5.

Factory Girl

Factory Girl is a library for setting up Ruby objects as test data.

You can now use a block with build_list and create_list so you can call methods on each instance of the array thanks to bbugh in 488e42d.

Bourne

Bourne adds test spies to mocha.

You can now see the master Travis CI build thanks to Harlow Ward (harlow) in 74dd8f4.

Paul Revere

Paul Revere is a library for “one off” announcements in Rails apps.

Support for Rails 2 apps will be dropped in Paul Revere versions greater than 1.1 thanks to Gabe Berke-Williams (gabebw) in e8ae883.

adarshp

This Week in Open Source

trail-map

Lots of activity on trail-map this week. Thanks to Mike Munroe (mikepmunroe) for catching a broken link 1025a32. Adarsh Pandit (adarshpandit) added a Code Review trail e46792c and Gareth Rees (garethrees) added links for different style guides 4cf0643 47b6002. We had help from Dan Croak (croaky), who fixed some bad links d82a944 889aee8, a grammatical error 13e1335, copy-editing 6d2402c, and removed the .gitignore f2f147a.

shoulda-matchers

shoulda-matchers got some refactoring from Gabe Berke-Williams (gabebw) 7f208e7 and Jason Draper (drapergeek) tightened up ensure_inclusion_of for array matching dc5daca.

cocaine

cocaine got some help from Jon Yurek (jyurek) including removing official support for REE 6073cd0 and switching the order of pipe-reading and waiting 69d6b6c.

paperclip

In paperclip, Jon Yurek (jyurek) removed some ternary operators in favor of ifs 65f4941, and added a test to prevent regression of the E2BIG problem 69bcf6e.

factory_girl

Phil Cohen (phlipper) added MiniTest syntax methods to the GETTING_STARTED.md page for factory_girl in 06ff258.

neat

neat got some help from Reda Lemeden (kaishin) including a fix for breakpoint values in the README 120ce1b and support for using both min- and max- in breakpoint() 9292467.

dotfiles

Our dotfiles are now more tmux compatible thanks to Joshua Clayton (joshuaclayton) who added tab-completion to ack using the tags file d16a4fe and Dan Croak (croaky) who enabled better pbcopy/pbpaste and RubyMotion compatibility by using reattach-to-user-namespace in 3ef63fe.

suspenders

Dan Croak (croaky) tightened up our suspenders by replacing the style guide (most of the README file, really) with links to guides c912961, ignoring the .env file 58c22ff, and alphabetizing the .gitignore file 884eb08.

high_voltage

In high_voltage, Mike Burns (mike-burns) extracted an overridable PageFinder class 8494e51 and removed the ActionMailer usage 6eee9b0. Odin Dutton (twe4ked) and Mike Burns added a config option to disable default routes 7570889.

fake_braintree

fake_braintree was bumped to version 0.2.1 by Dan Croak (croaky) 44f62b7.

bourbon

In bourbon Mike Burns (mike-burns) added command parsing using Thor ac3b318.

laptop

Our laptop script got the same reattach-to-user-namespace help from Dan Croak (croaky) as he added to the dotfiles 50a1a1e.

drapergeek

This week in open source

factory_girl

Version 3.6.0. of factory_girl is hot and ready (919543e).

Joshua Clayton (joshuaclayton) added memoization to the names of attributes which adds a 33% speed increase on factories with overrides (acb2636). He also removed the unnecessary dependency on bluecloth (8d2b352) and added a respond_to_missing on NullObjects to make the release more compatible with Ruby 1.9 (e038bf8). Alex P (ifesdjeen) also added jRuby support, you can check the GETTING_STARTED page for set up information.

dotfiles

The space bar is now working as the leader key in our dotfiles thanks to sjas (sjas). Dan Croak (croaky) also changed the prompt to only list your current working directory instead of the full path (4208970).

paperclip

paperclip saw release 3.1.4 (70f0f1f) with an awesome commit message from Prem Sichanugrist (sikachu).

Matthew Schulkind (mschulkindi) added the ability to specify the format of the file and override the built in content-type detection (3103da5). Nick DeSteffen (nick-desteffen) and Yasith Fernando (thekindofme) found and fixed a few typos (ef4725f) (786a13f).  Sergio Cambra (scambra) fixed a syntax issue affecting users on ruby 1.8.7 (f7b76cd).

Thanks to Aditya Sanghi (asanghi), paperclip now features a URI adapter (5d06ad8).

trail-map

If you haven’t checked it out already, the trail-map is a great resource for anyone interested in improving their programming or design skills. This week Darren Woodley (manvsmachine) updated our unix map to include I/O redirection (a9279f8e).

Clearance

Our beloved Clearance had a 1.0.0.rc1 release this week (26860a1) and we would be thrilled to get feedback on it via Github issues or support@thoughtbot.com. This release features a multitude of changes including enforcing database constraints (fd6fbc0), removing unnecessary flash messages  (7184e7d) and a change to using BCrypt for encryption over SHA1 (be37c35) for improved security.

lukegriffiths-apprentice

Apprentice.io Three Week Retrospective

Over the past three weeks I’ve begun my apprenticeship at thoughtbot. The apprenticeship lasts until the end of March.  I’m joined by designers Paul Webb and Edwin Morris, and fellow coder apprentice Alex Patriquin. Each of us is assigned to a mentor, who makes sure we absorb as much as possible of the thoughtbot way of doing things and achieve our specific goals. For me, the apprenticeship is a couple of things: it’s a chance to work in coder nirvana (TDD, heavy refactoring, bookshelf full of great literature, 5-minute meetings, pair programming, investment days, open source - the works), and it’s a chance to vastly increase my Rails skills in a bootcamp-style training environment.

My head is swimming with new knowledge. I entered this state the first day, and I’ve been there constantly for the past three weeks. Each evening I ride the T home with my poor neurons about to burst with new activity. At night while I sleep my brain indexes all this new knowledge, and the next day I dive in again. If you’ve ever read Ender’s Game, it’s sort of like Battle School for Geeks.

Let’s get specific. This list is long because I’ve been truly busy. In the past three weeks I have:

  • Mercilessly refactored my code two, three, even four times after writing it. The standards for code quality here are very, very high.
  • Learned to use Github pull requests for code review.
  • Responded to around 150 code review comments, most of which made me stop and rethink coding habits I’ve held unconsciously for years. My style is improving fast.
  • Participated daily in a morning company-wide standup that actually takes less than five minutes, and a team standup that takes another five. That’s only ten minutes of meetings per day!
  • Switched to using higher-level cucumber tests involving steps like “When I sign up as a new user” as opposed to “When I click the link marked ‘foo’”.
  • Achieved and maintained 100% perfect TDD discipline - not writing a single line of feature code until a failing test is present.
  • Completely switched text editors, from Textmate to Vim.
  • Became faster in vim than I ever was in Textmate.
  • Written custom functions for vim.
  • Learned other new tools including Homebrew, ack, ctags, New Relic, KISSmetrics, and kumade.
  • Forked thoughtbot’s dotfiles repo and started customizing it as my personal dev environment. The dotfiles repo contains bashrc, vimrc, git-config, alises, etc - I can now install it to any computer I use to instantly have my customized dev environment in place.
  • Watched an app’s user base jump from 100 to 10,000 in a matter of minutes as an article hit TechCrunch.
  • Gotten a crash-course in startup funding from the other coding apprentice, Alex Patriquin, who boasts, quite accurately, of knowing everybody.
  • Participated in discussions about new features in rails.
  • Made my very first contribution to an open source repo.
  • Been approved to give my first professional presentation - a lightning talk at at Boston.rb meeting.
  • Consumed 3,000 cups of green tea and a foie gras taco.

Did I mention I’ve been busy? That’s just the first three weeks - and I’ve got ten weeks left. I feel excited, involved, and challenged in a completely invigorating way. The team here is universally smart and helpful, and while I’m here I simply can’t help but get better by osmosis at what I do. This is the most fun I’ve had in an office in a long time.

For more information about this program, and to sign up to sponsor a pool of apprentices, visit apprentice.io

More later on,

gabebw

cd’ing to frequently-used directories in ZSH

Josh just dropped some sweet, sweet ZSH knowledge. I spend a lot of time in the directories under $HOME/thoughtbot/ and $HOME/src, and to get there I type (for example) cd ~/thoughtbot/hoptoad. There is a better way!

First, add this to your ~/.zshrc and source it:

setopt auto_cd
cdpath=($HOME/thoughtbot $HOME/src)

Obviously, use different paths in cdpath depending on which directories you cd into a lot.

Now let’s try it out:


$ cd rspec-core # Autocompleted from rspe<TAB>
$ pwd
/Users/gabe/src/rspec-core
$ cd hoptoad
$ pwd
/Users/gabe/thoughtbot/hoptoad

Seriously, check out your coworkers’ dotfiles. It can improve your workflow efficiency by an order of magnitude. Like most of the Thoughtbot crew, Josh keeps his dotfiles on Github.