How to tell if your code actually sucks...

How to tell if your code actually sucks...

There is no better moment for me than starting a brand new project. Everyone is afraid of adding or removing stuff. I guess we all have known at least one project that anyone wants to touch, or heard the phrase:.

There is no better moment for me than starting a brand new project.

Smells like new project spirit... (Whatever it means)

Starting a new project is funny. Everything seems to be in the right place. But as the projects grow and the deadlines come closer the things begin to boiling.

So, let's talk about signals that can tell us if our code sucks and we how we can avoid that.

Everyone is afraid of adding or removing stuff

I guess we all have known at least one project that anyone wants to touch, or heard the phrase:

It works, don't touch it!

Well, that's not a good signal. I know there are complex projects, big projects, but if nobody in your team can touch it without breaking something, then there is something wrong with that code.

Code is like a garden, it needs to be treat and maintained, if it grows in size or complexity with no control, then will be harder to maintain and easily can get death.

Code grows out of control when there are no conventions to work in it, team practices, even solo practices are important to keep our code under control.

If you see yourself in a scenario where is hard to add things to your project, then you should rethink the whole thing.

Only the creator understands it (Sometimes even the creator can't.)

If only one person in your team can understand a project, then that's a problem and hopefully that person never gets sick or goes on vacation.

If you are working by yourself please don't write overcomplicated code; in my experience simplicity is better; writing code that anyone can read is the right thing to do.

t is clear today may not be that clear in a couple of weeks, even for you.

Use comments on your code. Do not comment on every single line but put enough comments on the complicated and crucial parts.

1

If you develop on javascript this is a great repo with good practices.

It is difficult to read

I have to insist on this. Simple is better; there is no need to show anyone how abstract you can be or how much you know the language. Keeping things simple is way much more productive than trying to show off your knowledge and skill.

Keep your code as readable as possible, simple as possible. Clear variable names, descriptive functions names, clear statements. This will save time for you and your team.

A good way to measure how readable your code is is to overcome the necessity of comments. If the code does not need many comments to describe it, then it means the code is readable enough.

Conclusion

The best code is not only the one that is fast and performant; the best code is also the one you enjoy working on. I've had nightmares of codebases that I had to work with, and I also have had codebases that I enjoy.

Coding is a team sport, and every member of the team must be able to play the game, so write for the team.

development programming software-development coding coding-skills software-engineering code-quality code

Bootstrap 5 Complete Course with Examples

Bootstrap 5 Tutorial - Bootstrap 5 Crash Course for Beginners

Nest.JS Tutorial for Beginners

Hello Vue 3: A First Look at Vue 3 and the Composition API

Building a simple Applications with Vue 3

Deno Crash Course: Explore Deno and Create a full REST API with Deno

How to Build a Real-time Chat App with Deno and WebSockets

Convert HTML to Markdown Online

HTML entity encoder decoder Online

Software Developer vs Software Engineer — Differences: Bogus or Real?

In this article, see if there are any differences between software developers and software engineers. What you’re about to read mostly revolves around my personal thoughts, deductions, and offbeat imagination. If you have different sentiments, add them in the comment section, and let’s dispute! So, today’s topic…

Offshore Software Development - Best Practices

To make the most out of the benefits of offshore software development, you should understand the crucial factors that affect offshore development.

Developer or Engineer? Does It Make a Difference?

To summarise the main differences between the software developer and engineer: A developer executes. ... So the software developer is mainly focused on developing code that is a part of software development cycle. An engineer designs and plans applying the principles of engineering to software development.

Interested in Learning to Program? 13 Reasons to Start Now

Software development is something that is gaining popularity at lightning speed with the development of technology. The demand for regular developers is high compared to most other mainstream professions. But, what are the other reasons for learning to code?

5 Core Criteria for Selecting Software Development Company - TopDevelopers.co

Check out these five criteria for the selection of your software vendor, and you will never regret having the wrong quality product made for you.