How I Watch YouTube

For whatever reason, watching YouTube in Chrome sucks. Bad. As in, it's so bad I've stopped using Chrome for YouTube. Safari seems to have similar issues, and FireFox seems to be a bit better, but hasn't been bulletproof. You know what's been bulletproof? youtuble-dl. This program rocks. So here's how…

ActivityLifecycleCallbacks and Activity: Callback Calling Order

The documentation on ActivityLifecycleCallbacks is rather sparse, at best. It seems easy enough to use, but it's not obvious when the ActivityLifecycleCallbacks's functions are called in relation to the Activity's functions. I did a little test: ActivityLifecycleCallbacks: // ... public void onActivityResumed(Activity activity) { android.util.Log.w("test", "ActivityLifecycleCallbacks.onActivityResumed()"); } public…

WebGL: Fixing "INVALID_OPERATION: drawArrays: attribs not setup correctly"

I kept getting the WebGL: INVALID_OPERATION: drawArrays: attribs not setup correctly error in my simple WebGL app, which wasn't very helpful to me. Ok, I get it's not setup correctly, but what could be wrong? It turns out the problem was being caused by me using two different shader…

Haskell Mandelbrot

I wrote a program (years ago) in Haskell that generated the image above of the Mandelbrot set. I really like Haskell, but I haven't spent enough time with it and never really wrapped my head around monads. I'd like to dive back into it when I get the time. Anyway…

Building SFML 2 with C++11 on OS X

It's not a very difficult thing to do, but clear, simple instructions can be useful. Thankfully, there's a good Getting Started guide with official documentation for building SFML (and you really should read it). If, after reading that, you want things spelled out even more... here you go. Step 1…