Stuff about software development, agile and testing

Friday, June 13, 2008

Code Coverage is a negative metrics tool

This is something we forgot on our way with coverage tools over the years and I think, needs to be restated. Its really not important how much code is covered by your unit tests(assuming they are good) but rather which parts of code is not been covered by your tests.

Thursday, May 1, 2008

Literate Programming to DSL

Literate programming is phrase coined by Donald Knuth to describe a certain approach of developing computer programs from the perspective of a report or prose. The basic idea is to create self-documenting code. The programmer should write code as if he or she is explaining to another programmer how the code will be executed by the machine, like a literature. Knuth implemented literate programming through the WEB system of structured documentation. It uses Tex for documentation and C for executable code.

Sounds like a awesome idea but I wonder why it didn't take world by storm like DSL. According to the interview recently published, Knuth thinks only small percentage of programmers are good at writing, hence never been adopted that well. What do you guys think? Now it keeps me wondering how good are we going to be with DSL, doesn't it requires same skill. It is not easy to come up with good succinct, well readable DSL. Do we need new skills to be good at it?

One beauty of DSL is, its domain specific and sometimes its really small and succinct, so no need to have extra documentation. Sometimes its important to have documentation if you allow your business users to play with your DSL but having them integrated part of the code could make it bit clumsy and verbose. And like any other type documentation it still have the same inherited problem of keeping up with code changes (maybe having them integrated might help). Now with languages like Ruby and Groovy its possible to write human readable executable code without any additional documentation.


Update: Nice blog entry from PragDave. Addresses few core issues associated with DSLs
http://pragdave.blogs.pragprog.com/pragdave/2008/03/the-language-in.html

Thursday, March 27, 2008

Big enterpise deal going bad

http://www.itworld.com/App/670/waste-management-sues-sap-080327/

Tuesday, March 11, 2008

autotest for java

I just hacked out a java version of autotest plugin for eclipse (of course inspired by the ZenTest).

No more running JUnit tests manually, this plugin will detect code changes and run JUnit tests of that Java project. You can download and install this plugin from http://code.google.com/p/autotest4j/

Current version of plugin only runs with eclipse 3.3 and I need to do some clean up and fixes before I can checkin my source code. Watch out for some changes I am planning for next version.

Enjoy...

Wednesday, March 5, 2008

rss to json

Here is a nice yahoo pipe if you want to process rss feed from you web pages
rss to json

Monday, January 14, 2008

Scala: Surprise Part oNe

Ruby is a language of least surprises but I am not sure whether I can say that for Scala yet. I have already encountered some of them, here is one example

You can define method without '()'

def height: Int = 0 //This is a valid method

def width(): Int = 0 //This is valid too

Now you can invoke 'width' method with and without parenthesis but you cannot do that for height method.

SURPRISED


Update: The Scala convention is, use '()' for parameter less method if it has side effects otherwise don't

Thursday, December 13, 2007

scala book is out

Its now an open secret that Scala doesn't have good documentation/reference to help any developer to try their programming skills. But finally Scala book is out (pre-print edition) and I got my copy.

Labels