Ozric’s Hole to China Rewrite

A few weeks after I completed the first draft of my children’s book, Ozric’s Hole to China, I started a first-person version just to see how it would compare. I completed three chapters and actually liked the result quite a bit. It still needs work (I’m an amateur writer, so this pretty much goes without saying) but I think it’s an improvement over the original.

If you happen to have read OHTC, or at least the first few chapters, I’d love to hear what you think of this version. I added it to the main Ozric page, and here is a direct link: Ozric Rewrite Ch. 1-3

December 04 2014 | fun | No Comments »

If You Like Frosting, Go to Georgetown Cupcake on Monday

On a chilly Friday in March, my coworker, Bekah, wrapped up my team’s daily status meeting with our new ritual: she opened Georgetown Cupcake’s twitter feed for the secret flavor of the day. This cupcake would be given away, free, to the first 100 customers who ordered it by name. Running on just a cup of coffee, I waited to see if this could be a plausible snack to hold me over until lunch. “Chocolate Ganache Surpise,” Bekah read, as I shook my head and wandered back to my desk.

cupcakes

But wait, why was I turning down free cupcakes? Wouldn’t it be delicious? Well, yes, all of Georgetown’s offerings are superb, and they brew a solid cup of Illy coffee. During our early days of cupcake freeloading, I would have happily made the trip across the street. But by that point I had learned to skip ganache days.

Ganache

Ganache is a chocolate mixture that is typically used as a glaze or icing. It’s rich and delicious, and perfectly complements cupcake flavors such as strawberry and banana. The problem is that Georgetown uses ganache as a substitute for frosting, and when you are checking free cupcake flavors five days a week, you hold out for frosting.

Ok, we may not be quite the cupcake snobs I make us out to be, but you just can’t take a free cupcake every day of the week (for several reasons). There has to be a filter, and it’s not that the ganache icing is bad, it’s that the frosting is really really good.

It was so good, in fact, that we began viewing things in binary: frosting or ganache. It got to the point where it almost didn’t matter what the flavor was; if it had frosting, we were a go. You’d think that would have brought us to Georgetown pretty often, but, even though ganache flavors made up only a small fraction of the overall menu, they showed up as free flavors more than half the time. And we paid attention. In fact, we started to notice a pattern. For some reason, Mondays seemed to be a good day, with a high chance of frosting, while Thursdays were almost a sure bet to have ganache. This started as a hunch, a casual conversation piece, but I needed to gather some data.

Cupcake Data

I collected the past year’s worth of Georgetown’s free flavors (see my methodology at the bottom) and sliced up the data in various ways. The first & foremost of my questions was: is there a correlation between day of the week and whether a flavor will have frosting or ganache?

The data backs up our original hunch. For whatever reason, Mondays have the highest chance of frosting, while Thursdays have the lowest, getting frosting less than a quarter of the time.

But is this data meaningful, or just random?

Here I have the same data broken out by Month. This shows that the “Monday is good, Thursday is bad” pattern was consistent throughout the year, with only February and October as major anomalies. You can also see here which months had more days of frosting. July was a good month, as was August, but that may have been random because Georgetown did a Shark Week promotion in August. For a week, they topped each cupcake with a fondant shark fin that probably required frosting to stay in place.

sharkweek



Are Things Getting Worse?

Lately it’s seemed like ganache has been on the rise. I wondered if this is really the case or just my faulty memory or confirmation bias.

This shows the chance of frosting averaged over a trailing 30-day period for the past eleven months. This fall has definitely seen a noticeable downward trend, and we are experiencing the most ganache in my year’s worth of data. But similar trends happened last winter, and, to a lesser extent, in the late spring. So it’s probably too soon to declare anything definitive. Maybe the upcoming holiday season will bring the numbers back up.



Cupcake Flavors

Here are the top ten most common free cupcake flavors from Georgetown Cupcake in the past year.



Most of these are ganache, but luckily two of my very favorites are also in this list: Chocolate Salted Caramel and Strawberry Lava Fudge. If you like the combination of strawberry and chocolate, I highly recommend keeping an eye out for this one. Unfortunately, as of this writing, the last time it appeared as a free cupcake was all the way back on July 14th.

