Life in Maryland
May 10th, 2009

I've now been living in Maryland and working at Discovery Creative for a whole month, so I think it's about time I started writing again! My first couple weeks I was here alone while Jessi finished things up in Boston I had little motivation to do much outside of work, so I found myself going in to work early and home (I was staying with my aunt and uncle who graciously offered me a place to stay at their home in Bethesda during the limbo time between moving out of the condo in Somerville and into the apartment in Silver Spring) late. That left me pretty exhausted at the end of the day so relaxing, eating, and sleeping were much higher on my to do list than writing. Since Jessi got down here my time outside work has been dedicated to unpacking boxes and transmitting what little I know of the area to her and her sister Becky who flew out to help with the move. Now, however, we're unpacked—if not completely then at least enough to be comfortable—with most of our furniture in place and awaiting delivery on the few remaining items that we've purchased. So time to start looking towards the future again.

My experience here thus far suggests that there's a lot of interesting work ahead. I've got a few Django projects already going on, including working with some new stuff like OpenID, OpenCalais, Clickpass, Twitter, and many other things. I'll probably be starting work on a project using Google App Engine in the near future, and I've already begun learning about and starting to work on iPhone apps as well. So I should have lots of good fodder for technical posts in the coming months!

On top of that there's a whole new city to explore, and nearly the entirety of my family spend time with. Before we knew we were going to be moving, Jessi and I had been planning on getting kayaks this summer so we could spend some time on the Charles and Mystic rivers, maybe the Harbor Islands, and hopefully take them up to the Adirondacks to explore the lakes up there. That plan certainly hasn't changed as now we've got the Potomac and other bodies of water to play with. Plus we're now so close to Shenandoah that it would be a crime not to get in some camping and backpacking. (And after the missed opportunity last winter, I'm definitely planning on some winter backpacking in the Senandoah back country this year!)

So with any luck I should be doing a lot of writing on a lot of different topics in the future. At the very least I need to do some work on this site as I want to integrate my portfolio into the personal site and phase out the business one. And working on this site always seems to give my something to write about.

Good news, everyone!
Mar 26th, 2009

If you follow me on Twitter or Facebook you'll likely have seen my big news: I have a new job! That's right, I've been hired on as a web developer for Discovery Communications (the parent company of the Discovery Channel). More specifically, I'll be working at Discovery Creative, the subset of Discovery Networks that works on things like web sites (duh) and advertising. It's a pretty awesome job, and I can't wait to get started.

But, true to form, the transition to this next stage in my life is not as simple as that. The job is not here in Boston, rather it's down in Silver Spring, Maryland (just outside the northern tip of DC). So just three short years after moving to Boston, we're moving to Maryland! This is a little less crazy than it might sound. Nearly all of my family is down there, within about 10 miles of Silver Spring. The next largest concentration of my family members (which consists of just my grandmother and an aunt) is in South Jersey, about a 3 hours drive away. Other than that, there's no single place in the coutry where I could live near more than a single blood relation of mine (although there are a number of other places we could go to be overrun with members of Jessi's much larger family). On top of that, Jessi's sister and her daughter (our niece) are moving to Virginia this summer, about an hour away, and my sister is going to be in DC for at least the summer after her graduation in May. Strangely enough, DC actually seems to make a lot more sense for us logistically. The only real complication is what to do with our condo. Fortunately it's about four blocks away from Harvard Law School, basically on the campus of Lesley University, and within walking distance of Tufts University. So we're pretty confident that we'll be able to get it rented pretty quickly, and after some consulting on our mortgage (Best thing about the current economy? We can refinance and knock a good 2% off our interest rate!) it seems as though it should work out pretty well financially too.

So yet again this blog will turn into the chronical of a move. A much shorter move than last time (thankfully; as much as I enjoy driving cross-country, I really am not in the mood to do it again right now), but one that will, I think, prove quite interesting.

Oh, and the best thing about this new job? They have a dinosaur in the lobby!

How cool is that?

[Edit: Corrected a mistake. The parent company of the Discovery Channel is Discovery Communications, not Discovery Networks! Thanks Matt!]

