Using empty subclasses to add to the semantics of a class hierarchy?
I was wondering whether using (almost) empty derived classes to give additional semantics to a class hierarchy was a good idea (or practice) ?
Studies on how well can a programmer understand code in unfamiliar languages? [closed]
Closed 10 years ago.
When should code favour optimization over readability and ease-of-use?
I am in the process of designing a small library, where one of my design goals is that the API should be as close to the domain language as possible. While working on the design, I’ve noticed that there are some cases in the code where a more intuitive, readable attribute/method call requires some functionally unnecessary encapsulation. Since the final product will not necessarily require high performance, I am unconcerned about making the decision to favour ease-of-use in my current project over the most efficient implementation of the code in question.
Functional programming readability [closed]
Closed 7 years ago.
What happens to programmers most oftenly while reading the code of others? [closed]
Closed 10 years ago.
Are long methods always bad? [closed]
Closed 5 years ago.
Distinguishing repetitive code with the same implementation
Given this sample code
Which is more maintainable — boolean assignment via if/else or boolean expression?
Which would be considered more maintainable?
“static” as a semantic clue about statelessness?
I’ve recently undertaken a refactoring of a medium sized project in Java to go back and add unit tests. When I realized what a pain it was to mock singletons and statics, I finally “got” what I’ve been reading about them all this time. (I’m one of those people that needs to learn from experience. Oh well.)
Question regarding code readability
I would like to know, is it considered a common practice to use constructions like |=
, &&
, ||
, !=
altogether in the single line of code?