DEV Community

Cover image for Why do people think coding is difficult?
KagemaNjoroge
KagemaNjoroge

Posted on

Why do people think coding is difficult?

Simple amateur coding is trivial and most people can do it. Probably making ten or twenty lines of code in a programming language is something most people could do I think.

Factors mess that up:

  • Figuring out what to code. You just get asked, say, ‘Can you make it email me if more than five expense claims get rejected on the same day for the same person?’. How do you code that?

  • Fitting it in to existing code. You have to figure out how to fit your new code in to the existing code without breaking it. It might be millions of lines you have never seen. it might be very badly constructed and might break on small changes. That bit is hard.

And then, we want to do better as professionals.

We want our code to have automated tests, which changes how you design it a bit.

We want it to be easy to deploy to computers, so you have to design that in.

We want it free from security holes, to keep data safe.

We want to never corrupt any data.

We want our colleagues to easily read and easily change our code, which needs designing in.

We want our code to be robust and correctly handle bad data, bad user input and anything else unexpected. We have to learn to expect that.

Those bits are pretty hard, too.

Then, our bosses want to know when all that is going to be ready, so they can plan around it. Once the TV advert goes live, that software better be running.

That’s hard.

We have to juggle competing priorities of adding features, managing tech debt and fixing bugs.

There’s no right answer for that. Somebody is always disappointed.

We have to cope with floods of new users and feature requests that are difficult to build. The whole scalability piece is hard.

The code needs to stay running 24/7 or close to it - even if half the computers, disk drives, cooling systems, internet switches and electrical power fails.

That adds a bit of trickiness for sure.

We need to use existing libraries wherever we can, so we need to understand code we’ve not written. Tricky. But trickier still, we need to be part-time lawyers, because we have to check we are legally allowed to use that code without it affecting the business. Is it Creative Commons License or is it GNU?, that's another level of complexity.

We need to remember somebody pays for all the computing our code runs on, so we have to make it play nice.

We have to work for and with people who range from fantastic humans to the sort you’d rather not spend time with. And with all ranges of skill levels.

That’s a real mixed bag.

We have to know so much about computing, engineering, the problem area we are solving, testing.

That’s the really hard bit.

Top comments (0)