Design v.s. implementation failures
Failures happen when building features and architecture. Failing fast and moving away from our failures is a great thing. However, it's easy to simply give up everything as a bad job and start over.
Instead, it may be worth asking: is this a design failure or an implementation failure? You may be doing yourself a disservice by abandoning a valid architectural design or code pattern precisely at the moment you know the most about it.
Example design failures
- The two-way binding between components led to an infinite event loop.
- Design failure: Let's avoid this style of coupling and prefer one-way component binding.
- Our components have styles that are conflicting with each other.
- Design failure: Let's make sure our components are self-contained and use styling solutions such as CSS modules to avoid collisions.
- Paging our APIs via numeric offset leads to duplicate values when infinite scrolling.
- Design failure: Let's use a pointer offset instead to ensure we get results after a given item.
Example implementation failures
- These new components are hard to read with too many props.
- Implementation failure: The component needs to be split up and potentially connected with HOCs in separate places.
- Our E2E tests are slow, super flaky, and hard to debug.
- Implementation failure: The suite needs to be built with robustness and more resilient to network delays. We need to surface all errors and ensure we can easily see and replicate them.
- Bonus design failure: We have way too many E2E tests and should rebalance with other types of tests.
- Building a messaging service: the implementation had state issues on crashes and couldn't keep up with events.
- Implementation failure: Messaging still decouples and solves our performance and feature requirements, but our first attempt was not maintainable.
Implementations may need to be scrapped or heavily reworked, but design failures will always need to go. Of course, your team may just be frustrated with a salvageable failure and want a fresh start. And sometimes, that's okay. But be careful not to discount ideas without thinking through this question.