In addition to those two, my favorite free flavors are: Chocolate Maple Fudge (by far my favorite), Peanut Butter Banana Fudge, Triple Caramel, and anything Sundae.

Methodology

To gather a year’s worth of free cupcake flavors, I used the Twitter API. The code I used is in Github. Once I had the raw data, I pasted it into a Google spreadsheet and manually assigned each flavor a Yes/No value based on whether it was topped with ganache or frosting.

When looking at a Georgetown Cupcake free flavor, there are a few keywords that tip off a ganache topping. Obviously, “ganache” itself is a clear signal, but others include: dipped, hazelnut, blond, and surprise. At least I’m pretty sure of that last one. Many of the holiday cupcakes are “surprise” flavors, and the ones of these that I’ve actually gotten have always had a ganache icing with a fudge or frosting center. AS ganache cupcakes go, they are not bad at all. On the other side of the coin, “chocolate chip” generally indicates that the cake portion has chips in it, and that it will have frosting. A big thanks to Bekah for helping me correctly assign ganache/frosting to all of the flavors.

I used Google Charts for all of the visualizations in this post.


Tags: , ,

November 23 2014 | cupcakes | No Comments »

Pit Game Engine

I recently wrote a game engine for the card game “Pit” and posted it to my Github.

Pit Deluxe (from Amazon.com page)

The Card Game

Pit is a commodities trading card game. It’s quite fun, and good for groups up to eight. Even though I only recently learned of it, the game has actually been around since 1904, when it was first sold by Parker Brothers. The game play involves trading cards with other players until you complete a set of nine of the same card, at which point you yell out (or ring the bell) and declare that you have cornered the market and won the round. Trading consists of yelling out offers and making deals to exchange cards (blind, and always for the same number of cards) with other players. It can be quite hectic, and is probably something like an actual commodities trading floor.

Wikipedia Page
Rules (I use the bull/bear variant)
Boardgame Geek Page
Buy from Amazon.com

The Game Engine

I wrote a game engine (actually two) for Pit in Python. The idea is for people to write Player classes and have them compete against each other. The game engine manages the cards, rounds, scoring and other aspects of the game.

Disclaimer: I wrote a basic player and have run hundreds of game simulations (and even have unit tests!) but I wouldn’t say it’s thoroughly debugged. If you check out the code and find any issues, let me know. Or submit a patch :-)

Thanks for reading, and definitely send along any feedback. It’s always appreciated.

Synchronous Version

This is the version that a couple of my coworkers (and I) are planning to use to test out different Player algorithms. Here’s a run-down of the game flow…

  1. Cards are dealt, players after dealer get 10 cards (dealer rotates, just as in the live game)
  2. Game loop starts, processing one cycle of the game at a time until someone wins
  3. Game Cycle:
    1. Players are asked for an action (make offer, respond to offer, etc.)
    2. Actions are randomized and then processed one by one
    3. Cards update, notifications sent after each action is performed

Game Actions

During each cycle, active players may submit a single action to perform. Those actions include:

  1. Make an offer – call out a number of cards to trade
  2. Respond to an offer – propose a trade to specific player
  3. Ring the bell – declare you have won this round
  4. Pass – do nothing

Notice that “confirm a trade” is not listed. That happens outside of the normal game flow, and is triggered immediately whenever a player sends an offer response to another player. This does allow players to perform more than one action per round, but is somewhat realistic (people tend to hear their own name called, regardless of other distractions) and makes the game bookkeeping easier.

Action Durations

Game actions are not free. Making an offer, responding, or participating in a trade take a fixed number of cycles. During this time a player will not be queried by the game engine for any new actions, nor will the player be notified of actions made (or trades confirmed) by other players. The one exception to this rule is that players will still be notified of direct responses to any of their prior offers, and they may still confirm them, resulting in another trade (and yet another delay of a few game cycles).

Asynchronous Version

I wrote the async version second, and it was meant to be more realistic, closer to how people actually play the game. The idea was to break away from the concept of fixed cycles and order of operations. The game engine and each player run in their own separate (and multithreaded) Python process and communicate with each other via dedicated pipes and a single action queue. The code is a bit more complicated than the synchronous version, and a group of my basic players needs around 30 seconds to complete a single game (the sync version takes a couple tenths of a second).

