Humane Interfaces vs Minimal Interfaces

There is an interesting debate going on between proponents of Humane Interfaces and Minimal Interfaces. It looks like, Ruby camp is representing the Humane Interfaces while Java camp is representing the later. The debate started with a posting by Martin Fowler "HumaneInterface". And here is a summary of the debate., referred to as the Monkey knife fight.

I favor the Humane Interface camp. The interface should reflect all reasonably common scenarios it can be used. Not just the minimal building blocks. Let me explain by an example. Assume you have a Math class and a method add. As per mimimal interface camp, this is enough to carry out addition, subtraction and multiplication. It is true that you CAN do all those operations with add method. But not without user writing some code on top. Like if you want mulitplication, you would write a loop to add it as many times or some other smart logic. Imagine you have 1000 different users use your class. All 1000 users have to duplicate similar code in their product to do muliplication. All 1000 users have to test their code. All 1000 users have to maintain this code. But had this multiplication code be added to the class itself, the class would have been tested only once and need maintenance at one place. This would help developers focus more on the business logic, than writing utility functions all around. This might be translated in to hefty $$$ of savings for organizations too.

However, it is little hard to find out balance and identify only and all reasonably common scenarios and provide an interface equipped with all of them. But it pays off very soon, particularly if you are writing generic libraries, like the Java framework libraries. But there is a blessing in disguise in the minimal interfaces. Lot of work and more jobs for a whole lot of programmers.

Comments

Popular posts from this blog

Newsworthy News in Red October : Dow Jones & Tax Dodgers

USCIS Selects Final H1B Petitions by Random Selection - Almost a 50% chance for each Application

Wanna-be an Entrepreneur? Get Started