Sunday, September 27, 2009

Simplication via Polyglot

Radical Simplification Through Polyglot and Poly-paradigm Programming

*less code
*biz logic and impl separation (DSL)

imutable
nothing to sync
no locks semaphores mutexes

data stable, but a lot of functions use list, map, filter, fold/reduce (cloud computing)

adding types, few functions, use OO inheritances

declarative vs imperative

erlang
no mutable variables & side effect
IPC optimised msg passing (actor model)
lightweight & fast process

*less code 
*model domain as close as possible 
*declarative concise bug free 
*no mutable variables & side effect

-mocking dependency 

Wednesday, September 16, 2009

“FIRST class” test cases

Make “FIRST class” test cases (Fast, Independent, Repeatable, Small and Transparent)

Fast. Your test cases should be very fast to execute, every time you want to run all of them it shouldn’t take more than a few seconds for an small application.

Independent. You should be able to run your test cases in any order.

Repeatable. The result of the test case should be always the same, no matter how many times you have executed it before.

Small. Small test cases are easy to understand and change, are also likely to be faster.

Transparent. It should be clear what the purpose of each test case is.

from How to write a good test case: 5 tips to write better test cases