For some reason, I like having a notebook with me to write stuff down. But I never do.
When I encounter a coding problem I start problem solving it in my head. I always feel I’m on the verge of solving it and don’t need to write it out and reaching for that notebook would be a waste of time.
Is it laziness? A habit? I don’t know, but I’m trying to get better about writing out problems because there are so many benefits which I have noticed right away.
It’s much easier to visualize the problem when you can see all the parts. Trying to juggle it all in my mind ends up with a dropped piece
There was a time I tried to figure out the spacing of some elements to display in justified formatting. So in my head I figured there’s a total 90 spaces. There’s two elements that are static at a total of 8 spaces. I wanted to fill in the blank space with a repeating “ .”
So each repeating dot is two spaces. The dynamic element could be any length. So… static minus dynamic divided the repeating space + dot. But if that results odd I need and extra space… but if the dynamic is odd also I need one less dot… so the answer is…….. …. … I should have wrote it down to begin with.
Solved it much faster that way.
So writing it down/white boarding is good for problem solving. But its also great for starting a problem to solve. Before even typing one line of code it’s a great idea to write out the structure / framework / skeleton / what ever you call it / of the program. It might save you time in the future when you realize something in your data tables should have been something else, or you should have laid out something different and now you have to redo a bunch of code.
You need it for coding interviews
In the coding world, there are also white board portion during interviews. (Or so I’ve been told). It will test your problem solving abilities and your communication skills. You’ll need to go over your solution, which I personally find nerve wracking so better to start practicing now!
A final note
I had another thing I wanted to go over but I didn’t write it down when I was drafting this. So… let that be a lesson. WRITE IT DOWN.