I have a page where I’m using Highcharts for a graph, and jqGrid for a grid; they’re showing different views of similar data, but are sourced from two different calls to the backend. The graph is a summary, and the grid is detailed data, and it doesn’t make much sense for that to come back [...]
Cassandra supplies “counter columns”, which are used to store a number that incrementally counts a value. You might use a counter to keep track of pageviews or other events. I couldn’t find much documentation about how to use these, especially through the CLI (which is where I typically start out when trying to investigate a [...]
Last week, I introduced Dependo, my new dependency injection framework for Ruby. Today, I want to demonstrate something that it makes very easy — and something that I wouldn’t know how to adequately test without it. In our OCSP responder, we rely on a Redis database and can configure (at startup) whether we want to [...]
Today, I discovered that I need Dependency Injection in Ruby. Other people who are probably smarter than I am have said you don’t need it, because Ruby is so dynamic and you can just do whatever you want to without having the structure provided by dependency injection. DI frameworks are unnecessary. In more rigid environments, [...]
OpenSSL::X509::Name is a class in Ruby’s OpenSSL bindings that lets you deal with the subject line of SSL certificates. It’s useful and necessary, though dealing with it can be kind of annoying. But as of Ruby 1.9.3, there’s a big bug that threatens to be a deal-breaker for anyone doing significant SSL work in Ruby: [...]
Mocking in your unit tests is a useful and powerful thing. My experience with it had been with JMock, in Java. But for one of my current projects I’ve found that I need it with rspec, in Ruby. I didn’t find a ton of helpful documentation on the subject, so hopefully this explanation helps someone [...]
Have you ever noticed that both MLB and NFL only give the starting times of their games in Eastern time? Through their websites, and even through their mobile apps — which I find especially egregious since your phone knows what timezone it’s in. One of the big features, in my opinion, that my MLB Scoreboard [...]
Refreshing an Android ListView is a pretty common thing — but the best way to do it isn’t immediately obvious. Here’s my progress through the different patterns. The Obvious I figured that when I’ve downloaded the new list of stuff I want to show, that I could just create a new adapter and stuff it [...]
I’ve been playing with Appengine for Java lately, and using JDO (which stands for Java Data Objects) for the first time. All the example code is pretty annoying; apparently, in every DAO method, you have to grab a PersistenceManager from the PersistenceManager factory, use it to build and execute a Query, and then close the [...]
I was writing a program that needed to delete some items out of several different tables — but we want to be safe and keep a record of what was deleted, in case we need to put it back in. Since we’re guessing we won’t find out what the problems will be, if any, until [...]