Wednesday, March 13, 2013

Book: When Brute Force Fails

"When Brute Force Fails - How to Have Less Crime and Less Punishment", Mark A. R. Kleiman, 2009, 227 pages

Mark discusses how to improve our crime control policies by shifting from raw punishment to more intelligent methods and the obstacles that make it difficult. The basic idea is to concentrate efforts on high risk individuals. The most original ones are investing in parenting education and making post-release well being of prisoners a performance criteria of prison wardens.

Saturday, March 02, 2013

Fun for nerds stuck in boring meetings

Most meetings I attend are %90 boring and only 10% useful. I found that if I have pencil and paper I can prevent boredom by doing some simple derivations. By "simple" I mean that the derivation should take less than 5 minutes so that I can still follow the meeting. Here are some examples that I use to keep myself busy:

Friday, March 01, 2013

Detect Turkish characters with Java

To check if a string contains Turkish characters with Java, i.e. any of "ıİşŞğĞüÜöÖçÇ", you can use the following function (bonus: how to check if a string starts with a number):