3.9. Forget CLASSPATH
Each paradigm of programming has certain “cardinal sins.” With unstructured programming languages such as BASIC, it's probably goto, which can easily create incomprehensible spaghetti code. With structured programming languages such as C, it's probably the use of switch on types, which tests a fixed set of conditions and does not evolve well with the application.[5] With library-based object-oriented programming, it is the inclusion of the entire class library with the application, which creates software bloat.
[5] “Anytime you find yourself writing code of the form, 'if the object is of type T1, then do something, but if it's of type T2, then do something else,' slap yourself.” [10]
Veteran programmers know that they can ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access