Comments by "MrAbrazildo" (@MrAbrazildo) on "Being An Efficient Developer | Prime Reacts" video.
-
2:45, I once read a book by someone that used to code like that. It is pretty legible indeed. However, I don't code like that, because there's too much waste of time and energy by traveling vertically throughout the code. And there's also the worry about discapsulating things that, if not hold by a class or something alike, can then be called by the rest of the project, raising chances of bugs.
I prefer f()s that fit in 1 screen. They may be bigger, if there are more things that don't make any sense to be seen by the rest of the code.
6:07, I guess for small/tiny f()s, it's easy to know what tests 1 wants. And even if the code is from someone else and you don't understand it, if it has tests, it's possible to refactor it, even fast.
9:20, from my experience from timed work, I can say that often there are tiny interruptions. And if the programmer stops the clock at each of them, the resulted time is almost double. Examples: a) 2h -> ~3:30; b) 4h -> ~7:20.
It's not because I took too much time to go back. It's simply a matter of too many interruptions: a glimpse of an idea that you don't want to miss, someone talking to you, an uncertainty about the work, some stress, some feeling about hunger or thirst, a joke that you remember, and so on. It's inevitable. I guess that if someone makes a true effort to eliminate this, his stress will skyrocket. 10:12, I agree with you here, but it's not what happens, as I explained.
1