Top Mistakes That Developers Make

John Au-Yeung - May 9 '20 - - Dev Community

Subscribe to my email list now at http://jauyeung.net/subscribe/

Follow me on Twitter at https://twitter.com/AuMayeung

Many more articles at https://medium.com/@hohanga

Even more articles at http://thewebdev.info/

It’s easy for developers to make mistakes, but we can prevent them if we know them beforehand.

In this article, we’ll look at mistakes that developers make.

Trusting User’s Input

We should never trust users’ input into any software. Instead, we should assume that they’ll enter invalid data.

Letting them enter invalid data will contribute to corrupted data in our systems and we’ll run into problems later on.

Therefore, we should never trust them and validate any data that are entered by users.

This includes both client-side and server-side validation. Client-side validation is used to tell users that what they entered is invalid. But we also need server-side validation to prevent bad data from being saved to our systems since bad data can be entered easily.

Manual Tests

Manual tests should be minimized since they take so much time. It’s just annoying to test all features of our apps manually.

It takes a long time and it’s boring and repetitive. Computers are good at doing repetitive tasks. Therefore, we should let them do it.

We should write unit tests to test small parts of a system like functions and classes.

Also, we should write some end-to-end tests to test the behavior of the full system to see if they work well.

Skipping Documentation

Without documentation, no one would know how to do anything. We have to write documentation so that people will know how to do things like setting up a project locally.

Also, we need documentation for our product so that people know what it’s supposed to do.

More importantly, we should make sure that documentation is up to date so people won’t be misled by outdated documentation.

Skipping Logging

We got to log activities that are done by our systems so that we know what it’s doing and we can find out what things are causing issues when things go wrong.

With error logging, we can check for recurring errors and fix them faster.

Also, we need an audit trail so that we know what users are doing is what we expect and no malicious activity is going.

Being Careless as a Privileged User

Any privileged user has more power to do things. An admin makes have the power to mess up databases by modifying or deleting data.

Therefore, we should always think twice before doing that. Even if we have backups, it’ll be a pain to fix issues with data after we screw them up.

Also, we should be careful with any server operations. Even though many apps are hosted in sandboxed containers, we may still mess things up if we aren’t careful or if we don’t know what we’re doing.

Scattered Configuration

Configuration files should be in one centralized location so that we don’t have to look for them everywhere.

This way, we can find them easily and keep track of them easily. Making changes will also be easier if they’re in one place.

It’s also easier to safeguard things if there’s only one place to safeguard our configuration.

Hard Coding Values

We shouldn't hard code values that are constants. So we shouldn’t have values written in our code as magic numbers.

Instead, we should put them in as constants so that we know what they’re for.

Photo by Ricardo Gomez Angel on Unsplash

Burnout

To prevent burnout, we should always take breaks. Taking breaks lets us recharge and think about things in a different way.

We always need a vacation and they’ll be more productive than working nonstop since it’s easy to screw up if we work too long.

Not Learning More

Computer and software change all the time. We should learn more things so that we can use them later.

Sooner or later, we’ll have to learn them so we should just take the plunge now. Learning it fast will be a lot harder and more stressful since there’re probably deadlines.

Without deadlines, learning things is more comfortable, since we can learn at our own pace.

Conclusion

We shouldn’t make mistakes about when developers. If we’re too fixated at our jobs, then we’ll make these mistakes fast.

They’ll stifle our success since they’ll affect us negatively in one way or another. For instance, messing up user’s data is definitely bad and we can’t let that happen.

Letting our skills get outdated is also bad since we may become unemployable in the future.

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Terabox Video Player