DEV Community

Discussion on: Which process do you follow before code?

Collapse
 
kspeakman profile image
Kasey Speakman • Edited

If I am not sure about the implementation, I open a text editor and type out the requirements that need to be met. Like bullet points, but more free form. Then I consider each bullet point, and I start to type the considerations for it nested underneath the point. I go back over each one several times and update them as I think of things. Sometimes this exercise just helps clarify my thinking on what to do but I don't actually look at it again. Other times I will go through it as I implement. It rarely ends up structured in code just like in the text file, but it helps.

If the problem at hand is more conceptual, I am likely to draw boxes and lines on a piece of paper or whiteboard. One thing I like to do is for every box, I draw speech bubbles off of it to represent each concern that needs to be addressed by that piece. For instance, if I represent an API as a box I might have bubbles coming off it for: Cross-Origin Resource Sharing (CORS), JWT auth, SSL cert mgmt, logging, secret mgmt, config, throttling. And then I will continue to draw bubbles off those bubbles to represent underlying concerns for those aspects. Often I will even draw branching chains of bubbles to represent possible ways to implement something, and bubbles off each implementation representing the trade-offs. That helps me decide which trade-offs are more favorable for a particular piece of the design.