Menu

Sometimes you need a little help from your friends

April 07, 2010

…when the football gets stuck.

Konami kaChing

by Hugh
April 01, 2010

Happy April Fools’ Day from everyone at kaChing! If you’re looking for a treat, try entering a certain code on the kaChing homepage.

Z-Index and Local Stacking Contexts

by Hugh
March 27, 2010

z-index is a CSS property that specifies the order of your elements on the z-axis. The higher the z-index value, the closer the element is to the user. Using z-index is handy to make sure elements like modal dialogs show up above everything else on the page. div#red { z-index: 1; } div#green { z-index:… Read more

Ids and Ambiguous Method Parameters

March 14, 2010

You’ve probably run into a method with a signature like: void addToGroup(long userId, long groupId) and a common question you might ask yourself is, “Oh, was it the user id first, or the group id first? I always forget. Stupid method.” You’ve encoded the meaning of the parameters into their names, and hence you need… Read more

Parallelizing JUnit test runs

February 20, 2010

Test runs should be as fast as possible in order to allow a lean development cycle. One of the applications is a Continuous Deployment (see Lean Startup). Using strong multi-core machines to run tests is not enough since most unit tests are using a single thread per test. Apart of reducing IO to minimum, having… Read more

select product(value) from mytable

February 12, 2010

A nice tip from Harold Fuchs to calculate the product in Mysql select exp(sum(log(coalesce(value,1))) from mytable The coalesce() function is there to guard against trying to calculate the logarithm of a null value and may be optional depending on your circumstances. Here’s an example +——+——-+ | id | value | +——+——-+ | 1 | 3… Read more