All posts by amy

SF Ruby presentation on Haml

So I recently presented an introduction to Haml. Here’s the slides if you’re interested (6 MB, .pptx):

haml_slide1.jpg haml_slide2.jpg

And the links…

Haml – Main page
http://haml-lang.com/

Haml – Tutorial
http://haml-lang.com/tutorial.html

Haml – Google Group
http://groups.google.com/group/haml

Haml – Performance
http://nex-3.com/posts/87-haml-benchmark-numbers-for-2-2

Hampton Catlin’s homepage:
http://www.hamptoncatlin.com

Hampton talks about Haml at RailsConf Europe 2006 (Explicit):
http://www.ror-exchange.com/railsconf-europe-2006

Nathan Weizenbaum
http://nex-3.com/

Nathan Weizenbaum and Chris Eppstein interviewed about Sass + Compass
http://thechangelog.com/post/254788034/episode-0-0-1-haml-sass-and-compass

Compass
http://wiki.github.com/chriseppstein/compass/

Rendera
http://rendera.heroku.com/

Haml + Sinatra
http://ruby.about.com/od/sinatra/ss/sinatra4.htm

Locking the Mac OS X dock

Ever accidentally drag an item off the dock? Ever forget what that was and now it’s killing you that you know you might be missing something important? You would think that you can lock your Dock so that things don’t accidentally get removed. It’s such a simple feature—even Windows has had it forever.

Thanks to a quick article on Brighthub, http://www.brighthub.com/computing/mac-platform/articles/43080.aspx, there’s a couple of commands you can type into Terminal to lock it. I took it a step further and just made them into a couple of aliases for my .bash_profile:

alias docklock='defaults write com.apple.dock contents-immutable -bool true;killall Dock'
alias dockunlock='defaults write com.apple.dock contents-immutable -bool false;killall Dock'

So, to lock your Dock now just open the Terminal application and type: docklock

To unlock, type instead: dockunlock

Simple!

Ticket tracking and SCM, even for a team of one

On one of my newer projects I’m a development and project management team of one. Still, I use a ticket tracking system like Redmine and Git for many reasons.

I like being able to enter a feature or a bug into the ticket tracker to make sure I get back to those issues later. I could use a spreadsheet, a notepad, or something like Remember The Milk but Redmine has the big advantage of integrating with SCM systems.

And I definitely use SCM all of the time. I’ve run into way too many cases where I’ve made a change I regret or I just need to group changes together. Something like Git works perfectly for this. And when I commit code it also reflects in Redmine what I’ve done, when I’ve done it.

Plus there’s a more important thing: what if my development team grows from one person to more than just me? If I’ve been using these systems all the time then adding a new code author or a project manager is really easy. I’m ready to scale!

Are “find in project” searches in TextMate slow and eating up all of your CPU and RAM?

I was doing a casual project-wide search for some text yesterday when suddenly my computer ground to a halt. I opened Activity Monitor and saw that TextMate was taking up 2.42 GB of RAM. Yes, gigabytes. Not only that, the Find In Project searches were extremely slow.

I started poking around and found another blog entry dated April 27, 2006, and that gave me the answer. It turns out that TextMate will search all files it thinks are text, even if the files are binary files. And if you have a large project like mine then you’ll end up consuming all of your computer’s memory while it searches all of the graphics files and audio files.

textmate_treat_files_as_binary_1.png

TextMate’s way of ignoring binary files is for you to explicitly tell it that certain extensions are NOT text. How do you know what TextMate is thinking? Right-click/ctrl-click on a file in your project drawer and you should get the “Treat Files with ‘.png’ Extension as Binary” message when TextMate is searching those files. Try all of your .pdf, .png, .gif, .jpg, .mp3, .doc files.

textmate_treat_files_as_binary_2.png