By Nick Ribal, March 2019
Over 10 years of web development, mostly front-end
Technological (easy)
Architect, choose technologies
Lay a solid foundation, which hopefully won't need to be thrown away and rewritten
Cultural (hard)
Improve individual and organizational development speed and quality
Explore the complex interactions between code, people, culture and organizations using tooling, rules and conventions
I lead teams in two dimensions:
Senior developers
Team leaders
Tech leads
Architects
Anyone who cares and thinks about how people, code and organizations interact
Pull Requests (PR)
Code reviews (CR)
Maintainability
Development speed
Mindset and guiding principles
Cultivating team & organizational culture
Tools and methodology
Soon to come: detailed blog post
Avoid:
monolithic
opinionated
hard to replace parts
Do one thing, do it well. Compose.
Don't reinvent the wheel:
You can probably reuse 90% of others' work
Do your research
Only write glue code and your unique core product
Roll your own as last resort
Prefer:
small
single purpose
modular
Knowing the building blocks allows:
Sad example:
Not knowing CSS/HTML beyond a very basic level results in problems which shouldn't exist:
"div soup", bad a11y, CSS specificity/z-index wars
Examples:
Adopting and relying on something bad, will cost you a lot, for a very long time.
I actively avoided Angular1 and Redux, even when absolutely everyone was using them.
Years later, many acknowledged the same problems I had identified years ago.
It is OK to make mistakes
Never forget your:
Do not ignore them and change your mind
as long as you
Examples of my own mistakes:
A short feedback loop shows mistakes live, in real-time, as you type is crucial.
Enforceable rules, conventions and guidelines are great! They are VERY important. But,
Engineering is about managing trade-offs. When a rule doesn't serve you, change it!
// eslint-ignore-next-line
Refactoring, definition:
Restructuring code, without changing external behavior
Trying to program
avoiding refactoring
is painful failure
Example:
Choosing a framework/tool because you know it better than something more suitable: SSR vs SPA
People are your greatest and most expensive asset.
Encourage exploration, allow making mistakes, learning and growing. Serious mess-up? Bring 🍰!
Your expectations, the way you give and receive feedback create, encourage and cultivate work habits, which will make or break your team - and business.
People who feel that their work matters will naturally assume ownership, responsibility and care for their work and your business.
Wanna hire good talent? Outsource a project? Get a consultant? Why limit your options to offices?
But a remote-friendly organization is a better functioning one for ALL employees and collaborators
For everyone on the team, always - no exceptions!
Coding style, conventions + prettier, static analysis with git hooks allows participants focus on what matters: business and what the code does.
This is tricky: feedback must be constructive, meaningful and not nit-picking.
Be constructive
Use a proper tone
Ask and discuss
Suggest or guide
Instruct or command
Have people submit and review PRs early:
Everyone and anyone can - and should - review others' code in their free time, when they are at ease.
Async code reviews mandate clear documentation, relevant context and prevent time waste for peers.
Who?
What?
Why?
Async CRs set a record and clarity in every PR. Anyone is be able to understand, review and test any feature or change - without prior context.
What
Who
Task
Details
Notes
Code improvements should be in practically every change
"Leave your code better than you found it."
In a CR, if I see something which I don't like - even though it is unrelated to the PR changes - I'll ask to fix that. It will be reviewed and QA'd anyways.
Usually the answer is "No", which means you can do more than the bare minimum
Maintain 0 lint errors and warnings, 0 test failures at all cost!
Establish a clear and easy to follow git branching and PR process: