Monday, 31 August 2015

9 Books about Architecture

This post is published in December 2015, when I finally found the time to proof read and check. This post is a snapshot of my thinking back at this time.

For a long time, I've had the reading list on the left panel. However, over time it felt a little bit un-curated. Inspired by a list of recent retweets from Jeff Sussna, especially a post by Mike Sall, I thought compiling it differently could make sense.

Let's dive right in - here is my list of 9 (well, actually 12) Architecture Books every interested Software Practitioner should read:

Basic Architecture

These are books that give you an initial understanding of what Architecture is about (hint: something "entirely different") without being to engineering-heavy (if you want that, read Francis D.K. Ching), patronising or historic:

Matthew Frederick, "101 Things I Learned In Architecture School". A small, lovely, extremely simple book that gives you a first glimpse of how to think like an architect.


Doug Patt, "How to Architect". An indexical volume of architectural elements, making it an easy reader and introduction to architecture. Mainly because of his great videos, actually.

Anthony di Mari's "Conditional Design" and "Operative Design". Because it shows the commonalities of structural elements and patterns in building and software architecture in a simple, visual way (as opposed the Alexander's "Pattern Language").

As a bonus: Joel Kotkin, "The City". Not strictly architecture, as it is about urbanism, but a great, short, intense history of human habitat, before you read Jane Jacobs.


Elementary contemporary texts

These are texts that defined contemporary architecture, giving you a feeling of the philosophic foundations of "living and dwelling" - something that is often ignored by engineers talking about architecture.

