blog  about
Vector Portrait
May 2nd, 2009

cholong
I traced a photo of Cho and me in Vancouver, and then colored it in.

It’s in Adobe’s swf format, so you can zoom/pan around. The outlines are cool to look at too.

Minesweeper Online
April 22nd, 2009

Check out my latest JavaScript creation: Minesweeper Online.

It mimics the look and feel of the classic Windows version much better than other Minesweeper clones on the web, including this popular version, which claims to serve over 2.5 million games per year. Maybe I can surpass it!

A couple interesting technical details:

  1. It employs the CSS sprite technique to minimize image downloads. (Here is the sprite I used.)
  2. It uses the awesome jQuery library, which is conveniently hosted by Google.
Set Statistics
February 28th, 2009

set

Set is the classic pattern match card game in which players compete to find 3-card “sets” out of 12 (or more) cards on the table. I played occasionally while growing up, and I started playing a little bit again recently with Cho.

The instruction booklet states that with 12 cards out, the odds are 33:1 that a set exists. In other words, “don’t give up — there is probably a set, but you just don’t see it”. Despite this, it seems like we get stuck on 12 cards more often than only once every 34 times.

To test whether we’re actually just bad at Set, I wrote a simple Java app that simulates Set gameplay. First, I simulated 100,000 random 12-card deals. The 12 cards were “setless” 3.1% of the time, which agrees with the predicted 3.0% (≈1/34 or 33:1). Next, I simulated 10,000 actual games: for each game, the computer played through the entire deck, selecting sets randomly if more than one existed, and adding 3 cards when there were no sets. During gameplay, 7.3% of all 12-card configurations were “setless” — more than double that of completely random configurations. This is likely because when sets are removed and replaced, the remaining cards are no longer random.

The instruction booklet’s claim of 33:1 odds aims to encourage players to look hard for sets. But the number doesn’t apply to actual in-game scenarios, in which 13:1 is more accurate.

College Projects
December 16th, 2008

I worked on a few interesting projects as part of my coursework at Duke. I compiled them here for ease of reference.

Educational Software for Enlace Quiche, Guatemala
SOCIOL192 - Information Technology & Social Entrepreneurship (Spring 2006)

I developed a functional spec for children’s educational software that was eventually deployed at Enlace Quiche, a network of technology centers for indigenous peoples in Guatemala. These two press releases embellish it:

http://www.pratt.duke.edu/news/?id=951
http://www.duke.admissionsgenie.com/profile_emmett_nicholas.asp

Accelerometer-based Game Machine
ECE154 - Embedded Systems (Fall 2007)

I worked with Andrew Ofstad and Lauren Cohen to build a portable video game console from scratch. It features a 3-axis accelerometer as its primary input device, an LCD for graphics, loads games off SD cards, and resides inside a pencil case. See it in action:

AAMPL: Accelerometer Augmented Mobile Phone Localization [pdf]
ECE256 - Wireless Networking (Spring 2008)

Andrew Ofstad, Rick Sczodronski, and I worked with Prof. Romit Choudhury to develop AAMPL, a method for localizing mobile devices in businesses according to accelerometer signatures. In September 2008, we were given the opportunity to present our work at the MOBICOM MELT08 Workshop in San Francisco.

TesselSnake
July 21st, 2008

TesselSnake is a snake/nibbles clone with a (tessellated) twist. It uses the <canvas> element, so it doesn’t work on IE.

EDIT (December 21, 2008): TesselSnake now features a new game mechanic - you can eat fruit for bonus points!

RSS UPS Tracker
May 16th, 2008

I graduated :) and moved back to the Northwest. I’m still expecting a few packages containing stuff I shipped to myself, like my bicycle, and I’ve found it really convenient to track the shipments via RSS using simpletracking.com. This works great for FedEx, DHL, and USPS, but fails to support UPS. So, I wrote my own RSS UPS tracker. Here’s an example that tracks my recent Barnes & Noble order:

http://ups.emmettnicholas.com/track.php?num=1ZV90R481290837784 (UPDATE: This particular feed doesn’t work any more since the package was delivered.)

To track your own shipment, paste the tracking number into the URL.

Fiddling with Feeds
April 10th, 2008

I developed a brief obsession with Yahoo! Pipes, which bills itself as an “interactive feed aggregator and manipulator”. But if you’re used to scripting, the graphical programming environment can seem a bit limiting. I wrote a simple PHP feed parser/masher to mimic the functionality of Pipes. Here are two feeds I subscribe to that I created with the tool (try it for yourself: feedmash.zip):

NBA Top 10:
http://www.youtube.com/rss/user/NBA/videos.rss
http://feedmash.emmettnicholas.com/nba_top_10.php

Perry Bible Fellowship (with inline comics):
http://pbfcomics.com/feed/feed.xml
http://feedmash.emmettnicholas.com/perry_bible_fellowship.php

Othello Championship Replays
March 28th, 2008

I created an Othello/Reversi simulator, so now you can rewatch the 2003-2007 World Othello Championships.

EDIT (December 21, 2008): It now includes the 2008 championships as well.