Become A Programming Language Coding Superstar With These 15 Expert Tips

Nov 29, 2018 | 2976 Views

As a programming language programmer, you're constantly under the gun to produce quality code that's readable, simple, easy to update - and above all, that works. Making that happen takes effort and really thought about what the expectations and parameters of your project are.


To help, 15 members of Forbes Technology Council share useful advice every developer should know in order to create better code. Here's what they recommend.

1. Don't Try To Be Clever
Developers love to show off their skills and often try to one-up each other with "clever" solutions that rely on stringing together esoteric or obscure features of the language or framework they are using. My advice: Keep learning all those obscure features, but leave that "clever" code for hackathons. Make your production code easy for others (and future you) to understand and maintain. - Mike Sandler, Eligo Energy, LLC

2. Write Automated Tests
Good code is code that works. The only way you know if your code works is if you test it. I'm a big proponent of TDD (Test-Driven Development) as a way to ensure that your code is succinct and solves the problem and that it works. - Meetesh Karia, The Zebra

3. Understand The Requirements
The most important thing you can do is understand what is needed before you create the software. If the requirements are unclear, ask questions and get agreement from the stakeholders. Create an acceptance test (or test suite) and ask, "If the code passes this test, would that be enough for you to say it meets your expectations?" Keep going until you get a "yes," then start the coding work. - Jeffrey Fortin, Vector

4. Read The Error Messages
The No. 1 mistake I see with developers is that they tend to jump to Googling for answers before thoroughly reading the error messages. Every programmer writes code that does not work at some time or another, but getting to the root of the problem starts with reading the error messages well and listening to what they tell you. This habit will make anyone a better developer. - Zach Bruhnke, Halleman Bradley

5. Don't Skip Unit Testing
One piece of advice that every developer should keep in mind is that making unit testing an integrated part of how they write code puts them in full control of the quality of the code they develop. Unit testing shouldn't be something that happens once the developer has finished writing the code. Unit testing should be tightly integrated into the process of writing code. - Peter Mourfield, TaxSlayer

6. Reverse Engineer Everything
Always work backward on a task, problem or area of development, starting with how it will be used and why. This helps improve the code because it more accurately addresses how the end user will use the final product. - Chalmers Brown, Due

7. Make Things Easy For The Next Developer
The code can be around for a very long time. Be sure to make your code readable and leave plenty of documentation in the comments. Essentially, assume that some other poor developer whom you'll never meet will inherit this code and be responsible for maintaining it. Have the greatest empathy for that person! - Kent Dickson, Yonomi

8. Remember That ??Clear' Usually Trumps ??Quick'
Write code assuming someone else is going to have to look at it, understand it and maintain it. You'll be less likely to cut corners, ignore obvious bugs and write bad code. You won't choose the fastest algorithm or the smallest code if the result is going to be something that the client can't understand or maintain. Unless code needs to be fast or small, you're generally better off with "clear." - Manuel Vellon, Level 11

9. Make It Easy To Troubleshoot
Conventional wisdom says that it's cheapest to find bugs early, which is true; but at the speed, businesses move today, it won't always happen. Think about what information you'd need to debug, and add log statements as you write code. When you're tracking down an error in production, without a debugger, you'll thank yourself. - Steve Newman, Scalyr

10. Build In Flexibility
Writing better code often means making sure you understand the context around it. This means taking into consideration existing dependencies and code maintenance and also making it flexible enough to add more functions or adjust to changes in the overall application in the future. Good code should do its own job well, but also be easy for your peers to understand and utilize. - Xinwen Zhang, Hiretual

11. Keep Reading Up On New Technology
Developers must be willing to read up, improve, develop their skills and educate themselves about new developments and technologies on a daily basis. Many new development efforts require trial-and-error attempts and sophisticated problem-solving before the best possible solution is found - and the complexity of the obstacles will only increase as the industry advances at its accelerated pace. - Lars Knoll, The Qt Company

12. Remember That Coding Is A Creative Craft
It's a technical job, sure, but it's also creative and requires thinking beyond the traditional route, so passion is important. I've seen it in developers in India that I work face-to-face and remotely with. They are so devoted to coding as a craft. I think if more developers took this approach there would be even more amazing things available. - Jon Bradshaw, Calendar, Inc.

13. Keep An Open Mind
One of the common characteristics of developers is that they are tightly bound to their code, development style and choice of tools. I should know, as I've been one myself for 20 years. While a good thing at times, it can also be detrimental if developers are unable to be open-minded to their own shortcomings. This can lead to buggy applications, poor coding practices, and skill erosion. - Jonathan Babad, DIRECTED

14. Build Simple, Build Fast And Then Improve
Always build software simple and fast first, and optimize later. Time spent creating "clever" solutions, trying to make things work in one line or using entirely cutting-edge tools is often really just time wasted trying to get the entire task done. A working product done quickly is worth more than impressing colleagues with a clever solution. - Grant Kirkwood, Unitas Global

15. Don't Take Shortcuts
Everyone thinks that if they take this one shortcut, they will come back to it "tomorrow" and fix it. Nine times out of 10, "tomorrow" never comes, and that code stays in production for a long time. Build a good relationship with your team lead/manager and keep them in the loop with the ups and downs of your work - they will get you the time you need to do your best work. - Tom Altman, Leverage, powered by Clickstop

Source: HOB