• 0 Posts
  • 5 Comments
Joined 1Y ago
cake
Cake day: Jul 30, 2023

help-circle
rss

I’ve worked on satellite command and control software that is literally using a 1970s OS. The code is limited for historical reasons and you have to work with the structure you are given.


Could be worse, it could’ve been customer_ID, Customer_id, customer_Id…


Yes, you don’t need to comment “n++” to say it is incrementing it but you should mention why you are starting with 1 instead of 0, etc. Boundary conditions are notoriously tricky and need to be documented. Then there are historical reasons that are NEVER obvious, “This function has to return -2 as a default because we’ve been calling it using X for years and it expects a -1 as the error…”


I like it when people rag on their own code in comments. “This line is a kluge but I can’t think of a better way to do it right now.” Comment is dated 10 years ago.