Is a code refactoring rule of thumb to decide when a replicated piece of code should be replaced by a new code/procedures/methods.
It states that you are allowed to copy and paste the code once, but that when the same code is replicated three times, it should be extracted into a new procedure.
The main concept is to make code/procedures/methods generic so it can be reused in many places.
Being consistent with the structure and how you code things. This can help with the readability & maintainability of your application.
Try and come up with coding standards, that help with consistency. It should be as little as the naming conventions of your variables. Another big one is the structure of the application, it should be obvious where the developer needs to make changes or add something new. …
Whatever programming language or technology you’re using as a developer you will always come across them generic useless error messages. These type of errors are very time consuming when it comes to debugging as often it leaves developers with no starting point.
Names which do not reflect what a function, class or variable is for. This can make the code hard to follow very quickly and can become misleading.
var d = 2;
var myInt = 12;
var message = "An error";
When a project comes in and is needed in a hurry the tests can sometimes take a hit. Developers may get told to write tests latter but more times then not them test never get written. …
Hopefully, there will be at least a couple on the list which you didn't know about!
One HTML element that you don’t see used much at all and for no reason!
<datalist> tag is used to provide an "autocomplete" feature for
<input>elements. You will see a drop-down list of pre-defined options as you type.
<input list="animals" name="animal" id="animal"><datalist id="animals">
<datalist> id attribute (see bold items above) must be equal to the list attribute of the
<input> , this is what binds them together. …