DEV Community

Discussion on: Philosophy of a Good Developer

Collapse
 
leob profile image
leob

Regarding comments, there's one thing that I often do:

When I've found a solution to a particularly hard or obscure problem via StackOverflow or another internet resource, I almost always include the URL to that resource as a comment above the piece of code where I'm implementing it in my app's source code.

This way, whenever another dev (or myself) revisits that piece of code they're never left scratching their head "what the heck is this supposed to do", they can simply visit that link and read about the background.

Collapse
 
sarthology profile image
Sarthak Sharma

Wow, that’s so thoughtful. ❤️

Collapse
 
leob profile image
leob • Edited

Well at some point it came naturally. Solutions sourced from SO or anywhere else can be pretty opaque and hard to understand when you're missing the context. To solve that I could copy/paste the text of the SO post as a comment, but just pasting the URL is easier and makes more sense. At the same time I'm sort of building up a little knowledge base. It's just become a habit and I'm pretty much always doing it (unless the solution is really obvious/trivial).