Best Things This Year (2013)

Anecdotally, it seems like a lot of people shook up their lives in 2013. I certainly did. Here are the best things that happened to me in 2013.

1. RJMetrics – In March I started working at RJMetrics, an e-commerce data analytics firm in center city Philadelphia. Leaving Garvey Corp was a difficult decision, but being a developer at of the best SaaS data visualization companies in the world has been amazing.

RJMetrics
RJMetrics

2. The Bulldog Budget – I worked with Philadelphia City Controller candidate Brett Mandel to implement his vision for the city’s open data future. We built a visualization tool using D3 and MySQL that gives both a high level view of the General Fund budget, but still allows you to drill down to individual transactions. A lot of people got excited about it and I think it made an impact in Philadelphia. It also influenced similar projects in Italy and Oakland, California.

Treemap of the Philadelphia General Budget
Treemap of the Philadelphia General Budget

3. Coffeescript – I was skeptical at first whether Coffeescript was a worthwhile abstraction from Javascript. After 9 months of using it at RJMetrics, I’m a fan. Here’s why:

  • Cleaner syntax: No parenthesis, braces, or semi colons. The time I save writing console.log instead of console.log(); has been worth the switch.
  • Improved workflow: Continuously running the Coffeescript to Javascript compiler alerts me of stupid mistakes (ie. ones that won’t even compile) faster than finding them after I’ve loaded the browser.
  • Existential operator: I can’t count the number of bugs I’ve fixed with one character are due to Coffeescript’s great ? operator, which checks to see if it’s null or undefined before proceeding. For example, if in javascript you previously did this:

    if (player != null) {
    player.levelUp();
    }

    In Coffeescript you just write:

    player?.levelUp()

  • Comprehensions: The Coffescript.org docs say you almost never have to write a multiline for loop and they can be replaced by comprehensions. For example:

    for (player in players) {
    if (player.health < 0) { player.kill(); } }

    In Coffeescript you can write:

    player.kill() for player in players when player.health < 0
  • I'm looking forward to getting better at Coffeescript in 2014.

4. AngularJS - I don't want to develop another interactive UI without AngularJS.

5. Bought this swingset from craigslist - With the help of my friend Mike and my father in law, we disassembled, packed it up and a U Haul, and reassembled it in my back yard. I'm amazed it went back together so well.

swingset
swingset

6. Read 13 Books - My morning commute afforded me more reading time. Here's what I did with it.

  • Bonfire of the Vanities by Tom Wolfe
  • Ready Player One by Ernest Cline
  • Look at the Birdie by Kurt Vonnegut
  • The Trial by Franz Kafka
  • A Beautiful Mind by Sylvia Nassar
  • Boys from Brazil by Ira Levin
  • Game of Thones (books 1-3) by George RR Martin
  • Life of Pi by Yann Martel
  • Timequake by Kurt Vonnegut
  • How to Win Friends and Influence People by Dale Carnegie
  • Thinking Fast and Slow by Daniel Kahneman

7. Public Speaking - I got way out of my comfort zone this year and did some public speaking at Ignite Philly and Technically Philly's Civic Hacking Demo Night.

8. Built the Gonginator

9. Spark Program - Some coworkers and I participated in an apprenticeship program for Philadelphia school kids where we spent 2 hours a week with 8th graders interested in programming and computers. Together we built a game!

That's as much as I could remember from 2013. Check out my lists from 2012 and 2011.

Creating a comma separated list

For years, whenever I have to create a comma separated list from an array I have been writing code that looks vaguely like this.

$first = true;
foreach($arr as $m) {

if ($first) {
$first = false;
}
else {
echo ",";
}
echo $m;
}

I’ve had it. There has to be a cleaner way than using $first to skip the comma on the first value. What am I doing wrong?

Rob Kolstad is an Asshole

This month’s Wired has a great article (not online yet, so no link) by Jason Fagone about the International Olympiad in Informatics where high school students from all over the world compete to solve problems through software. It’s fiercely competitive and has its own sub culture of super stars, namely Gennady Korotkevich of Belarus, who at 14 became the youngest world champion.

