by nickjj · 7y ago · 0 comments
My workflow is basically:
- Plan the project out, but not super detailed, this is more like a high level overview of features. I did a 90 minute video live on this process once[0].
- Think about each state of what a feature could be in. Here's another video[1] showing that process.
- Design some pages around your states (if you planned a user registration system, start designing the register form)
- Dive into the code and implement one of the features (using pseudo code to help with the flow initially if needed)
- Write some tests to demonstrate that what you have works as you intended
- Heavily refactor your code if needed, leaning on your tests and refining them as you come across edge cases, etc.
Honestly the above never fails for both small and large projects. You always have something small and focused to work on and the code you produce typically ends up being in good shape by the time you reach the end of the workflow. It's a fast cycle too (easily multiple loops per day) once you have the states ironed out.
[0]: https://nickjanetakis.com/blog/live-demo-of-planning-a-real-...
[1]: https://nickjanetakis.com/blog/design-your-web-uis-faster-by...
> Legacy code is code not under test
That said, I'm not against the existence of legacy code, but any bugs damn well should be written up as tests to catch regressions.
That way new development can be done without tests (full TDD is tedious and often way too coupled to implementation imo) but any bugs are captured in a way that can't be tests written against the implementation and guard against regression.