January 2011
12 posts
3 tags
cURLing with Rails' authenticity_token
Our event, Developers Developers Developers Developers, is this weekend. When the amount of registrations reached the capacity of the venue, we removed the registration form from the website. However, we left the Rails route and controller around and encouraged students to register by reading the source code of the application and coding their way in. We pointed them to the staging app so they...
Jan 31st
5 notes
4 tags
Sweep unused code into the dustbin with rcov
One of the oldest tools in the Ruby testing utility belt is rcov. Most developers know that they can use rcov to find parts of their application code that tests aren’t exercising at all. However, playing with rcov’s options a bit can help you clean up your application after refactoring or removing features. These techniques all rely on a well-tested application, so make sure you start...
Jan 26th
7 notes
5 tags
Feature branch code reviews
“Code review.” My knee-jerk reaction to that phrase? Nap time. I’ll be honest, I never really felt engaged during “code review” meetings at the end of an iteration. It always took too long to get and discuss the code. The room would get warmer. We’d discover things we’d want to change. Many of those changes would never be made. Since today is Boycott...
Jan 19th
18 notes
5 tags
A Tmux Crash Course
I’ve been using Tmux for about six months now and it has become just as essential to my workflow as vim. Pane and window management, copy-mode for navigating output, and session management make it a no-brainer for those who live in the terminal (and especially vim). I’ve compiled a list of tmux commands I use daily to help me work more efficiently. If a tmux command I mention is...
Jan 18th
13 notes
10 tags
DIY @font-face web service
Phil recently designed Developers Developers Developers Developers, an event we’re running for Boston-area high school and college students: It looks awesome in part because of liberal use of @font-face. These days, it’s simple to use @font-face. Just use a stylesheet referencing a web service like Google Font Directory: <link...
Jan 14th
19 notes
1 tag
Fetching source index for http://rubygems.org/
Like you, I’ve sat at my terminal watching Bundler emit this post’s title and do nothing for quite a while. Imagine what we could be doing instead of waiting for dependencies to resolve! I’m out of ideas already, I love resolving dependencies. Why it’s slow It’s actually not Bundler that is slow…it’s RubyGems itself. To understand why this process takes...
Jan 13th
6 notes
4 tags
Make CSS3 buttons like a boss
High-quality interface elements are a great way to add that extra bit of refinement to a website. I’ve been maintaining a repo of CSS3 buttons for the past few months and I’m starting to see them slowly make their way out into the real world. This tutorial is going to give you a deeper understanding of the design thinking that goes into making these buttons and show you how to make...
Jan 12th
40 notes
3 tags
Ongoing refactoring and client work
Anyone who has done client work or worked inside an organization where the priority is on “new” has faced this dilemma: how do you “sell” housekeeping/maintenance and refactoring tasks up the chain of command to your boss or your client? Often times developer claims about wanting or needing to do refactoring work, maintenance tasks, “small tweaks”, etc - are...
Jan 10th
3 notes
1 tag
PostgreSQL performance considerations
There are a number of variables that allow a DBA to tune a PostgreSQL database server for specific loads, disk types and hardware. These are fondly called the GUCS (Global Unified Configuration Settings) and you can take a look via the pg_settings view. There are also a few of things that you can do in your application to get the most out of Postgres: Know the postgres index types By default...
Jan 7th
6 notes
3 tags
Design Driven Development
Most of my thoughts about design spawn from asking myself what makes a project successful. Well, what does? Most will agree that good design does. This is not speaking exclusively about the graphic design or implying that everything rests solely upon the shoulders of the Designer. Everyone is a designer. Design is a fundamental part of everything. Keep this philosophy in mind for the entirety of...
Jan 5th
6 notes
5 tags
AjaxRecorder: is this insane?
This week, Matt and I were converting pagination in an app to Ajax pagination. In the process, we broke the build. The failing feature looked something like this: When I follow "Next page" And I comment on "Ford" with "Fjord is a better name for a car." Then I should be on the second page And I should see the "Fjord is a better name for a car." comment The implementation of “I should...
Jan 4th
10 notes
3 tags
Use Deadweight and your integration suite to...
We’re refactoring the CSS in Hoptoad - the app is a few years old, and has been through several rounds of design improvement. We’re looking to combine duplicated rules, make selectors more intention-revealing, and want to reorganize the stylesheets to reflect our current best practices. We’re also switching to SASS, which we’ve found to be a tremendous help. Together,...
Jan 4th
14 notes