A shorty today.
- A massive group of developers is revisiting and debating the current state of our shared-code architecture. appable_plugins might not be a perfect match, and we might develop our own or plugin-sharing system.
A shorty today.
Never be afraid to refactor. It may seem scary right now, but it will only become more daunting as the code base increases in size.
The right time to refactor is NOW… grasshopper
And now that my pair and I have rallied around this post, to the refactoring!
<code> $> svn propset svn:executable ON somescript.sh $> svn propset svn:eol-style native somescript.sh </code>
ruby -r profile, and our own custom ruby test benchmarker, amongst others.
ActiveRecord.connection.execute("some sql")to build some reporting statistics, but it seems too early to blame that. Coincidental, though.
:persistent => false:
<code> AWS::S3::Base.establish_connection!( :access_key_id => access_key, :secret_access_key => access_key, :persistent => false ) </code>
Not much of interest today beyond project updates.
GC.startafter heavy RMagick use. We’ll also check the version and insure that it’s 1.13.
Follow-up: Actually it looks like we were hanging connecting to Amazon’s S3 service.. Once we figure out the details we’ll let you know what the problem was.
Ever do “
less log/development.log” and see the following?
ESC[4;35;1mSQL (0.001084)ESC[0m ESC[0mSET character_set_results = utf8;ESC[0m
ESC[4;36;1mSQL (0.001792)ESC[0m ESC[0;1mSHOW TABLESESC[0m
Wouldn’t it be nicer to see the colorization like when you’re tailing the log with
tail -f? Try using -R:
less -R log/development.log
Then you’ll see
SQL (0.001084) SET character_set_results = utf8;
SQL (0.001792) SHOW TABLES
A bit more legible, eh wot old chaps?
Works on Mac and Cygwin too.
And -X makes it not clear the screen when you stop less, so you get to keep seeing what you were just seeing.
So that means you may want to put
alias less="less -RX"
Also, if you don’t want the fancy colors at all, specify
ActiveRecord::Base.colorize_logging = false
in your environment file (e.g.
test.rb.) We’re doing that in our
test.rb so we can more clearly read the output from our CruiseControl build.
Brief project reports, and that’s it!
Image::change_geometry(geometry_string). In a nutshell, you can perform complex image transformations my passing
change_geometrya string; for example,
my_imageto a 50×50 pixel image, but only if it’s larger than 50×50. For us, this exact line turned our 600×600 image into a 50x38 image. Weird. Only on Linux.
Something interesting I’ve noticed about paired programming — the Vulcan Mind Meld. I can’t really describe it any other way. It’s like your brain, and your pair’s brain are the same brain. And after finishing a feature, I can never remember who did what.
How does this work? Latent psychic powers? Olfactory hormone sensors? I have no idea.
Last week, however, I got some insight into part of what’s going on.
I was pairing with Damon, a bad-ass in his own right, who happens to be a Dvorak keyboard user. It’s not just a normal Dvorak either, it’s one of those crazy Kinesis brands where you do everything with your thumbs. And he’s pretty damn fast on it.
After a little while pairing with him we started to get into The Zone. I noticed I felt kind of weird when he was driving (that means he’s the one using the mouse and keyboard for all you non-agilites out there).
It was like I was playing Counter Strike on a laggy connection; he’d change tabs in the IDE or go to the end of a file and it’d take me an extra moment to figure out what just happened. Even when he was coding, I felt this lag in my uptake of the situation. Lines of code I felt sure were about to be deleted would instead be duplicated by Damon and his crazy keyboard.
And that’s when it hit me: crazy keyboard.
I realized that one thing I do to stay in sync with my pair is watch their keyboard out of the corner of my eye. I don’t do it on purpose, in fact I’m never even aware of it. But when my subconscious peripheral vision notices my pair’s finger movement before the keys are actually pressed, it gives my mind that extra coupled milliseconds to figure out what’s about to happen.
Personally, I think this is crazy and has crazy implications. And I’ll talk about these more later.
But for now, I’d guess that for all you aspiring Dvorak users out there, a great way to get good fast would be to sit down and pair with someone who’s already a Dvorak user.
I wonder what other cues, physical or not, contribute to that feeling of one-ness while pair programming…
Interesting/Ask for Help for 02/07/2007
require RMagick, but neither the PC or Mac complained, only Linux.