34 Habits That Will Take Make You A Better Coder
15 Jun 2016
7 minute read
There are 34 habits that will separate you from the rest of the pack and make you a more effective coder.
- Always testing your code. Preferably, write tests first. This gives you a very clear idea about the use cases and also enables you to think how a user can screw up your product.
- Thinking of all the ways your code could fail before you start coding. Think from the perspective of your users. This requires empathy. What will users want to do? What are they used to doing?
- Writing psuedo-code first. Think (for a while) before you code.
- Keeping track of areas to improve.
- Keeping track of new technologies to learn. The world of tech is ever advancing. Be adaptable.
- Thinking about how you would explain what you did.
- Reading other code. Take a look at different approaches.
- Welcoming code reviews. Don’t be afraid of critique.
- Designing your program top down — from the most conceptual levels.
- Removing assumptions. If you’re not sure, research and ask.
- Learning how the tools, frameworks, and languages you are using work. Read their source code and their documentation.
- Writing about challenges you have encountered. Every so often, think about how you would change your approach now.
- Remembering someone else will be reading your code. Write human friendly code. Follow consistent naming conventions, and name them sensibly. Variable and function names should describe their functions. Use indents. Not just for Python, where you have to, but always.
- Writing as though you’ll be responsible for the code forever...and as though the next developer knows where you live. If it’s so awful that no-one can understand it, you might be, and they might try and find out!
- Breaking big problems into smaller ones.
- Not getting too attached to any one way of doing things.
- Understanding what the end goal of the software is and build with that in mind.
- Testing for required behaviour.
- Learning how to submit a good bug report. Explain how to reproduce the bug, as precisely as possible. Say what should have happened. Describe what actually happened.
- When asked to fix a bug, investigating thoroughly what the cause(s) might be. No hacky fixes!
- Automating frequent processes. A build should be able to be completed with one click. Testing should be able to be completed with one click. If that’s not the case, work to make it so.
- Version Control. If you’re not using Git (or Mercurial, I guess), what’s wrong with you? Check in your code every time you complete a task — debugging, a new feature, refactoring.
- Understanding the culture, the ‘way’ of a language you are coding in.
- Socialising with other coders. You can learn a lot by talking to other people.
- Writing documentation. It will force you to learn how to explain yourself.
- Assuming the worst from your users. You should have empathy for users, but also accept there are a million ways they could mess up, or use your program in a way you didn’t intend.
- Experimenting. Think: How can I do this? How can I do this better?
- Using comments to explain why, and justify your decisions. Your code should be readable enough to tell a reader what is being done, and if not, you’re trying to be too clever, or writing bad code.
- Reading books about coding. Before the internet, people read books to learn how to code. It’s still a useful approach.
- Read books that aren’t about coding. You’d be surprised by how concepts from economics, business, and social science can influence your way of thinking.
- Knowing when to take a break, and then actually take the break. When you are stuck, it can be tempting to just keep working away, even when you know your inspiration’s run dry. Step away.
- Removing what you don’t need.
- Understanding your clients may not know how to communicate what they want in developer speak. Be patient.
- We have to repeat it. Always using version control. Use it from the start. If you forgot, start now. Now is better than never. Do it even when you’re working alone. Version everything human created in the project — test cases, documentation, build scripts, explanations, requirements. Write good commit messages. Don’t break the build. Only commit with unbroken code. The added bonus? You don't have to completely start again if you stuff up beyond retrieval. Surely something we can all appreciate!
LEARN MORE ABOUT CODER ACADEMY
Coder Academy is the most loved Australian Coding Bootcamp provider according to Course Report. Our accredited coding Bootcamps will set you up for a new career in tech via our Fast Track Bootcamp or our Flex Track Bootcamp . Our immersive courses help students acquire in-demand skills through hands on, project-based training by industry educators and experts.
Now enrolling | domestic & international students in Sydney, Melbourne & Brisbane! Study now, pay later with FEE-HELP!