<3 sed

Posted Fri 27 April 2012 17:41 under category tech

I wrote a fun sed script today:

sed -E -n -e ':t ; s/(.{21})(.*)/\\bf\{\1\}\n\2/ ; p ; s/\\bf\{(.*)\}\n.*/\1/ ; h ; :q { n ; G ; s/(.{21})(.*)\n\1/\2/ ; tp ; s/(.+)\n.*/\1/ ; bt} ; :p { P ; bq }'

Short, but effective. Can you figure out what it does?

(solution after the break)

read more

Link: PHP sucks

Posted Tue 10 April 2012 08:29 under category tech

One of my co-workers wrote up this gem on why PHP sucks. I don't agree with his points (having a "development server" isn't an important or even particularly useful feature of a framework, much less a language; prepared statements aren't the pinnacle of SQL), but he does do a good job of showing off some of PHP's more spectacular failings.

I'm naming all of my PHP functions __lambda_object now.

(yes; I do appreciate the irony of linking to his post from a formerly PHP site)

read more

Debt Free Since 2012

Posted Fri 10 February 2012 01:09 under category personal

As of today, February 10, 2012, I am now officially debt-free. I decided to use my tax refund to pay off the rest of my student loans, which have been sucking down thousands of dollars a month since I graduated. Here are the results:

debt status

Yep. It took a few days longer than expected, because Sallie Mae is terrible at ACH. And, of course, their obnoxious rounding means that at some point in the next six months, I'm going to get a cheque from Sallie Mae for 80¢ (presumably plus 6.8% interest). But it's pretty nice to be ...

read more

My Storage Problem

Posted Sat 28 January 2012 19:07 under category tech

Storage is cheap, or so we're told. Amazon will sell me storage for $0.055/GB/month in “the cloud”; 3.5" hard drives are hovering around $0.06/GB. However, my laptop has a little 250GB SATA drive that is (a) slow and (b) getting full. So I desire to replace it with a fast little SSD. But that raises the question of what to do with my stuff. I'm asking you, Internet. Details below the fold.

read more

60,000 scrobbles

Posted Fri 06 January 2012 11:02 under category personal

I used to post these on Facebook as Notes, but since the Timeline refactor, I frankly have no idea how to use Notes; so I guess I'll just post on my own blog. I use last.fm (me) to track my music-listening habits (and sometimes for other things). As of some time recently, I've passed 60,000 scrobbled plays since 2006. Yay!


Here's a graph I made (click for ps version; gnuplot continues to be the best thing ever):


Cheers, all.

read more

Merry 2012

Posted Tue 03 January 2012 10:32 under category personal

I know I'm a bit late to the party, but Merry 2012. As a sort of celebration, here's my favorite animated GIF of all time (courtesy of Evan a long time ago):

a horse

Maybe I'll actually write some useful content this year.

read more