|
|
|
|
|
by Someone1234
847 days ago
|
|
Comments that say HOW commonly useless, as that is almost always self-evident (i.e. "just read the code."). Comments that explain WHY are worth their weight in gold, and not something AI could ever create. For example: // How: This filters records by MyType of J and if they have children
// Why: We want Jobs (J) when those Jobs have Children. Otherwise, we'll get JobGroups or Jobs without any Children we need to process below.
.Where(T => T.MyType == "J" && T.Child.Count() > 0);
WHY are, by their very nature, business rules or explaining a thought process. If the original developer of the code moves on or is unavailable, that information can sometimes not be found elsewhere. |
|
Really? You don't think it's a matter of updating the prompt and expanding the context to include more of the code?
I don't know the exact method of how they generated these comments, but I think just focusing a prompt on a single method with the entire codebase in context would yield much better results.