Thursday, March 14, 2019

Programming Problem Solving Mnemonic - part 2


Just improving my "AEIOU" framework with things I've learned from an online course by Colt Steele

From the basic AEIOU to this: 

A
E (S,C,E,I)
I (B)
O
U


Translation:

A = Assumptions
E = Examples (Simple, Complex, Empty, and Invalid inputs)
I = Ideas (Breakdown)
O = Optimizations
U = Unit tests


Further Translation:

A = clarify your Assumptions about the problem to better understand it. Ask so your answer addresses the actual problem.

E = ask for or come up with Example inputs (Simple/Complex/Empty/Invalid) and their expected outputs, both of which you can later use to test whether your code behaves the way it's expected to.

I = generate multiple Ideas of solutions (after choosing one, write a steps Breakdown) to get your thoughts flowing.

O = Optimize the idea that you chose (maybe go back to other ideas) by improving it's performance in time and memory, but also readability by simplifying the code.

U = Unit test your code using the example inputs and expected outputs (before doing a final submission).