This is the world of magic - it's totally abstract but real. I still clearly recall when professor talked about abstract data types, he said, everything in this world is math, as it can be simulated in programming languages. Then we got to try to simulate a point, a rectangle, gradually to a cashier, register, and it's mind-blowing - we are simulating the world. But to do this, rigorous programming methods are needed - setting up class, defining attributes and parameters, and implementing user-defined classes. Truth to be told I hated writing doc strings for the most of the time, but now, with 0 error and 0 warning on my assignment one report, I start to appreciate it. It is those little things that make a difference. Doc strings also help us to collaborate with other people, providing information about the data types of parameters and function description.
It gets, even more, exciting when it comes to the recursion part. I was totally amazed when Danny showed us he can use one line code to do the whole numbers counting for a nested list. That's amazing. But I had a hard time to comprehend it - after all the one-line coding expression is a bit abstract, something like <Expression 1> If <condition one> Else <Expression 2>. Also, we need to follow the rule of the base case and recurse the general case.
The way ahead of us is arduous and exciting, I can't wait to do the next assignment!
No comments:
Post a Comment