1. If your snippet has specific functionality, put it in a function. This allows me to quickly test it as a module. There are exceptions to this, but by and large, it should be in a function (or method if you're British in Java).
2. Provide a description. The field is there, but often is unused. Context is key in this business. Sure I can tell "what" your code is doing from the code, but the "why" is just as important. It's a brief glimpse into your thought process and that is infinitely more interesting then anything you could write.
3. Provide a test case, especially if you neglected number two. What you used you as input, what you got as output, and a brief description. Or, at the very least, expected I/O sans details. It would be even better if you provided a small sample implementation (a little main() or whatever).
4. If you pulled an algorithm from somewhere, post the algorithm or its source. i.e. there are a lot of ways to calculate sine/cosine/other math functions which often differ in minute ways. Linking or posting the "blueprint" allows a quick verification to see if it's right or if any small changes are needed to make the function work.
2. Provide a description. The field is there, but often is unused. Context is key in this business. Sure I can tell "what" your code is doing from the code, but the "why" is just as important. It's a brief glimpse into your thought process and that is infinitely more interesting then anything you could write.
3. Provide a test case, especially if you neglected number two. What you used you as input, what you got as output, and a brief description. Or, at the very least, expected I/O sans details. It would be even better if you provided a small sample implementation (a little main() or whatever).
4. If you pulled an algorithm from somewhere, post the algorithm or its source. i.e. there are a lot of ways to calculate sine/cosine/other math functions which often differ in minute ways. Linking or posting the "blueprint" allows a quick verification to see if it's right or if any small changes are needed to make the function work.
0 Comments On This Entry
← January 2022 →
| S | M | T | W | T | F | S |
|---|---|---|---|---|---|---|
| 1 | ||||||
| 2 | 3 | 4 | 5 | 6 | 7 | 8 |
| 9 | 10 | 11 | 12 | 13 | 14 | 15 |
| 16 | 17 | 18 | 19 | 20 | 21 | 22 |
| 23 | 24 | 25 | 26 | 27 | 28 | 29 |
| 30 | 31 |
Tags
My Blog Links
Recent Entries
Recent Comments
Search My Blog
23 user(s) viewing
23 Guests
0 member(s)
0 anonymous member(s)
0 member(s)
0 anonymous member(s)



Leave Comment









|