Tuesday, December 18, 2012

More gunstores than McDonalds.

Interesting statistic. But meaningful? Why would you compare an entire industry (gun sales) against a portion of another industry?

Wouldn't these comparisons make more sense?

Retail outlets

Deaths

It's fine to have opinions on gun control. But supporting opinions with apples and oranges statistics makes it appear like advocates have to make stuff up rather than using valid data.

Monday, June 25, 2012

There's something wrong with this picture - bus monitor video

You've seen the headlines. Bus monitor mercilessly harassed by middle school boys; video goes viral, campaign to raise 5K for a vacation fund for her currently at 600K; boys under police protection due to death threats.

To any adult with a clue the fact that a group of middle school kids could be cruel is not news. The bigger question is: Why was she on the bus, and why was she sitting passively instead of taking control of the situation? It seems unlikely she had sufficient respect from the students to be able to effectively take charge in an emergency situation.

Either she wasn't up to the job, or she was powerless because the district wouldn't back her up if she disciplined the kids. On an ongoing basis it's not feasible to raise $150,000 per victim every time a middle school kid bullies someone. The taxpayers of school district ought to be demanding accountability from their school board. Either their hiring and supervision practices are substandard, or their disciplinary procedures aren't effective.

Sunday, March 18, 2012

open source conundrum

I needed some code to perform a specific task (parse out a particular set of web pages). Obviously something someone has already done. A google search, a stackoverflow post and a couple candidates appear. High praise, both listed in the maven repo (a major plus), but low documentation. Try the first, jtidy -- mostly works but doesn't quite parse out the way I want. Take a look at the second -- javadoc hard to find and sparse.

I could do the basic task directly with regular expression matching -- but it always takes a bit longer than you think to work out regex kinks. On the other hand, I could fiddle with the open source for longer to find it doesn't quite do what I need or it's buggy.

Thus it often is with second tier open source. Never obvious what best route is.

In the end I've decided to go with a hybrid jtidy/roll my own solution -- I can use jtidy to find the right chunkis of the web page and then just String.substring to find what I need.