DEV Community

Cover image for 5 habits every developer should adopt!
Pasca Vlad
Pasca Vlad

Posted on • Updated on • Originally published at vladpasca.hashnode.dev

5 habits every developer should adopt!

If you found value in this thread you will most likely enjoy my tweets too so make sure you follow me on Twitter for more information about web development and how to improve as a developer. This article was first published on my Blog.

1. Don't repeat yourself

This habit is based on DRY.

The “Don't Repeat Yourself” principle is a software development practice aimed at reducing the repetition of information.

So when you have a piece of code that repeats in your codebase try to put that into a function.

2. Code every day

This is so important especially if you're learning how to code.

Typing some code for as little as 15 minutes every day can increase your skills a lot faster.

And by developing this habit you won't rely on motivation.

3. Never stop learning

Being a developer is a lifelong learning journey.

The worst thing you can do as a developer is to stop learning new technologies.

This field evolves so fast and you need to keep up with it.

4. Think before you write code

Don't just write code without having a solution in mind.

Start by thinking about the solution for the problem you want to solve and only after that start to write it.

This will save you a lot of time down the road.

5. Avoid burnout

Listen to your body.

When you feel like you need some rest take a break.

Burning out == at least a few weeks of no code.

A small break from time to time can help you avoid this.

Conclusion

I hope found this useful and if you did please let me know. If you have any question feel free to DM me on Twitter .

Top comments (32)

Collapse
 
mmj profile image
MMJ

There's a little mistake in point 5.
I wouldn't write

Burning out == at least a few weeks of no code.
Enter fullscreen mode Exit fullscreen mode

but

if (Burning out) {
 at least a few weeks of no code.
}
Enter fullscreen mode Exit fullscreen mode

Just joking of course. Nice tips! :)

Collapse
 
tilkinsc profile image
Cody Tilkins • Edited

I can attest to failing #5. I simply get in tuned with working hard on projects for multiple hours at a time. Then I simply just die and can't look at code for a month. I have github commit history to prove this.

Collapse
 
pascavld profile image
Pasca Vlad

You need to find a balance mate

Thread Thread
 
tilkinsc profile image
Cody Tilkins

Unlikely to happen :D

Collapse
 
sanjaysinghrajpoot profile image
Sanjay Singh Rajpoot

This is what happens after burnout 🤣

Collapse
 
mmj profile image
MMJ

Exactly! :D

Collapse
 
pascavld profile image
Pasca Vlad

Haha, good one mate

Collapse
 
gecikadm profile image
GecikaDM

Good points! I am agree about point 5, it happened to me and I ve been for a long time then away from coding... It took me a while to get back to it, and now I try to take it easy and get some break more often 👍

Collapse
 
pascavld profile image
Pasca Vlad

This is great, as long as you know that burnout is real you'll be ok

Collapse
 
tankerguy1917 profile image
tankerguy1917

I to agree with point 5. I love coding, but I often find myself getting tired and not coding for a few days at a time

Collapse
 
pascavld profile image
Pasca Vlad

You need to find a balance

Collapse
 
kamilliano profile image
kamilliano

I would change the title to: "Do these 5 things at least once, then adopt these 5 habits that should make your life easier!"
😅 I am a slow learner and still don't listen to my past mistakes that you mentioned.
I don't code every day because of 3. 4. 5.

Collapse
 
pascavld profile image
Pasca Vlad

Everyone's journey is different, don't compare yourself with others and you'll be all right

Collapse
 
kamilliano profile image
kamilliano

My journey employs a lot of brute force method. Sometimes I feel like Michael Bay of dev world 💥💥💥

Collapse
 
andreidascalu profile image
Andrei Dascalu

Just a note, dry is not about code, it's about knowledge. verraes.net/2014/08/dry-is-about-k... Makes a nice concise example about the difference.

Also DRY is not an absolute principle. It's good, sure but it's nearly impossible to ensure in large projects.
It's a nice ideal but imagine a large team. How would you ensure knowledge about existing representation? Mandatory research before any new feature? We all know no documentation is perfect....

WET can be a nice compromise, where two concurrent independent representations are allowed but never 3 (a third would result in refactoring)

Collapse
 
tilkinsc profile image
Cody Tilkins • Edited

In terms of abstraction, I will create the all new acronym PAPAGO - pick a paradigm and go. If you plan to write something that has the same lifestyle compared to others, you should probably box that in some guiding interface - pick a paradigm. How should I represent this code?

This way you not only have a structure to build off of, but it greatly reduces the amount of code. Otherwise, every other class is going to have a Load function. Some named differently. Especially if said code doesn't use the Load function in the first place. A nice interface to a class like this would be would be ILoadable and you can separate the loadables from the unloadables.

Having a neat structure means you can easily batch things together and have a fairly nice stack unwrap when something bad happens. I stay away from abstract classes as much as possible in place for interfaces. They bridge the gap of 'Mandatory research before new feature' by having something you can easily walk through not only in code, but again the stack unwrap.

There is a difference between 'oh one of my classes failed to load' and 'oh one of my loadable classes failed to load' that only experience can make you appreciate.

Collapse
 
yoursunny profile image
Junxiao Shi

I'm the stallion coder 🦄 and I cannot possibly burn out.

Collapse
 
pascavld profile image
Pasca Vlad

I don't think so:)

Collapse
 
yoursunny profile image
Junxiao Shi

The closest I got was one day of no coding after 20 days of 9~14 hours. I did logo designing on that day.
twitter.com/yoursunny/status/12791...

Collapse
 
pranavbaburaj profile image
Pranav Baburaj

Hey @pascavld , thanks for those tips 😄

Collapse
 
pascavld profile image
Pasca Vlad

Glad you found these useful mate

Collapse
 
michaeljo94 profile image
Michael

TL:DR;

if burnout:
    # No Code
    pass
Enter fullscreen mode Exit fullscreen mode
Collapse
 
jakedamon profile image
Jake

Thank-you for these tips! Very useful.

Collapse
 
pascavld profile image
Pasca Vlad

Glad you found these useful mate

Collapse
 
anshulnegitc profile image
Anshul Negi

What about a few exercises?

Collapse
 
pascavld profile image
Pasca Vlad

Yes, this is really important too

Collapse
 
tankerguy1917 profile image
tankerguy1917

Sadly, I suffer from point 5, fairly often. I don't realize that I'm burnt out until its to late, and then I stop practicing for a few days to even a week.

Collapse
 
pascavld profile image
Pasca Vlad

You really need to find a balance mate, maybe don't touch coding at all during the weekends. Find what works for you

Collapse
 
sara_kh06 profile image
سّ ا ر ة

.. / .-.. --- ...- . / -.-- --- ..- / -... .- -... -.--

Collapse
 
aalphaindia profile image
Pawan Pawar

Thanks for sharing!!

Collapse
 
devcse profile image
devcse

nice tips, codesnipeet.com/

Collapse
 
rishthekingboy profile image
Rishabh Singh

Damn true