Posts tagged programming language
It seems I can no longer write any piece of code without including the Apache Commons libraries.
They just contain everything that the ancient architects of the Java language forgot to include in the java.* APIs; Commons save huge amounts of coding debugging time, by capturing ever repeating patterns, allowing effective reuse which results helps with clean code.
Here’s the bug that had me working today (a Sukot holiday):
_myMap.get(key) // without lower casing the key.
At first you might think of this as a common human error, but I claim that it’s no less of a code smell:
Why trust yourself to always remember to lower/upper case all of the interactions with the map? What about trusting others?
So, instead of using a HashMap, use an Apache CaseInsensitiveMap that nicely and safely encapsulates this key’s case concern.
I would expect CaseInsensitiveMap to become a part of the Java SDK.
I spent today at the IBM Programming Languages and Development Environments Seminar 2010, that took place at the beautiful Haifa Research lab mount Carmel campus. Things worth mentioning:
Gilad Bracha, father of Java Generics and auto-boxing, spent 60 minutes repenting Sun’s Java 1.0 early design mistakes, such as allowing primitives and static members into the language. IMHO the lecture itself was so-so. Gilad pointed out Java’s soft spots, but didn’t bother presenting the crowd what he views as the alternatives. What he did suggest was to check out his new baby programing language Newspeak (something for the purists I guess).
Perhaps some of Java’s charm at the early days was its simplicity and low learning curve, I’m not sure that a semantically perfect Java (could there by anything like this?) using nested classes instead of static members would have enjoyed the same mojo.
In one additional interesting lecture, Kathy Barabash, talked about how data structures with a sequential references object graph (say a LinkedList) do not allow traditional concurrent GC Tracing algorithms to scale on many-core (i.e., massive multi-core) platforms.
What good is your new 1,024 cores Intel processor if the desktop widget nuclear explosion simulation flickers because it can only scale on 400 of the available cores, right?
The new language sets out to excel in testability, dependency injection, and readable code (see the proposed features). More interesting than whether Noop will gain a crowd of enthusiasts, is the language’s dynamic and lucid development process; made available through Google code (Sun’s JSRs, are also transparent but here it’s a whole new language).
What do you think?