Sebastian Kübeck on Checking Runtime Dependencies

In his blog post “Dependency Management Beyond Language Boundaries” Sebastian Kübeck describes a problem that is not unique to Java projects, but has had its peeks in it because Java has the privilege of being “mainstream” and thus the testbed for all kinds of “new ideas” to heal the world.

I like his introductory sentence very much because it describes one of my main concerns about how static languages can lead people into dangerous solutions for problems that can be solved much more elegant in dynamic, reflective languages:

In the meantime, Java is quite an old lady in IT terms and had to survive various hype phases which all left their traces in legacy applications. One of them was the XML configuration mania which left us with numerous XML configuration files. This was followed by the Annotation pseudo cure that obfuscated our source codes in such a way that we couldn’t see the source code forest within all those annotation trees.

Annotations and the overuse of external (XML or whatever) files for configurability to the extreme are typical cases of premature flexibilisation that can lead to very high maintenance cost (Did you ever have to debug a Struts application?).  Unfortunately, the Smalltalk world is currently in danger of overusing Method Pragmas, which bear the potential for similar problems like Annotations do in Java. They may be helpful, but they can also lead to practically non-understandable code, where you simply don’t know what’s happening in your system.

The rest of Sebastian’s article shows how it’s possible to check Struts configurations for correctness in unit tests. A good piece of inspiration, not only for Java developers!

2 thoughts on “Sebastian Kübeck on Checking Runtime Dependencies

  1. Hi Joachim,

    thank you for your nice post!
    You are right that the issues I mention aren’t specific to Java or any other language.
    The problem with XML, Annotations etc. isn’t the language/tool itself but our tendency to overuse them.
    To my knowledge, this was first observed by Paul Watzlawick. He observed that whenever we find a new Solution for an existing problem, we tend to apply this solution everywhere and we eventually find ourselves applying the solution far beyond its usefulness. Hence it’s a good idea not to get too distracted by the hypes and remain critical to use those solutions only where they are useful.

  2. I agree with your sentiment about pragmas. This recent infatuation of turning them into general annotations for everything is very disturbing. By the time people realize the mess this can make, we’ll have Squeak and Pharo sources littered with this nonsense — dozens of annotations per method, one for each person’s meta hobby horse.

    Think I’ll start looking at Newspeak😉

Comments are closed.