Hours of Operation
Dec 16th, 2008

As you probably know, I've been working on a Django-based re-build of BostonChefs.com (the new version of which is actually live now, but due to DNS propagation issues isn't yet available to 100% of people which is why I haven't yet written a post about it). Among other things, BostonChefs.com provides information on some of the fantastic restaurants in the Boston area. One piece of information it provides is the hours of operation of those restaurants. In order to store this information I created a model called HoursOfOperation. It looks like this:

class HoursOfOperation(models.Model):
DAY_CHOICES = (
('0', 'Sun'),
('1', 'Mon'),
('2', 'Tue'),
('3', 'Wed'),
('4', 'Thur'),
('5', 'Fri'),
('6', 'Sat'),
)
restaurant = models.ForeignKey("Restaurant")
meal_period = models.ForeignKey("MealPeriod")
day = models.CharField(max_length=3, choices=DAY_CHOICES)
open_time = models.TimeField(default=datetime.datetime.now)
close_time = models.TimeField(default=datetime.datetime.now)

def _get_hours(self):
return "%s - %s" % (self.open_time.strftime('%I:%M%p'), self.close_time.strftime('%I:%M %p'))
hours = property(_get_hours)

As you can see, each 'hour' is related to a restaurant and a meal period, which allows us to display the information in a manner similar to that you might find on a store's front sign. For example, if you go to the Grill 23 & Bar page (my personal favorite restaurant in Boston, although Craigie on Main is a decent challenger), you'll see something like this:

DINNER
* Sun: 5:30 p.m.-10 p.m.
* Mon-Thur: 5:30 p.m.-10:30 p.m.
* Fri: 5:30 p.m.-11 p.m.
* Sat: 5 p.m.-11 p.m.

Building a list like that out of the above model proved slightly more difficult that I might have hoped. It required quite a lot of template logic, including writing a custom filter. The block of template code necessary to generate that list looks like this:

<div class="hours">
{% regroup restaurant.hoursofoperation_set.all by meal_period as periods %}
{% for period in periods %}
<div class="hoursMealPeriod">{{ period.grouper }}</div>
{% regroup period.list by hours as hour_list %}
<ul>
{% for hour in hour_list %}
<li>{{ hour.list|collapsedays }}</li>
{% endfor %}
</ul>
{% endfor %}
</div>

As you can see, somewhat complex. Those nested {% regroup %}s can be nasty to wrap your head around, if nothing else. But basically it's taking the set of HoursOfOperation objects related to the restaurant, grouping them by meal period, then taking the subset of those objects for each meal period, and grouping those by the hours of the day they represent. So what you're then left with is a list of all the different time periods (still represented as HoursOfOperation objects) that the restaurant is open for a given meal period, and the days on which it is open during those hours. As you can see above, the days are represented by number of the day of the week (0 for Sunday through 6 for Saturday).

Converting that list integers into something like 'Mon, Wed-Fri' was not very easy, and certainly not something I wanted to try to tackle using Django's template tags. I ended up drawing heavily on my hazy memories of CS 127 (many thanks to Dave who taught me all about recursion way back then) and creating a filter that considers the list of HoursOfOperation objects as a list of those integers, then recursively converts it into a list of lists representing the subsets of contiguous days in the list. So if you start out with [1, 3, 4, 5] you end up with [[1, 1], [3, 5]] which is then converted into 'Mon, Wed-Fri'. After several false starts I ended up with this beauty of a Django template filter:

from django.template import Library
from django.template.defaultfilters import time

from types import ListType

register = Library()

def simplify(index, found, days):
high = index+1
mid = index
low = index-1
if not found:
days[low] = [days[low], days[low]]
if high >= len(days):
if not isinstance(days[-1], ListType):
if days[-1] == days[-2][1]:
days.pop(-1)
else:
days[-1] = [days[-1], days[-1]]
return days
if int(days[high].day) - int(days[mid].day) == 1 and (found or int(days[mid].day) - int(days[low][0].day) == 1):
days[low][1] = days[high]
days.pop(mid)
high = high-1
found = True
else:
if found:
days.pop(mid)
found = False
return simplify(high, found, days)

