News for hackers. Stuff that matters.
Re:Reducing technical debt by valuing comments as much as code by adamwk on Tuesday January 31, 2023 @04:35PM (#34602546)
I went from a rails developer to iOS; Apple and iOS developers in general are pretty good at comments, and I now value them more. Comments at the API level mean I don’t have to go diving however deep to find out what a method does. If they’re really good, they can also be used to distinguish the specification from what’s actually happening when there are bugs.

In the simplest cases, sure you don’t need to write “getName returns a user’s first name and last name separated by a space character,” but I’m guessing the method requestPurchase will have a lot of nuance and I hope it’s documented (yes, even the “what happens”)

Re:Reducing technical debt by valuing comments as much as code by still_grokking on Tuesday January 31, 2023 @06:12PM (#34603719)
> “getName returns a user’s first name and last name separated by a space character,”

This would be actually a quite interesting comment as it indicates that the implementation of `getName` is buggy in regard to internalization.

Here's the classic post about this topic:

https://www.kalzumeus.com/2010/06/17/falsehoods-programmers-...