Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
lxmcf199506yWe all seem to forget breakpoints and debuggers exist for this purpose...
I always comment stuff that's fucking up as well so i know the feels, half my projects have half there code commented because I'm hunting a bug haha -
You should always comment nested if else blocks, unless they are really trivial. That does not only increase readability, it also helps you to quickly grasp the complicated shit you wrote six weeks ago feeling ingenious. 😉
-
If the blocks aren't trivial two-liners, especially the else deserves a comment what situation is being handled here. The "if" part can be made self explanatory with proper variable naming, but "else" is always somewhat sucky.
-
@lxmcf I did not put that much effort in installing a debugger into my vs code to debug my node.js express app ^^
-
maybe try something like this (warning: ruby included but reaaaally good talk) https://youtu.be/OMPfEXIlTVE
-
@Fast-Nop Yeah that was mainly The Problem for me. I ended up doing some method chaining and refactoring to methods but sadly this was only partial possible
-
rA29316y@hypervtechnics vscode has a built-in node debugger...
Try to set some breakpoints and hit F5
https://code.visualstudio.com/docs/...
Related Rants
You know shit gets serious when you start to comment your nested if/else blocks...
rant
nested ifs
commenting code
ai