Wednesday, 27 January 2016

Week 3 in the life

In the first two weeks of CSC148 we've focused mainly on building simple classes and learning how to implement them efficiently. We're getting used to coming up with appropriately descriptive class names, how to identify class attributes and methods before we begin designing, and finally how to write a detailed class API before we begin coding. Writing good API's is an incredibly important skill for a programmer to have, even if he is not working on a large project with other programmers, having to share his own code with them. API's are useful to just a single person working on a project because they not only help organize his code and make it more readable but they serve as helpful reminders if he or she has to take a break and come back to the project in the future.

We've explored things like inheritance and composition in terms of building efficient classes; that is, in terms of writing code so that superfluous details are omitted and the program can run with as few steps as possible to accomplish its goal. One thing I really liked learning about these past two weeks was list comprehensions. Last year I continually felt that iterating through a for-loop, assigning new values to a new list from an old list, etc. in the format we originally learned was too bulky and unreadable. List comprehensions are easy to understand and much more user-friendly and really make the code feel lighter and more manageable.

I'm looking forward to what's to come!

No comments:

Post a Comment