@register.filter
def collapsedays(value):
hours = "%s-%s" % (time(value[0].open_time), time(value[0].close_time))
days = simplify(1, False, value)
for i in range(len(days)):
if days[i][0] == days[i][1]:
days[i] = days[i][0].get_day_display()
else:
days[i] = "%s-%s" % (days[i][0].get_day_display(),
days[i][1].get_day_display())
return "%s: %s" % (', '.join(days), hours)


Boston Restaurant Week
Jul 16th, 2008

As those in the Boston area are probably aware, this years Summer Restaurant Week is fast approaching. This year it will be two weeks, those of August 10 through August 15 and August 17 though August 22. If you've been reading my blog for a while you may know that one year ago, almost to the day (off by 5) I announced that I had helped work on BostonChefs.com's Unofficial Guide to Restaurant Week. Well, this year I'm announcing the same thing.

The site just went live with all the information you might want about what's going on with this Summer's Restaurant Week including the restaurants that are participating, what meals they'll be serving, what's on their menus (where available), and a Google Maps mashup to help you find them. The site has been completely redeveloped and is now powered by Django, making this my first Django-based project to go live! (Not counting my own website, of course.)

Go check it out, and bon appetit!

The intricate ballet of government beaurocracy
Jul 15th, 2008

I just got off the phone with the California DMV. That's right, the California DMV not the Massachusetts RMV that I've already spent countless hours waiting in line at or on the phone with.

