Can you even have architecture before there's a team?
I've been thinking about this lately. Reflecting on how writing code goes when you work as a team of soloists vs a team that works together. Code is cleaner when you work together. But why?
Conway's Law
Conway's law says that companies ship their org structure. If 3 people build a compiler, you will have a 3-pass compiler.
[O]rganizations which design systems (in the broad sense used here) are constrained to produce designs which are copies of the communication structures of these organizations.
That's why you want vertical teams aligned with business goals and product areas. Anywhere you split the teams, you'll get a rift in the product.
Architecture when you're soloing
When you solo a new feature or project, you can try to keep your code clean. But it's hard. You have to think about it. Consciously decide to maintain arbitrary boundaries between components. It feels silly.
After all why not, why shouldn't you smoosh the state management logic together with the UI rendering? Who cares if interfaces leak between components?
You're building all parts of the feature. Do what feels easiest!
Want to prop-drill a value through 5 layers of components? Sure why not, nobody's reusing those components anywhere else. Why even build 5 layers of components in the first place. Make a big fat 500 line component instead.
You get a muddy architecture with high architectural complexity and code that's hard to re-use. Maybe that's okay. At least it works.
You come back 3 months later to add new functionality and oh no what is this code??
Architecture when you work as a team
Compare that to working as a collaborative team.
You have 3 to 5 people who need to work together on a new feature. You work together on 1 thing at a time because that makes the work go faster.
How do you do that without stepping on each other's toes?
You have to talk before the work starts. Get together and:
- identify all the moving pieces
- split those into components
- define clear interfaces
- agree on the contracts
Then you each go build the individual pieces. Good code structure and clean architecture happen automatically as a function of splitting up the work.
The code becomes more maintainable and easier to work with. You get the work done faster too. Code review is easier, you have fewer whack-a-mole bugs, fixing a bug in 1 component doesn't break 3 other components. It's great.
Break down the work
I think the trick is to break down the work. With or without a team.
You have a goal, how do you get there in a series of steps?
After each step the code should work, be shippable, do something valuable, and get you closer to the goal. The smaller the steps, the cleaner your architecture will be.
You can Conway's Law with yourself.
Cheers,
~Swizec
PS: small steps are also easier to test and make you more resilient to disruption
Continue reading about Software architecture IS Conway's Law
Semantically similar articles hand-picked by GPT-4
- What I learned from Team Topologies
- Why even care about code structure
- Scaling teams is a technical challenge
- Coordinating at the end is too late
- You can't fix the wrong abstraction
Learned something new?
Read more Software Engineering Lessons from Production
I write articles with real insight into the career and skills of a modern software engineer. "Raw and honest from the heart!" as one reader described them. Fueled by lessons learned over 20 years of building production code for side-projects, small businesses, and hyper growth startups. Both successful and not.
Subscribe below 👇
Software Engineering Lessons from Production
Join Swizec's Newsletter and get insightful emails 💌 on mindsets, tactics, and technical skills for your career. Real lessons from building production software. No bullshit.
"Man, love your simple writing! Yours is the only newsletter I open and only blog that I give a fuck to read & scroll till the end. And wow always take away lessons with me. Inspiring! And very relatable. 👌"
Have a burning question that you think I can answer? Hit me up on twitter and I'll do my best.
Who am I and who do I help? I'm Swizec Teller and I turn coders into engineers with "Raw and honest from the heart!" writing. No bullshit. Real insights into the career and skills of a modern software engineer.
Want to become a true senior engineer? Take ownership, have autonomy, and be a force multiplier on your team. The Senior Engineer Mindset ebook can help 👉 swizec.com/senior-mindset. These are the shifts in mindset that unlocked my career.
Curious about Serverless and the modern backend? Check out Serverless Handbook, for frontend engineers 👉 ServerlessHandbook.dev
Want to Stop copy pasting D3 examples and create data visualizations of your own? Learn how to build scalable dataviz React components your whole team can understand with React for Data Visualization
Want to get my best emails on JavaScript, React, Serverless, Fullstack Web, or Indie Hacking? Check out swizec.com/collections
Did someone amazing share this letter with you? Wonderful! You can sign up for my weekly letters for software engineers on their path to greatness, here: swizec.com/blog
Want to brush up on your modern JavaScript syntax? Check out my interactive cheatsheet: es6cheatsheet.com
By the way, just in case no one has told you it yet today: I love and appreciate you for who you are ❤️