Archive for the ‘Work’ Category

Rails Cookbook Released

Friday, January 19th, 2007

Rob Orsini’s Rails Cookbook has finally hit the store shelves. Go grab a copy because of how nice it makes you look:

Rob's Daughter Reading Father's Book

More from Rob here.

DocBook Dinner

Friday, December 8th, 2006



Cheers!

Originally uploaded by psd.

The highlight of XML Conference 2006 (more coverage here, here, and here.

Want darcs? Well, install these too…

Friday, December 1st, 2006

How could darcs possibly have this many dependencies?

[background: installing darcs using fink on OSX so that I can then build from source to get to the current version.]

The following package will be installed or updated:
darcs
The following 31 additional packages will be installed:
docbook-xsl gd2 gd2-shlibs ghc ghc-dev
ghostscript ghostscript-fonts gmp gmp-shlibs latex2html
libcurl3-unified libcurl3-unified-shlibs libgmpxx4-shlibs
libkpathsea4 libkpathsea4-shlibs libmpfr1 libmpfr1-shlibs
libtiff libtiff-bin libtiff-shlibs libwww libwww-bin
libwww-shlibs netpbm-bin netpbm10-shlibs openmotif3
openmotif3-shlibs t1lib5 t1lib5-shlibs tetex-base tetex-texmf
Do you want to continue? [Y/n]

Remembering a Slower Internet

Monday, November 27th, 2006

I’ve been blessed with an opportunity to investigate first-hand what the internet feels like for the voiceless masses with slow internet connections. My findings will shock you! For me, the opportunity comes despite my living in the geographic center of a very densely populated urban area–specifically from my living over 15000 feet from where the cable that will become my worthless Earthlink (don’t buy!) DSL originates. Let me tell all of you sitting on the edge of your seats with anticipation: the internet sucks for people with less than a 1KB/s connection. Think I’m exaggerating? Think again:

My Slow Internet

Multipart POST in Ruby

Wednesday, November 1st, 2006

In Merb is the new black Josh Susser mentions:

I also wrote a little client command line script in Ruby that wraps curl to upload the files to the web service. (I had to use curl because Ruby doesn’t have a simple solution for doing multipart file uploads.)

I ran into this once, and ended up writing a solution (for essentially the same problem) as a Multipart module. It’s ugly but functional, and almost all borrowed from here and Bill Stilwell.

[Update: See the comments for more useful versions]

RAM Hogs

Wednesday, October 18th, 2006

I’m getting pretty annoyed by the performance of my year-old iBook these days, mostly due to my DSL not working properly and running out of RAM (neither of which is really the fault of the hardware persay). After noticing that I was has 870MB of RAM “Used” (of 1GB total) according to my iStat Nano widget (basically a wrapper to top or Activity Monitor), I started trying to quit stuff to get that back down. With everything closed, I was using 697MB.. Blech.

I shutdown, restarted. Here’s my startup log:

Action Used (MB) Difference (MB)
Startup 224 n/a
Thunderbird 267 43
Firefox (google.com) 314 47
FF to gmail.com 324 10
Adium 341 17
Finder (new window, browsing) 351 10
Terminal 365 14
Teminal–3 new windows 378 13
Firefox–two new tabs, sites 378 8
Azureus 446 68 (!!)

Blah, I thought life should at least be decent with 1GB RAM?!

Update: This document from Apple helps explain why only some of the columns in Activity Monitor are interesting.

Inherit from the Standard Library

Tuesday, September 19th, 2006

As always, Google manages to fail for even the stupidest programming queries because it ignores special characters ” < ", etc...

So, it turns out that I've never actually inherited from the standard library before. Time to get some stupid errors that make me look like a fool on Ruby-talk when I ask about them. Specifically:
~/ruby/lib/foohelper.rb:432:NameError:
uninitialized constant FooHelper::Logger

Huh?

irb(main):001:0> module Foo
irb(main):002:1> class Bar < Logger
irb(main):003:2> def self.baz(t); p t; end
irb(main):004:2> end; end
NameError: uninitialized constant Foo::Logger
from (irb):2
irb(main):005:0> module Foo
irb(main):006:1> require 'logger'
irb(main):007:1> class Bar < Logger
irb(main):008:2> def self.baz(t); p t; end
irb(main):009:2> end; end
=> nil
irb(main):010:0> Foo::Bar.baz("How to inherit from the stdlib")
"How to inherit from the stdlib"
=> nil

irb to the rescue and I didn’t even post to Ruby-talk, but missing ‘require’ made me feel pretty dumb…

Picked on

Friday, June 23rd, 2006

Do you ever feel like you’re being picked on by a higher authority? Perhaps you walked to work, are about to leave, and a huge rainstorm starts? Perhaps one exactly like this:

Bad Weather

Yeah… this is why I’m moving to San Francisco.

Word 2007 Beta Server Blows Up

Tuesday, May 23rd, 2006

So, I filled out all the forms, signed up for Microsoft Passport (all on my Linux box with Firefox, of course), and generally jumped through all the hoops that Microsoft put up before allowing me to download the Office 2007 Beta (which I’m genuinely excited to see). But then, it all blew up:

Why I Like Darcs

Sunday, April 30th, 2006

I came into revision control from a rather unusual path these days: RCS. We use RCS at work to manage FrameMaker and DocBook content with hard locking, and it still works remarkably well. At the early days of AudioBeta, now GiraffeGiraffe, we were using CVS for code, but the codebase was pretty small and I convinced Daniel and Altay to try out darcs (skipping SVN altogether). We’ve been using it since November or December now.

In the intervening months, I’ve been extremely happy with darcs, especially the:

  • ease of setup (darcs intialze && darcs add *)
  • ability to commit patches without being on the internet
  • stability (I only broke it once, and I think it was my fault)
  • portability (works on our Unix, Linux, Mac, and Windows boxen)

Here’s what I don’t like about Subversion (perhaps because I don’t know enough), especially since I’m more used to darcs:

  • Way too hard to start a repo, I don’t think I can even do it at work without being a sudoer. I want to be able to put even the smallest stuff into revision control trivially.
  • I want to be able to commit patches internally without forcing them down others throats. Because darcs is decentralized by design, I can commit patches (darcs record) without sending them to anyone else. When I’m ready to share, I can submit a whole bundle of patches to our de-facto central repository for sharing with others (darcs push [another repository])
  • Why can’t I review the commits and decide whether I want them? darcs allows me to view a diff while I’m pulling patches (essentially svn up and then accept or decline patches as I see fit.

This last point, the one on reviewing patches, has allowed me to do impromptu code reviews on everyone’s patches (when I pull them), which has helped me learn the rest of the application much better than any other method (more on this later, someday).

Just to be complete, darcs bummers:

  • Really slow and inefficient at moving patches over SSH
  • Takes a long time to commit big files (don’t use darcs if you’re writing in a really verbose language or can’t otherwise break up your code into nice chunks)

More on darcs here: http://abridgegame.org/darcs/