Close and Go BackBack to Viget

Tools of the Trade

Getting to Grips with Git

John Dyer
John Dyer, Rails Development Intern, September 07, 2010

Since this is my first article for Viget Extend, I’ve decided to start with a short introduction. My name is John Dyer and I joined Viget at their Durham, NC, office as a development intern in July. Since then I’ve been working full time on SpeakerRate, an in-house Pointless Corp project. Although I was relatively familiar with Rails and had been using it on and off for a couple of years, this was my first time working on a large project. Needless to say, I’ve learned a lot.

Any project that has multiple developers, designers and others working on it at any given time needs some system of version control so that changes don’t quickly turn into a pile of meaningless nothing, causing confusion and conflicts within the application and amongst the developers themselves. When it comes to Ruby on Rails projects, Git seems to be the VCS (version control system) of choice. Like many other tools commonly used in the Ruby community, Git was familiar to me, but I hadn’t had much practice with it. Using Git on a daily basis over the last couple of months, I have amassed a collection of techniques, tips, and tools that have made version control with Git a breeze.

Continue reading "Getting to Grips with Git"

CoffeeScript for Ruby Bros

David Eisinger
David Eisinger, Senior Developer, August 06, 2010

Hello there, Ruby friend. You’ve perhaps heard of CoffeeScript, “JavaScript’s less ostentatious kid brother,” but it might as yet be unclear why you’d want to stray from Ruby’s loving embrace. Well, friend, I’ve been playing with it off-and-on for the past few months, and I’ve come to the following conclusion: CoffeeScript combines the simplicity of Javascript with the elegance of Ruby.

Continue reading "CoffeeScript for Ruby Bros"

Protip: Passing Parameters to Your Rake Tasks

Patrick Reagan
Patrick Reagan, Development Director, December 14, 2009

For the times I have needed to pass parameters to my Rake tasks from the command-line, I have always used environment variables (as Ryan describes in this post from 2007). I recently checked out the parallel_specs plugin to see if I could get some noticeable performance improvements when running the test suite for one of my current projects. I didn't in this case, but I saw something in the documentation that caught my eye:

$ rake parallel:spec[1]
$ rake parallel:spec[models]
$ rake parallel:test[something/else]

I have been using Rake forever, but those bracketed options were something new. I thought that it was something Michael added as part of his plugin, but it turns out that this feature is built directly into Rake itself. It was first introduced in this commit and made available as part of version 0.8.1.10. Configuring your tasks to use this feature is simple. I'll show you how.

Continue reading "Protip: Passing Parameters to Your Rake Tasks"

Benchmarking Javascript Templating Libraries

Brian Landau
Brian Landau, Web Developer, December 08, 2009

Because of Connect-a-Sketch’s heavy use of Javascript, I’m always looking for new ways to improve JS performance. This is, of course, important for ensuring a good user experience on as many machines as possible, not just those with newer computers and browsers. But, it’s also important for our ability to add new features as new features often mean more javascript running on the page.

One part of that Javascript functionality is generating the HTML for page nodes (representations of pages on the canvas). I use one of the many javascript templating libraries to do this currently. I recently noticed that mustache.js had been released and I got interested in exploring what other options are out there and how well they perform.

Methodology

I gathered up a huge list (the only requirement being that it be independent of other libraries or be a jQuery plugin) and narrowed it down to ones with template and API syntax I liked and code that looked at the very least decent on a quick glance. Following that, I created a series of benchmark pages that I would use to test the speed of each library. I generally had two tests, a simple test of a basic HTML template, and a test where I wanted to iterate over some data. Some of the libraries had support for iterating within the template syntax and others that didn’t; for those that didn’t I iterated via a standard for loop appending the content to the end of the relevant HTML element. A couple of the libraries (underscore and Tempest) offer the ability to compile the template into a function, for these I also created a third test for that functionality.

The libraries I ended up testing were:

Continue reading "Benchmarking Javascript Templating Libraries"

My Tools of the Trade

