hortont · blog · code

(Walking) Trips

2012.03.31 in code and personal

Having lots of time to think about the web and little time to create content, I took a few minutes out of this weekend to make a silly little thing with d3.js.

Not being a driver, I find myself walking around a lot - to work, to visit people, to find food. Some of those walks are longer than others, and I thought it would be neat to be able to visualize and compare them!

I built trips.hortont.com to do that. The map on the right is a little confusing, because it is four cities, superimposed, with my "home" in each centered in the same place (using our 15th St. apartment for "home" in Troy, since I had three). Lots of things respond to hover, and clicking the different sorting options provides a few different ways to look at the trips (and adds a splash of color!).

The most interesting thing that sticks out of the data (to me!) is the relative shapes of the four cities. Cupertino and La Jolla are way younger than Troy and Colchester, and are clearly more "designed"; La Jolla with swooping curves all around, and Cupertino with a strict grid (except around IL, of course).

Milkyway@Home for iOS

2011.04.01 in code

Just in time for the end of the semester, Milkyway@Home, Matt's distributed computing project, has been ported to run on iOS, complete with the ability to download tasks from the Internet and submit results back to the project.

You can now contribute to humanity's understanding of the universe — on the go!

Visit the forum post if you want to install it on your (jailbroken) iOS 4.0+ device.

Games, Notebook, And Other Random Stuff

2011.03.05 in code, personal, and school