What should have been an inspiring and interesting look into this academic sport with open ended problems such as how to best determine the language of a given text string, went sour for me when Fagone brought up US coach, Rob Kolstad, who admits he doesn’t “know how to do most of the algorithms.” After Korotkevich won his second straight Olympiad at 15, Kolstad remarked, “the question is, will he die a virgin?

I expect smartasses with no respect for the brilliance of these kids to say something like that, but not someone who works with them every day and helps them train. He’s not someone I want to represent the US either.

Rob Kolstad
US Coach Rob Kolstad, who clearly does very well with the ladies.

Sorry, it just made me angry.

Could Twitter Have Worked in 1999?

For many years the Internet has brought us ideas and services that we wish we had thought of first. ?Most technologists wish they could go back in time and hit big with online auctions, classifieds, blogging software, and social networking. ?Microblogging (ie. Twitter) is the latest and greatest of these facepalming ideas because it’s so damn simple.

twitter-status6

But would Twitter have worked ten years ago?

The two components to this question are the technical feasibility and user feasibility. ?Were the computers fast enough for a worldwide application handling millions of messages per day in real time? ?Were people ready for a public, messy communication tool?

Technology:
Did we have the technology for Twitter in 1999? ?The fail whales of the past few years indicate we may not have had equipment and system software powerful enough for a monster like Twitter. ?Were there any applications of that size in 1999?

To me, the only comparable 20th century, many-to-many application was eBay. ?The web and the Internet ?itself were enormous systems handling many-to-many relationships, but its architecture was distributed world wide to share the load.

Users:
What did the Internet look like? ?Google had just arrived, Internet Explorer had achieved dominant market share, eBay seemed like the best Internet business, blogs were in their infancy, message boards and usenet were extremely popular, and mainstream communication was dominated by email and instant messaging. ?So much time and effort went into making sure messaging was private and secure, I think it would have been a big stretch to think people would have been ok with mostly public messaging. ?In fact, I think the only way public messaging could have caught on was through the emergent behavior we saw on friendster?testimonials?and myspace wall posts, which were the precursors to twitter. ? Message boards were obviously public in 1999, but we hadn’t yet grown tired of the trolls, spammers, flamers, creationists, and over-reacting moderators. ?For many of us Twitter reclaimed that energy and spirit the web had before these problems got unbearable.

This is what my site looked like in 1999.  Ouch.
This is what my site looked like in 1999. Ouch.

So in my opinion, we may or may not have been technically ready for Twitter, but the users definitely weren’t ready. ?We needed to be shown over and over again that email, chat, ?and message boards all kind of sucked once they got to a certain size. ?Twitter made it truly mass communication?usable?again and it works despite its negatives, but only because we know the alternatives are worse.

Follow me on twitter: ?http://twitter.com/bengarvey

iTunes Genius

I finally got around to downloading the latest version of iTunes and with it came their new Genius playlist feature. Here’s how it works:

You pick a song in your library you like, hit the Genius button, and it generates a playlist from your library of 25 complimentary songs. I was skeptical, but tried it out. It first parses through your whole library and uploads that data to a central server somewhere (let’s call it Mother Brain) and cross references with thousands of other people’s libraries and musical tastes. So can Genius generate the awesomest mixtape ever from just one song? Will John Cusack and Jack Black use this feature as evidence of an impending apocalypse in High Fidelity 2?

Maybe. Here’s how it did when I selected Neighborhood #2 (Laika) by Arcade Fire…

  1. Neighborhood #2 (Laika) by Arcade Fire
  2. Five Years – David Bowie
  3. Slow Hands – Interpol
  4. Last Goodbye – Jeff Buckley
  5. Lua – Bright Eyes
  6. The Skin of My Yellow Country Teeth – Clap Your Hands Say Yeah
  7. El Scorcho – Weezer
  8. We Are Nowhere and It’s Now – Bright Eyes
  9. Grace – Jeff Buckley
  10. Lover’s Spit – Broken Social Scene
  11. Caring is Creepy – The Shins
  12. Molly’s Chambers – Kings of Leon
  13. 12:51 – The Strokes
  14. Business Time – Flight of the Conchords
  15. Lazy Eye – Silversun Pickups
  16. I Summon You – Spoon
  17. My Moon My Man – Feist
  18. Vampire / Forest Fire – Arcade Fire
  19. Fake Palindromes – Andrew Bird
  20. Do You Realize? – The Flaming Lips
  21. Evil – Interpol
  22. Wolf Like Me – TV on the Radio
  23. Y Control – Yeah Yeah Yeahs
  24. Woman King – Iron & Wine
  25. In the Backseat – Arcade Fire