As you may recall, I recently (and after many many failed attempts due entirely to problems on the RMV's end of things) converted my California driver licence to a Massachusetts one. In doing so, they managed to forget my motorcycle endorsement. Having put quite a lot of time, effort, and money into getting that endorsement in the first place I wasn't really all that interested in losing it for no good reason. After two relatively pleasant chats with a woman at the RMV they sent me the paperwork I needed and told me that all I had to do was take it into a branch office and they'd be able to take care of it.

So yesterday I went into the RMV branch at the Cambridgeside Galleria. They're open until 7, and I got there at about 5:30. After waiting in line for a scant 45 minutes I gave them my paperwork and explained what was going on. The woman behind the counter told me that, unfortunately, she'd have to call into the Boston branch office which had closed at 5 so I'd have to come back the next day (today) before 5 to take care of it. So today I went back in. I got there at two and spent maybe 10 minutes waiting in line. The same woman was there and she called the Boston office. They told her that before they could correct the mistake that they made, I would have to call the California DMV and request that they send a copy of my driving record over to them. Hence my call to the California DMV. Unfortunately, the woman I talked to at the California DMV told me that I'd have to submit a form and pay a $5 fee before they would send my driving record.

The form and check will, of course, have to be mailed in, so who knows how long this is going to take. What I want to know is exactly how much of my money is being wasted on this crap. Is this really what I'm paying taxes for? Is it really worth the effort for me to be a law abiding citizen when I could probably have a motorcycle with invalid but normal looking plates illegally in no more than a couple hours if I really wanted to?

A big new project goes live
Jun 18th, 2008


It's been a while since I've been able to announce a big new project. Not because I haven't had any, but because everything I've been working on lately has been so large that nothing is quite ready to go live yet. But finally, I get to announce a big project that I recently finished: the Becoming MOBOS video blog. As I'm sure many of you from the Boston area are aware, there is a new Mandarin Oriental that's been under construction down by the Pru. They hired me to create an internal video blog for them. Unfortunately, since it's internal, I can't link to it, but the screenshot to the right links to a full-size, albeit redacted, image. It's a WordPress based blog using a verstion of WPelements.com's MassiveNews theme customized by your truly. I also used FlowPlayer to provide the Flash video playback capabilities. All in all, I think it turned out to be a pretty slick site.

That's not the only news, however. In preparation for announcing the Becoming MOBOS site I've been doing a little work sprucing up my own website. So I also get to announce a new version of the dy/dx tech website (I also changed hosts for it, so you may need to wait for the DNS to propagate if you're still seeing the old site). The overall look of the site is the same as before, but I've removed some rather pointless elements such as the Google Map that used to be on the front page. In it's place is now a slideshow of screenshots from my portfolio, which I think is a much better use of the space. The majority of the changes, however, are under the hood. As you may recall, I redeveloped the site using Django a while ago. Since then I've spent a lot more time with Django and know a lot more about it, so I completely redeveloped the site (using the newforms-admin branch and was able to make a lot of improvements to the code, and basically leave it better positioned to integrate more features in the future. Among other things, I plan on migrating this blog to a Django-based solution and integrating it into the dy/dx tech website to some extent. I've been working heavily with Django for the past several months, and I just keep liking it more and more. It makes every part of my job so much more enjoyable and, in a lot of cases, faster. Be on the lookout for another project going live in the next couple weeks: this one will be Django-based and will be very public, and, I predict, very popular.

Last night at the Apple Store
May 15th, 2008

AppleSo as I mentioned, I was at the opening of the new Boston Apple Store on Boyleston St. last night. Unfortunately I was a little late showing up and didn't get my free t-shirt. :(

As I mentioned, it's an extremely nice location with some extremely cool design. The entire top floor (of three) is dedicated to support with a gigantic Genius Bar that is apparently able to support several thousand people per day, and a ton of iMacs lining the walls where you can get one on one help/tutoring (they call it their One-to-One program). Another cool new features they're rolling out (or possible already had and I just haven't been paying attention) is their personal shopping service. You can make an appointment to show up and have, essentially, a personal shopper to help you out with any questions or help you might need while shopping. Seems like a pretty cool idea, and I imagine it will be very useful for the parents who want to get their kid a new computer or something but really have no idea what they're looking for.

All in all, I think this store is going to be a huge success. Especially positioned, as it is, directly across the street from the Prudential Center and the soon-to-be-opened Mandarin Oriental hotel. It will definitely be a little more pleasant to visit than the Cambridgeside location, though parking won't be nearly as easy so you'll probably start seeing more people with big iMac boxes on the T...

And in closing, these people weren't on the guest list and therefore aren't as cool as me:
These people aren't as cool as me.

(Yes, both pictures in this post were taken with my iPhone.)

Apple Store Boyleston
May 14th, 2008

I'm currently at the grand opening event of Apple's new flagship retail store in Boston. I've only just gotten here, but so far I've hot to say that I'm impressed. It's something like a cross between the 5th Ave. location in New York and the Miracle Mile location in Chicago. In short: three stories of beautiful, glassy architecture with a huge skylight topping it off and the iconic white Apple logo overlooking the Pru. Also, they're giving me free beer and appetizers, so far so good. I'll write more about itlater, for now I'll just enjoy it, and play with the toys.

And another thing
May 1st, 2008

Why is everything that disrupts parking labelled an 'emergency' around here? When it snows enough to disrupt parking it's a 'snow emergency'. When they're forbidding parking so that they can paint lines on the street it's an 'emergency'. Last night we walked into Porter Square for dinner and passed no fewer than two different 'emergencies': 'Emergency! We're painting lines on the street! Please file calmly, but quickly to the nearest exit!', 'Emergency! We've torn up the sidewalk! Please ...walk around it!'.

Seriously, people, these are not emergencies... Ok, there's a vague case for the 'snow emergency', but there is absolutely no excuse for labeling an event that has been planned for weeks if not months as an emergency.

Some braindead planning by the city of Somerville
Apr 29th, 2008

So, currently there are signs up and down both sides of Somerville Ave. saying that there's no parking on those streets due to an 'emergency'. Well, that's all you can read of the signs as you drive around looking for parking due to the fact that everyone who usually parks on Somerville Ave. is now parked elsewhere, anyway. If, however, you take a closer look at those signs, they say that there's no parking there on 4/30 and 5/1 from 7:30 pm until 6:00 am or so because they're painting bike lanes.

Painting bike lanes? Bike lanes are great and all, and I wish there were more of them in general. But this is just an absolutely moronic way to go about it. The most obvious reason that it's a completely moronic thing to do is that Somerville Ave. is currently being re-paved. For the past, I don't know, 6 months or so, they've been very very very slowly working their way from Union Sq. towards Porter Sq. tearing up the roads and repaving them. Now this is definitely an essential thing for them to be doing as the state of Somerville Ave. is, in a word, abysmal. So, in general I heartily approve of both these measures.

The problem is that they're doing it in the wrong order. Unless they're planning on not fixing up all of Somerville Ave., which seems somewhat ridiculous since they're already investing time and money in the project and disrupting just about everyone's lives for it now, or they're planning on somehow, miraculously finishing the rest of Somerville Ave. tonight and tomorrow, they're just wasting a bunch of money here. They're going to spend the next two days painting bike lanes on the street only to tear it up and re-pave it in another month or so (if we're lucky).

This just strikes me as a tremendous waste of money. Also, it seems kind of odd for them to be painting bike lanes on a street that doesn't really have car lanes painted on it. I guess we're not really far enough away from Boston to escape the sphere of city planning moronicism.

As promised
Oct 26th, 2007

...my account of Blogtoberfest 2007.

As expected it was a lot of fun. There were a ton of people there, far too many to be able to actually have any sort of real conversation with even most of them. In addition to our illustrious host Jenny, I was able to meet a number of area bloggers for the first time including: Dana Zemack, Michael Krigsman, Jesse Baer, Andrea Mercado, and a few others whose names and/or URLs I sadly can't remember. All in all, there were actually only three bloggers that whom I had met before: Jesse Legg, Steve Garfield, and Adam Gaffin. From the sound of things most of the people there were meeting a bunch of new people as well.

The highlight of the evening was probably the raffle. Everyone who attended put their name in a hat (well, bowl) for a chance to win a number of prizes including a beautiful print of Fenway Park shot by Jenny herself. As per usual, I didn't win a thing, although both of the two people standing to my left at the time won things, as did at least two other people I had been talking to throughout the night. I'll just try and claim credit for that.

Afterwards Jesse (Legg) and I made our ways back to Somerville via TC's Lounge and the Newtowne Grill. A good night, I think, was had by all.

In other news, I think it's safe to say that it's officially starting to get almost kinda cold here. It looks like Monday will be the first day that the temperature doesn't even break 50°, although overnight temperatures appear to be remaining strictly above freezing for the foreseeable future (at least according to the weather widget in my dashboard). I did, however, actually turn on the heat today for the first time in months. The furnace hasn't actually kicked in yet as the residual heat from the day is still keeping us above the 65° I set the thermostat to, but it probably will within the next 30 minutes or so. I also bothered to take the time to figure out how to program a schedule into the thermostat. It's a much more useful feature than I thought, letting me program in 4 distinct periods for weekdays (delineated by Sleep, Wake, Leave, and Return), and 2 periods for weekends (Sleep and Wake). This actually works out rather well since despite the fact that I work from home and so will want the heat to be on during the day, I prefer a much cooler temperature than Jessi does. Thanks to the programmed in schedule the condo will only be too warm before Jessi leaves for work in the morning and after she gets home at night leaving it nice and comfortable for me during the bulk of the day.

Blogtoberfest
Oct 25th, 2007

Well, I'm off to the Pour House for Blogtoberfest 2007. It'll be a great chance to meet some more of my fellow area bloggers, as well as catch up with the ones I've met before. Expect a post summarizing the night ...assuming anything interesting happens.

Soccer? In Somerville?
Aug 10th, 2007

According to The Somerville News, Somerville is being considered as a site for a new soccer stadium. This stadium would become home turf for the New England Revolution. At the moment, I have mixed feelings about this.

There would certainly be advantages to having a sport stadium in Somerville. For one, having it would bring a lot of attention and money to the city. Just the fact that we're being considered for the stadium I'm sure will help raise people's awareness of Somerville which, in turn, will probably bring some increased investment in the city. Not to mention the tax revenues on everything that's sold at a stadium, parking, and incidentals bought by fans while they're here. And certainly Somerville has a large soccer fan base. There's even a grocery store called 'Gol!!!' on Somerville Ave., not too far from our condo. Obviously a sports stadium can be a big money maker for the city.

But there are also negatives to this. First and foremost, we're basically in Boston here, and Boston sports fans are ...an interesting bunch. I don't know how much overlap there is between Revolution fans and Sox fans, but just ask anyone who lives in Kenmore Sq. how they like their neighborhood on game nights. I sure wouldn't want to see the same thing happen to whatever neighborhood in Somerville gets the stadium when the Revolution has a home game (and I'm sure the people who live there have even stronger feelings about it). There's also the question of where the funding is going to come from. A whole lot of professional sports stadiums are subsidized by the cities they're in, and I really don't have any desire to pay more taxes just so that we can have a soccer stadium. Then there's the issue of space. Somerville isn't that large of a city, and unless they're going to pave over some park land, building this thing will require demolishing some existing houses and/or businesses. This isn't necessarily a bad thing, but what if the people in the proposed spot don't want to leave? Will the stadium simply go away, or will eminent domain be exercised to force them out? And what about traffic? I don't think there's a single city in Massachusetts with well designed roads. Can we handle the influx of traffic that a stadium will bring? Or is Somerville going to have to basically shut down the roads to everyone but fans on game nights like certain areas of Boston?

So, like I said, I have mixed feelings on this. My general inclination is that that bad would outweigh the good, but I don't really know enough about the issues to make any sort of real determination. Seems like it would be a good topic for a municipal referendum, if such a thing is possible.

4th time's NOT the charm
Jul 11th, 2007

Today was supposed to be a nice, lazy, relaxing day. The Restaurant Week Project is finished, and I've got nothing pressing to do. So I decided to take my new bike (Oh yeah, last weekend I bought a bike off Craigslist. $25 for an old Schwinn hybrid in pretty good shape.) for a ride and get some things accomplished.

First things first, I decided I'd go back to the RMV to try again to get my California license converted to a Massachusetts one. So I got on my bike and headed towards Boston. I got all the way to the Boston Common before I ran into my first problem: a nut on my rear wheel had come loose and my wheel got pulled out of position so that it was rubbing up against the fork. I had foolishly not brought any tools with me, so I just locked it up and went the last few blocks on foot. I got to the RMV and got in line with 51 people ahead of me. One hour and 30 people later, I figured I was finally going to be getting my license. Then, all of a sudden, things slowed down. Up until that point they had been calling a new person every couple minutes.

Then for a long time nothing happened.

Then, as before, in a flash of smoke and brimstone an RMV employee appeared and announced to us all that the Social Security computers were down. AGAIN!!!

This is now the fourth time I've been to the RMV to try and convert my license and failed. It's the second time that my trip was a failure thanks to a crappy Social Security computer system. Had I previously had any faith in the state of the RMV, the Massachusetts state government, or bureaucracy in general, it would now be lost. Having never had such a thing, I'm simply wallowing in despondency and despair at the thought of having to try yet again.

So I left the RMV thwarted yet again and contemplating the issues involved in getting my immobilized bike home. Fortunately, I was able to borrow some pliers from a friendly bus driver and get my rear wheel mostly straight and my bike ridable again. So I continued along my planned route to the Copley Square branch of the Boston Public Library where I checked out a copy of Charles Stross' Accelerando, then bike back home via Storrow Drive and the Harvard footbridge.

All told, my main accomplishment of the day—which was supposed to be getting my Massachusetts license—turned out to be the fairly pedestrian achievement of biking ~12 miles. It is, at least, a very nice day for a bike ride.

Boston's Restaurant Week
Jul 11th, 2007

Most of you probably know about Boston's Restaurant Week. For those that don't, it's a week (or more) that happens twice a year during which participating Boston area restaurants offer meals from a prix fixe menu at very low prices. For example, Excelsior will be offering a three-course meal for $33.07 (I might just have to give that a try).

What you probably didn't know is that there's a fantastic website at restaurantweekboston.com (offered by bostonchefs.com) that will show you all the participating restaurants, the details of their participation, the prix fixe menus that they are offering, and a Google maps mashup to help you locate and get to those restaurants.

I helped create it, so you should go use it to help justify my services. ;)