Tuesday, November 11, 2014

Door Bot

For a good long while (2 whole years according to Github commits 😩), my buddy Cody and I have been hacking on an automatic door lock for the front door of his house. We’ve gone through a handful of iterations and dead-ends (the most painful of which involved attempting to write a REST webservice for the Arduino Ethernet Shield), but a few days ago we finally finished. I’m ready to put this project to bed and move on to building real robots (the walking, talking, terminating kind). Read More

Monday, August 8, 2014

How This Blog Works

[This is an article about how my blog used to work. Today it uses https://gohugo.io/[Hugo]. I’ll write a post about the current set up one day… it’s much simpler.] I was recently forced to deploy this blog on a new server, and it was pretty terrible. The problem was that I expected myself to remember a process with more than 1 step; history has proven that this expectation is ridiculous. In the months since my last update, I had completely forgotten the steps required to deploy this blog and largely forgotten the specifics of how it is supposed to work. Read More

Sunday, February 2, 2014

Find and Replace with Mongoose

I recently discovered a weird gap in the functionality of Mongoose. I’ve been building a number of simple data caching services using Node, and http://mongoosejs.com/[Mongoose] has been my swiss army knife for all things Mongo related. Schema definition, server connection, collection management, access to native driver; Mongoose makes it simple. All in all, it’s a fantastic tool that has drastically reduced my lines of code dedicated db stuff. The gap that I mentioned has to do with a use case that I would assume is fairly common: I want to insert a document into a collection, replacing the existing version of the document if it exists. Read More

Saturday, February 2, 2014

Explaining Promises

I’ve been working with node a lot recently, and as a result I’ve been reading a lot about managing asynchronous code. I’ve found that I particularly enjoy using the promises pattern, but I haven’t yet taken the time to step back and fully contemplate how (if) it is benefiting my code. So, I’ve decided to write a post explaining the basic usage of promises, as a thought exercise for myself and hopefully as a useful guide for someone new to the concept. Read More

Tuesday, January 1, 2014

Dependency Injection 101

Dependency injection is an incredible thing. Practicing it in your programming will make your code more reusable, readable, and, most importantly, testable. I read a quote the other day that I loved from Michael Feathers' Working Effectively with Legacy Code, “Legacy code is simply code without tests”. If you’re not injecting your dependencies, you’re not going to be able to test your code (or at least not test it in a sane way). Read More

Wednesday, January 1, 2014

Hacking Scramble Squares

For his birthday, my dad received a puzzle from a family friend. The puzzle is called Scramble Squares® and the concept is simple: A player starts out with nine square pieces, each with a different design. Each piece has one of eight designs one each of its four sides, and these eight designs pair into four complete images. The version my dad received was dog themed (obviously), and so the four images on this puzzle were of a Yellow, Black, and Chocolate Lab and a Golden Retriever. Read More