DEV Community

Cover image for Worth the 5 Minutes

Worth the 5 Minutes

Rini Simon on February 28, 2019

I have been coding for a few years now and there was a time when I struggled with a issue. Let me explain. It was hard for me to start writing co...
Collapse
 
iskndrvbksh profile image
Baba

i use draw.io for a long time and it gives me 'birds view'

Collapse
 
hdv profile image
Hussein Duvigneau • Edited

Same. I find it so much easier to navigate flow charts than paragraphs of textual documentation. I'm sure other people with dyslexia on the team would also appreciate it.

That said though, if a function becomes so convoluted that you find yourself needing to document it like this, it's usually time to break the function up. Keep the flowcharts to plan and/or map out the bigger picture.

Collapse
 
rinisimon profile image
Rini Simon

I know about the tool, but never tried it, will try it out.

Collapse
 
hdv profile image
Hussein Duvigneau

This is the first step to good unit testing practice.

Once you've got into the habit of breaking down a routine into a set of discrete functions, clearly defining what the inputs and outputs should be, it's not such a big leap to habituate writing the unit tests which enforce the function's role.

Collapse
 
kristijan profile image
Kristijan

Simon, thank you so much for this post! I started learning to code 5 months ago. Learning theory is going good, but i really have problem putting into the practice. Your post really encouraged me! Thank you!

Collapse
 
rinisimon profile image
Rini Simon

Hi! I have been there and i know how it feels, just hold on and don't give up. Don't stop practicing, practice is what makes you better when it comes to coding and errors is what teaches you. Am really glad my post encouraged you. All the best!

Collapse
 
l0x0s profile image
l0x0s • Edited

Hi Rini, thanks for the article.
could you give a real example ? I'd be curious to see how details you are in your steps and if you're more desbribing feature step or technical step .

I agree with you , with experience I tend to spend more time thinking about the code before starting than younger where I wanted only to be in code (I needed a lot of issues and dead-end to realize thinking before code is useful ! )

Collapse
 
rinisimon profile image
Rini Simon • Edited

I do agree with you, for me as I learnt I stopped writing most of the details because I was aware of them in my head. This is a small example of what I do, I do keep adding notes to it on the go. Hope it helps.

alt text

Collapse
 
madhavgupta profile image
Madhav Gupta

I so need to do this,I take it all in my mind and not write it sometimes, ends up getting confused in the middle of process,great read..Thanks.

Collapse
 
rinisimon profile image
Rini Simon

Writing it down gives you a better understanding and helps you align your ideas. I am glad you liked the post :)

Collapse
 
karaluton profile image
Kara Luton

Love this! I take a similar approach and it's really helped me think through exactly what I need to do when I'm having a block.

Collapse
 
rafalpienkowski profile image
Rafal Pienkowski

This guideline nicely follows the ”think twice, do once” rule.

Collapse
 
rinisimon profile image
Rini Simon

Yes, even if your not ready to think twice, you kind of are ticking yourself to do so.

Collapse
 
davidhbolton profile image
David-H-Bolton

Inputs, outputs and the bit in the middle was how Jackson Structured Programming used to be described. It's a bit more than that. en.wikipedia.org/wiki/Jackson_stru...

Collapse
 
steelwolf180 profile image
Max Ong Zong Bao

Hahaha, this is exactly what my boss is asking me to do when he is giving me advice on time management. Honestly, it feels kind of hard to do to start.

Collapse
 
rinisimon profile image
Rini Simon

I was very reluctant too but i did give it a try and trust me its not that difficult at all. Eventually i have seen a change in my perspective, the way i approach a task. so just try it, nothing there is nothing to lose. All the best :)