The Way of Testivus

If you write code, write tests.
Don’t get stuck on unit testing dogma.
Embrace unit testing karma.
Think of code and test as one.
The test is more important than the unit.
The best time to test is when the code is fresh.
Tests not run waste away.
An imperfect test today is better than a perfect test someday.
An ugly test is better than no test.
Sometimes, the test justifies the means.
Only fools use no tools.
Good tests fail.

Boids, Flocking, and Unapologetically Plastic

I found a great algorithm for AI Flocking behavior. It’s actually an old algorithm with a very popular example called Boids. Boids are objects that emulate fish or bird flocking behavior. I fell in love with a Java Processing example of this algorithm. The effect is simple and really beautiful.

Flocking with Processing

The Boids actually appear to be a flock of animals. They respond to each other somewhat perfectly. The collision, and slowly drifting gives the Boids a realistic appearance.

I also really like this example project written in cocoa2d by I re-wrote it with spritekit as fast as I could. I wrote it too fast because I could only create 80 Boids before the framerate became shitty. The original project was able to have over 200 sprites at almost 60 frames. I’m still investigating why my performance is so much lower. Screen Shot 2013-09-19 at 4.26.32 PMGit

Thanks Onedayitwillmake for the great example.

I bought the iPhone 5C and I’m going to cram my opinion of it into the internet. It’s great! I got the green one and I really like it.