Robert Venturi, "Complexity And Contradiction In Architecture". Not an easy read, but one of the most defining ones of contemporary architecture. A manifesto against dogma and black and white thinking, introducing the hybrid, notably one of the most often used concepts in IT (often read as counter-example of Le Corbusier's "Towards a New Architecture" and only followed by Bjarke Ingels "Yes is More").

Ram Koolhaas, "Delirious New York". Because it took complexity to the next level, added emergence, and cross-pollination between society and building. Read it as Conway's Law and be astounded. No idea why, after that, it took Architecture so long until Marc Kushner introduced feedback to it.

Kate Nesbitt, "Theorizing a New Agenda for Architecture". An extremely well curated collection of elementary texts that stands out not only as a reader, but for bringing all of those thoughts into a structure that, at least to me personally, was never before so clear.

As a bonus: Fred Brooks' "Design of Design", because it is a software book dealing with architectural design.

Tertiary Literature

Those texts are not directly about architecture, but about the motivations of architecture, it's impact on society and the public.

Adam Sharr, "Heidegger for Architects". Actually the whole "Thinkers for Architects" series is pretty good, and this is just one example. Architects like, and learn, to think from the perspective of other disciplines. Might be a good example for IT.

Stewart Brand, "How buildings learn". Brand is a classic, working on the edge of design thinking/service design since the "Whole Earth Catalog". This is a great introduction into the evolution of buildings and hence an answer to the question: Can architecture emerge?

Geoff Manaugh, "The BLDGBLOG Book". Imho the single best blog about architecture in the interweb, probably the only real alternative to an AA files subscription. The book captures the full spectrum of cutting edge contemporary ideas into one volume.

As a bonus: Jo Steffens', "Unpacking My Library: Architects and Their Books" is a nice tabletop book listing a wide range of architects and their favourite book inspirations - Thomas Pynchon's "Gravity’s Rainbow" is named surprisingly often.

Sunday, 26 July 2015

Documenting Service Interactions

This post is published in December 2015 after I re-read much of Simon Brow's stuff again and figured that, with Structurizr extraction, he is so much on the right way I can stop pondering about that topic - this post is a snapshot of my thinking back in July, which I never really finished due to a unconvincing conclusion.

I’ve actually read "Documenting Software Architecture". ATAM, V&B, DITA and ALM at least ring a bell in my memory. I’ve attended Jazz/RTC, Sparx EA and UML trainings. I can safely say that, in the last 5 years there has barely been a work day I did not use the Atlassian toolchain. Yet, to me it seems there is no truly elegant architecture documentation, let alone knowledge retention, techniques out there in custom software development land.

So why is architecture documentation still so bad?

You have the integrated toolchains on one hand, the legacy of Smalltalk, Lisp Machines, Jazz/RTC/Eclipse/Mylyn and Visual Studio. On the other hand the self-documenting-code and markup world, the legacy of Cobol, like Python, TDD/BDD, Javadoc, Swagger and so on. There are a few attempts to bring the two together, XText, Lighttable, Structure101, and GitHub for that matter, and a few rather academic visual/structural coding systems like Dataflow (e.g. vvvv). Human-understandable documentation, though, still feels like a 2nd class citizen in any larger scale software development ecosystem I am aware of.

The reasons are pretty clear: most documentation systems are either tied to the hip of their very language ecosystem, often as afterthought, and hence not being able to fulfil Polyglot Programming. Or, they have been invented to enforce a given top-down structure, either for waterfall development or as operational support, which is by definition not agile and breaks traceability. Both of these reasons make it tedious to work with documentation. It breaks the flow of feature development, and forces everyone to externalise knowledge into the least common denominator. Hence people named “Architects” or “Business Analysts” still create static documents in more or less nice templates and models, which are outdated the moment they are published, because "the code is the ultimate truth" (unless you do MDD).
That’s a big problem in a digital world. Because software doesn’t just copy real-world business processes, and captures them in a box, anymore. It creates new processes, flows unseen before, that are constantly modified and updated through feedback, until no human understands them anymore. We turn our software into deep learning, minus the human understanding.

Documenting Service Interactions            

At Dockercon, Adrian Cockcroft gave a nice talk about Microservices and how to document the architectural implications. It sounded a little bit like Service/Process Mining, a backwards-looking approach to architecture, more feature/vertical slice/cell rather than layer-based. As such, for me it would fall in the markup bracket from above, a fancier version of Developer Portals in API Management. What I still miss, though, is structure, the levels of abstraction. Not in the UML sense of meta levels, but in the sense of a lean take on views. Without structure, I hate to say it, static documents will never die, and code and architectural documentation will stay detached.

In order to reduce the overhead and eventual detach between code and documentation, we can look at non-architectural documentation, and see how the problem is solved here:
  • Interface and developer documentation, how to use a service or library, can, and should, easily be generated out of code itself (Clean Code meets Convention over Configuration), and versioned directly with it.
  • Traceability to stories can be linked easily, e.g. per check-in. In a post-GitHub world, we must assume this is standard practice.
  • Tests, as behaviour documentation, what is called a specification in BDD, should be versioned and documented with the code, that means aligned to stories and features. Personally speaking I don't think a test can ever cover a real requirement (see below), but it can to certain degree specify a behaviour.
  • Requirements traceability, i.e. feature documentation, is a tricky one, because it typically is orthogonal to stories. This is a vast, separate topic, think MDA, DOORS and Sophist.
  • End-User documentation should be driven by feature documentation, and hence falls in the same area.
  • Integration architecture and dependencies are a bit harder, typically EIP e.g. in IBM Integration Toolkit are used. A bit more lightweight, we could use Adrian’s approach from above. But right now I am not aware of an integrated, structured way to feed back monitoring information into developer documentation (like Hystrix for instance).
  • Operations and maintenance documentation is another tougher step. Even if monitoring on service level is achieved, the impact of infrastructure or database issues is rarely documented and formalised into post mortems that can be simulated. DevOps is a cultural solution, but requires very experienced engineers with tacit knowledge.
  • Information architecture would be a next step, a third dimension to story and requirement, the data view. This is, today, the weakest link.

Aesthetics of Architecture


When documenting architecture, one dives into the aesthetics of code - why something in the world was perceived in a way it deemed necessary to break into into parts of a machine. Which immaterial (as in non-functional) values shaped the design of this machine over time. And why those values were agreed in the first place by the group of authors. Hence, architecture documentation has to become a part of the beauty of code. 

In building architecture, plans have evolved from models and experiments, towards guidelines and procedures. I have mentioned Alberti earlier, also in the first chapter of my book, the inventor of the modern plan as original artwork. In recent years, building architecture has gone back to a much more integrated practise, with plans showing values and ideas rather than processes and concepts. This style has been made popular by Atelier Bow Wow. It enriches architectural section drawings, pushing them almost in the direction of perspective competition drawings*.
Detail from "Graphic Anatomy", Atelier Bow-Wow 2007, Toto Publishers

The myth of the right proportion

Recently, I've been to the Venice Biennale. In one of the exhibition catalogues, Pro Portio, this remarkable passage about the usage of proportions caught my eye:
proportion is [...] investigation of how elements and patterns are connected and interconnected across disciplines [...] universal proportions guide our understanding of creation and the dynamic dance between order and chaos
The art of connecting the different views and perspectives of an architecture, understanding the values that make up our perception of a "good architecture", that's proportion. It's putting the elements of the machine into the right relation to each other. It's the grid in responsive design, the harmony of Pattern Languages, the Fibonacci sequence in planning, Amdahl's law in scalability and, after all, finding the right proportion between documentation and code.

After Venice, we took the chance and drove up to a monument of proportion: Palladio's Villa "La Rotunda", which Colin Rowe called "the ideal villa". It is an example of perfect harmony, as Rowe writes in Architectural Review:
It was not in fact suggested that architectural proportions derived from musical harmonies, but rather that the laws of proportion were established mathematically and universally diffused. The Platonic and Pythagorean universe was compounded of the simpler relationships of numbers, and such a world was formed within the triangle made by the square and cube of the numbers 1, 2, 3

While it stands as an ideal of renaissance proportion, there is an issue: Inside it's absolutely hideous. It's a monument that proves proportions, or patterns, or a grid, can never be the sole source of beauty.

Which might be the reason taking pictures inside is not allowed. For us in software architecture it means while we need to follow a plan, and maybe even make a plan, we need to use proportions as a tool to understand why we made decisions to have relationships established. A 3-tier architecture is not better because it adheres to Fibonacci's sequence or the triangle made by the square. Gregor Hohpe has called this "paying more attention to the lines than to the boxes", or Stefan Tilkov the "Cross-System properties" to care for.

In a wonderful talk, Alvaro Videla hunts down some common myths (a little bit in Bret style). He argues the reason why we still believe them is because they "are easy to repeat and to follow, than to actually learning the whole methodology". Grids, patterns, number laws and thumb rules are myths, as one easily takes ratios for silver bullets instead of guidelines. An example of a myth from the talk is "Miller's Law", the thumb rule of number of elements a human can put in context. Over time, humans have adapted, and the rules need to be changed. It's these changes, and the rules, which is the most important part of documentation. The tradeoffs and their interaction, the timeline, and the change in context and understanding.

I have written about Choice Architecture before. I firmly believe an Architect is a gardener, and as such she needs to work with the seasons, with time, with taste and the weather, to allow emergence (or evolution if you want) of beauty of the plot. Yet it's true, choice needs to be limited, and we require categories and guidelines to make decisions. Taking those decisions, and being able to explain them to others, so they can make them on their plot, is the art of our profession.

*) Architectural drawing style is a wide field, see e.g. Blomfield