In the course of writing & testing the async version, I realized that it’s not necessarily that much more realistic. I still had to alter reality in several ways to make the task easier on myself. For example, all communication routes through the game engine. In the real game, everyone is an independent agent and there is no central control.

Perhaps I’ll write a third version some day. In any case, I may write another post with more details about this version, but the current plan is to focus on the simpler (and faster) synchronous version. We want to run hundreds or thousands of trials to see whose player code is best, and I’m not sure the async version is suitable for that in its current state.

October 13 2014 | Uncategorized | No Comments »

Setting up Chatham Sign Shop on Etsy

171-a25-a109-a

We’ve started to set up an Etsy account for the sign shop. Check it out… Chatham Sign Shop on Etsy.

And here’s the main website… Chatham Sign Shop.

We’ve added six signs so far, but hope to have the full catalog eventually. These are all locally made, carved wooden signs in the cape cod style.

10516-a

Tags: ,

May 04 2013 | Uncategorized | No Comments »

Boston Bus Map Android App

screen shot of BostonBusMap app On Friday I downloaded a new app for my android phone: Boston Bus Map. It’s a free app that uses the MassDOT xml feed to show current bus locations and give estimates for arrivals at a given stop.

I have only just begun using the app, but so far I find it very cool & useful. I brought up the 77 route, which runs near my house, and got a google map with an overlay showing the location and direction of each bus on the route. Tapping on a bus shows a little pop-up window with the bus id, route name/number, exact heading, and number of seconds since the last update.

Like many people in the Boston area, I often have two or three ways to get from point A to point B, and knowing exactly how long it will be until the next bus will be a great help in deciding the best way to go. At some point I’m going to go sit at my nearby bus stop and try to get a feel for how accurate the data really is.

BostonBusMap has a…
web page
twitter account
developer blog

Tags: , , , ,

August 29 2010 | local | No Comments »

Anita’s Birthday Dinner

Had dinner in Brookline to celebrate Anita’s birthday. Great time and great weather.

Anita's Birthday Dinner 2010

July 26 2010 | photos | No Comments »

Cuervo Games Boston

Here are pics from my camera for yesterday’s Cuervo Games in downtown Boston. I joined team Red’s Army in the blog/media category. We didn’t win (didn’t even get to finish the final event because they ran out of time) but had a great time, and made up for it w/ free drinks & apps at the bar afterwards.

Other people were also taking photos, and I’ll try to get a copy of those and upload them as well.

Cuervo Games Boston

Tags: , , ,

July 25 2010 | photos | No Comments »

Cape Cod July 2010

On Friday, Brett and I watched Inception at the IMAX in Natick. It was amazing, and I’m going to see it again soon.

After that, we drove down to the Cape and spent the weekend with Dad & Deb.

Cape Cod July 2010

Tags: , ,

July 19 2010 | photos | No Comments »

Gravatar Created

I just set up a profile on Gravatar, which was easy since it made use of my existing WordPress.com account.

Gravatar is a service that automatically adds a profile photo any time you comment or post on a blog/website/forum that supports it. You create an account, register your e-mail address (or multiple addresses), and upload a photo. After that, your photo will appear whenever you use your e-mail address when commenting/posting. This includes sites (like mine) that require commenters to provide an e-mail address, but do not display it to the public.

Pretty cool!

Tags: , ,

July 14 2010 | fun | 1 Comment »

My First Android App

I recently published my first app for the Android platform. My main goal was to get my feet wet with Android development, and the Assistant Coach app seemed like a fairly simple idea that, as far as I could tell, hadn’t been done before.

The whole process took me about a month, working part-time. I really enjoyed the process; the Android documentation is excellent, and the architecture is designed well. It had been a while since I did any Java development, but I fell back into it pretty easily (esp. thanks to Eclipse). I had a blast and am thinking about what to make next. Let me know if you have any ideas!

Tags: , ,

July 07 2010 | assistant-coach and fun | 1 Comment »

Next »