2 ms·
If each section is only a few lines, you've doubled your function length without giving any context relevant to someone who has written code before. If those a
by joshuamorton 6y ago
If each section is only a few lines, you've doubled your function length without giving any context relevant to someone who has written code before.
If those are long/complex enough that you need to keep track of the sections individually, yeah break them out!
Like, what insight does "perform io operation" provide beyond what f.write() already gives?
- war1025 6y ago> what insight does "perform io operation" provide beyond what f.write() already gives? Often maybe it won't give any insight, in which case it gets left out. Basically, the general idea is that I am denoting and grouping chunks of code together sort of like section headers to form an outline of what is happening. A random example from a file I was working on recently: #{ Attempt to handle the case where Redis loses our access token # for some reason ... #}