1
vote
3answers
177 views

Redundant function to clarify purpose? [duplicate]

Since what matters is not how the code does it but what it does, would you consider wrapping a function with a different name just to clarify it's behavior in certain situations a good practice? ...
8
votes
5answers
203 views

Gathering all data in single iteration vs using functions for readable code

Say I have an array of runners with which I need to find the tallest runner, the fastest runner, and the lightest runner. It seems like the most readable solution would be: runners = getRunners(); ...
-1
votes
1answer
197 views

Checking timeouts made more readable

I have several situations where I need to control timeouts in a technical application. Either in a loop or as a simple check. Of course – handling this is really easy, but none of these is looking ...
10
votes
4answers
718 views

Should we rename overloaded methods?

Assume an interface containing these methods : Car find(long id); List<Car> find(String model); Is it better to rename them like this? Car findById(long id); List findByModel(String ...
5
votes
4answers
2k views

Is nesting types considered bad practice?

As noted by the title, is nesting types (e.g. enumerated types or structures in a class) considered bad practice or not? When you run Code Analysis in Visual Studio it returns the following message ...