Atom Atom feed

The Number One Ill Of Java ...

... is its stupid "directory structure reflecting the package hierarchy" (mis)feature.

I was "helping" 20-year programming veterans to "understand" this (mis)feature in 1998. I'm still "helping" people to understand it now.

"I have a directory full of Java sources right here. Why do I have to tell javac or my IDE that the sources are three directories up?"

There is no good answer to this question. Sure, you can get use to it. You can even be proud that you are among the 5% programmers who persevered in understanding it. But it doesn't make it right!

You can label the on switch "off" and the off switch "on". People will get used to it. But that doesn't make it right.

It causes unnecessary problems. And its another barrier to true understanding.

That, and zero-based array indexing, have got to go.

Tags :

Alexander Stepanov: Notes On Programming

(Via Reddit.)

Alexander A. Stepanov: This book does not attempt to solve complicated problems. It will attempt to solve very simple problems which most people find trivial: minimum and maximum, linear search and swap. These problems are not, however, as simple as they seem. I have been forced to go back and revisit my view of them many times. And I am not alone. I often have to argue about different aspects of the interface and implementation of such simple functions with my old friends and collaborators. There is more to it, than many people think.

I do understand that most people have to design systems somewhat more complex than maximum and minimum. But I urge them to consider the following: unless they can design a three line program well, why would they be able to design a three hundred thousand line program. We have to build our design skills by following through simple exercises, the way a pianist has to work through simple finger exercises before attempting to play a complicated piece.

... and I thought all I have to do was to write millions of tests! And write the simplest thing that will make the tests work.