Tagged Questions
8
votes
5answers
530 views
Which is more maintainable — boolean assignment via if/else or boolean expression?
Which would be considered more maintainable?
if (a == b) c = true; else c = false;
or
c = (a == b);
I've tried looking in Code Complete, but can't find an answer.
I think the first is more ...
85
votes
12answers
28k views
Why is Clean Code suggesting avoiding protected variables?
Clean Code suggests avoiding protected variables in the "Vertical Distance" section of the "Formatting" chapter:
Concepts that are closely related should be kept vertically close to each other. ...
3
votes
4answers
392 views
Reusable VS clean code - where's the balance?
Let's say I have a data model for a blog posts and have two use-cases of that model - getting all blogposts and getting only blogposts which were written by specific author.
There are basically two ...
27
votes
9answers
2k views
How clean should new code be? [duplicate]
I'm the lead designer in our team, which means I'm responsible for the quality of the code; functionality, maintainability and readability.
How clean should I require my team members' code to be if ...
11
votes
4answers
857 views
Good use of try catch-blocks?
I always find myself wrestling with this... trying to find the right balance between try/catching and the code not becoming this obscene mess of tabs, brackets, and exceptions being thrown back up ...
6
votes
6answers
245 views
Is code maintenance typically a special project, or is it considered part of daily work?
Earlier, I asked to find out which tools are commonly used to monitor methods and code bases, to find out whether the methods have been getting too long.
Most of the responses there suggested that, ...
23
votes
6answers
639 views
What payoffs have you seen from taking care of technical debt?
This article on technical debt has some good points, including:
Working on the "technical matters" works best when it is driven by stories. The code base is probably in need of work everywhere, ...