Experiments with Machine Learning & Lex: Teaching a Machine to Identify Color

Amazon has (somewhat) recently added some new services under the Artificial Intelligence offerings, one of them being a Machine Learning service. I wanted to play around with their predictive analysis service so I decided to make a really simple proof of concept.

Predictive analysis, in a nutshell, is basically looking through a large dataset of various input values that each contain an outcome. That outcome may be a true or false conditional (Binary Classification), a numerical value (Regression), or identifying a label (Multiclass Classification). This data is used to generate a model that makes a correlation between the input variables and the outcome, which can then be fed new input values to predict what the outcome will be. The catch, of course, is that you need to have this large set of training data to work with.

Since I didn’t have any data available, I wanted to see what I could possibly generate on my own. I decided on trying to make a model that could guess the name of a color based on the input value. The end result would look something like the following (once integrated into slack):

Continue reading “Experiments with Machine Learning & Lex: Teaching a Machine to Identify Color”

Doing Stupid Things with Google Spreadsheets


I use Google Spreadsheets pretty often at work, but for more mundane  typical scenarios such as budgets, time and scope estimates, and so on. However, as I played with formulas and some of the built-in features, I was curious to what other non-productive things I could create. This lead me to a project I recently completed that uses the spreadsheet grid to recreate images. This was recently featured in the 2nd annual Firstborn Art Show (All These Things 2016) under the title Pixcell Images.

You can check out the entry here: Pixcell Images by Eric Decker.  There are about 20 images that rotate every 15 seconds.
There’s also a version that accepts and shows user-submitted images via MMS, which you can text to at 585-672-6394  (try it out while it’s still active!)

The concept is pretty simple — I display small images (up to 32 x 32) in a spreadsheet by coloring three cells for each pixel’s red, green, and blue value. Basically, more or less how a typical monitor or screen works. A separate external script processes the images and sends the data to the Google Spreadsheet, but the spreadsheet processes and displays the “image” all on it’s own without any additional scripting.

Pixcell: Mario Kart Toad
Toad sprite from the original Mario Kart displayed in a Google Spreadsheet.

It was a fun process, so here are some of the interesting steps it took to achieve the final results.

Continue reading “Doing Stupid Things with Google Spreadsheets”

Gravity Wells


Dug up a project I had been working on a while ago that I want to revisit – a game prototype called Gravity Wells. The idea of the game is that’s it’s a somewhat typical 2.5D space shooter, except that objects you encounter have weight that deforms the 2D plane that the ship and obstacles sit on. The gravity wells that objects – enemy ships, asteroids, space debris, etc – create affect other objects and even the projectiles that the ship shoots. I had another thought that maybe the ship doesn’t even shoot, but instead has some sort of gravity manipulation device that requires you to fling objects into each other. Extremely heavy objects, a la black holes, could present some interesting options as well. This started as a quick Flash prototype for proof of concept but would be executed with webGL.

Gravity Well Objects

Twitter Content for Testing

We recently launched a new site at Firstborn (which we can’t publicly share yet) but wanted to share a resource I created to aid in testing. A part of the site pulls in twitter content via the API (nothing new there) and in order to test what that content could be we used an account that is a collection of, let’s say, inconvenient tweets. Basically, posts that contain emojis (💩),  html markup, and lots of new lines. You can use the account – and suggest your own – by following @developerjerk.

Continue reading “Twitter Content for Testing”

Migration to DigitalOcean

Over the last few weeks I’ve been working to move by blog over from DreamHost to DigitalOcean. First off, I’ve been using Dreamhost for nearly 10 years now, and for the price and what you get I’m still super happy with it. However, performance has been a bit slow, and I wanted the opportunity to really mess around with my own server.

With DigitalOcean, I have my own SSD Cloud Server to play around with and completely screw up.  Since I’ve been doing more server provisioning, tweaking, and architecting at work I wanted to have a personal server I could muck with as I pleased.

Continue reading “Migration to DigitalOcean”

Ludum Dare 24

future rabbit by eric decker and erin gregory

Ludum Dare is a quarterly rapid game development competition/event. You essentially have 48 to 36 hours to make a game from scratch based on a theme announced at the start, which is usually 9:00 PM on Friday. If you participate in the compo, you have just the 2 days to create everything yourself – code, design, audio, etc. The more relaxed jam gives you 36 hours, lets you work in a team, and is more lenient on the usage of  open source libraries, etc. After submission the community plays and votes for their favorites in multiple categories such as graphics, mood, humor, etc.

For my first jam, I worked with my fiancée to create a short game. I naturally did the game development in AS3, and Erin hand-made all the graphics as actual cross-stitch, even down to the font. This round’s theme was Evolution, and there were 1406 entries, 400 of them in the Jam. I will admit, however, the concept based on the theme is a bit of a stretch.

You can check out our entry here and read the post-mortem here. It was a lot of fun and we even managed to tie for 10th place for Graphics!

Continue reading “Ludum Dare 24”

Video Sync Issues with Flash AS3

It’s been almost a year exactly since my last update. I guess I’ve been pretty preoccupied. I wanted to do a post about an age old problem very often encountered in Flash – compositing video so that overlaying elements sync perfectly with a video. In essence, getting the true current frame of an FLV or F4V. Specifically the problem I want to talk about tackling is having an image be composited as if it were in the video. I think a great example of this is a site we (as in Firstborn, not me) did for 5 React a year or so ago. There are a couple of solutions to solve this problem that work almost perfectly 99% of the time. In general, they usually involve an XML file that contains corner points for each frame of how an image should be transformed to match the video. For live video (no CG) tracking is set up in After Effects and then the cue points are exported. While After Effects doesn’t have a native export cue points as XML option, the keyframe data can be copied & pasted out as plain text, and then you can just run a simple RegEx to convert it to XML. This is all pretty simple and isn’t the problem, the issue lies with not being able to get the exact frame that a video is displaying.

after-effects-cue-points Continue reading “Video Sync Issues with Flash AS3”

CATScan: It Doesn’t Hurt to Twitter Up Close and Personal.

Just a quick note that I will be  regularly contributing to Creativity Online’s CATScan blog. It’s a collection of post from various people about digital media and advertising. I’ll be posting one article per month along with Dave Snyder, who is one of the Creative Directors at Firstborn. My first article is titled ‘It Doesn’t Hurt to Twitter Up Close and Personal’ and is about how businesses can use twitter to intimately reach their audience. My first article is linked here: It Doesn’t Hurt to Twitter Up Close and Personal.


Just a quick update here, we recently relaunched the new Doritos.com [edit: no longer online], my latest project. I was lead developer on this project with much help from Lucas Motta and Michael Roushey on the flash forefront, and as always Francis Turmel as our technical Sensei. The project was done with the world renowned ad agency Goodby, Silverstein & Partners. We put a lot of hours into this site, but I think it was worth it. My job as lead developer was doing the overall structure and framework of the site. I also developed some helpful debugging utils along the way, which I hope to post on here rather soon.

Continue reading “Doritos.com”


Recently I was working on preloader for a project and needed to use a tweening engine. (We have an internally developed one at Firstborn that is based off of the syntax of Tweener). I wanted to see if I could write my own that would be super small. I wasn’t as concerned with performance – meaning being able to tween thousands of objects at once, a highly unlikely scenario anyways. I wanted to keep compiled file size down, as well as number of classes. So I created a NanoTween class that is a super simple tweening utility. When compiled on it’s own, it only consist of about 1.3 Kb.

Continue reading “NanoTween”