terrbear.org
ruby! food! kids! … and other fun from terry heath-
Bug-prone if statements
Posted on December 6th, 2011 No commentsI think I’ve seen more bugs from multi-expression if statements than anything else, especially once they’re combined with either an ‘else’ or if they’re used with an ‘unless’ instead of an ‘if’.
I can’t tell you in <2seconds what conditions result in which codepaths. Whenever I come across code that looks like that, it gets changed into something a lot easier to read, even if it’s more verbose.
-
Commenting out code…
Posted on November 18th, 2011 No commentsIs a ghetto form of source control. Just delete it. It’s why you’re using /git|svn|hg|bz|cvs|evs/.
-
Searching playlists on Spotify
Posted on November 16th, 2011 No commentsIt’s CTRL/Apple+F, in case you were wondering (I’d been for a few weeks).
-
Finger-detecting buttons
Posted on November 15th, 2011 No commentsWe’ve a TV and a monitor that are both impossible to turn off in the dark because you can’t feel any buttons. The surface is entirely smooth, and by the time you find the power button you’ve already changed the input and enabled SAP.
Easy fix: put a dot of glue by the button, near the edge of the device. Then you rub your finger along the side and when you feel a slight texture change, go 90° and bam, device is off.
The glue also works wonders for chatty kids.
-
I need a way to enter a negative seed into Pandora
Posted on November 15th, 2011 No commentsNever play Coldplay. No, really.
-
Love:
Posted on November 10th, 2011 No commentsFirefox 8. Way less memory usage. Fast. Pretty. Firebug.
-
“You have to let people bring *something* for Thanksgiving”
Posted on November 8th, 2011 No commentsNo I don’t.
-
When you can’t ctrl+c
Posted on November 7th, 2011 No commentsNot sure why CTRL+C sometimes doesn’t respond, but CTRL+Z almost always responds immediately. If you’re too lazy to look up the process you just suspended, you can do this: kill -9 %1
And bang, it’s dead.
-
Reducing friction in blog posting
Posted on November 7th, 2011 No commentsFinally got around to enabling posting via email. I think that’ll end up meaning two things:
* More frequent posting
* Shorter mean post lengthThere’s still a few things to figure out. I just sent an email with a picture, and it looks like the default email processor drops those, and the email client I use doesn’t allow HTML emails, so I’ll probably need to find a markdown or textile parser for email posts.
Baby steps…
-
Moved from GoDaddy -> Namecheap
Posted on November 7th, 2011 No commentsMostly because GoDaddy tries to upsell a bunch of stuff that nobody wants, and you have to click through 7 obnoxious dialogs to renew a domain for a year. Got the idea from bmenoza.


