Photo by Hitesh Choudhary on Unsplash
in

Productivity: 28 Tips To Help Coders Work More Efficiently

If you want to code faster, you have to be more efficient. Here are some tips and tricks to help boost your productivity as a coder.

#1 Squash bugs the moment they appear

Don't let bugs pile up. If you see a syntax error, fix it right away. If you know you need to fix or update something in another file, go fix it. Don't wait. As bugs pile up, they start causing more bugs and adding unnecessary complexity to the task at hand. Keep it clean.

Contributor: Ryan Desmond from codingnomads.co

#2 What can go wrong will go wrong

With every line of code you write, think to yourself, what could go wrong here? When you realize what can go wrong, immediately build in proper exception handling and data sanity checks so that you don't end up having to come back and clean it all up when everything starts going wrong. 

Contributor: Ryan Desmond from codingnomads.co

#3 Write tons of psuedo-code

If you write down what you need to do in English, step by step, before ever writing a line of code you can think through it clearly and simply. Write your steps down as pseudo-code, then just come back and fill in the lines of code required. This habit also has the nice side effect of leaving your code well documented, which makes it much easier to maintain and upgrade later.

Contributor: Ryan Desmond from codingnomads.co

#4 Don’t stop learning

Especially in coding, everything is changing really fast. There’s always a new way to make it faster, easier, and more efficient. Spend at least some of your time researching before you start coding. There’s definitely a better way to do things. That being said, don’t just copy and paste. This sort of thing almost always ends up badly. Think about what you do.

Contributor: Sarunas Budrikas from angle180.com

#5 Iterate in small cycles

Don't build an entire project and leave it until the end to test what you've made. Split up the project into chunks, such as a group of related requirements from the project specification and review, implement and test that group tasks exhaustively before moving onto new features. Bugs missed at the start of a project usually are much more difficult to identify and fix later in the project as they are fresher in your mind, so spotting them early will save you a great deal of time and mental effort.

Contributor: Andrew Ward from andrewleeward.com

#7 Do not trust your memory

Always keep a list of your daily targets handy. Whether you type it, write it, or dry erase it, a list is an easy, effective way to make sure you don't lose track of your daily tasks. Simple lists also help measure progress and could inspire solutions to multiple problems throughout the day. 

It sounds easy, but lists are the first thing to go when your day gets busy! The next time you tell yourself, I'll remember that write it down, so it doesn't disappear.

Contributor: Aniket Sarkar from robustwealth.com

#15 Commit and push to version control often

Committing often is particularly important if working collaboratively within a team. By creating commits as you finish each feature, you make it easier to track progress or roll between breaking changes. Should the members of your team be working on different branches, then this might also allow everyone to cherry-pick commits to apply to their current branch in advance of your branches being ready to do a full merge.

Contributor: Andrew Ward from andrewleeward.com

#16 Maintain a project readme.md file

Often you'll do things in a project that have to be done in a certain way or require several steps to get correct. These steps aren't always appropriate to document within your code comments, so instead get into the habit of making a note of these steps in a readme.md file in the root of the project. These notes don't have to be complex, a simple bulleted list including relevant hyperlinks is good enough.

Contributor: Andrew Ward from andrewleeward.com

#17 Ask someone else to review your code often

Get someone to review your code, don't have them spend too long, 5 minutes is enough, but have them review it often. Known unknowns are easy to spot and fix when you test your code, but what about unknown unknowns? 

You might be making obvious mistakes and not realizing it. By having someone skim-read your code from time to time, you hold yourself accountable to write clean, commented code, knowing someone will be looking, and if you make a mistake then it will be noticed quickly so that you don't get into bad habits. Nobody wants to realize they have made the same mistake lots of times throughout a project, then have to go through to refactor or re-write code at the end.

Contributor: Andrew Ward from andrewleeward.com

#18 Always check if someone else has solved the problem first

Don't be so fast to jump into coding up a feature right away. Stop, review what's involved, and take ten minutes to see if you can find an open source module or library that does most of the work for you already. This ten minutes of research might result in saving days, weeks, or even months of coding time building it again from scratch. If you improve on the code, you find then make sure to share that change with the repository owner so that you are helping to improve the open source community that you got this free value from in the first place.

Contributor: Andrew Ward from andrewleeward.com

#20 Use the best tools possible

Don't be afraid to pay for them. Here are some must-have tools: 

Code Linter to keep you from making mistakes & make your code consistent. 

Code Snippets & Generators because having to write boilerplate code is boring, time-consuming, inefficient & not why people pay you. 

Continuous Build & Deployment tools. You should be able to jump on a new project & spin up a development environment with a single command. You should equally be able to push to a testing server with a single command. 

Contributor: Matt Ferderer from mattferderer.com

#21 Start with a plan

Get a sheet of paper and think about what would be the most efficient way to do it. Only then start coding. First time just do it, then try doing it right and after that do it even better. Don’t forget to test your work. Nobody’s perfect at the very first try. Code a little bit, test a little bit, code a little bit, test a little bit. It’s all about persistence.

Contributor: Sarunas Budrikas from angle180.com

This post was created with our nice and easy submission form. Create your post!

Written by Nathaniel Fried

Co-founder of Fupping. Busy churning out content and building an empire.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.