5 ms·
That's a very excellent question, to which I have most of an answer, if not 'the' answer. Daylight is the best antiseptic. It's not giving them a microservice
by hinkley 10y ago
That's a very excellent question, to which I have most of an answer, if not 'the' answer.
Daylight is the best antiseptic.
It's not giving them a microservices architecture and Docker that solves problems. It's expecting them to use it that causes problems to be solved, or at least formally identified.
I do a lot of root cause analysis whether my boss asks for it or not. Human factors are almost always in play. A significant source of bugs that make it into late QA or even production are caused by wishful thinking about the scope and impact of code changes. Things that should have been red flags are brushed off because you can't prove that their code caused the problem, and as long as there is reasonable doubt about the source, some people won't look at code they already declared done.
When the code is developed and tested in an isolated system then the only source of state changes on that system were caused by the new code. It takes a real set of brass ones or an extremely dense skull to deflect concerns about problems seen on a system that only contains your code changes. People either shape up or get labeled as untrustworthy. The former result is preferable, but at least with the latter you get predictability out of the system.
- 0xfaded 10y agoI would argue it would be simpler to introduce test coverage tools that automatically call out bad test coverage during code review. Microservices remind me of a particular C++ protocol implementation I wrote as a novice programmer. Since the protocol was structured, I had high level classes broken down into simpler classes. e.g. virtual class Reader { void read(Buffer *buf); }; class TCharacter: public Reader { TString *name; TList<TStat> *stats; ... }; class TStat: public Reader { TWord32 *remaining; TWord8 *percent; }; class TWord32: public Reader { uint32_t v; }; class TWord8: public Reader { uint8_t v; }; And on, and on, and on, and on ... I thought it was cute that down to the simplest PODT, every type satisfied a well defined `Reader` interface. I hand wrote many constructors, deconstructors, read and several other interface definitions for each type. Elegant, arguably. Inefficient, yes. Overly complex, undoubtedly. Every argument for microservices has in some way reminded me of this code, with it's well defined interfaces and overly verbose implementation. My current strategy is to utilise the crap out of language features to safely achieve what I want in the minimal amount of code possible. In C++ this would be done by initialising the protocol structure classes straight out of the memory buffer, using #pragma pack as required. No error prone constructors / deconstructors / read() required. Haskell and Scala are two languages I use a lot, and each have powerful type systems which I can use to prevent myself from doing something stupid. Programmable macros are great for removing boilerplate. Want less technical debt? Write less code. In my own controversial opinion, if somebody can't work out how to modify my code because they can't work out how to correctly update the type definitions, that person has no business modifying my code. Problem solved! Interfaces are well defined and modifiable only by people who truly understand the code.
- ScottBurson 10y ago> Want less technical debt? Write less code. I love this Dijkstra quote: If we wish to count lines of code, we should not regard them as "lines produced" but as "lines spent": the current conventional wisdom is so foolish as to book that count on the wrong side of the ledger.
- bluejekyll 10y agoWhen I was in College, I really only appreciated Dijkstra as a genius who invented neat multi-processing techniques. As a formal Software Engineer, I now consider him to be possibly the most enlightened engineer that's ever existed in the field.
- duaneb 10y ago> As a formal Software Engineer, I now consider him to be possibly the most enlightened engineer that's ever existed in the field. On one hand, his quotes have the ring of wisdom. On the other, the man was famously not an engineer and never brought a software project to fruition, to my knowledge. These aren't necessarily contradictory, but you should keep it in mind. Knuth is much more of an engineer in the sense it's used on HN.
- bluejekyll 10y agoKnuth is brilliant and wonderfully pragmatic, no doubt. I think the greatest thing Knuth really got into me is that code is meant for people, not computers. As to Dijkstra; enlightenment doesn't necessarily mean productive. Some of the least successful people I've ever met, can have absolutely sage like advice. Dijkstra was able to visualize things others could not, and explain novel solutions to those. On top of that he had a deep understanding of the life of a programmer and the complexities faced day in and day out.
- geon 10y ago> Some of the least successful people I've ever met, can have absolutely sage like advice. You learn from mistakes. Unsuccessful = many mistakes?
- mattmanser 10y agoWhat does this even mean? The previous poster is basically saying "they screwed it up last time in 6 months, they'll screw it up again". Microservices don't help. If they couldn't properly design their code without micro-services, throwing docker and micro-services in the mix won't make it magically better. It'll add massive amounts of complexity right off the bat. They'll still be bad coders and bad architects. They still won't know how to lay out their code. Having to split up their code will probably make a bad situation even worse. They'll put the wrong methods on the wrong microservices, and share some 'key' code that shouldn't be shared as the method's on the wrong microservice, or worse still, cut and paste code and have it decay at different rates. They'll create new services that should actually be on an existing service and then gradually they code will duplicate, but with random subtle bugs. The code debt won't disappear, it'll accelerate until they have a bunch of services they daren't touch and one of those services will become "the monolith" and eventually no-one's allowed to deploy to it or the whole thing will come falling down. And all you're saying is "daylight". What does "daylight" mean? The very idea that micro-services will remain 'isolated' in a bad coding team is utterly deluded.
- pavel_lishin 10y agoImagine a single monolithic jar file, that contains all of the code that lives on any given Docker instance, that decides which services and API endpoints to expose based on poking and prodding environmental variables.
- calinet6 10y agoIt's not microservices that help. It's changing the culture around how things are developed and understood, and the parent poster is saying that exposing the team to daylight using something such as an architecture like microservices (or another "good practice") can help push the team toward a better understanding of what a good codebase and stable state should look like. Stop thinking about the specific buzzword hyped up trendy term you're stuck on here; start thinking about the psychological factors that caused the situation in the first place, the environmental pressures that resulted in poor decisions, and the ways you can teach the team—by doing—how to create better applications. Also: > They'll still be bad coders Most often that's not the root cause. Most often the root cause is poor management and poor leadership causing otherwise decent programmers with decent instincts to make decisions against the best interest of themselves and the company. The most common classic debt generation situation is trading off long-term quality for short-term speed and functionality. That is not "bad coders" at work; it's bad managers.