June 2009
1 post
Why we should not name tests as tests
Conventions… I have always been keen on asking why we need to follow a convention and is there a better way to do it. This is test name convention is something I have been noticing people following for a long time. When we write test people always tend to name class names and method names sometimes as test and I don’t think that is the right thing to do and here are my reasons why.
I...
May 2009
3 posts
why do we call mocks objects as mocks in our...
Confusing title… I know. I am good in making such titles :).
This is for people who when they mock something call it as mockXXX. It is a convention with a lot of people even me till a few days back. I moved away from the keboard and saw that the code was having too much of mock naming noise. I started wondering why do we do that and started talking to people. Some of the replies I got and...
1 tag
It is not just about writing test code or testing...
I am not sure why but whenever the topic is testing it is always about testing the application or writing test code. Both are really good and are important part of software development but there is more to testing than automation and testing the code.
I see testing to be a perpetual activity in an iteration and not as a phase. We do different kinds of tests and we may not realize it most of the...
Functions and Procedures
Just my understanding of the concepts
f(x) = 4(2x + 3)
g(x) = 8x + 12
So f and g are same functions or procedures?
Function is an abstract concept mapping input and output. Input goes into the box and output comes. If for the same input pushed into two different boxes produce give same output they do the same function.
Whereas the procedure is an algorithm. They are implementation concepts...
April 2009
1 post
ActiveRecord != Domain Model
This post is my view on using ActiveRecord classes as domain classes. I have been using rails for quite sometime and have seen this pattern of creating a class and extending it from ActiveRecord::Base every time we think we need a domain class. I am not really comfortable in doing this and following are the reasons why
I want my domain logic to be free of persistence stuff. Even though...