Wednesday 6 December 2017

SLOG #3



End-of-Term Reflection


It’s the end of the semester already, and we’ve just ended our last class. It’s been a great course, the instruction we received in the class and the help we got from the TAs all have helped me gain a lot more understanding towards the subject matter of coding, thank you!


I would recommend this course to my friends who are interested in exploring this subject. And my advice for a student beginning this course would be the following.


Design functions

Designing functions is the core and challenging part of the course, yet I had the most fun doing so. Since often time we expect the function to generate different outputs with regards to different input we have, in order to design a function that works for all conditions, we need to write a few check-expects for both documentation purpose and design purpose. Check-expects are used to record the input and output side-by-side, and after finishing the design of function, we will run the check-expects, if “the test pass” we know the function is doing what we expect them to do, given a specific input. When writing the check-expects, they also help us to think of the possible categories of inputs when running the function. 


There are a lot of functions that already exist in the Dr. Racket “inventory” that makes designing functions possible and a lot easier. When writing the functions, we write the header including the new function’s name, and a parameter which is the place to write the inputs. After the header, we start designing by calling all sorts of functions on the inputs, depend on the properties of inputs, there are some functions that only work on certain things. For example, “rotate” only works on pictures, and “apply” only works with lists of items.


When it comes to the situations where different categories of inputs are expected to produce different sorts of outputs, we use “cond” (stands for condition). We first check if the input meets the first condition, (say, if it’s an even number,) and we might decide to call a specific function on it. But if the input doesn’t meet the first condition, (say, it’s an odd number,) then we might ask the function to do different things with the input.

Prep for class 

Before taking the course, I recommend reading the parts of Dr. Racket’s manual that interest you, it can be numbers, pictures, or animation, because the manual gives very useful demonstration regarding the functions. Future students can also download the software before class, and try some of the simpler functions themselves, getting familiar with the software. And what is amazing about Dr. Racket is that when putting the cursor on the function, and push “f1”, the function’s manual will pop up in the browser, giving useful help with the function.


One of the function that has given me tremendous amount of help throughout the course is “step”, which step through the functions in the interaction area, helping me understand the order and exactly what the functions do to the inputs. Because in the tests, we are often expected to write down the intermediate steps for a specific function, so I recommend prospective students using step, when they first start using the software.

And prospective may wish to watch some crash course, or read some articles on coding and computer science, which will help building the basic understanding of coding.

Before each class, I suggest running what was written down from the previous class, which not only helps with the preparation for tests and  exams, but it also helps with understanding of the new class material, because the materials often link with each other one way or the other.

And after class, I recommend comparing the one's own notes with the instructor's, because even a small typo can prevent the function from running in the right way. And definitely review the materials often, and ask questions if one gets stuck.

More reflection on experience 

After all, the function I found the most difficult was animation “Big-bang”, but once trying several different examples, I slowly understand how it works. So prospective students should not be scared by the intimidating rumor about coding, with enough practice and focus, one can get the hang of it. 

I am more than excited moving forward with the invaluable knowledge and experience I gained from this class. To explore areas of Dr. Racket we haven't learned yet, and to learn new languages, like HTML or java.

Dec.6th 2017

SLOG #3

End-of-Term Reflection It’s the end of the semester already, and we’ve just ended our last class. It’s been a great course, the ins...