The first part of this weeks lecture was concerned with privacy. It was a rather eye opening lecture for a person who is completely oblivious to the plethora of avenues technology and computers present when it comes to unveiling private and personal matters. Furthermore, I enjoyed the discussion concerning what exactly constitutes a violation of privacy, and in what situations someone can logically and reasonably justify breaching someones private information. It is critically important to note that the big-bang in social media (that has only recently occurred) has opened many routes for one to unknowingly share information, via computers, that may be accessed by such a vast audience. Furthermore, so many sites require personal information in exchange for membership which can be accessed by individuals in attempts to violate a persons private matters. Hence, one should always be careful with disseminating their private information, and one should always consider routes that would keep their private information private.
During the second part of the lecture we had a chance to explore a slightly chllenging recursive program. The program is as follows:
flatten : list -> list
(define (flatten L)
(cond
[(cons? L) (apply append (map flatten L))]
[else (list L)])))
This recursive function produces a pretty elegant method for collapsing a list composed of several lists into just a single lists composed of all the elements of the lists inside the overall list (what a tongue twister of a sentence). These types of programs are fairly easy to visualize as long as you start with the initial value (in this case a list that actually is not a list) and using this value to progressively solve further values. I find it helpful to apply the function to every element in (L) as it can help one deduce what recursive value such an element has.
No comments:
Post a Comment