The Basics of Signal Handling

Signals are one of the most basic ways programs can receive messages from the outside world. I’ve found limited tutorial-type documentation on them, so this post covers how to set them up and some debugging techniques. The easiest way to get a feel for signal handling is to play with a simple C program, likeContinue reading “The Basics of Signal Handling”

Labeling Git Branches

I came across git branch descriptions today and it is so freakin useful that I wanted to share. My branches usually look like this: $ git branch add-feature feature-add * implement-foo implement-foo2 temp temp2 It is… not the clearest. Luckily, you can add descriptions to branches: $ git checkout implement-foo2 $ git branch –edit-description —PopsContinue reading “Labeling Git Branches”

It’s turtles all the way down

“Turtles all the way down” is a concept that Java handles very nicely: public class Turtle { Turtle prevTurtle; public Turtle(Turtle prevTurtle) { if (prevTurtle == null) { throw new RuntimeException(“It’s turtles all the way down.”); } this.prevTurtle = prevTurtle; } } (Probably there should be a special FiniteTurtleException, but I wanted to keep theContinue reading “It’s turtles all the way down”

Adding an Assertion Macro in Objective-C

TL;DR: #define CHECK(val) NSAssert((val), @#val) // Then use: CHECK(/* something (hopefully) true */); Long version: iOS made the the somewhat bizarre choice that dereferencing a null pointer is not an error. The program just ignores that line and keeps going. Now this causes fewer crashes (yay-ish), but when I developing I’d really like the programContinue reading “Adding an Assertion Macro in Objective-C”

MongoDB: The Definitive Guide 2nd Edition is Out!

The second edition of MongoDB: The Definitive Guide is now available from O’Reilly! It covers both developing with and administering MongoDB. The book is language-agnostic: almost all of the examples are in JavaScript. Upgrading from a previous edition? If you have read the first edition, the new edition covers a lot of new material (itContinue reading “MongoDB: The Definitive Guide 2nd Edition is Out!”

Recruiting in all the wrong places

A recruiter had an email exchange at me the other day. It started with the standard recruiter email: Hi Kristina, How are you enjoying 10Gen? Any interest in going to something earlier stage? I’m working with a client in <field I’m not interested in>. Obviously the specificities of that are fascinating. Let me know ifContinue reading “Recruiting in all the wrong places”