HTTP is an API

Ray Camden posted an interesting article over on InsideRIA about expanding short urls using jQuery and ColdFusion.  After reading the article, I thought he was overcomplicating things somewhat by relying on the url shortening services' APIs to do the lookups.  Yes, that's what APIs are for, but for this case, HTTP happens to be a [...]

Spring 2 "scope" goodness for ColdSpring

In Spring 1.2 (and ColdSpring, which emulates it), you have the "singleton" attribute, which was a boolean flag for whether a bean is a singleton (the default) or a prototype (instantiated afresh for every getBean call).  If you've used Spring 2.0+, you've probably come across the "scope" attribute, which supersedes the "singleton" attribute, and allows [...]

Project Euler Test Harness

Project Euler is a collection of mathematics/computer science problems, as you probably already know.  I've solved almost 50 of them so far, and I've developd a collection of utilities to make my job easier.  Some of them (factorization routines, prime generators, etc.) I'm not going to share as they are fundamental to solving certain problems.  [...]

A Groovy Letdown

I'm a huge fan of Groovy, but it's major downside drove over me like a bus this evening.  What's that, you say?  Performance, of course.  Runtime "stuff" necessarily happens at runtime, and therefore affects performance.  Does this matter in most cases?  No, absolutely not.  In general it's far cheaper to buy hardware than to employ [...]

My Dinner

Like most things, cooking is usually better done simply.

5 rashers of thick bacon
1 large sweet onion
1/2 green pepper
2 stalks celery
1 still-warm baguette
1 box rice pilaf (yeah, I know)

Put on some music (Rachmaninoff's Piano Concerto #2 and Rhapsody on a Theme of Paganini for me), and pour a glass of wine (but not the stuff I [...]

Hiking in the Gorge

Sunday is usually the day I get up and do laundry, because the only other time I have to do it is while the kids are sleeping.  They probably don't care, but laundry at bedtime bugs the hell out of me, so I try not to do it.  Today, however, was going to be different.  [...]

Apache HTTPD's mod_proxy_balancer

Last year we bought a Barracuda web firewall/load balancer appliance at work and have had nothing but problems with it.  Even the support guys from Barracude were unable to solve our dropped connection problems.  Needless to say, rather disappointing for a $15K device.
We're also in the process of moving off of Akamai to another CDN [...]

Public Project Euler Dashboards

Project Euler doesn't support any kind of public stats for users, which is kind of lame I thought.  I posted about it on the Project forum and got no response, so I built my own: http://barneyb.com/projecteuler/.  The code is a total hack, faking a login to grab the protected profile page and then doing some [...]

Google Bar Charts

I just learned today from Joshua that Google Charts added an option to automatically compute bar widths and gaps for bar (or column) charts.  Doing it manually is always a total PITA, and I've intentionally chosen line chart where a bar chart was a better fit for that precise reason.  Now, however, you just set [...]

Prime Factorization

In my ongoing rampage through the Project Euler problems I've needed a prime factorization routine several times, and figured I'd share it as a complement to the sieve I shared last week.  Implemented in Groovy, of course.  Typing is a little strange on first glimpse because Groovy uses Integer by default which only supports values [...]