Live data from Hacker News

Software Architecture Guide

martinfowler.com

261–270 of 303 posts

Re: Software Architecture Guide

#261
post #95

People have asked for evidence on this thread, so let me share my experience. A couple of years ago, I was developing an E-Commerce platformm internally for my company. I follow Martin Fowlers' articles on using DDD (Domain Driven Design) and Microservices to architect applications. What should have been a month long project took us 8 months! I'm not including the time I took to read about, understand and practice DD…

Even Martin Fowler writes that DDD is for large, complex software. He also recommends monoliths before microservices. If you're writing something that should take you one month it is not large and complex. It is not suitable for DDD or microservices. Microservices are not always micro. It's a bad name. Teams of 5-10 oftentimes work on only a single microservice. 1 microservice can be millions of lines of code.

See, this is the problem. See, the definition of microservice (in DDD context) is so vague, it keeps varying, but according to books on microservices, they're supposed to be simple and broken down parts of a larger system. Definitely not a million lines of code.

Re: Software Architecture Guide

#262
post #258
post #251

Earlier quoted context omitted.

I think there is some tribalism at play. Fowler and friends are writing about enterprise architecture. HN is probably more oriented towards startups which haven't yet reached that kind of challenges and constraints (and in most cases never will), and who feel superior to the dinosaurs. And then there is is the "computer scientists" who think software development should be based on proofs rather than experience and re…

And then there are people like me. I've worked in big enterprise software departments (a huge homeowners insurance tech company, big banking, government contractors), "companies" of three people including myself, and some in between. Currently I'm at a 500-ish person company that is not quite enterprise but not really a start-up. My experience is that "Enterprise Architecture" creates as many problems for the busines…

This is where I get confused. Are you criticizing a particular architecture, or architecture in general? Is it even possible to have a system without an architecture?

Re: Software Architecture Guide

#263
post #261

Earlier quoted context omitted.

Even Martin Fowler writes that DDD is for large, complex software. He also recommends monoliths before microservices. If you're writing something that should take you one month it is not large and complex. It is not suitable for DDD or microservices. Microservices are not always micro. It's a bad name. Teams of 5-10 oftentimes work on only a single microservice. 1 microservice can be millions of lines of code.

See, this is the problem. See, the definition of microservice (in DDD context) is so vague, it keeps varying, but according to books on microservices, they're supposed to be simple and broken down parts of a larger system. Definitely not a million lines of code.

I think you're reading a lot into those books.

Microservices were pioneered at companies with thousands of engineers. That is where they shine.

Small is relative. The point of a microservice is to allow a smallish team of 5-10 people make their changes independent of all other teams. That is their primary purpose. To make sure your thousands of engineers aren't stepping on each other's toes.

All other benefits range from minor to bullshit, especially if you don't have a huge engineering department.

The above applies even if you don't use DDD. DDD oftentimes goes along with microservices because their bounded contexts are a good way to split your microservices.

Re: Software Architecture Guide

#264
post #234

Earlier quoted context omitted.

> Teams working on high-availability, high-reliability software know this and take a rigorous approach Approaches that are, nevertheless, still more akin to philosophy than engineering.

Please detail your understanding of what philosophy is and how it resembles what such teams are doing. My gut feeling is that they're quite different, but I could be missing something...

I don’t reward sealioning.

Re: Software Architecture Guide

#265

Earlier quoted context omitted.

Actually it's just being respectful. I'm not an engineer, but I work with a lot of engineers who actually have the qualifications to call themselves engineers, so if I call myself one, I'm essentially lying.

I am an Engineer, in that my degree is in engineering, and my job is in engineering. I am not a Professional Engineer, in that I have not taken the Fundamentals of Engineering exam, passed, worked for at least 4 years under a Professional Engineer, and then taken the Principles and Practice of Engineering exam. So I can't put EIT or PE after my name, stamp projects which require it, or operate as a PE in any state.

I misspoke then. I would call you an engineer without your being a member of a professional association. I guess in my mind the degree is enough. I'll never have PEng on my business card, but you at least have the potential.

Re: Software Architecture Guide

#266

Earlier quoted context omitted.

Haskell is not really category-theoretic. The category Hask doesn't quite line up with real-world Haskell. The disconnection is well-understood and well-documented [0][1]. Category theory can directly give us systems from theories. See the papers behind FQL/CQL for more details, especially [2] and [3]. [0] https://wiki.haskell.org/Hask [1] http://www.cse.chalmers.se/~nad/publications/danielsson-et-a... [2] https://ar…

Well you're not technically wrong about the Haskell thing. I'll look into FQL and CQL. If such a thing exists, what in your opinion is stopping an architect from using it? Is it just that it's not popular or are there flaws?

If you use it now, and it ends up being popular like Java or Python or Haskell are popular today, then you can expect a two-decade delay before you're vindicated.

Re: Software Architecture Guide

#267

Earlier quoted context omitted.

Agree, but people tend to stop at Fowler and live it as gospel. There is a profound richness in the different ways to think and talk about computers, engineering, and information science, far more wonderous than any one person can catalog. Read SICP, Knuth, Code Complete, Codd. Hell, just YouTube around. If your vocabulary is prescribed by literally one guy in a fedora, you gotta get out there. Might I suggest Joe Ar…

Agreed. But that's a fault of content consumers not producers, no? I have read SCIP (in college), Code Complete (first book I got in my first job), Gang of Four (2nd book), Clean Code, etc. Unfortunately we are in an age where blog posts and videos are a lot more accessible than dense books. That sucks, and means we all have to expend extra energy to find a mix of good and diverse ideas and thoughts.

> But that's a fault of content consumers not producers, no?