It's been quite a while since I've written here! While I'm only taking 12 credits this semester, it seems like one of the busier semesters I've had, at least so far... random assorted notes, in no particular order:

  • I got a job! I'll be joining Apple's WebKit team in June. I'm extremely excited; however, in order to keep this website separate from work, this is the first and last time I'll mention this fact.
  • I'm visiting Silicon Valley during spring break to find an apartment, along with Mom!
  • Carol got a job! She'll be hanging out in Rochester, at Harris Corporation!
  • I dropped Cryptography/Network Security, because it was unnecessary and was threatening to be the class that I ignore this semester in favor of the more demanding ones.
  • Notebook has a few new features: indent/unindent region, and a reasonable API for providing access to an engine's globals. Progress is much slower than it was over winter break, because I have to spend so much time on other things...
  • There are videos on YouTube of my first and second Experimental Game Design games.
  • I'm spending a lot of time on Experimental Game Design; this always seems to happen with Arts/Communications classes when I take them! This time around, it's because I've committed to being the sole programmer on a really complicated multiplayer game, which puts me a bit out of my element. But I'm making the most of it (even if that involves spending a lot of time on MSDN...)
  • If EGD takes a lot of time, IT & Society takes up just as much — there's constantly writing, editing, formatting, or meetings.
  • Amy and I are going to see Donald Glover (Community's Troy Barnes) do standup and stuff at the Bowery Ballroom in NYC (the same place Carol and I went to see She & Him a while back!)
  • We're (probably) relicensing Seed under LGPLv2+ so that webkit-gtk can use parts of it. What kind of coincidence is that??

Notebook 0.1.0 (and 0.1.1)

2011.02.03 in code

I just pushed out the first two releases of Notebook! The second release was rushed out after the first to fix a few silly bugs that never should have made it into the first one (basically, the same reason most releases of any software are made...)

It's still in an incredibly alpha state, but you're welcome to download it and report some issues.

I hacked up a silly icon so that it doesn't look so dumb in the dock; it's supposed to be a cell, split in half: input and output. Now you see it, now you don't! In case you don't use OS X, it's the seventh icon from the left. I'm not much of an icon designer, obviously, so I went for the flat three-color approach instead of the awesome photorealistic style that Apple and co. use (which I can't even begin to replicate).

I'm working on Notebook for credit this semester through RCOS; many thanks to Moorthy and Sean O'Sullivan for making this program possible; if you're not aware of RCOS, I wrote a little bit about it a little over a year ago.

Introducing Notebook

2011.01.12 in code

Since mid-November, I've been using my free time to work on a little application currently called Notebook. It's a REPL of sorts, but implemented in Cocoa, and heavily inspired by Mathematica (since Mathematica also calls its evaluation environment a 'notebook', I'm open to suggestions for a new name, and probably won't be shipping it with the current one).

I pushed up a content-free website last night... it'll get filled in eventually. The code is on Github.

Notebook has a pluggable language system; for right now, I'm primarily maintaining a Python backend, though there is a working Ruby backend in the repository as well. Matt has talked about implementing a Haskell backend, which I think would be awesome, but hasn't gotten around to it yet.

The basic idea of Notebook is simple: you have a bunch of cells, all operating with the same global state, but you can evaluate them in whatever order you want, however many times. You can define a function in one, use it in another, assign a global variable in one, access it in another, etc.; you can go back and edit the definition of your function inline, exactly where you initially typed it.

When you evaluate a cell, its output is captured and attached directly to its bottom; when you re-evaluate a cell, the old output is replaced:

That's basically all there is to it, right now... I just wanted to get it out there. There are a huge number of features planned, and a huge number of known bugs, and many months of work to do before it's 1.0 — if anybody wants to help, feel free!

It is currently 100% not ready for anyone to use it; while it works, many basic features haven't even been considered yet, as it's been all about getting the backends working properly (which was a Distributed Objects learning experience, believe you me!). However, I hope that someday it can be the place that I point people who want to learn Python — the instant, inline feedback that it provides could be extremely useful (it was for me, with Mathematica, anyway!).

An Arduino Platformer

2010.10.12 in code

Over the long weekend, I wrote a very simple platformer for the Arduino platform, targeting a grid of 8x8 RGB LEDs as its display. It has ground of varying height, monsters to kill (or to have kill you), coins to collect, and pretty clouds, as well as the classic side-scrolling and jumping mechanics you'd expect. The controller is just three buttons on a small breadboard with long wires back to the board. It's obviously not very sophisticated, having only 64 pixels to display things with, but it was an entertaining "just because" project.

The code is open-source (though not very clean nor well-documented, as it was a rushed weekend project) under the 2-clause BSD license, as always, on my Github. The hardware is simply three momentary pushbuttons, an Arduino Diecimila, a handful of resistors, and one of Sparkfun's 8x8 RGB LED matrices — nothing special.

There's a (somewhat long) video that pretty much demonstrates the entirety of the game (unfortunately, it was captured with my phone, so you can somewhat see the LED refresh rate — though keep in mind that the blinking yellow coins are actually blinking):

Should work if you're not stuck on IE...

QChat from 30,000 feet

2010.08.21 in code, personal, and qualcomm

Ed.: the majority of this was written on the plane from San Diego to JFK, and then emailed to the QChat client dev list (plus a few extras)

Almost exactly three months ago, I boarded a plane from Burlington to San Diego, solo, entirely unsure of what lay ahead. I'd been to San Diego before — for a few hours — and I'd heard only good things about it from people who live in the area, but beyond that, nothing. I knew that I would be interning at Qualcomm, writing embedded software — that was about all I knew beforehand; I had yet to be introduced to QChat, and I certainly hadn't met anyone I would be working with.

My second day (the first was consumed with intern orientation activities, and discovering that I had to walk 2 miles to work and back every day) was filled with introductions to everyone, which, being as shy as I generally am, was expected to be as intimidating as could be. But as soon as they started, it was clear something was different here. From Ali, the first QChatter who I met, who toured me around and helped me get settled in, to Vikram, who I didn't meet until many weeks into my internship, as he was on vacation when I arrived, everyone was ridiculously friendly, approachable, and helpful.

I've worked with many teams of varying shapes, sizes, and purposes before (though less often in the real world), and the QChat client team is unquestionably the first to be this universally awesome. Throughout the whole summer, there was a complete lack of raised voices (except in laughter and jest), blame-laying (I think I was the worst offender there, because I wasn't totally used to the laid-back workflow yet), and argument — which made it extremely easy to quickly become comfortable with the group and the atmosphere and get to work.

I might have gotten too comfortable — after being here for three months, I felt so much like a part of the team that yesterday's departure was quite hard to bear. Unfortunately I didn't manage to find everyone (Shobha, Sachin, Sanket, and Vikram, at least, and Teja was still on vacation — so an extra goodbye and thank you to all of you) to say goodbye to, but if I'd hung around for much longer, there would have been a few tears, and we didn't need that.

I won't miss fighting with the ever so wonderful prototype handsets, nor cursing the engineer who thought that using the C escape character as their path separator was a good idea (or that you needed two characters to represent a newline — basically, I won't miss Windows), nor silly little things like timecards, but the list of things that I will miss is innumerable. The whole team, for starters — every single one of you. The spirit of QChat. The long walks in the San Diego sunshine into work every morning. The daily status meetings (you guys will think I'm crazy, but I was already missing these when they stopped halfway through — it was good to see everyone every day and get a handle on what was going on in the beginning of the day; I learned a lot about what we were doing just from listening to the chatter there, and I hope if you have another intern next summer, you'll do daily status at least for the first few weeks). I'll miss our little faraday cage, and the wonders of release days. So, so many things.

