This is a supplement to the Hacking Chess with the MongoDB Pipeline. This post has instructions for rolling your own data sets from chess games. Download a collection of chess games you like. I’m using 1132 wins in less than 10 moves, but any of them should work. These files are in a format calledContinue reading “Hacking Chess: Data Munging”
Author Archives: kchodorow
Hacking Chess with the MongoDB Pipeline
MongoDB’s new aggegation framework is now available in the nightly build! This post demonstrates some of its capabilities by using it to analyze chess games. Make sure you have a the “Development Release (Unstable)” nightly running before trying out the stuff in this post. The aggregation framework will be in 2.1.0, but as of thisContinue reading “Hacking Chess with the MongoDB Pipeline”
And now, for something completely different
Probably only relevant to a limited portion of my audience, but Silicon Valley Ryan Gosling is awesome. I have never seen anything like and I’m not sure what the point is, but I know I’m a fan. Go forth and be sexy and supportive for the female programmers you know.
Replica Set Internals Bootcamp: Part I – Elections
I’ve been doing replica set “bootcamps” for new hires. It’s mainly focused on applying this to debug replica set issues and being able to talk fluently about what’s happening, but it occurred to me that you (blog readers) might be interested in it, too. There are 8 subjects I cover in my bootcamp: Elections CreatingContinue reading “Replica Set Internals Bootcamp: Part I – Elections”
Popping Timestamps into ObjectIds
ObjectIds contain a timestamp, which tells you when the document was created. Because the _id field is always indexed, that means you have a “free” index on your “created at” time (unless you have persnickety requirements for creation times, like resolutions of less than a second, synchronization across app servers, etc.). Actually using this indexContinue reading “Popping Timestamps into ObjectIds”
SQL to MongoDB: An Updated Mapping
The aggregation pipeline code has finally been merged into the main development branch and is scheduled for release in 2.2. It lets you combine simple operations (like finding the max or min, projecting out fields, taking counts or averages) into a pipeline of operations, making a lot of things that were only possible by usingContinue reading “SQL to MongoDB: An Updated Mapping”
On working at 10gen
10gen is trying to hire a gazillion people, so I’m averaging two interviews a day (bleh). A lot of people have asked what it’s like to work on MongoDB, so I thought I’d write a bit about it. A Usual Day Get in around 10am. Check if there are any commercial support questions that needContinue reading “On working at 10gen”
Getting Started with MMS
Edit: since this was written, Sam has written some excellent documentation on using MMS. I recommend reading through it as you explore MMS. Telling someone “You should set up monitoring” is kind of like telling someone “You should exercise 20 minutes three times a week.” Yes, you know you should, but your chair is soContinue reading “Getting Started with MMS”
More PHP Internals: References
By request, a quick post on using PHP references in extensions. To start, here’s an example of references in PHP we’ll be translating into C: This will print: x is 1 called not_by_ref(1) x is 1 called by_ref(1) x is 3 If you want your C extension’s function to officially have a signature with ampersandsContinue reading “More PHP Internals: References”
Playing with Virtual Memory
When you run a process, it needs some memory to store things: its heap, its stack, and any libraries it’s using. Linux provides and cleans up memory for your process like an extremely conscientious butler. You can (and generally should) just let Linux do its thing, but it’s a good idea to understand the basicsContinue reading “Playing with Virtual Memory”
