Sunday, April 30, 2006

 

Simian

Simian is a simularity analyser. It looks at your code and finds similar code else where. Ideal to get a grip on cut and paste coders.

This is really a tool to deal with the problem that you should only code your program once. Just as with a database, only store your data in one place and don't duplicate the same approach should be taken to coding. This is the principle behind the 2nd normal form for a relational database.

I can think of one exception where Simian would give an incorrect result, and that is with code generation. Code generation is likely to produce lots of duplicate code, but it doesn't break the principle that you shouldn't duplicate code. The reason is that it is the compressed representation of the code, and the code generator itself that is important, not the output.

Well almost. If you do have lots of duplicate code, then you are going to have a larger program than necessary. Simian can help detect this, and you can then feed this back into your code generator, to optimise the output.

Comments: Post a Comment





<< Home

This page is powered by Blogger. Isn't yours?

Subscribe to Posts [Atom]