This content originally appeared on DEV Community 👩💻👨💻 and was authored by Al - Naubit
Seriously, these things could sink a career.
As a developer, you ought to know that shipping working code is the minimum. There are many other tasks that you should be performing to be successful. If you fail to adhere to these habits, your career will suffer.
The frustration of being on a team with a bad-habit coder is not something any developer would want to go through. So, make sure you don't do these things…
1️⃣ Not writing tests
The study of programming problems and their solutions often entails two equally important aspects- the production code that solves the problem and accompanying tests that validate the solution.
The importance of tests on any development team cannot be overstated.
Tests == confidence.
It would be best if you always tried to test your work whether it saves a lot of time later or not. Even if the change may seem minor or insignificant, there's always a risk that you have missed something, which could result in bugs or errors. You're only a good engineer if you write tests. Period.
2️⃣ Committing to main & no PR reviews
If your organization allows this, try to talk with your manager about that. You should never commit directly to the main branch- always open a separate branch for review and change control.
Oh, and make sure to add clear commit messages.
Put in the effort to open a pull request when opening your branch. Make sure you have a clear description and be specific about what you need from the reviewer. This will prevent any issues later, such as not being detailed enough. If it's too big, break it up into smaller pieces and fix those.
Even if it's a personal project — hold off for a day before reviewing your code!
Missing code reviews are easy to identify whether it's time to update your existing code. Code that has been reviewed often becomes better over time.
3️⃣ Lack of auto-formatting & linting
I can sometimes understand why projects tend to be missing this. However, many helpful tools simplify it, like formatting, static analysis, linting, and type checking.
These will find any easy mistakes you might have made.
It's near impossible to achieve perfect code all the time, but you can come close. These tools might be exactly what you need:
- Code formatting
- Static analysis of code smells
- Linting
- Type checking
Let's not worry about a whole bunch of little things… let the bots do it for us. You can even create a commit hook to run this task automatically when files change.
This will standardize your code and let you focus on more important aspects of coding.
4️⃣ No automatic testing or CI/CD
Setting up some commit-hook or CI/CD before you release your code is a great way to ensure everything will work.
The tests should run automatically when you commit to your repository or open a pull request. That way, you know it won't break the build, and the code will pass all tests.
It's straightforward to set up a system like this, and the benefits are well worth the time - you can stop worrying and focus on more important things like creativity.
Automating these processes can lead to a few other benefits. The more you automate the tedious processes, the easier you can make them for yourself. When it comes to quality assurance, any level of tests should work.
5️⃣ Ad hoc work with no task tracking
How do you keep track of what work you're working on right now?
Not having a good task management system for your project is a problem. This means that ideas and tasks are either lost in your head or are scattered among various notes. It's much better to have an organised system where you can store these ideas and tasks in one central location.
Track your work via a ticketing system or kanban board (like Trello, Asana, or Jira). It doesn't have to be complicated. Start by adding a title and a short description of the task. Just to have the task tracked somewhere and see all your tasks next to one another.
To get started, you can use some Kanban columns like these:
Backlog — Whenever you have an idea, it must go here first. This is your repository of potential projects.
- To-do — These are the initiatives you have decided are worthwhile.
- In progress — Move something here once you've started work on it
- In review — Once you've finished the implementation, you should seek review from your teammate to ensure everything went smoothly.
- Done —Having a task here means the tests were run, and the code was reviewed before it was released to production.
🚢 Sinking the ship
These are a few everyday practices that can hinder someone's productivity. These practices have the potential to sabotage a dev's work; you should educate yourself on them and take steps to avoid them!
Luckily, these practices are all relatively simple and easy to manage, but they can make a big difference in terms of the security levels and speed at which you can release new features.
If you're missing any of these practices, start now!
🌎 Let's Connect
- Twitter: @thenaubit
This content originally appeared on DEV Community 👩💻👨💻 and was authored by Al - Naubit
Al - Naubit | Sciencx (2022-09-07T22:33:22+00:00) Avoid these ship-sinking coding practices!. Retrieved from https://www.scien.cx/2022/09/07/avoid-these-ship-sinking-coding-practices/
Please log in to upload a file.
There are no updates yet.
Click the Upload button above to add an update.