DEV Community

Cover image for 5 Bad Habits of Software Developers

5 Bad Habits of Software Developers

Ilona Codes on August 10, 2019

There is no hard and fast rule as to how a programmer should program. So, there is nothing wrong if you have your own style of programming. There ...
Collapse
 
codemouse92 profile image
Jason C. McDonald

On the topic of documentation, I'd say that using Doxygen or some other API autodoc tool is not the solution most people think it is. Useful documentation almost always has to be written by hand, otherwise it's like teaching someone to use a toaster by explaining the electrical specifications of the heating element.

Regard "night owls", I find that getting up earlier (5 AM for me) gives me time to ease into my day, get a bit of work done in the quietness of the early morning, and yet actually help my productivity for the rest of the day. Being an early bird or a night owl is a matter of choice and practice, not biology. You can decide what to be.

Collapse
 
ilonacodes profile image
Ilona Codes

Waking up at 5 AM is more than just getting things done 👍

Collapse
 
wizardrogue profile image
Joseph Angelo Barrozo

5AM huh? What time would you usually go to bed? I'd love to try this for myself.

Collapse
 
codemouse92 profile image
Jason C. McDonald

Personally, 10pm. I typically only need about 7 hours of sleep to be well-rested. (Just to make up the difference, I sleep 10pm-7(:30)am on weekends.)

If you find you need 7.5 or 8 hours of sleep, you can shift the bedtime or wakeup times around, of course. This week, I've been unusually tired, so I've been doing 10pm-5:30am or 10pm-6am.

Collapse
 
lankydandev profile image
Dan Newton • Edited

Agree with everything you said!

I can't believe there are people that think tests are pointless. If they hate tests so much, they can go and test every single feature for each change they make. That might change their minds 😂

Collapse
 
ilonacodes profile image
Ilona Codes

Many thanks! Writing tests makes life easier for software developers 🙂

Collapse
 
waterlink profile image
Alex Fedorov

They believe they are so smart and so good that they can't possibly make a mistake and introduce a regression.

Moreover, when this happen, they'll blame everything around them, but not themselves.

Collapse
 
alainvanhout profile image
Alain Van Hout

There's an underappreciated difference between feeling productive and being productive. That's particularly true when you feel you're in the 'zone' (Uncle Bob himself discussed that point in The Clean Coder).

Collapse
 
lukegarrigan profile image
Luke Garrigan

Brilliant blog, I agree with it all. I particularly resonate with your chapter on staying up late and being a night owl, I used to be so bad with this, coding till the early hours. It wasn't until I read Why We Sleep by Mathew Walker that I actually started to realise the importance of sleep!

Collapse
 
ilonacodes profile image
Ilona Codes

Thanks a lot for your words and the link! 🙏

Collapse
 
vimmer9 profile image
Damir Franusic • Edited

Sleep is essential!!

First or all, It's a great article and I haven't finished it but have, on the others hand, saved it for later. The funny thing is, when you're younger you feel invincible and don't pay attention to your sleeping habits.

I belive this is especially prominent in software development community or maybe it's IT in general. I felt the need to comment since I've been doing dev for around 20 years, started when I was 16.

In the old days, I would sleep maybe 2 to 4 hours a day, and would stress myself to the point of almost collapsing.

After weeks of this torture, my body finally decided to put a stop to all this in a form of grand mall epileptic seizure. And there you have it.

If I hadn't been so reckless about my own health, my daily routine would not include taking two types of pills twice a day.

This is just my unfortunate experience and it doesn't happen to everyone but it could happen to you if you're not careful. Times have also changed, for the worse of course; now it's even more stressful and people are pushed to work even harder.

Go to bed before 2am, get at least 6 hours of sleep, it will increase your productivity and maybe spare you of any potential health issues.

Cheers,
DF

Check this great article:

Collapse
 
ssimontis profile image
Scott Simontis

I have fucked a lot of people over not documenting things. There have been jobs where I had a bus factor of 1, and when I left I was being a self-centered ass. There were a lot of other things going on in my life at the time so I'm learning to forgive myself, but it's a lesson I have taken to heart.

Collapse
 
jjtriff profile image
jjtriff

Point 3, third paragraph, that could happen even when working on daytime. If you feel productive you probably are, though I agree on the point that we are design to live at day and sleep at night, plus the rest of the society also is. That's why is better to be productive during daytime.

Thanks for putting the time on this article.

Collapse
 
ilonacodes profile image
Ilona Codes

Thank you for your thoughts! I am happy you liked the article.

Collapse
 
vimmer9 profile image
Damir Franusic • Edited

I use Doxygen but that is low level documentation used primarily by developers. It's only useful in combination with a hand written higher level overview documentation. What's the point of knowing how a spark plug works if you don't know how to start or drive a car.

Also, it makes me cringe when I see stuff like "the code is self explanatory", etc.

I highly appreciate developers who take their time to write user level documentation, which is, in my opinion, vastly more useful than describing function arguments and return values.

LaTeX is my preferred tool for high level documentation, while Doxygen serves the purpose of being API documentation tool.

Regarding code style, I use ClangFormat since I'm a C developer. It's a great tool to keep your coding syle consistent. Another similar tools which I used while writing Web apps in React.js is Prettier; it is highly configurable and probably supports a plethora of languages.

Collapse
 
darkes profile image
Victor Darkes

Very glad you included testing as that for me is probably the most valuable. There have been plenty of times when a regression test has quickly saved me.

Collapse
 
ilonacodes profile image
Ilona Codes

And thanks to test coverage now you are not afraid of changing code while refactoring or new feature implementation 🙌

Collapse
 
nhkk profile image
NHKK

Are tests not enough documentations? In addition I got lot of devs saying "well you wouldn't need test if you just code better and you'd code better if you understand every single little thing in the system like I did". :\

Collapse
 
ilonacodes profile image
Ilona Codes

In my opinion, it should be basic documentation for the project with the project description + architecture, setup, run, and deployment. Truly understanding of the project comes during the work on it.

Some developers might be lazy to cover the software with tests and they are looking for excuses not to learn it 🙈

Collapse
 
mt3o profile image
mt3o

Guilty of point 3.

Also guilty for being loud in the office. I work in a scrum team and we are the loudest in the open space, not to mention arguing and throwing sexist jokes. I think that if my team had at least one female dev, we'd nicer to each other ;)

Collapse
 
oskarkaminski profile image
Oskar

"Having a good test coverage encourages developers to make changes more confidently..."
How many % of the codebase should be covered with tests in your opinion?

Collapse
 
waterlink profile image
Alex Fedorov • Edited

It's not just a number.

It's also the importance. The more important the bit of logic (and the more other modules depend on it) the better it should be tested.

Looking at a single number is not productive because you can always increase coverage by adding more tests to not-so-important code.

Collapse
 
th3n00bc0d3r profile image
Muhammad

Add excessive smoking also!!!

Collapse
 
gayanhewa profile image
Gayan Hewa

Still guilty of point 3 :(

Collapse
 
grazhevskaja profile image
Alexandra Grazhevskaja

To think you are the smartest person in the world sometimes becomes a bad habbit of developers also. 😏