Web development Advice by Ben Turner
Code Talk #007 - Problem Solving recap
Software developers are problem solvers first, programmers second. Software is simply the tool we use to craft solutions. When faced with a daunting or unfamiliar problem, it is helpful to take a step back, survey the scene, and work from a basic set of principles.
- Understand the problem. Be able to summarize it as succinctly as possible. Try explaining it to someone who doesn't have any background in what you're doing.
- Determine potential edge cases. Ask, 'What are all the possible types of scenarios this solution is intended to handle?'
- Pseudo code the solution. Get creative! Draw pictures, talk out loud, write it with a pencil, use comments in your editor, etc.
- Break it down into a series of smaller problems and solve them in isolation.
- Use debugger and other tools available to streamline the development process. Test often!
- Take breaks! Your brain does a lot of subconscious work when you're not at your computer.
- Test thoroughly. Ensure your solution covers its intended problem space.
- Optimize solution. Check for readability, extensibility, testability, file size, and efficiency. Fewer lines does not guarantee quality code.
- Determine if more abstraction is possible or necessary? If the problem space expands beyond it's current size, will your solution scale to handle it?