Clinton R. Nixon
Clinton R. Nixon, Former Staffer, October 15, 2009

Inspired by Mike Gunderloy’s tools of the trade post, I made a list of what I use every day for development. My tools don’t necessarily reflect what every developer at Viget uses.

Hardware

  • 2009 MacBook Pro 13”, 2.53 GHz, 4 GB of memory. This machine is a screaming demon of speed and fury. I’m meticulous about keeping junk that it doesn’t need off of it. I love my laptop, although I do wish I had 8 GB of memory in it. Maybe I’ll get the upgrade for its birthday present.
  • 20” Dell 2000FP monitor. It works. It seems giant to me, but I imagine I’d love a bigger one even more. I’ve had my eye on this 28 inch beauty for a while.
  • MacAlly ICEkey keyboard and Logitech MX518 mouse. Both of these are amazing. I have the same setup at work and at home. The ICEkey is my favorite keyboard I’ve ever used.

Development software

  • Mac OS X 10.6 Snow Leopard. Pure joy.
  • Ruby Enterprise Edition 1.8.7. It’s what I use on my servers, and I like to develop in a similar environment.
  • Homebrew packaging system. I used MacPorts for a long time, and was a big proponent, but the ease of adding new packages to this won me over quickly. Max, the project head, is great about accepting patches.
  • TextMate. Big surprise, I know. There’s a reason it’s so beloved in the Mac development community.
  • NetBeans. I’m a wishy-washy person when it comes to my editing environment, so I switch from TextMate to NetBeans often. It’s an excellent IDE for multiple languages, and gets better with every release. If I have to work on anything that isn’t Ruby, I usually use this. If it felt a little snappier and had a little better usability, I’d probably use this for all my code.
  • Git and GitX. Git’s my version control system of choice. I mainly use it from the command line, but when I need to do some visualization, I pull out GitX.
  • Mozilla Firefox. It’s my development browser. For casual browsing, I use Safari, as it’s way faster. I was a Firefox-only user for a long time, but frustrations about speed and lack of customizable keybindings has pushed me into Safari’s arms.

Other software

  • Backblaze. I use this for constant off-site backups. I’d link to them, but they have an awful auto-starting movie on their homepage. Instead, check out this blog post about their storage pods.
  • Hiveminder. This is a great task management system. My favorite parts are the command-line client and IM interface.
  • Notational Velocity and SimpleNote. Notational Velocity’s a great super-fast note taking application for OS X, and SimpleNote’s the same for the iPhone. I keep them in sync with a Perl script, so I have my notes everywhere.
  • I like to keep everything I can online and off my computer, so along with Hiveminder and SimpleNote, I use Gmail for both home and work email, Delicious for bookmarking and making groups of links, and Instapaper for things to read on the can or while waiting in line. I use GitHub and Dropbox to keep all my projects off my computer and accessible.
  • Fever is my RSS reader of choice. There’s too many high-noise feeds with sporadic great content out there to read them all. Fever’s Hot List makes it way easier to sift through the cruft.
  • To control my desktop, I use a combination of LaunchBar, MercuryMover, and SizeUp. I can launch anything, do many file manipulations, and move my windows around without leaving the keyboard. LaunchBar’s also great for giving me a global kill ring.

Tell Me What You’re Using

If you’ve got a tool you love, or think my toolset is weak sauce, let me know! I’d love to hear about it.

We're the Developers

at Viget Labs. We write about web development trends, tips, best practices, industry events, and our projects — all with an emphasis on Ruby on Rails.

Upcoming Events

Future Insights Live - April 29 to May 4
Future of Web Apps, Future of Web Design, Future of Mobile, and Future of Web in the Enterprise have joined forces to bring you our most comprehensive event EVER!

Contact Us

Have any questions, comments, ideas, or secrets to share? Let us know.


How many minutes in an hour?

Sorry, you need to have Javascript enabled to use this form. (Don't blame us, blame the spammers!) If you'd like to contact us, please visit our Contact page.