News for hackers. Stuff that matters.
Re:Ask HN: What are your favorite developer-efficiency tips? by whoisjuan on Friday May 08, 2020 @08:24PM (#23121001)
A similar idea I practice. After I solve a complex problem I usually leave a big comment at the top of the main file, explaining how I arrived at that solution, the caveats, how it works, and how it interacts with other files and dependencies.

If I need to, I also use Monodraw to produce ASCII character graphs and add them to the comment to explain concepts.

It helps to cement the solution in your brain and it's a system of record on how it was accomplished in case you forget.

I do this only for personal projects though. I don't think co-workers would appreciate an essay with exhibits at the top of a file, lol.

Re:Ask HN: What are your favorite developer-efficiency tips? by owl57 on Sunday May 10, 2020 @05:42PM (#23136504)
> I don't think co-workers would appreciate an essay with exhibits at the top of a file, lol.

Why? I don't really have an experience of being a co-worker, but I have always appreciated such essays in free software.

Re:Ask HN: What are your favorite developer-efficiency tips? by mvanbaak on Saturday May 09, 2020 @12:10PM (#23125937)
Instead of putting it as comment in the file, put it all (including graphs etc) as commit message when you commit the feature/fix