Yeah, mostly. But at least a little is that Fowler writes and presents pretty authoritatively. And he should, because that's what consultants do, but we should remember that he's a consultant for a very niche area of software ("Enterprise") whenever evaluating his advice.

Re: Software Architecture Guide

#268
post #233

Earlier quoted context omitted.

That's not at all the source of my negativity. Instead, I am confronted in my work with developers of different experience levels which justify their design and coding decisions based on what e.g. Robert Martin or Martin Fowler wrote in a book or blog. Some of these ideas, like "code should read like prose" or the obsession with unit testing are causing problems, such as making the code harder to follow or neglecting…

> unit testing [...] or neglecting other kinds of testing that are more effective Could you elaborate? (happens I come from a background where there is no kind of systematic testing, which is a bit of a downer) And 'PoC' = proof of concept? > which justify their design and coding decisions based on what wrote in a book or blog. Happened to me. We had an SQL-based product that ran like a dog. Much faster by the time I…

i dont think having a blog outlining random advice is the source of the issue - it's the programmer who chose to take advice without first measuring and/or critically evaluating it.

Even if martin fowler and co didn't write this, soembody else would've, and the same sort of mistakes would continue to happen. The root cause, as always, is incompetence.

Re: Software Architecture Guide

#269
post #248

Earlier quoted context omitted.

Yeah he's no Zed Shaw. But actually I think Fowler is... well he skips a lot of steps and makes a lot of assertions. Here's an excerpt from the intro to Refactoring : > The performance of software usually depends on just a few parts of the code, and changes anywhere else don't make an appreciable difference. > But "mostly" isn't "alwaysly." Sometimes a refactoring will have a significant performance implication. Even…

Are you applying the principle of charity when reading Fowler? The quote about performance seem totally sensible and basically akin to Knuths "We should forget about small efficiencies, say about 97% of the time...". Focus on maintainability and only sacrifice clarity for performance when you know there is a performance problem. What part of this do you honestly disagree with? You can pick any writing apart by being…

> Are you applying the principle of charity...?

Well, when I read that passage, I tried to figure out what he might mean. And mostly I distilled it down to what I wrote: "clarity is more important than performance, and will usually lead to better performance". So even though he's lacking a lot of specifics, sure I think I get his meaning.

> "That's basically exactly what Knuth said"

No Knuth said "ignore small inefficiencies". Fowler said "clarity via refactoring is more important than performance, and will usually lead to better performance". Those are very different.

> Focus on maintainability and only sacrifice clarity for performance when you know there is a performance problem. What part of this do you honestly disagree with?

A good and well known example are entity systems in game engines. If you build such a system using OO principles--polymorphism, encapsulation, messaging--you will have an entity system that doesn't support very many entities on common hardware. It will also have very complex and hard to predict behavior as entities are created and destroyed, and as they all react to different messages, even if you break down and do it all synchronously.

Unless you have a lot of certainty that any game built with that engine will have a (far) below average entity need, you'll end up building the wrong thing, even following best practices, and no amount of refactoring will help you; it's a fundamental design limitation. In fact, you have to design a system that breaks these rules in order to get good performance, and I'm not talking about wonky code here and there; I'm talking about building something that (for example) lets you avoid vtables entirely.

So that's an example of why I disagree with Fowler on refactoring and performance. I think he's basically as wrong as you can be about it. It's a complex subject, and no, it doesn't just fall out of "clear" code, whatever that is.

> You can pick any writing apart by being deliberately obtuse. It doesn't help the conversation. E.g rhetorically asking the meaning of "clear" and "well-factored" code, when basically all of his writing are about exactly that.

I can understand how I probably came across as overly pedantic, but I don't know any other way to pin down all the vagueness. A lot of people find Haskell very clear and idiomatic C unreadable, or a lot of people can read fucked up SQL but can't make heads or tails out of ES6. If I'm gonna burn engineering time on making something "clearer", I'd like some idea of what that is.

And my strong feeling is that it's very situational, contextual, and subjective. What's clear in pixman is confounding in Django; what's elegant in Java is weird as hell in Python. I'd love to read a book that explored these differences and gave me more insight into how to express myself more clearly across them. Refactoring is just not that book at all, and in fact it encourages lots of engineers to apply its concepts everywhere, which of course makes things less idiomatic, less context-aware, and thus, ironically, less clear.

Re: Software Architecture Guide

#270
post #268

Earlier quoted context omitted.

> unit testing [...] or neglecting other kinds of testing that are more effective Could you elaborate? (happens I come from a background where there is no kind of systematic testing, which is a bit of a downer) And 'PoC' = proof of concept? > which justify their design and coding decisions based on what wrote in a book or blog. Happened to me. We had an SQL-based product that ran like a dog. Much faster by the time I…

i dont think having a blog outlining random advice is the source of the issue - it's the programmer who chose to take advice without first measuring and/or critically evaluating it. Even if martin fowler and co didn't write this, soembody else would've, and the same sort of mistakes would continue to happen. The root cause, as always, is incompetence.

If people don't know much then they are not in a position to discriminate. It's the unknown unknowns. In the case I gave I'd reasonably agree that the lead programmer should have sat down with a stack of MSSQL books and done his homework.

But even more so, the prat of a blog author, a well-known blogger in MSSQL at the time, should have done his homework and not published dangerous crap. Proclaim yourself an authority, you'd better be one! I've other examples of this too.

But sometimes the end-users just can't know. I'll skip the details but due to overload at work I couldn't help our support staff properly, so they did a web search and grabbed a snippet which did what they needed. Well done for initiative, lads.

It also silently disabled full trans logging on our clients production DBs. Not so good. Support staff couldn't know, they did their best, blame lies with idiot blogger 'expert'. Again.

Post reply on HN