3 ms·
You can even apply this idea in a literal sense around pre-op preparation too. I've often talked about and practice this for certain types of code changes. For
by nickjj 5y ago
You can even apply this idea in a literal sense around pre-op preparation too.
I've often talked about and practice this for certain types of code changes. For example let's say you have a big chunk of code in 1 function or file (how you got into this situation isn't important).
When it comes to real life surgery often times the area being operated on will get isolated. Maybe there's a blanket over everything with a cut out near your stomach or whatever is being operated on.
You can do the same thing with large chunks of code. If you plan to modify something or add something new you can add a bunch of line breaks before and after the area giving you some form of isolation. If you don't do this you can easily get lost in the details of the things around it, especially if it's someone else's code. You'll be surprised at how useful this ends up being to keep you focused.
- claylimo 5y agoI do something similar except I just stub in comments with a description of the functionality I think may need to exist there. It really does feel like surgery and allows for more high level planning before committing to write a line of code.