January 31, 2010

interface code smells

Interfaces are a very useful language feature, but are much abused. Symptoms include:
  1. An interface is only implemented by one class
  2. A class implements multiple interfaces. Often touted as an advantage of interfaces, usually it means that the class in question is violating the principle of separation of concerns.
  3. There is an inheritance hierarchy of interfaces (often mirrored by a hierarchy of classes). This is the situation you're trying to avoid by using interfaces in the first place. Too much inheritance is a bad thing, both for classes and interfaces.
All these things are code smells, IMO.
(Jim Cooper)
Why do most system architects insist on first coding to an interface? - Stack Overflow
Blogged with the Flock Browser

January 27, 2010

building from scratch is mind-bogglingly easy compared to changing something

Building something with a single purpose from scratch is mind-bogglingly easy compared to changing something that already exists. 
....
The real cost of complexity increases exponentially.
....
One guy wrote eBay in a day -- one guy, one day! When they built version 2, the project took the same guy many weeks. Version 3 took many years. There can never be a version 4
....
why does each version take longer -- even if replacing the system in full? The answer is that small amounts of increases in perceived complexity (e.g. each new requirement) expands the real complexity of the system exponentially. Want examples? Take a hand-built web-site and add internationalization / localization. Add accessibility support. Add support for other devices, such as an iPhone. Add scale-out. Add high availability. Add security. If you know someone that thinks it's easy, then whatever you do, don't hire that person, fire them if they already work for you, and quit if you work for them.
/dev/null : Weblog
Blogged with the Flock Browser

JsUnit - unit testing javascript

JsUnit is a Unit Testing framework for client-side (in-browser) JavaScript. It is essentially a port of JUnit to JavaScript.

JsUnit
Blogged with the Flock Browser

January 19, 2010

BugsVoice - turn bugs into opportunities

BugsVoice is ... serving friendly error pages and saving the exceptions and feedbacks on your account.

So if you get a trapped exception in your application (or in your web server), this will print out the script copied from your BugsVoice account, display the friendly error page to your customers, and collect their eventual feedback. All this will be saved in your account, and you can access any time to inspect the bug, feedback the customer etc. :-) .
BugsVoice - turn bugs into opportunities
Blogged with the Flock Browser

January 18, 2010

powermock

PowerMock is a framework that extend other mock libraries
....
By using a custom classloader no changes need to be done to the IDE or continuous integration servers which simplifies adoption.
....
PowerMock aims to extend the existing API's with a small number of methods and annotations to enable the extra features. Currently PowerMock supports EasyMock and Mockito.
powermock - Project Hosting on Google Code
Blogged with the Flock Browser