Sunday, 19 October 2014

Denying State

Recently I attended a great talk about Lamba Architecture by Carlos. I particularly liked how information is underlying a tight control of accuracy, a concept that systems like HyperLogLog, F1 or Storm with Algebird have since some time. In my JAX 2012 Keynote I stated that Eventual Consistency will move into Hyper-Consistency that focuses more on perception than technical isolation. I could very well imagine Lamba Architecture being combined with CQRS, where some parts of the UI are "noisier"(a bit like VoIP scatter, coming from a queues and workers implementation) than others (maybe implemented using a functional paradigm). In functional programming as well as in event-driven systems, state is mainly neglected. But sometimes state is necessary, because it occurs in the real world, and addressing it in an immutable manner, just storing all information, can become costly, slow and inaccurate and insecure. By encapsulating functional logic and immutability where it makes sense, pairing it with a more state-driven, fuzzy, approach an architecture can scale more heterogeneously. The functional parts could be RESTful, and the fuzzy ones streams.

But the more complex these ideas become, the more they seem to be used as an excuse for random technology choices - especially in multi-paradigm solutions, e.g. ones based on JavaScript. They are getting used by people I refer to as Hipster Coders. Although the term hipster has become non-descriptive and contradictory, there is a core to it: You can call it quality or design but in the end it's simple: Not caring. Caring is the opposite of cool, it's boring. Hipster coders don't actually care about appropriate technology, the business context or the user. They care about their personal fun. The hipsters were just the last step in a long history of defaming care. They took away the rebellion. From Hip Hop, Rock, last but not least the Geek and Nerd world - hollowing out every possible idea until it could be mass-customized into an ironic pop-culture t-shirt. Hipsters celebrate obsolescence. Their hedonic need to be "on the cutting edge" (Boym) rather than beyond the edge is meagrely covering the capitalistic rationale behind it: The perpetual, infinite,  reformulation of techno-scientific merchandise (Lyotard). Hipster coders use technology like fashion uses materials, as a status symbol with an arbitrary defined lifespan.

A good example is Microservices, an architecture pattern that gained traction as fast as a cat meme. A mix between SOA, DevOps, REST and Cell Architecture, Microservices build mainly on the availability of automated virtualization and out-of-the-box distributed infrastructure. They are a worthwhile answer to heavy infrastructure blocks that come with corporate processes designed to kill any form of agile solutioning. But they come with the cost of "Integration at every level" - a technical debt in the long term a Hipster Coder could not care less about. As mobile and social require distributed architectures, this debt is easily accepted in favour of time to market. But once the systems stabilise, operations cost will rise. I agree, versioned services running in their own container make a lot of sense. As does decoupling code from nonsense anachronistic operations onboarding processes. For some components, though, a shared infrastructure just makes total sense. Forcing everyone into a directed messaging model will eventually lead to an uncontrollable network of dependencies. Once the append-only databases start stalling debugging will be hard. Microservices should be used to get rid of noise in the development cycle, not so isolate your fancy pants from the context of the world.

