It's important as developers that we are careful to not make unnecessary, redundant method calls.
During code reviews, I often come across situations where code is doing this extra, unneeded work.
In the short term, it may make the code slightly slower. But longer term, as code is updated for
future versions, redundant calls could have more drastic effects on performance.
Read more...
Correct sorting is very important. Incorrect sorting often leads to subtle defects or sloppy display
results. For some developers, sorting is an after thought. They don't give enough consideration to
confirming their sort orders or to their code behind their sorting.
Read more...
When developers have a new piece of data to handle, they will create a new type for that data. That's
a pretty standard approach. But they often don't create new types to handle a list or
collection of that data, or even a type for the identifier. Having these extra types can
yield many benefits.
Read more...
Get vs. Find is a simple code naming convention for increasing code readability while decreasing code
complexity, the amount of code written and potential defects. When fetching data, from something
such as a list, map, set, or even permanent storage, the developer will know when the data
being fetch should always be found (i.e.gets
) or not (i.e.
finds
).
Read more...
Identifiers are unique types and should be treated as such in our code. In software, we create object
types to model the world around us. We create unique object types to model specific data.
Identifiers too are a model of a specific kind of data, with its own unique scope. The identifiers
for one type of data is completely different than the identifiers in another type of data.
Read more...
What's in a name? Well, everything. As developers, we spend a great deal of time reading code, both
our own and other developers' code. We should be able to jump back into code written last week, a
year ago or 10 years ago and be able to easily read it. This all starts with good naming.
Read more...