Squeezing Performance out of Knockout.js

Knockout.js is a fantastic MVVM framework that handles observables, templating, styling, and more. It's easy to learn, but getting good performance out of it in larger apps can be difficult. Not to worry though, a few easy tweaks can make your app almost as responsive as a native app!

Full post >

The web team at TigerText uses CucumberJS, Selenium, and Webdriverio for its unit tests. However, I was unable to get it to run on my machine; Selenium would open a Chrome window to the url "data;,", then do nothing. After hours of Googling and headaches, the problem ended up being that some of the files the tests use had syntax errors in them. Webdriverio didn't spit out any error messages whatsoever, which made finding the problem difficult. I couldn't find any mention of this on the internet, so I thought I'd post my findings for the good of everyone.

Happy unit testing.

Site upgrades!

All posts now have Disqus comment integration, so the few visitors this site has who aren't Russian bots can weigh in on my coding escapades. There's also pagination since I have over five posts now, and even an RSS feed! I've never seen a person actually use RSS in my life, but it's there.

Klondike is hard

So, I'm bad at Solitaire. Like, really bad. However, I'm good at writing code and just took an algorithms course this semester, so one afternoon I decided to make up for my complete lack of card game strategy with brute force. About twelve hours later, I had a working Klondike generator and solver. Unfortunately, it doesn't seem to solve many initial states, but I'm not sure if that's because my code is bad or because the shuffling routine I use is just really good at making unsolveable decks.

Whatever the reason is, it's pretty fast at calculating moves due to a multithreaded architecture and a thread-safe priority queue that allows for a sort of hill-climbing algorithm. It often gets stuck in local maxima, though, but I think that's just due to the nature of Klondike.

On a related note, it's almost the 25th birthday of Windows 3.0, the first version of Windows to include the familiar card game. Happy birthday, you dinosaur.

The code is here.

FizzBuzz in CSS