I reread one of my favorite textbook, structure and interpretation of computer programs(SICP), recently. I would like to summarize some insights I got from the book to investigate some understandings with my previous experience . So the content would be some personal random notes and not for everyone. :-)
Here comes some from chapter 1, Building Abstractions with Procedures.
* Why using the a non-mainsteam programming language? Because Scheme has very simple syntax and flexible semantics to implement broad range of applications easily, that's so important for a computer science student to know the main ideas by constructing infrastructures so that they won't get lost among the fancy features coming up everyday. I think this is useful especially when programmers get mature. They will find out that language features are not so important. The important thing is to deeply understand the ideas behind the complex components. If we can construct toy examples, that will be huge for learners even though we might not really implement the components by ourselves in the future.
* Procedures vs. functions. In computer science, procedures usually concern the imperative knowledge; in math, it usually uses functions as the descriptive knowledge. That means programmers need to know the exact steps to figure out some questions even the procedures they write using only descriptive knowledge. It also means reasoning the logic is necessary otherwise we can't confirm the correctness of answers with computers. This might look hard first for researchers in AI nowadays since the models they are building no one can really understand... I think that is an alert for them. :-)
* Recursion can be a good tool to solve problems. It's exactly like induction in mathematics. Once we confirm the problems can be divided into same problems, but just smaller, this approach can be used to model our solution. So what is the difference between math and programming? Sometime, no. :-)
* Iterative vs. recursive. This is an implementation issue, it's not about the form of code. t's about the semantics it should be. Although many languages use recursion to implement all recursive procedure.
* First-class procedures. Lambda calculus is an amazing tool to construct the world. Once we can use it naturally, we can reason the logic of program and model the concepts by encoding them with functions. This may be not easy to interact with real-world. However, it's an inspiration to me to rethink problems at hand.
* Procedures as arguments can make the procedure more abstract to problems so that the functions could be more generic. Procedures as return values can provide callers the appropriate operations in runtime. Combining these 2 methods can make programmers to reach a new milestone of understanding abstractions. Modeling fix-point is a good example but might be hard to understand at the first glance.
Here comes some from chapter 1, Building Abstractions with Procedures.
* Why using the a non-mainsteam programming language? Because Scheme has very simple syntax and flexible semantics to implement broad range of applications easily, that's so important for a computer science student to know the main ideas by constructing infrastructures so that they won't get lost among the fancy features coming up everyday. I think this is useful especially when programmers get mature. They will find out that language features are not so important. The important thing is to deeply understand the ideas behind the complex components. If we can construct toy examples, that will be huge for learners even though we might not really implement the components by ourselves in the future.
* Procedures vs. functions. In computer science, procedures usually concern the imperative knowledge; in math, it usually uses functions as the descriptive knowledge. That means programmers need to know the exact steps to figure out some questions even the procedures they write using only descriptive knowledge. It also means reasoning the logic is necessary otherwise we can't confirm the correctness of answers with computers. This might look hard first for researchers in AI nowadays since the models they are building no one can really understand... I think that is an alert for them. :-)
* Recursion can be a good tool to solve problems. It's exactly like induction in mathematics. Once we confirm the problems can be divided into same problems, but just smaller, this approach can be used to model our solution. So what is the difference between math and programming? Sometime, no. :-)
* Iterative vs. recursive. This is an implementation issue, it's not about the form of code. t's about the semantics it should be. Although many languages use recursion to implement all recursive procedure.
* First-class procedures. Lambda calculus is an amazing tool to construct the world. Once we can use it naturally, we can reason the logic of program and model the concepts by encoding them with functions. This may be not easy to interact with real-world. However, it's an inspiration to me to rethink problems at hand.
* Procedures as arguments can make the procedure more abstract to problems so that the functions could be more generic. Procedures as return values can provide callers the appropriate operations in runtime. Combining these 2 methods can make programmers to reach a new milestone of understanding abstractions. Modeling fix-point is a good example but might be hard to understand at the first glance.
留言
張貼留言