Dear Hipsters, maybe you would be better off with a bit of Normcore.

Sunday, 3 August 2014

Fog Computing

Recently Cisco is promoting a new term, Fog Computing. It's the application of cloud (IaaS) terms "to the edge of the network", incorporating ideas such as CDN, SDN, IoT and BaaS.

In building architecture, this convergence between what they call public and private space is much discussed and a main feature of contemporary buildings, for instance the Blur Building which has fog instead of a boundary, or edge for the sake of the argument:
Diller & Scofidio Blur Building
(c) Diller & Scofidio at Designboom
What began as the discussion about buildings that have a flexible interior but a very clear, black box, exterior in Learning from Las Vegas, has moved towards a view of information flows alongside people flows in cities (see Trüby, Lynch or the Quantum City). The bottom line is: From the smallest spatial piece of information, where we are located, how we experience space, to the urban landscape, evolving over time, the same patterns emerge. There is no clear distinction between inside and outside, static and dynamic, it's a Matryoshka that unfolds in different speeds.

Building up on the currently ongoing Microservice discussion this means Microservices, or Fog Computing, won't solve the complexity. They are just in the same state as OOP, CASE Tools or Dynamic Languages were in the beginning - before they hit the Norris wall. Our systems will grow in complexity, and while it's great not to have to worry about heterogeneous platforms, we need to understand them nevertheless. Scalability concepts still need to be understood from the bottom up, in combination with the real world problems they are trying to solve. They can be masked away by high-speed data synchronization concepts between devices and algorithms, but eventually they will pop up as technical debt, when change happens. It's the story of the magic Excel Sheet - which turns into Software and then back. Just like a Matryoshka.

The Blur building was not really comfortable, it's pretty wet. Many edgy contemporary buildings with "Open Space" concepts are also not comfortable. They seem to give maximum flexibility in a simple concept but actually are just a mask around technical debt. Which is fine as long as it's clear to the user. It won't make IT easier or more commoditized, in fact it promotes the opposite: Having to pay for highly specialized experts when you can't go back and are stuck with a tool that once seemed easy enough. In the past this situation occurred as well, but it was covered with new needs for client-server systems, GUI's, the Internet, Mobile and Omnichannel. If there is no new paradigm around the corner many users will sooner or later realize the technical debt they finally have to solve.

Let's see which technologies will be chosen then, when they finally need to be harmonized with real change - when the users realize they work for the computers. I hope it's simple components, that need a fair bit of understanding - and not oversimplified magic bullets. The more important change in IT should be a culture that embraces problem solving, diversity and organization rather than fancy facades.

The Next Challenge of the Web is Us
Christian Heilmann 

Sunday, 11 May 2014

How doctors and pilots verify

The current discussion around Test-Driven-Development (see here, here and the Hangout) seems a bit far-fetched, as I have rarely seen such dogmatic applications, but some aspects of it are indeed interesting.

Mocking clearly has its limitations (whoever used Spring or O/R mappers knows the uncanny feeling of mocking tons of Spring internals). What I find fascinating more interesting, though, is the cultural discussion of pre-planned versus experimental approaches. In the Hangout, Kent Beck makes a point about how he defines the problem and incrementally finds a solution whereas Hansson does not even define a problem but rather tests something directly with any "owner", prototyping. From their example it looks like Beck usually solves algorithmic problems whereas Hansson seems to face interface and integration issues. Fowler seems to see both advantages, and tries to reconcile without a strong opinion.

The more interesting underlying question is, where verification is required and how it is achieved. This reminded me of a chat I recently had with a friend, a doctor, and another friend, a pilot. The pilot explained, how nowadays conflict resolution between the various (social and technological) subsystems of a plane, also between the various autopilot systems, is a major part of the training. The human mind becomes the reason between algorithms (an argument Lehrer already wrote about, also see Flash Boys). Understanding feedback cycles and how systems interact is of course an important tool to solve conflicts. The doctor added that, interestingly, this systemic understanding becomes more and more relevant in her work. She went on explaining that, just like in software engineering, medicine has a discussion about whether it's more of an art or more of a science. In her opinion, which I liked very much, medicine is an art based on science*.

Software Engineering could be the same art based on science. Hypothesis (i.e. scientific)-driven Validation in the form of TDD would therefore be required for the scientific part, the algorithms and processes. Empiric (i.e. psychological, social)-driven Validation would be required the arts part, the composition, experience and elegance. The latter would be hard to test, it would probably need to be monitored and replayed in simulations or regression-tests, at least documented, in order to be manifested for future generations of programmers. Clearly defining which part of a software system belongs into which domain might end many of the discussions, and bring back reason.

*) Apparently, this quotes originates from William Osler