My attempts at game programming usually turn into impenetrable spaghetti code: “If the player walks through this door, then have him talk to the princess, unless he’s killed a guard, in which case the guards attack, or if he comes out of the secret passage…” The game I’m working on now is pretty simple, butContinue reading “Programming a State Machine”
Author Archives: kchodorow
Mad Art Skillz
With all this free time, I’ve been working on an iOS game. I’m not even close to done yet, but I’ve wrestled Objective C into submission and now and I’m working on some assets. It’s going to be musical, so here’s Beethoven: And here’s a demon (it plays the piano): And the player character, Calliope:Continue reading “Mad Art Skillz”
Finished The Definitive Guide
Or at least the writing it, it still has to be tech edited, “real” edited, illustrated, formatted, etc. The second edition is going to be about 400 pages (almost twice the length of the first edition), with majorly expanded sections on sharding, replication, and server administration. Phew. Now, some mea culpas: To those of youContinue reading “Finished The Definitive Guide”
Databases & Dragons
Here are some exercises to battle-test your MongoDB instance before going into production. You’ll need a Database Master (aka DM) to make bad things happen to your MongoDB install and one or more players to try to figure out what’s going wrong and fix it. This was going to go into MongoDB: The Definitive Guide,Continue reading “Databases & Dragons”
The Google Interviews
When I was a college senior I applied for a job at Google. During the in-person interview, the interviewer asked me to find the median of an infinite series of numbers and I just stared at the board, having no idea what to do. Every idea I came up with that was reasonable for aContinue reading “The Google Interviews”
Guide to Tech Interviews
I’ve been interviewing people for programming jobs for five years and I’ve recently gotten a look at the interview process from the other side. Here are some suggestions for acing tech interviews. Read Cracking the Coding Interview (available for free from here, Google Play, and various other places). It is incredible, it basically covers everyContinue reading “Guide to Tech Interviews”
Goodbye 10gen, Hello Google
After five wonderful years, I’ve decided to leave 10gen and join Google. I’m going to miss working with all of my coworkers and the community tons, you guys are awesome. I will hopefully continue blogging, but Snail in a Turtleneck will probably not be as MongoDB-focused anymore. If you’re looking for some good MongoDB reads,Continue reading “Goodbye 10gen, Hello Google”
Intro to Fail Points
This is probably exclusively of interest to my coworkers, but MongoDB has a new fail points framework. Fail points make it easier to test things that are hard to fake, like page faults or network errors. Basically, you create a glorified boolean called a fail point, which you can turn on and off while mongodContinue reading “Intro to Fail Points”
MongoDB Puzzlers #1
Suppose that the collection test.foo contained the following documents: {“x”: -5} {“x”: 0} {“x”: 5} {“x”: 10} {“x”: [0, 5]} {“x”: [-5, 10]} {“x”: [-5, 5, 10]} x is some combination of -5, 0, 5, and 10 in each document. Which documents would db.foo.find({“x” : {“$gt” : -1, “$lt” : 6}}) return? Click here toContinue reading “MongoDB Puzzlers #1”
Humans are difficult
My web app, Noodlin, has two basic functions: 1) create notes and 2) connect them, so I tried to make it blindingly obvious how to do both in the UI. Unfortunately, when I first started telling people about it, the first feedback I got was, “how do you create a connection?” At that point, theContinue reading “Humans are difficult”
