<3 sed

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

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)

Debt Free Since 2012

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 free...

This is going to be the worst post ever for attracting spam-bots, isn't it?

My Storage Problem

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

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!

me

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

scrobbles

Cheers, all.

Merry 2012

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.

Kindle vs. Kindle

Kindle 4

So, you might have heard about Amazon's new Kindles. They're kind of a big thing. There's even talk that Jeff Bezos is the New Steve Jobs, which is kind of silly, but serves to underscore the point that Amazon is big news these days. Anyway, you might also remember from an earlier post of mine that I have a Kindle 2. Well, when I saw the new Kindles, I couldn't resist. So now I also have a Kindle 4 (non-touch). It's pretty awesome. Let's start with some sexy comparison shots (flickr set):

Kindle vs Kindle

The most stunning thing about the new Kindle is, without a doubt, its size. My old Kindle 2 is 290g, my new Kindle is 160g. That's a very noticeable difference. I imagine that most of the weight savings comes from losing the useless keyboard. Which is, in turn, possible because the screen refresh is approximately 90,000 times faster. In my scientific opinion.

Aside from those hardware differences? It's still a Kindle. The software is the Kindle software (and now I know one of the guys who wrote it, so I have somebody to blame for java.lang.Integer errors), which is cool. There are some little tweaks, like the option to decrease inter-line spacing, but it's the same e-reader software that I know and love. I've gotten two and a half years of great use out of my Kindle 2, from reading the Times every morning on the subway from the 116th St. station to the 14th St. station in 2009 through reading the Times every morning while I ponder the San Francisco fog in 2011. Books are awesome, and eBooks are eAwesome. For $109 (without ads), how can you say no?

What about the other new Kindles, the Kindle Touch and Kindle Fire? Well, I think the Touch is pretty ridiculous. I've never had an urge to touch my Kindle's screen to change the page. Why would I pay $30 more for the privilege of touching the screen (and also the "privilege" of 50g extra mass)? And the Kindle Fire is cool hardware for an amazing price, but scary software. All the bad things I've said recently about Chrome breaking the internet (with 60-second socket timeouts and speculative prefetching) are nothing compared to the mess that is Amazon Silk. But that's all a post that can wait until the products are actually released next month. I have an iPad and a TouchPad, so I don't think I'm in dire need of any new tablet computers for a little while.

Now, if you'll excuse me, I think I should go read a book or something.

TouchPad!

TouchPad

So, I got one of the Internet-legendary $99 TouchPads (well, $149 actually, but whatever). As some of you may know, I was an enormous Palm fanboy during the 90's. So it was pretty inevitable that I would end up purchasing one of their WebOS products, even though there's not a lot in common between this and Jeff Hawkins' wooden cutout Palm Pilot. Anyhow, this is probably going to be the nerdiest review of the TouchPad posted on the Internet. It mostly is concerned with keyboard mappings. Enjoy!

read more

Rawr, Lion

Mac OS X Lion If you've read any kind of tech news in the last few days, you might've noticed that Mac OS X 10.7 Lion is out. I wasn't going to upgrade for a while, but then it launched and I did. So I've been using Lion for a few days now, and I thought I'd join the endless ranks of people on the Internet talking about Apple's latest big cat. I'm not really going to be much competition for the real tech writers, so if you want to learn nearly everything about Lion, I recommend making a pot of tea and sitting down to John Siracusa's latest tome. Otherwise, read on to see what I think of the new features.

read more

n+1 years

One year ago tomorrow, I graduated from college. As my younger friends graduated today (thanks for the quasi-livestream, Skye), I actually realized this fact: it's been a year. A year as one of the dead. A year in the real world. It's bloody strange. On some level, it's unbelievable that I've been out for a whole year. Graduation was just a couple of weeks ago, wasn't it? I can still remember lectures good and bad, evenings in the muddhole, nights working in Platt, as though it were all just yesterday. On another level, though, it almost feels like I've been out forever. I have a life, and it fits me sort of like a glove. I sit in my apartment and I feel like I'm home, and I really don't know when that started. I can remember the details of life in college, but it no longer feels like I'm on a particularly protracted vacation.

Looking back with an iota of distance, Mudd was a really transformative place. I can look back on things I wrote a few years ago (hello first post), and it seems really weird. Mudd is a place that tears you down and builds you up in a shape that it finds amusing. Five years ago, about to graduate from high school, I wouldn't've been able to imagine pulling an academic all-nighter. Nor would I be able to understand the camaraderie of a research team, the bond of dorm-mates, or, well, you get the idea. By the time I crossed the stage last year, it would've been strange to me to go to bed on the same day I woke up.

And now? Things certainly have changed in the last year. Some for better, some for worse. I still have a lot of friends, which is nice. Some of them are even people who didn't go to Mudd with me. But gods know that nothing compares to having everybody you know or want to know living within a few hundred yards of you. Now I have roughly as much money as I could reasonably spend, which I suppose is a good thing. No more problem sets, which is both a blessing and a curse. Yes, I still have that dream sometimes where I'm in the exam for a class and I realize that I've never done any of the homework or the reading, and have no idea what the material is about. I know, it's clichéd.

My gods, dear reader, books! Mudd spent four years drilling into my head that books are those dense and mysterious things that you've got to read until you can't read any more just to keep on top of your classes. I've been working hard to get past that — nearly up to 100 books read since graduation, most of which are so light and irrelevant that you couldn't teach a class with them if you tried. That's a pretty wonderful part of the real world.

Looking out from the top of my building

Then, of course, there's the specifics of my situation. Working at Yelp is pretty good. It certainly has its moments of fun. And it provides me with plenty to do, although when I try to work sane hours, everybody says I'm working too much and should go home. Which is not necessarily wrong, but still rankles a bit. Living alone in the city, that's a more nuanced thing. I love my apartment, and my neighborhood is pretty cool, but there's no getting around the fact that it's pretty weird to live by yourself in the real world. You have to remember to vacuum. And no matter how delicious the food you cook is, there's always dishes afterward. And you have to work a bit to keep the antisocial factor from turning you into a caricature of yourself. On the other hand, there are no other people to bother you. Nobody complains if you play bad music, sleep weird hours, or let the windowsills get dusty. My view (right) certainly is a lot different than my view a few years ago.

The last year has had a lot of crazy things happen in it. It's also had a lot of perfectly humdrum things. It's life. Normal, plain, vanilla life. Who'd've thought?

This isn't a blog post that has a conclusion or a point. It isn't a guide or a manual. It's just an expression of how profoundly strange it is to be an adult, one year in.

Good night, reader.