Being a more effective programmer
History /
Edit /
PDF /
EPUB /
BIB /
Created: May 11, 2018 / Updated: November 2, 2024 / Status: in progress / 4 min read (~612 words)
Created: May 11, 2018 / Updated: November 2, 2024 / Status: in progress / 4 min read (~612 words)
Programmers that like their craft want to improve as much as they can. However it becomes difficult to determine how one can improve given the variety of paths possible. This article tries to examine what are considered best practices and ways to be as efficient as possible in your work.
- How to more efficiently develop complex algorithms
- How to be more careful when writing new code
- How to spend less time debugging
- Is writing a working solution better than thinking about a better alternative solution to develop straight away?
- How to recognize where to look for the source of a problem/bug?
- How can you make reusing your own code more easy?
- How can you find code you wrote before rapidly?
- Minimize the time spent understanding requirements
- Minimize the time spent developing a feature
- Minimize the time spent debugging an issue
- Use a consistent code style
- Spend time learning the language features available functions/classes
- Go through code you have issue writing yourself with someone else to see how they reason about it
- Deliberately practice the aspects of programming you have difficulty with
- Practice going through code challenges not for the purpose of solving the problem, but observing how you solve the problem and where you could improve
- Do not optimize for speed, optimize for readability/understandability/transparency
- Understand the problem
- Understand the requirements of your problems
- Understand the time and space complexity requirements
- Write test cases
- Execute your test cases often
- Make explicit (write/explain) the important parts/steps of the algorithms
- Pseudo-code your solution, then implement it
- Break the problem into parts and solve the parts
- Take a step back from time to time to observe your existing solution and attempt to determine if it is too complex for what it is trying to solve
- Simulate program execution
- Check the problem definition
- Run the program step by step using the debugger and think about the (desired) state at each point
-
- First, understand the reported issue
-
- Start with the simplest cases you want to support, then proceed to more and more difficult cases
- Verify your progress in small iterations to prevent writing a lot and then having to make it all work
- Identify the variables that you need through an iterative process
- Write comments about the alternative options you have
- You must be willing to accept that some of your assumption may be wrong: Sometimes you will discover that what you took for granted is not necessarily correct (such as template code provided to you that does not accomplish what it states it does)
- Record yourself solving a problem then take some time to analyze and determine the steps of the problem you were trying to solve. Determine how long you would expect each step to take and where there is potential for improvement
- Design a process for designing, implementing and debugging programs and follow it, changing it as needed
- Define case for empty values as inputs
- http://programmer.97things.oreilly.com/wiki/index.php/Coding_with_Reason
- http://programmer.97things.oreilly.com/wiki/index.php/Do_Lots_of_Deliberate_Practice
- https://softwareengineering.stackexchange.com/questions/65705/how-to-code-faster-without-sacrificing-quality
- https://www.quora.com/How-do-I-train-myself-to-code-faster-and-with-fewer-bugs
- https://news.ycombinator.com/item?id=9242245
- https://news.ycombinator.com/item?id=14708350
- http://arnklint.com/technology/become-efficient-programmer.html
- https://softwareengineering.stackexchange.com/questions/44177/what-is-the-single-most-effective-thing-you-did-to-improve-your-programming-skil
- https://medium.freecodecamp.org/how-to-think-like-a-programmer-lessons-in-problem-solving-d1d8bf1de7d2
- 7 Steps to Solve Algorithm Problems