Menu

Models, they make everything look good

August 31, 2010

One of the most common best practices in Rails is to keep the controller light weight. This helps maintain the code’s readability maintainability, and refactorability (just like coding, I make stuff up). This is often done by pushing as much of the business logic as you can (where it still makes sense) down into a… Read more

Type inference puzzler

Does this compile? public class Puzzle { static Object one() { return 1; } static <T> T safeOne() { return (T) one(); } public static void main(String[] args) { int one = safeOne(); System.out.println(one); } } Take a look at it carefully and think before answering. Why or why not? Once you’ve thought it through,… Read more

Creating TypeLiterals in Scala

August 30, 2010

In case anyone wondered, here is how one can easily create instances of Google Guice’s TypeLiteral in Scala. Type literals are used for reifying types. def typeLiteralOf[T](implicit m: scala.reflect.Manifest[T]): TypeLiteral[T] = (m match { case m: ClassManifest[T] if m.typeArguments.isEmpty => TypeLiteral.get(m.erasure) case m: ClassManifest[T] => TypeLiteral.get(new ParameterizedTypeImpl(m.erasure, m.typeArguments.map { case n: ClassManifest[_] => typeLiteralOf(n).getType }.toArray))… Read more

Had a great Lean Startup TGIF at kaChing

August 15, 2010

Last Friday we had some great time at the kaChing “Lean Startup TGIF”. Engineers and entrepreneurs came over from all over the Bay area as far as San Francisco and Berkeley. We chatted about Lean Startups, Continuous Deployment, Test Driven Development/Deployment, Monitoring, seeking talent and geeking around about the next big thing. There was lots… Read more

August Coolness

The entrepreneurs roundtable are hosting us this Thursday to talk about kaChing’s engineering practices. To sign up, head to Facebook event page. The event is this Thursday August 19th and is hosted by Pillsbury Law Firm in Palo Alto, 2475 Hanover Street. It will start 6pm.

No Downtime Database Schema Changes

Maintaining database compatibility while deploying north of 30 times a day often raises a slew of questions during our tech talks. In this post, we will cover backward and forward compatible database schema changes. We will survey specific classes of change and describe how they enable no downtime rollouts. For formalists out there, we are… Read more