3 ms·
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 function
by epolanski 10mo 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 https://github.com/redis/redis/blob/unstable/src/aof.c
- boredemployee 10mo agoReally nice, we would have a better world if comments like that were the standard.
- CuriouslyC 10mo agoThis 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.