TIL it’s entitled to ask that software you use is either compliant with the law or clearly lets you know that it isn’t, especially when the developers have no idea what the law is
TIL it’s entitled to ask that software you use is either compliant with the law or clearly lets you know that it isn’t, especially when the developers have no idea what the law is
I mean, the example kinda implies that this is on a Customer
type. Otherwise you’d have a method getCustomerId
instead.
I’m a bit split on this. I do think in general all functions and methods should have comments describing how they behave, but I also think the standard format of Javadoc or JSDoc can look a bit redundant and silly sometimes, at least wrt getters and setters. I often see things like
/**
* Get the customer ID.
*
* @return the ID of the customer
*/
public getId(): string {
// ...
}
Now sure, you could argue that this is more of a problem with the Java-esque way of abstracting away field access than with the documentation, but sometimes there just genuinely isn’t anything meaningful to add that isn’t already expressed by the method name and signature. In that case, these comments add visual noise to the class and no real value. As soon as there is more logic to it than that though, I completely agree that should be documented for any caller.
I’m not sure I like it better, but I do find Kotlin’s approach to this quite interesting, where parameters and return values are referenced from the description text rather than always listed separately.
Here's a really small and easy to fix pet peeve of mine: graphics options that cycle through the levels of fidelity with inconsistent scales. I like to set my graphics to max, try it out, and then adjust down where needed. It's very annoying if a game doesn't stop where the max option is, so if it's currently at "High" I have no idea if the next option to the right is going to be "Very High" or "Low" again. So I often end up overshooting the highest setting and having to go back one, or purposefully going to the lowest setting and then one further.
deleted by creator
It’s great for racing games where you have gradual steering but also quicker response times than with a controller