DEV Community

Cover image for Edge Cases are the hardest parts of a Developer's job
Renan Moura
Renan Moura

Posted on • Originally published at renanmf.com

Edge Cases are the hardest parts of a Developer's job

If you are a developer with not much experience you might feel like a lot of the parts of your job are really hard.

The framework doesn't behave as it should.

The database is locking.

The language you are using has a weird way to deal with some situations that should be simpler or easier.

Maybe you are fighting to center that div on your screen.

All of those problems are legitimate and can drive you crazy.

But once you get past these issues and become a master of your tools and how they behave in each and every situation then, and only then, you will feel the hardest part of a developer's job: Edge Cases.

What I mean by edge cases?

An edge case is a situation that you (and maybe not even your end-user) never thought would happen.

You create a page where everything fits perfectly, you test it on mobile, on your computer, and on your super-sized TV, great!

And then you deploy your app in production to find out how a user is having rendering issues when using Safari on an iPad and, curiously, on the same iPad, it works perfectly on Firefox, go figure.

Edge Cases are the hardest parts of a Developer's job.

The previous example is quite technical, but you got the idea.

The same rationale applies to any layer of your app.

If you implement business logic in your backend, you have to think about all of the possible combinations that might happen and test each and every one of them for your system to work bug-free.

Most problems in software arise from edge cases.

How to identify and avoid problems with Edge Cases?

Communication.

When writing business logic, the first thing to do to catch edge cases is to talk with your users, customers, clients, or any person who understands the problem in depth.

Ask as much as possible, understand the situation and think about the possible edge cases.

Remember there is a distance between regular manual work and automating this work with a system.

There are edge cases your users might not even notice because they are so obvious to them, but not to you or anyone else.

As said by Bill Gates:

The first rule of any technology used in a business is that automation applied to an efficient operation will magnify the efficiency. The second is that automation applied to an inefficient operation will magnify the inefficiency.

Most operations are inefficient, so be careful before automating anything.

The second thing to avoid falling into an Edge Case trap is simple attention to detail.

Attention to detail avoids problems related to the technical part while Communication avoids problems related to business logic.

Attention to detail is for when you don't test your application with all kinds of screen sizes, or all browsers, or when all the planets align in a leap year and your app crashes (who knows).

So, if you ask me, how do you evolve from a junior developer to a mid-level developer?

My answer is: learn how to communicate clearly and learn to develop attention to detail.

After learning general technical skills, these skills are the ones required to jump to another level in your career.

Oldest comments (1)

Collapse
 
logicsatinn profile image
Calvin Jackson

Great Post