Not bad, but a little heavy on Bright Eyes. Let’s try another song: Coffee & TV – Blur

  1. Coffee & TV – Blur
  2. Every You Every Me – Placebo
  3. Alright – Supergrass
  4. Supersonic – Oasis
  5. The Charming Man – The Smiths
  6. Summer Babe – Pavement
  7. The Dark of the Matinee – Franz Ferdinand
  8. Lucky – Radiohead
  9. Monkey Gone to Heaven – Pixies
  10. Slow Hands – Interpol
  11. The New Pollution – Beck
  12. Here Comes Your Man – Pixes
  13. El Scorcho – Weezer
  14. She’s So High (Live) – Blur
  15. The Skin of My Yellow Country Teeth – Clap Your Hands Say Yeah
  16. Out of Time – Blur
  17. The W.A.N.D (The Will Always Negates Defeat) – The Flaming Lips
  18. No Cars Go – Arcade Fire
  19. Mistaken for Stranges – The National
  20. For Tomorrow – Blur
  21. You and Me Song – The Wannadies
  22. Tropicalia – Beck
  23. We Used to Vacation – Cold War Kids
  24. One Big Holiday – My Morning Jacket
  25. Molly’s Chambers – Kings of Leon.

The way I’ve been using it is to create the playlist and not look at what was selected, preferring to treat it like a robot radio station while I listen to it on my commute. What’s cool about it is that it will dig down and find stuff that you probably forgot about and never got a chance to rate (if you rate your songs at all).

New Computer on the Way

I ordered my new computer parts last night. Here are the specs!

Intel Core 2 Duo E6300 Conroe 1.86GHz LGA 775
Processor Model BX80557E6300 – Retail

PNY VCG7900SXPB GeForce 7900GS 256MB GDDR3 PCI Express x16 Video Card – Retail

MSI 945P Neo3-F LGA 775 Intel 945P ATX Intel Motherboard – Retail

WINTEC AMPO 2GB (2 x 1GB) 240-Pin DDR2 SDRAM DDR2 667 (PC2 5300) Dual Channel Kit Desktop Memory Model 3AMD2667-2G2K-R – Retail

Western Digital Caviar SE WD2500JS 250GB 7200 RPM SATA 3.0Gb/s Hard Drive – OEM

SAMSUNG 18X DVD?R DVD Burner With 12X DVD-RAM Write Black E-IDE/ATAPI Model SH-S182D/BEBE – OEM

Antec LifeStyle SONATA II Piano Black Steel ATX Mid Tower Computer Case 450Watt SmartPower 2.0 Power Supply – Retail

SAMSUNG 941BW Black 19″ 4 ms (GTG) DVI Widescreen LCD Monitor – Retail

I ordered my new computer parts last night. Here are the specs!

Intel Core 2 Duo E6300 Conroe 1.86GHz LGA 775
Processor Model BX80557E6300 – Retail

PNY VCG7900SXPB GeForce 7900GS 256MB GDDR3 PCI Express x16 Video Card – Retail

MSI 945P Neo3-F LGA 775 Intel 945P ATX Intel Motherboard – Retail

WINTEC AMPO 2GB (2 x 1GB) 240-Pin DDR2 SDRAM DDR2 667 (PC2 5300) Dual Channel Kit Desktop Memory Model 3AMD2667-2G2K-R – Retail

Western Digital Caviar SE WD2500JS 250GB 7200 RPM SATA 3.0Gb/s Hard Drive – OEM

SAMSUNG 18X DVD?R DVD Burner With 12X DVD-RAM Write Black E-IDE/ATAPI Model SH-S182D/BEBE – OEM

Antec LifeStyle SONATA II Piano Black Steel ATX Mid Tower Computer Case 450Watt SmartPower 2.0 Power Supply – Retail

SAMSUNG 941BW Black 19″ 4 ms (GTG) DVI Widescreen LCD Monitor – Retail