Brian Wigginton Lab and Nerdery

2010 Development Toolbox

Posted on November 6, 2010

Here is a quick run down of the tools and applications I user pretty much everyday. As of this time I'm doing a lot of frontend work as well as some backend PHP development.

Programming

  • Browsers
    • Safari - I use it for all my general development
    • Firefox - Mostly great for tuning CSS and pixel pushing
    • Google Chrome -  Great for debugging and performance testing
  • Textmate - texteditor
    • open in Textmate - utility to put in your Finder that lets you quickly open files in Textmate
    • project plugin - better project handling for Textmate
  • Versions - Very clean SVN client
  • Fluid - great to take web pages you always access and make them their own app.
    • JIRA - This is just a great setup, this way JIRA is always a few keystrokes away
    • jQuery API - quick and easy access to the jQuery API
  • iTerm - better replacement for the built in mac terminal
    • vim - best TE in the world (next to Textmate?)
  • Sequel Pro - GUI for MySQL
  • Charles Web Proxy - for intercepting and viewing http data, also great for testing slow connections to a certain domain
  • Reggy - Regular expression sandbox, great for finding out what the hell is going on with a regular expression
  • HTTP Client - Great app that let's you play with HTTP, great for testing out backend services
  • VMWare Fusion - X-browser testing
  • Adobe Photoshop CS5

Utilities

  • Caffeine - awesome little app to keep your computer from going to sleep or launch the screensaver. You don't know how much you love caffeine until you actually use it a few times
  • Divvy - awesome window management app that helps you resize windows on the fly using hotkeys or your mouse.
  • Droplr - terrific app for taking screenshots and sharing them with others
  • Spot Color - great little color picker
  • VirtualHostX - app to manage all the virtualhosts installed on your system's apache instance
  • iStat Menus - bunch of monitors that sit in your menubar and report system status to you. Great for keeping an eye on memory and processor usage

Misc

  • Evernote - Great for taking notes throughout the day and also syncs back up with your iphone or mobile device
  • Mail.app
  • Pandorajam - If you listen to pandora, do your self a favor and download this badass app right now. Simply amazing.
  • Grooveshark - think of iTunes, but has any song you can think of. Completely web based.
  • Adium - IM client
  • Colloquy - IRC client
  • Echofon - Twitter client
  • Skim - PDF Reader, much better than preview or acrobat reader
Filed under: Programming, Tips No Comments

Pragmatic Development

Posted on January 14, 2010

What does it mean to be a pragmatic programmer, or to program pragmatically? Generally speaking, acting pragmatically or being pragmatic means to act practically. Taking things for what they are, don't make  things more difficult then they have to be. Take these ideals and apply them to development and you can be a very efficient, very productive, pragmatic programmer.

Andy Hunt and David Thomas have written a terrific book on Pragmatic Programming. They mention many qualities that they have found pragmatic programmers to possess:

  • A fast and early adopter - Pragmatic programmers love drinking the newest flavors of the technology coolaid. Playing with a new technology is like getting to play with a new toy. It's fun and represents something new and unknown to be figured out.
  • Curious and Inquisitive - Pragmatic programmers are always asking questions. Curious about how and why things work, and what the best way is to solve a problem. The knowledge picked up from these questions almost always becomes more useful in understanding future questions.
  • Grounded and Realistic - Pragmatic programmers have a very realistic view on things. They won't forget that the webapp you're building is only a tool for the means, not the end to the means.
  • Jack of all Trades - Being able to wear multiple hats makes pragmatic programmers more adaptable but also more valuable. Pragmatic Programmers have the ability to switch from one task to another pretty often, while still being able to claim a master or some.
  • Care about their craft - As a pragmatic programmer you have to care about what you are doing if you are to really have an appreciation for what you do. A pragmatic programmer has fun crafting their code and finding elegant, yet practical answers to their problems.
  • Always be thinking - A pragmatic programmer tries not to do things out of habit. Always asking "why?", and "how?" helps to always be thinking about your work and why you are doing it the way you are.

The Pragmatic Programmer

Image of The Pragmatic Programmer: From Journeyman to Master

Subversion: Commit Emails

Posted on October 24, 2009

This is a tutorial on how to setup Subversion to email a team when there is a commit to the repository.

Subversion Hooks

Hooks are what Subversion executes upon certain events. Within your SVN directory you should see the following items

  • README.txt
  • conf
  • dav
  • db
  • format
  • hooks
  • locks

Go into the hooks directory and you will see a bunch of files ending in .tmpl. These are template scripts that are prebaked for you. Within each hook file are calls to scripts you want to be executed. To get one to execute you need to remove the .tmpl extension and then make it executable.

mv post-commit.tmpl post-commit
chmod +x post-commit

The Post Commit Hook & commit-email.pl

In post-commit there is a call to commit-email.pl. (Be sure that this calls to the absolute path of the script)

I didn't have commit-email.pl on my server but acquired it from the Subversion Tools Repository here.Save that file to your hooks directory. Also, be sure to edit that file and rename all the @SVN_BINDIR@ instances to the directory of you subversion executable. To find out type which svn and use the path that returns. Mine returned /usr/bin/svn to I used /usr/bin/ for @SVN_BINDIR@.

Run commit-email.pl without any arguments to see a list of options. To test this script point it to a repository and a revision number.

./commit-email.pl /var/svn/repository 1 --from "Subversion Gate Keeper <subversion@example.com>" youremail@example.com anotheremail@example.com

I like to prepend a subject line prefix so I can filter it a little easier when it comes through to my email client. Adding the -s argument to the command will allow you to specify a subject line prefix.

./commit-email.pl /var/svn/repository 1 --from "Subversion Gate Keeper <subversion@example.com>" -s "Commit Activity: " youremail@example.com anotheremail@example.com

Here are some more resources to help you out.

Edit - October, 27: You have to call your scripts within post-commit by their absolute path or else they wont run. Code above has been modified.

Tagged as: No Comments

Paperclip – Customizing Paths and URLs

Posted on October 19, 2009

To customize the paths and urls of paperclip objects in your rails app you need to modify both the :path and :url options for  has_attached_file in your models. Here's an example...

class SomeModel < ActiveRecord::Base
 
  has_attached_file :image_one,
    :path => "public/system/:class/:id/:filename",
    :url => "/system/:class/:id/:basename.:extension"
 
  has_attached_file :image_two,
    :path => "public/system/:class/:id/:filename",
    :url => "/system/:class/:id/:basename.:extension"
end


By default Paperclip will store your files in /system/:attachment/:id/:style/:filename. By passing the :path and :url options to the has_attached_file method in your model you can change where the uploaded files will be stored as well as where they can be accessed. The :path is the directory in your application where your files will be stored. The :url is the url that users will use to render the image.

Paperclip Resources

Tagged as: , No Comments

[TIP] Ruby GUI Applications and Empty Console Window

Posted on August 6, 2008

While writing a Ruby GUI app I kept seeing an empty console window. As it turns out there are two ruby executables that you can use to run your Ruby scripts: ruby, which is a CUI (Console User Interface) and rubyw, a GUI (Graphical User Interface) used to launch GUI Apps. Using rubyw will prevent that empty console from showing up. Hope this helps someone!

# rubyw myapp.rb

Edit - 8/7/08

There are actually two filetypes you can use for your ruby scripts. .rb files will run with the ruby CLI interpreter, while .rbw scripts will run with the GUI interpreter. Remember though, with no console window you wont get any status messages or debug messages. While writing and testing your GUI apps use the ruby interpreter then when your finished change the filetype to .rbw.

Tagged as: , No Comments
   
Google+