October 18, 2009 at 5:32 pm
· Filed under Stuff
Don’t laugh, this could happen to you:
http://hashedbits.com/the-birth-of-the-grumpy-asshole-programmer/
Stage 1: The happy creative programmer
Stage 2: The proud father
Stage 3: The product guru
Stage 4: The grumpy asshole programmer
Permalink
October 18, 2009 at 12:36 pm
· Filed under Stuff
4 years ago I had this pile of books waiting to be read: http://morgane.com/2005/11/
The current list looks like this:

Some things never change…
Permalink
October 18, 2009 at 11:21 am
· Filed under Stuff
Some ways of using here-docs:
# interpolation
doc = <<DOC
Yo #{name},
what's up
DOC
p doc
#=> " Yo bob,\n what's up\n"
# indent the end marker
doc = <<-DOC
Yo #{name},
what's up
DOC
p doc
# => " Yo bob,\n what's up\n"
# no interpolation
doc = <<-'DOC'
Yo #{name},
what's up
DOC
p doc
# => " Yo \#{name},\n what's up\n"
# replacing spaces with underscores
doc = <<DOC.gsub(' ', '_')
Yo #{name},
what's up
DOC
p doc
# => "__Yo_bob,\n__what's_up\n"
Permalink
October 18, 2009 at 10:08 am
· Filed under Stuff
Cyberduck won’t start on Snow Leopard. Install the new beta to fix it:
http://cyberduck.ch/
Permalink
October 16, 2009 at 8:46 pm
· Filed under Stuff
as<tab>
assert(test, "Failure message.")
ase<tab>
assert_equal(expected, actual)
tc<tab>
require "test/unit"
require "library_file_name"
class TestLibraryFileName < Test::Unit::TestCase
def test_case_name
end
end
Permalink
October 10, 2009 at 6:52 am
· Filed under Stuff
It seems that I still don’t have a stable system, since I’ve upgraded to Snow Leopard a few weeks back.
Running db:migrate or entering cmd-R from TextMate fails with the following error:
uninitialized constant MysqlCompat::MysqlRes
I did a few different things, but I it boils down to having to do this:
$ sudo gem uninstall mysql
$ sudo env ARCHFLAGS="-arch x86_64" gem install mysql -- --with-mysql-config=/usr/local/mysql/lib/mysql_config
(your mysql_config could be in /usr/local/mysql/bin instead, in which case make sure to use that path)
I’ve also wound up uninstalling mysql and reinstalling, though I don’t think those steps were necessary. Just in case, you might want to try that also. Go here: http://dev.mysql.com/downloads/mysql/5.1.html#macosx and get “Mac OS X 10.5 (x86_64)” from the package format section.
Permalink