Remix.run Logo
epolanski 4 days ago

I like antirez' style of comments.

He starts implementing any module or function by first writing the documentation for it and let's it guide both the functionality and structure.

Makes Redis also extremely easy and enjoyable to read.

Random example: https://github.com/redis/redis/blob/unstable/src/aof.c

CuriouslyC 4 days ago | parent | next [-]

This is a great practice. I used to do it when writing complex algorithms, I'd do pseudo-code comments to outline functionality, then basically implement the comments line by line.

Now I sometimes use this practice when working with agents, if I need something done just a certain way. It's time consuming, but it produces good results.

boredemployee 4 days ago | parent | prev [-]

Really nice, we would have a better world if comments like that were the standard.