December 2011
10 posts
6 tags
Evaluating alternative Decorator implementations...
Recently, decorators have become a big part of my Ruby on Rails life. We used them heavily in a recent client project, Harold Giménez wrote a great post about them, Avdi Grimm is writing about them in Objects on Rails, and Jeff Casimir has a great presentation about them. Until recently, I still had some questions, however, such as: Should I roll my own decorators? If I roll my own, what...
Dec 26th
30 notes
4 tags
WatchWatch
A quick screencast that shows how I use CSS snippets to speed up my workflow. Links Mentioned in video: Textmate Zen CSS Textmate SCSS Vim CSS Snippets My Vim CSS Snippets
Dec 21st
1 note
7 tags
This week in open source
paperclip Much of the work over the past week was done in paperclip, so now you can upload files to your Rails apps with more flare and style! It now supports an option for keeping old files, so you can pass :keep_old_files to has_attached_file and, when you destroy an attachment (@user.avatar.destroy) it won’t actually delete the underlying files (345ec74). Many people find this useful...
Dec 16th
19 notes
5 tags
Internship or Apprenticeship?
What’s the difference between an internship and an apprenticeship? Internship An intern is someone who: usually wants to explore many options for their next job, or career in general may be unpaid is probably in school A company who hires interns: often has special project work that is a good fit for part-time employees knows it’s very likely the intern will work or study...
Dec 14th
28 notes
2 tags
This week in open source
Few commits over the past week. We’ve been hard at work on refactorings and larger features (plus client work), so keep your eyes peeled for the amazing commits we pull from you (yes, you!) in coming weeks. suspenders Commits on suspenders this week bring us instructions on how to use the app with Heroku (257ea39 and 5a4c257), revised documentation “that is awesome, not...
Dec 9th
2 notes
1 tag
Here's an Idea
Today we’ve launched several major changes to the Discussions feature of Trajectory. These changes lay the groundwork for many more improvements we’d like to make to Trajectory in the future to make your projects more successful. Discussions are one of the things that make Trajectory different than other story planning tools out there. Create a discussion instead of a vague story...
Dec 8th
14 notes
3 tags
The Durable Document Store You Didn't Know You...
As it turns out, PostgreSQL has a number of ways of storing loosely structured data — documents — in a column on a table. hstore is a data type available as a contrib package that allows you to store key/value structures just like a dictionary or hash. You can store data in JSON format on a text field, and then use PLV8 to JSON.parse() it right in the database. There is a native xml data type,...
Dec 6th
52 notes
7 tags
I learned to alias shell commands with Hooked on...
Do your co-workers snicker at your sentence-length shell aliases? I’m here to tell you it’s okay because my aliases border on the Dostoyevskian, too. Some commands you do a thousand times a day. They deserve super-short aliases: alias be="bundle exec" alias s="bundle exec rspec" alias cuc="bundle exec cucumber" Like h() or t() in Rails, the more often you invoke a command, the...
Dec 4th
32 notes
3 tags
This week in open source
Since last week was Thanksgiving here in the States, here’s a double-whammy: everything that happened last week and everything that’s happened this week, in one blog post! suspenders The big deal with suspenders, our app app, is that version 0.3.2 is officially out! Since 0.3.1 on October 28th we’ve added an email validator, raised email delivery errors in the development...
Dec 2nd
10 notes
6 tags
Tidy views and beyond with Decorators
The problem Here’s a view serving monkeys#show. What’s wrong with it? <h1><%= @monkey.name -%>'s Monkey page</h1> <% if @monkey.eating? %> <div class="eating"> <h2><%= @monkey.name -%> is eating. Nom nom.</h2> </div> <% elsif @monkey.sleeping? %> <div class="sleeping"> <h2><%= @monkey.name %>...
Dec 2nd
29 notes