Do not use unsigned for non-negativity

It is common to find C/C++ code using unsigned types for no better reason than to annotate non-negativity of an integer. C++ Core Guidelines and Google Style Guide advise against that, but do not elaborate enough why.

Cheatsheet for multibooting Windows and Linux on a Mac

Installing on an external USB / IEEE 1394 drive, making a bootable Windows USB stick without using any third-party software, blInitializeLibrary error…

Run Xcode tests in source file order

Here is not very pretty but definitely the easiest way to change invocation order of XCTestCase methods from default alphabetical order to the order they are written in the source file (like GoogleTest does, for example) — with no bullshit like starting test names with a number.

Manipulating OS X login items from command line

I will leave this post as a reference for those who need their installer postflight scripts (and uninstallers) to manipulate login items in OS X.

Prevent Mac sleep when `make` is running

Ever came back in the morning only to find 40-minute make is still running? OS X 10.8 “Mountain Lion” now includes a nice command /usr/bin/caffeinate which will prevent system from going to sleep while a program is running.

Shell prompt that spans console width

This is how I solved the problem of separating commands from their output, once and for all.

How to actually fix FOV in Mass Effect

The viewing angle (FOV) in Mass Effect games is too small, PC players are upset, but developers never cared. By the time of this writing the only solution to be found on gaming forums is clumsy and messes up cutscenes. So here is the actually working fix, for each of three Mass Effect games.

Why you can just forget about UTF-32

Very often when a discussion of encoding strings comes up someone claims UTF-32 allows for “fast” character access at the cost of wasting some memory. Unfortunately, wasting memory is the only thing it does.

How to install Xcode 3 on Mountain Lion

It is basically the same trick as with Lion, except that it renders your system unbootable. Oops. Be prepared to boot into single-user mode and remove the incompatible kernel extensions.

How to install Xcode 3 on Lion

The installer does not allow it, so here is how to trick it.