Problem Solving Framework
The mnemonic I have settled on is PI AT PC. Plus I can imagine a a picture of a little pi symbol sitting at a computer in like 1994.
understand the Problem
- Ensure you fully understand and grasp the problem. Try and replace any and all gooshy elements (e.g. pronouns, not-specific-enough words, anything vague) with a more clear revision.
IOCE the problem
- Figure out your Inputs, Outputs, Constraints, and Edge cases. This is simpler for coding problems, but is still useful outside of it in bounding the problem and reducing the complexity of your desired solution.
figure out the problem's Assumptions
- What can be assumed about this problem? About the input, output, constraints, or edge cases? This is where you can further probe for the bounds of the problem so you don't have to solve more problems or cases than necessary.
- How can you test that you have a solution and that it works? How can you test against the cases you know won't work? How can you test the edge cases? Be thorough, as a test that is not definitive is useless.
create Pseudocode/use Plain english
- How would you describe a solution to someone without using jargon? Without knowing any technical knowledge, how would you describe how to solve this problem to another person?
Code/Create your solution
- Do it!
Solving Larger Problems
Solving problems is the ability to break problems into smaller problems. Even if you don't instantly know how to solve it, and say "well, I'm probably going to need to do X and then Y", and can repeat that process for those sub-problems until you either know how to solve it, look it up, or ask someone.
Aptitude != Knowledge
The common thing to confuse "aptitude" with is "knowledge". I also talk about this when discussing interviewing with colleagues: many interviews check for "knowledge" (what does this function do? what is a hash? what does "CSS" stand for?) because it's easy to do and (presumably) because people mistakenly consider it a good heuristic for whatever makes someone a good developer. However, in general, "knowledge" is easy to get - go read wikipedia or a book or some documentation and memorize it. It's also not very useful - if you don't know something, go look it up! It helps because it makes you faster (not having to look everything up is why CPUs have instruction caches), and it might more quickly lead you toward a better solution (if you know several approaches already, you can more quickly consider which would be best), but much more important is "aptitude". It's much harder to teach someone how to think.
Last modified: 202110091810