I think the moment it all really clicked for me was that one super long (4 AM) sanity day. I think it was my third or fourth release; hanging out with everyone just trying to finish up (through the USB hilarity that ensued that everyone who was there surely remembers); ordering Indian food (my first time!) and being introduced to that by the people who know it best (by the way, the countless anecdotes about home from everyone makes me feel almost obligated to visit India... someday!)

And then on the opposite end of that was Shilpa's goodbye lunch — the end of the team as I knew it for most of the summer, and the first realization that the summer really was coming to a close. It was certainly a bonding experience for me; a chance to hang out with a majority of the team and talk about anything but work. I think that was actually one of my favorite days of the summer, bittersweet though it was.

So... I don't know. Maybe I'll run in to some of you again; it seems incredibly unlikely that I'll run in to all of you again. If I end up back in San Diego, I'll be sure to look you guys up, and if any of you are ever in Albany, Burlington, or Boston, send me a note! You never know where I might be...

And who knows what might happen in May! I certainly don't...

Thanks for everything, and goodbye (for now), and good luck!


Coda Notes, Internote

2010.07.29 in code

Today, everyone's beloved Mac software house, Panic, launched something that seems SUPER familiar to me (anyone who was around me 5 years ago will know why):

Coda Notes!

In other news, Matthew Tuck is working on Internote 3! I think that's pretty awesome, considering how long it's been unmaintained. Try it out if you want, but whatever you do, don't ask me for help :-)


2010.05.18 in code

Since the semester's over, and I've got a week until work starts (I'm flying to San Diego on Saturday), I spent a little bit of time working on a tiny Cocoa program Nate had been writing:

It's a very simple program called AverageLapse, which takes a sequence of images (or, alternatively, a video that Quicktime can decode) and outputs the running average at each frame as a JPEG. It's also very parallelizable — I took this opportunity to play with libdispatch for the first time, which was neat!

For example, here's a frame from a timelapse (from OpenFootage):

This turns into the following video (if the HTML5 video below doesn't work in your browser, it's on YouTube too):

If you want to try it out and you're feeling experimental, check out the code from GitHub. Otherwise, I'll make a post with a 10.6-only binary later in the week.

P.S. Another interesting sample output video here.

My Once-in-a-Lifetime Bug

2010.05.08 in code

Two days ago, I received what ended up receiving an email which detailed what I believe to be the single most coincidental and epically ridiculous bug I will ever manage (I hope) to contribute to this world.

It turns out (as Mr. German-person so politely detailed) that the very simple random pattern generator that Robb and I implemented for Lights Off generates an "offensive" pattern at some point.

Now I won't go off on a tirade about how insane it is that someone can be offended by a 5x5 grid of lights, nor how it might actually be illegal to display said grid of lights in at least three countries, nor how the pattern that Lights Off was generating is actually completely different from the pattern that this person stated it was, and actually approximates an ancient symbol for peace (or good luck, or some such). Those are components of the human condition which mostly just serve to infuriate me, so I'll leave them alone.

What's important to note here is that the generation of the pattern is not the epic part of this bug. The fact that the level number which contained this pattern happens to also be a number often used as an identifying code within (despicable) groups of people who subscribe to the worldview symbolized by the "offensive" symbol... that is truly incredible.

That's also what made my fabulous new friend quite positive that I was one of those people.

Which I most certainly am not.

You can be assured he got an earful. Well... inbox-full.

I promise I was polite.


In any case, he replied with a very polite, very over-apologetic response, even retracting his request that the "bug" be fixed. I fixed it anyway, as a side-effect of applying a patch that someone else wrote to improve the level generation algorithm (and make it significantly more complex).

If you're really interested in being "offended" (and you have to promise me that you won't take it out on me, I promise it's all totally random — you can inspect the source if you want!), you can start up Lucid, install lights-off, and go to level 88 (this will be fixed in GNOME 2.32, which will be in Maverick). Or, click here.

It's just not reasonable.

See Older Posts