Re:Ask HN: What are the best programming tricks you know?
by jack_codes on Monday July 25, 2022 @09:27AM
(#32223935)
Maybe not a 'trick' but writing comments before I dive into the code helps me structure my thoughts and then piecemeal the work.
[ Parent
| on HN ]
Re:Ask HN: What are the best programming tricks you know?
by taneq on Monday July 25, 2022 @10:04AM
(#32224468)
Yep, I write comments to figure out what I'm doing, and then the code writes itself. It's gotten to the point where it's hard to code without writing the comment first, and usually the comment gets rewritten multiple times before I write a single line of code (thus saving me rewriting dozens of lines of code multiple times.)
Re:Ask HN: What are the best programming tricks you know?
by rovr138 on Monday July 25, 2022 @09:35AM
(#32224041)
I write comments and create lists for what should happen.
As I go through the list, I take the line and place it above the code.
Besides helping me go through things, it also helps anyone that comes in months after to work on it.
Re:Ask HN: What are the best programming tricks you know?
by napolux on Monday July 25, 2022 @09:30AM
(#32223959)
yep, I use them as a blueprint for what I'm going to write...
Re:Ask HN: What are the best programming tricks you know?
by kacperlukawski on Monday July 25, 2022 @09:33AM
(#32224013)
That's not necessarily a trick I meant, but definitely a good piece of advice. Do you keep them in the codebase after implementation or is it just for you while developing to sort things out?