Useful Coding Advice Throughout the Years


In a career, it’s common to receive advice over the years. This advice is specific to programmers and can help take your career from good to great.

List of Pieces of Advice

In this summary, I list advice that can helped you in your career as a programmer and data scientist. It’s a quick read, but implementing the advice well can require a lifetime. I have been programming for years, and still, occasionally, I must stop and think of essential parts of the profession. Without further ado, here’s the list:

  1. Take your code and break big pieces of it into bite-sized functions.
  2. If it’s time to leave work and you still haven’t figured out the solution of the problem for the day….please shut down your computer and work on it the following day. Take time to rest and stop thinking about the pain for a while. It’s good to take mental breaks and come back with fresh eyes.
  3. YAGNI principle: Don’t create more code than necessary. Don’t do what you haven’t been asked to do. Don’t anticipate future issues. Make something that functions and does the job as soon as possible. Code only what is required to solve the current issue.
  4. You don’t need to understand each and every thing in coding under the sun, nor do you need knowledge of every existing framework to be a good programmer. The most important thing is to build and maintain a solid base of knowledge. Know a programming language in detail prior to starting with a Framework and understand the fundamentals (the solid principles). Also, learn how to write clean, well-documented code.
  5. KISS: “Keep it simple, stupid” or “keep it stupid simple” is a principle of design which states that most systems function the best when simple, instead of made complicated. And while this makes sense, it can be difficult at times to accomplish.
  6. Do not overthink stuff.
  7. If you’re working on an issue for too long, then take a break, and readdress it later. Many times, the greatest answers to the problems come to me when I’m away from my office. Going for a walk is also recommended when you upset with a client or coworker.
  8. Learn how to make helpful tests for software. Learn to do TDD. TDD is a process in software development which depends on repetition of a precise development cycle: Create a test, run each test and check if the new test fails, produce some code, run tests, refactor code, repeat.
  9. First, find the solution to the problem and type up the code afterwards. Do not begin coding without first knowing what you should do.
  10. Refrain from memorizing code, instead learn and understand the reasoning of the code.
  11. If you find, copy and paste a solution from stack overflow, then make certain that you know how the solution works. Learn how to use solutions from Stack Overflow properly.
  12. If you want to learn a new skill in coding, practice the skill. Make examples of the skill and make them functional for you because simply reading about a skill is not sufficient.
  13. Study code written by other people and let other people learn from your code as well. Pair coding and reviews of code are a good idea to gain new skills and perspective on coding.
  14. Don’t Reinvent The Wheel. If someone has already made something that works, then use it.
  15. The code that you have is the best documentation.
  16. Know how to find references for things with google. To do this, you must have experience. Read a ton so you know what to search for.
  17. You or someone else will need to maintain your code in the future, so create it with the reader kept in mind. Make the code read as though you’re reading a story.
  18. The best method for resolving a problem is to copy and paste it into google.
  19. Don’t give up because in the end, in one way or another, you will resolve the issue. There are days that are upsetting, but they will eventually pass.
  20. Make sure to get enough rest. The best method to resolve a problem is with a restful mind.
  21. Learn how to utilize patterns of software design. Design patterns are a way to solve common issues in software design. Each method is similar to a blueprint which you can customize in order to resolve a common design problem within your code. (Don’t Reinvent The Wheel)
  22. Make use of integration tools in order to automate as much as possible.
  23. Make use of code katas. A code kata is an programming exercise which is helpful for improving skills through practice and repetition. See Examples here.
  24. Refactor -Test-Refactor. Refactoring is a programming technique used to restructure existing code, which alters and improves the internal structure of the code without changing the external behavior of it.
  25. Seek help when you need help with something. Don’t lose time because you refused to ask for help.
  26. Practicing your programming skills will help you improve. As the sayings goes, “Practice makes perfect.”
  27. Although, occasionally comments are helpful to you, please don’t focus too much on them. They might be outdated.
  28. Learn and understand the development environment that you’re using, and invest in a powerful development environment, such as IntelliJ.
  29. Reuse things from your code in other projects.
  30. When making an application for the web, first consider mobile use of the app and the associated power and restrictions on bandwidth.
  31. Do not prematurely optimize code or refactor. It’s more beneficial to have a minimum viable product sooner rather than later.
  32. Never use inefficient shortcut methods to save time. Each time you write code, do your best!
  33. Practice writing code according to the documented standards.
  34. The people using your software are not tech savvy people. Take that into consideration when developing something.
  35. Always use a source control system such as Github or bitbucket and make small git commits regularly.
  36. Be consistent when writing a program. If you follow a particular style, always make use of that same style. If you write program with a lot of people on your team, use the same style of coding with everyone on the team.
  37. Continue to learn, but learn about more than just new languages or coding frameworks.
  38. Have patience when coding and enjoy what you do.

Thanks you for reading this. I hope these tips are useful for your programming.

Remember to take breaks. It’s important to take care of yourself!

Leave a comment

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