Saturday, 31 January 2015

SLOG #2 A FEW THOUGHTS ON OBJECT-ORIENTED PROGRAMMING

In the first three weeks of the class, we learnt how to instantiate a class and define methods to the class. The instance variables, or attributes of the class is an example of objects, which is the core of the object-oriented programming.

At the first exposure to OOP, I was quite confused by its functionality. I got quite frustrated when I was trying to solve assignment one; we were required to use classes to make a game, but I can make exactly the same game with the functions and data types I learned in CSC108 and it is easier. The process of programming is after all the process of thinking, but thinking in an object-oriented way didn't quite fit my intuition. I did understand that defining new data types and storing data in classes can be handy in many situations, but the excessive usage of class in assignment one seemed to be artificial and unnecessary.

After I talked to one of my CS specialist friends about what I thought about classes and OOP, he explained to me why they are important in the design of a program. In first year computer science classes, projects usually do not have a large size, so collaboration is not essential. But as the thing we want to build get bigger and bigger, one person cannot possibly finish it on herself, or if we want to make something that other people can extend or modify, OOP is extremely useful. This is because that one of the most important feature of OOP is that data are accessible and usually modifiable by users and programmers. Moreover, a parent class provides roadmaps to the design of subclasses, so if other programmers want to extend the class for more functionalities, they will follow the instruction from parent classes or simply inherit methods from them. For example, in assignment one, making a class for generic game and generic strategy saves us from the trouble of writing a new file for each specific game and strategy.

Sunday, 25 January 2015

SLOG #1 WHY GEEK SHOULD KNOW HOW TO WRITE

It is almost ostensible that being able to code and design algorithms are the most important skills for a computer scientist. However, one can hardly argue that the ability to write, in English, not programming languages, is of less significance than the above expertise. English writing is crucial for computer scientists, as it is for virtually all the other fields of professions, for the following reasons:
 
1. Writing is important for computer science pedagogy. No one would claim that her native language is java or python. Instead, a novice can only acquire the language of computer science through learning in the language they use every day. If a computer science professor wants to deliver her knowledge to her students, she must be able to articulate the ideas, which might be quite complex, in her speech or writing. Clarity, accuracy and efficiency in expression make it easier for students to grasp the material in the class.

2. Communication is essential in teamwork. A lot of computer science students end up becoming software engineers. The size and complexity of the work of software engineers makes working on one's own very difficult, if not impossible. As a result, they usually work in teams. A team could be very large depending on the project. If the crews in the team are not efficient in communicating with each other, they may have hard time putting their work together to achieve the goal of their project. So a team will not be productive if the communication between members of the teams efficient. The efficiency of communication, of course, relies on the person's proficiency in writing.

3. Sharing helps promote ideas. Sometimes geeks design softwares that can be utilized by or programmable to other computer scientists. In order to promote these softwares, the geeks should instruct the potential users of how they work and persuade them to use it. Even if this software is extremely well made, without a proper promotion, which largely depends on what the geeks say and write about it, it may not become popular among the users. As Joel Spolsky said, "the programmers with the most power and influence are the ones who can write and speak in English clearly, convincingly, and comfortably."