What great developers do day to day

What great developers do day to day
What great developers do day to day
Photo by Thirteen .J on Unsplash

Rule of 3.

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.

Consistency is king

Being consistent with the structure and how you code things. This can help with the readability & maintainability of your application.


Daily struggles of being a Software Developer

19 things that software developers hate to hear/see
19 things that software developers hate to hear/see
Photo by Toshi on Unsplash

1. Useless error messages

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.

2. Badly named things

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";

3. “We’ll write tests latter”

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. …


Interesting tricks you can do with HTML/JS/CSS

Frontend tricks. HTML/CSS/JavaScript
Frontend tricks. HTML/CSS/JavaScript
Photo by FLOUFFY on Unsplash

Below are some tricks which a lot of frontend developers don't know about. To do with HTML/CSS/JavaScript.

1. Datalist element

One HTML element that you don’t see used much at all and for no reason!

Image for post
Image for post
<datalist>

Example:

<input list="animals" name="animal" id="animal"><datalist id="animals">
<option value="Cat">
<option value="Dog">
<option value="Chicken">
<option value="Cow">
<option value="Pig">
</datalist>

The <datalist> id attribute (see bold items above) must be equal to the list attribute of the<input> , this is what binds them together. …

About

Daniel Anderson

Full stack lead developer, from Manchester(UK)

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store