How I like to code

Monthly Archives: October 2010

Appropriate thing to say

I was at a funeral for my wife’s great uncle. Sitting in front of us were his grandchildren and my mother-in-law recognized one of the boys and said, “I remember you. I was at your bris” “Ah… awkward…”, he replied. I tried to lighten the moment by saying, “You don’t normally hear that at a […]

Getting rid of the Boost warnings

Ever since I started to do 64-bit development, I had a problem with the Boost headers producing a ton of implicit conversion warnings in Xcode. This is due to the fact that I am compiling with the following flag: -Wshorten-64-to-3 I got this idea from both Herb Sutter and the Viva 64 website, where you […]

Creating a Tag with Subversion

If you have the need to create a tag from your current source code, you can use the copy command from the shell of your preference: ?View Code BASH$ svn copy -m "Creating 2.0 release of the ‘MineMineItsMine’ project."

Dr. McNinja

So, what’s going on with Dr. McNinja? Chris Hastings hasn’t updated the site since last Friday. This is one of my favorite web comics and I’m left wondering, “what happens next?”. What gives? 😐

I made a Widget!

In the course of the day, I actually open several web pages related to the work I do. The browser, for better or for worse, has become part of my workflow. After a while, it can get annoying to constantly have to log in to separate pages to see all of the data I need […]

Saving energy on a FreeBSD server

FreeBSD is an awesome operating system, but if your machine is set up like mine… the drives spin all the time and can actually suck up some juice. A month later, opening the electric bill made my eyes open wider than they usually do at a bill when I see the bigger bill. Okay. I […]

Symbol visibility in Mac OS libraries

I was having a nice coding day. Xcode was behaving nicely and all of my code seem to behave like I wanted to … then … Crash. Okay. I can handle a crash. But. Looking at the call stack from the crash, something didn’t look right. In the call stack there was a reference to […]

Getting GDB to stop on a conditional breakpoint

One of the cool things about Xcode and GDB is that you can create custom breakpoints that could be set up by calling a function within your own project. GDB supports C functionality in their conditional checks, but for me, I found this functionality to be particularly helpful when paired with convenience variables. So, let’s […]

How to detect what SDK you are building for in Xcode

I recently had to build a file for multiple operating systems and had to figure out a way to enable a feature that is only available on Mac OS X 10.5 and greater, and Windows. Here’s how I did it: ?View Code CPP#if (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5) || defined (_WIN32) #include <omp.h> #endif Now, technically there […]

The Social Network

I just saw “The Social Network” with my wife. I liked the movie and so did my lady. A couple of things I came away with after the movie: 1. I remember why I became a programmer: because it’s cool 😉 No, that’s not being sarcastic. 2. My didn’t my college have programming drinking games. […]