Which Design Patterns Should Be Retired? (In Defense of Singleton)

Addison-Wesley asked the patterns community (or at least those who were there at the beginning) about their opinion on various issues. This is the second post of what should have been three (though I probably will only get to the first two).

Which Design Patterns Should Be Retired? (In Defense of Singleton)

For this very specific question, I expect everyone to say: Retire Singleton!

I beg to differ; for its time, Singleton was right. “Its time” mostly means single-threaded C++ code, as written by 3 of the 4 authors of the Design Patterns book. Today, many will argue that multi-threaded Java programs have made Singleton obsolete and even harmful. In my take at design patterns that would be wrong. Singleton should not perish, it should simply be adapted to its time. What ever thread-local information you may have, some it will be global to that thread. How is that not a thread-specific singleton? Or, take a group of application servers acting as a group: How is the group communication protocol not to provide a global id that makes the group identifiable and provide some global state attached to it? This may not be your granddaddy’s good ol’ singleton, but a singleton it may be nevertheless.

This is also where pattern descriptions will pass (or fail) the test of time: Does the original description of Singleton allow for these variations or not? If not, it may have been too narrow a description. I’d assume then that specific usage examples, tied to the programming languages and systems and technologies of its time, dominated the description and the abstracion process “out of examples, timeless patterns” did not yet conclude.

Beyond Singleton, some may want to retire Visitor, mostly because we find functional programming concepts being added to programming languages more and more, and multiple dispatch (which Visitor is about) comes for free. I say: Simply be precise about the scope. Visitor is (kind of) fine for Java but in a different context may not be needed as a design pattern because it has been cast as a language feature.

Design pattern should evolve and there is nothing wrong with it. John would approve.

A summary of all posts can be found on the InformIT site.

PS: Turned out, not many on the InformIT site were pointing to this issue. Looks like I was beating a dead horse!

First Thoughts on the 20 Year Anniversary of the Design Patterns Book (a.k.a. GoF Book)

Addison Wesley is going to celebrate the 20 year anniversary of the Design Patterns a.k.a. Gang-of-Four book. For this, they reached out to the community and asked for contributions. Here are the questions they asked, suggesting we ask (and answer) our own ones as well:

  1. How has Design Patterns affected you and your career?
  2. How has it changed how you think about software development?
  3. Do you have specific recollections of the book’s release?
  4. How do you use design patterns today?
  5. Which Patterns should be retired?
  6. Which new Patterns should be added?

I’ll provide my answers to questions 1-4 here and I’ll answer questions 5-6 in separate follow-on posts later.

Continue reading

Call for Papers (Verlängerung): Deutsche Software-Engineering-Konferenz SE 2015, Software-Engineering-Ideen-Track

The SE-2015-Konferenz ist die Konferenz der deutschen Software-Engineering-Gemeinde. Teil der SE 2015 ist der Software-Engineering-Ideen-Track, in dem neue und interessante Ideen vorgestellt werden können, die noch nicht als wissenschaftliche Ergebnisse validiert wurden. Wir versprechen uns von der Vorstellung dieser Ideen angeregte Diskussion und erhoffen resp. erwarten eine spätere Validierung. Aufgrund verschiedener Anfragen verlängern wir die Einreichungsfrist. Die neuen Deadlines lauten:

  1. Deadline Einreichung: 15.11.2014
  2. Author-Notification: 15.12.2014
  3. Camera Ready Deadline: 05.01.2015

Hier geht es zum ursprünglichen Call-for-Papers für den Software-Engineering-Ideen-Track der SE 2015.

Call for Papers: The 11th International Conference on Open Source Systems (OSS 2015)

The 11th International Conference on Open Source Systems (OSS 2015)

Co-located with the 2015 International Conference on Software Engineering (ICSE 2015)

Florence, Italy – 16-17 May 2015


Open frameworks: from service to cloud

Free and Open Source Software (FOSS) has had a disruptive effect on the commercial software industry and the ways that organizations and individuals create, distribute, acquire and use software and software-based services. In addition to the many standalone FOSS projects, FOSS is at the heart of modern network-based computing infrastructures and can be found in the vast majority of applications that run in these environments.

Continue reading

Springer Verlag Adding Insult to Injury

Springer Verlag by way of its incompetence to properly edit manuscripts has been a royal pain in my butt for a long-time. In the most egregious example, one of their editors changed the title of what was a crowning paper of many years of research work. He turned “open source” into “open course”, completely altering the focus of the paper as suggested by the title. I was not given a final proof-reading chance after that change and only found out about it when I saw the paper on their website. When I complained, Springer steadfastly refused to change the title to the correct original wording and only filed an Erratum that everybody thereafter of course ignored.

Continue reading

Fine-grained Change Detection in Structured Text Documents (DocEng 2014)

Abstract: Detecting and understanding changes between document revisions is an important task. The acquired knowledge can be used to classify the nature of a new document revision or to support a human editor in the review process. While purely textual change detection algorithms offer fine-grained results, they do not understand the syntactic meaning of a change. By representing structured text documents as XML documents we can apply tree-to-tree correction algorithms to identify the syntactic nature of a change. Many algorithms for change detection in XML documents have been propsed but most of them focus on the intricacies of generic XML data and emphasize speed over the quality of the result. Structured text requires a change detection algorithm to pay close attention to the content in text nodes, however, recent algorithms treat text nodes as black boxes. We present an algorithm that combines the advantages of the purely textual approach with the advantages of tree-to-tree change detection by redistributing text from non-over-lapping common substrings to the nodes of the trees. This allows us to not only spot changes in the structure but also in the text itself, thus achieving higher quality and a fine-grained result in linear time on average. The algorithm is evaluated by applying it to the corpus of structured text documents that can be found in the English Wikipedia.

Keywords: XML, WOM, structured text, change detection, tree matching, tree differencing, tree similarity, tree-to-tree correction, diff

Reference: Hannes Dohrn, Dirk Riehle. “Fine-grained Change Detection in Structured Text Documents.” In Proceedings of the 2014 Symposium on Document Engineering (DocEng 2014). To appear.

The paper is available as a PDF file.

The Impact of Germany’s Stop of Uber

A German court ordered Uber to stop offering its taxi services (for now). The argument was as to be expected: Uber taxi drivers and cars are not fit for the job. This is definitely the right decision under the assumption that the German taxi approval rules make sense. Even if the court decision stands, this is not the end of Uber (nor Lyft nor AirBnB nor Wimdu as same or similar business model based companies).

I see two distinct innovations in Uber’s model:

  1. Higher service quality (mostly improved convenience) through the Uber app (and the system behind it)
  2. Lower costs of operations by utilizing drivers and cars who couldn’t or wouldn’t become taxi drivers

I think #1 is a justified and sustainable advantage: It just is easier to use an app rather than the phone and the more efficient and feedback-based system behind it. If Uber was a regular taxi service accessible through this app, it would already kill the market.

Continue reading