Entities and Values

May 04, 2010

In object-oriented programming, defining new classes of objects is the typical way of introducing new types. It is extremely important to classify these types in order to ensure separation of concerns. In this article, I am going to define two common classes of types, namely entities and values. Entities are objects of the domain model,… Read more

Deployment Infrastructure for Continuous Deployment

May 02, 2010

Continuous deployment is the unification a number of best practices to create a more iterative and responsive engineering organization. Frequent, small commits reduce merge conflicts and help engineers adapt to changes in other parts of the code more quickly. Thorough automated testing ensures confidence in the codebase and allows engineers to make changes without worrying… Read more

Use a Before Method in Your Tests

April 28, 2010

When writing unit tests using the JUnit like frameworks, the mantra is to avoid any work in the class and prefer putting initialisation logic in a dedicated before method. Imagine you’re testing JSON manipulation and you have sample fixture data to work on. public class WhyUseBeforeTest { static Json.Array fixture = (Json.Array) Json.fromString(“[5,6]”); @Test public… Read more

Findbugs, Hudson and Pizza Driven Development (PDD)

April 15, 2010

As you may know kaChing (now Wealthfront) is an test driven engineering organization. Test driven is not an option, its a must. We move fast and push code to production few dozens of times a day in a five minutes release cycle, so we must have high confidence in our code. In complex systems there… Read more

iPad stand FTW

April 13, 2010

Testing with Hibernate

April 08, 2010

Some of the unit tests I wrote lately involved setting up a data setup in the DB and testing the code using and mutating it. To make it clear, the DB is an in memory DB so the setup is super fast without IO slowdowns. Its very easy to do the setup using hibernate but… Read more