6 ms·
> In a way, this quote is saying “first do what you should have always been doing; being organized” and “then do what you came here to do in the first place (ad
by lolinder 4y ago
> In a way, this quote is saying “first do what you should have always been doing; being organized” and “then do what you came here to do in the first place (add a feature, fix a bug).”
This is half the meaning of the quote, but only half.
Even if you've been as organized as can be, business requirements change and suddenly your code organization is wrong. A good codebase can turn bad fast when people try to retain their original code model in the face of a changing real-world model. Changes become harder and harder, the code becomes more and more complicated, and you end up with a big ball of mud.
I suspect this is especially likely to happen when the original architects of the system are long gone. They knew why the system was structured the way it was and would have been able to recognize when the requirements evolved to the point where that design stopped making sense. But subsequent maintainers don't have that picture and either are afraid to make large structural changes or they don't know where the inflection points are that allow adaptation.
- wpietri 4y ago> business requirements change and suddenly your code organization is wrong Agreed, and another important case is when you just learn something. The beginning of a project is when we know the least about the domain. Some early assumptions will be wrong! And that's great as long as we've optimized our team's process for learning. Indeed, that can become a strength, where we release new things specifically to learn. Learn about our users, about our domain, about our technical notions.
- tylerchurch 4y agoYeah, it seems to be a rule that once something is in the hands of users, things that sounded great in theory turn out to be bad in practice. Or things work so well that new (previously unimagined) improvements become obvious.
- guskel 4y agoIf you get organized about building the domain, such as using an ontology, this can be mitigated.
- wpietri 4y agoMaybe? It depends a lot on the domain. If it's stable and well-understood, pre-development research can help, both the academic kind and the anthropological. But otherwise, the fastest way to understand the domain may be to ship early and often, while doing lots of user and use observation. And that latter approach teaches you things no amount of pre-development research can, like the right intermediate concepts as you turn human concepts into things that work well for the computers, the users, and the developers. As an example, consider the social media domain when Facebook launched. No amount of ivory-tower ontology-building would have given them the right conceptual model up front, because the domain co-evolved through interactions between users and platforms.
- ajmurmann 4y agoAs Sandi Metz put it: You will never know less than you know now.
- eru 4y agoThat seems overly optimistic. Knowledge can get lost. Both on an individual level and on an organisational level.
- drewcoo 4y agoAnd you'd think someone with three decades of experience would have seen the cycle of software "novelty", ignorance, and rediscovery turn a few times. https://sandimetz.com/about/ https://sandimetz.com/about/
- ajmurmann 4y agoGiven the context this came from, I think it was about how to model a particular problem in the context of a current project, not an absolute statement.
- ajmurmann 4y agoHaving worked a lot on a 20+ year old code base I definitely appreciate your point. I think the time frame in the context the quote came from is more limited though with the point being that if you can delay an important design decision/lock-in till next sprint or month, do it.
- eru 4y agoOh, definitely. And I appreciate the sentiment. Also you might want to fight against forgetting by writing things down. Both individually and as an organisation.
- rapnie 4y ago> when we know the least about the domain Strategic domain modeling (DDD) is a method to avoid much of the trouble before coding starts and steer timely on an ongoing basis as knowledge of the domain matures. Not suitable for all types of systems, of course, but is anyone using this methodically?
- wpietri 4y agoI'm a big fan of Domain-Driven Design. But I think "before the coding starts" is a bad way to look at it. To be ready for a week's worth of coding, all we need is either a small amount of stuff we're sure about or something that we can learn about via shipping something. Delaying for perfect knowledge is a very dangerous habit to get into, so I'd rather avoid it entirely.
- rapnie 4y agoYes, that's bad formulation on my end. Know the domain when coding is what I meant.
- scaredginger 4y agoTechnical debt is often a result of competent engineers dealing with uncertainty, changing requirements or a bad engineering culture, but it is sometimes just a result of unskilled engineers, and I think as a field, we like to pretend that's not true.
- nevinera 4y agoI think "undisciplined" is more specifically accurate.
- drewcoo 4y agoTechnical debt is a metaphor about intentionally making tradeoffs. If engineers are unskilled, it's unlikely that they can do that. All problem code is not technical debt. https://www.castsoftware.com/blog/ward-cunningham-capers-jones-a-discussion-on-technical-debt https://www.castsoftware.com/blog/ward-cunningham-capers-jon...
- llamataboot 4y agohmmm, this is true definitely on the face of it. Less skilled engineers don't see whether they are implementing functionality that couples a bunch of logic together that will be difficult to entangle, or duplicating logic, or adding a bunch of very specific logic that will be hard to abstract etc. Very good engineers are actually those that have come to understand how and why they have done that in the past and what options there are, or those that are shown through mentoring or code review or seeking out instruction on their own what different patterns and tradeoffs there are. -- But that means nothing on the face of it, since every amazing engineer did those things at one point, there are plenty of things for "less skilled engineers" to do that need to be done and they can do very well while also being helped to grow and learn, and for all of us, even 10/20/30 years in, we are still facing not only the limitations of what we didn't know we didn't know in the past, but even the limitations of the languages and frameworks we are using, and trying to make those better. -- I could also say that technical debt is the result of non-engineers prioritizing short-term features and bugs over long-term code quality and eventually everyone suffering for all the corners cut over the way - that's a popular one for the dev team, but what does that mean other than the people keeping the business going need this thing to happen and they don't care about where you put the logic, and if you want perfect code, please find someone to pay you to write it... -- This conversation happens so often in so many ways, and I'm actually in a situation right now as a technical lead where my very real ask and complaint is - we don't actually have enough deeply competent coders that have done this enough times that can make this work. We need a few more people with those deep architecture eyes, and we need to trust that what they see as priorities actually are, not for this feature, but for every feature we might create 2/3/4 years down the road as we scale. There is value in the simple truth that inexperienced or lazy or crappy coders write bad code. But if we take it out of the realm where that means those people are the problem, all that means is that to collaborate on a large codebase that is doing something in the world, we all need to figure out ways to put soft fences around people's weak spots, help them grow, and try to keep the balance of business requirements and technical debt and scaling and growing a team and hero coders and lazy coders and great product people and unreasonable product people etc etc etc in some sort of productive tension that never collapses under its own weight. -- The most beautiful code I've ever seen didn't last beyond the MVP. The worst and the best code I've ever written happened in the past, and I don't understand how I could write such things. -- Personally I think all teams could benefit from one day a week/sprint/month where every eng on the team just goes and makes something better than they know could be better. Cause everyone sees something ugly, but no one sees the same things, and we'll never agree on the priority. Regular time to go do things that are just "this is kindy sketchy and hacky or causes me pain every day, Ima go fix it"
- cjonas 4y agoThis is also the reason that most heavy abstractions fail. Abstractions often define the rules for one very specific universe. When the next CEO comes in a decides to toss that universe, it can become almost impossible to reason about our new reality in the context of the old abstractions. For this reason, I tend to stear away from OOO design patterns in domain logic. I've found that simple function based code written around algebraic data types tends to be much more fluid and able to conform to changing worlds. Ironically, that as I've gotten more SR, the code I produce tends to be much simpler...
- eru 4y agoYes, object oriented design promised a lot of re-use that never happened (at least not like that). Instead in the real world, re-use happened via libraries. And very much along the lines you sketched.
- DenisM 4y ago> I've found that simple function based code written around algebraic data types tends to be much more fluid and able to conform to changing worlds. How do you explain that?
- cjonas 4y agoBecause the ADT mostly just describe the shape of data moving through the system. Less control flow and logic is tied up in abstraction. Functions are typically small, pure and either "composable" or "disposable"
- BerislavLopac 4y agoLike everything else in software development, there are different valid approaches, and it's up to us (the developers) to use them in ways that suit us the most. I've come to realise that all coding, regardless of the language, comes down to two things: 1. defining what the data we're working on looks like 2. defining what do we want to do with that data Different languages and "paradigms" approach these "things" in different ways: OOP revolves around the idea of the operations and the data being hauled around together, in a single "object"; functional programming strictly separates the two into functions and data types; and so on. In your case, the approach you're describing works great, and fits your use case perfectly; in some other cases, a more object-oriented approach is a better fit. There is no silver bullet.
- rapind 4y agoAnd here I thought it meant; convince the stakeholders that the change should be different in a way that it fits the existing system. Shepherding. I can hear what I want I guess, like most maxims.
- ip26 4y agoThe original architects are also well positioned to understand the underlying pivot points of the design, the places where the design can most naturally be shifted towards a new direction rather than hacking around the edges.
- deleted 4y ago[deleted]