Developer Cheatsheets
Shipping Fast
Extra: Going Fast Everywhere Else

Some Thoughts on #CodingPasses

There are countless facets of development that could be divided into separate 'passes' or phases. Let's consider a few examples:

  1. Styling and Theming: In the first pass, you might opt for inline styles or fundamental CSS classes. The second pass could see you transforming your styles into a CSS-in-JS approach like styled-components or employing a CSS framework such as Tailwind. The third pass may involve creating a shared theme or design system to ensure consistency throughout your application. By the fourth pass, you could be adding features like dark mode or other accessibility options.

  2. Data Fetching and State Management: The first pass might see you fetching data directly in your components using the fetch API. In the second pass, you could refactor this into a custom hook, making your data fetching code reusable. Should your application's state complexity grow, the third pass might see the introduction of a state management library like Redux or MobX. The fourth pass could add caching or other performance enhancements.

  3. Routing and Navigation: In the first pass, you might have simple routes without nested routes or parameters. By the second pass, you might start working with route parameters, query parameters, and nested routes. The third pass could see the introduction of transitions or animations between routes. In the fourth pass, you could include robust error handling for 404 pages and other routing mishaps.

  4. Forms and Validation: The first pass might involve creating straightforward forms with default HTML validation. In the second pass, a form library like Formik or React Hook Form could be introduced to help manage your form state. The third pass might see complex validation rules added using a library like Yup. By the fourth pass, you could be adding real-time validation or other enhancements to improve the user experience.

  5. Testing: In the initial pass, you might write basic unit tests for your components. The second pass could see you introducing integration tests to examine larger parts of your application together. In the third pass, end-to-end tests using a tool like Cypress might be added. The fourth pass could involve performance testing or other advanced testing techniques.

  6. Performance Optimization: In the first pass, you might primarily focus on building your application without any specific attention to performance. In the second pass, you might start utilising performance profiling tools to identify any bottlenecks. The third pass could see you refactoring your code to enhance performance, using techniques like memoization or virtualization. By the fourth pass, you could introduce advanced performance optimisations, like code splitting or service workers.

Keep in mind that the precise sequence and significance of these stages will depend on your specific use case and the requirements of your application. It's always best to prioritise the features and enhancements that will provide the most substantial impact for your users and your business.