Also, no excuses for me. Although I did remember that I should update my blog during my Friday lectures, I had completely forgotten about it until this lunch when I was munching on some ___ did I realize that... maybe I should have completed my entry by Friday. Maybe I'll set an alarm for it some time later.
We finally started recursion this week, and by the looks of it, this topic will go on for quite a bit longer. I've seen enough people crack jokes about recursion (ie, pretending to recurse their sLOGs, so I won't do it here). Although many people haven't done recursion and doesn't realize it, I believe teaching us LinkedList(Nodes) was a good prequel. One can argue that the form of it drawn out like a long chain has nothing to do with recursion, which I admit is true, but actually the definition of linkedListNodes do look like recursion -- calling an object within an object, just like calling a function within a function. However, I guess I shouldn't write too much about recursion here because Week 7 sLOGS should be more focused on recursion.
Therefore, labs and assignment 1. Although Assignment 1 is now up and running (my version on events.txt and events_small.txt anyways), I must reflect on this time. I don't believe that I had done enough testing for all the different possible cases because I finished coding on Wednesday. Our group had only simulation.py and monitor.py to finish after reading week, so we thought we had some spare time and let down our guard during the last week. This should not happen in order to finish earlier for testing purposes. We should not have relaxed just before the finish line -- like a race, we should dash past the finish line before relaxing. Testing should be done anyways. The program is in fact more complicated (with more modules) than the ones before, but is still tiny as compared to major software programs. Testing should be done along the way to ensure there are no future problems. I think unittests were only written up until event.py. Doctests were rarely done. There is definitely for improvements there.
Also, finding a good group becomes essential in working in larger projects -- just as mentioned in class, there were many divorces and late constructions of groups. It is reasonable that since students don't know each other well and conflicts can happen, but at the last minute, changes like these don't seem appropriate? I guess, at least try working with someone before you decide whether you work well with them?
Usable Code:
- zip(a, b)
- //maps every ele of a to b
- zip([1,2], ["a","b"])
- [(1,"a"), (2, "b")]
- *zip() //unzips a zip
- filter(bool f'n/expr, iterable/list/etc)
- //goes through iterable and filter by checking each element with boolean statement
- filter(1, len(x) for x in ["a", "bc", "d"])
- expr1 if bool else expr2
- if bool: expr1
- else: expr2
- there must be something else here, but i can't quite remember...
- maybe i'll add on later.
No comments:
Post a Comment