Prefer Static Methods for Non-Mutating Operations

When writing instance methods that do not change the state of their instance but rather return a modified copy of the instance, it is often better to implement these methods as static methods accepting an instance as an argument rather as a argument-less instance method.

DO NOT Return Mutated State from Instance Methods


Document Conditions with Local Variables

When many factors weigh into a condition, the condition statement can become unreadable, especially if combined with a poor line wrapping technique. This is a very basic technique that achieve much better readability when writing conditions.

DO NOT: Write complex conditions directly in if statements


Dealing with Player Input in Games

Some notes on implementing player input in video games.

I've seen many games and even engines that implement player input processing in a way that makes it very hard to run unit tests on input consuming controllers and that create unnecessary dependencies from the game's movement code to whatever input library or engine is being used.

View gentoo-steamvr-system-report
SteamVR System Report created Wed Jun 28 10:58:46 2017
SteamVR Version: 1497390325
SteamVR Date: 2017-06-13
Steam: Public
Steam Branch:
Steam AppID: 250820
Tracking: No Driver
OS: Linux version 4.9.16-gentoo (root@tiamat) (gcc version 5.4.0 (Gentoo 5.4.0-r3 p1.3, pie-0.6.5) ) #3 SMP Sun Jun 18 18:36:30 CEST 2017