Sunday, 8 February 2015

SLOG: Week 5

Last week we started learning about recursion and I found the concept to be relatively easy. The idea is that a function continuously calls upon itself which is a very powerful tool we can use in solving complex problems that we could normally not accomplish through writing simple python code. For example it could be used to count the total number of elements in a list or even a list of lists. Recursion is so powerful that many programmers today use it on a daily basis and I believe that if I can get a solid grasp on this topic, I will be very successful in my future programming career. Despite understanding the concept of recursion, I always have trouble coming up with the correct algorithm in which I can translate into python code for complicated recursive functions because it's pretty hard to think of what specific things I need the function to do each time it is called. To improve upon this I'm planning to practice tracing more recursive functions to the point where I can clearly visualize what each call will do without having to write it out.





On another note, we also had our first midterm this week which I felt I did a pretty good job on. However, I feel like I could have done better had I coded a bit more since I completely forgot what to put in methods that were meant to be abstract and overridden by subclasses. I now know that I should have wrote an exception or perhaps put pass instead of writing something that had no correlation to the question whatsoever. Another thing I should probably do next time is study a bit more since I ended up sleeping all night due to the fact that I was dead tired from staying up the previous night studying for a psychology midterm. 

Sunday, 1 February 2015

SLOG: Week 4

These first few weeks in CSC148 have been pretty hectic. Since the very first day of class, I noticed that the difficulty level of this course was exponentially greater than its predecessor CSC108 and through each lecture, the difficulty only gradually increased. In addition, the transition from having classes only three days a week to classes everyday only made it that much more difficult to adjust to the level of difficulty that this course had to offer. As a result I tried to review my notes everyday in order to understand the key concepts that were covered in lecture and to see how to apply them in future assignments/programs that I do.






Despite understanding the concepts, one of the main things I'm disappointed about are the quizzes. Although they were generally easy questions, I ended up doing pretty badly on them since my lab occurred at 9 am and I usually don't get enough sleep. As a result, I didn't read over the questions carefully enough and ended up writing a completely wrong answer. To improve upon this, I'm going to try to make a schedule to better manage my time and also to practice writing out code more so that I have an ample amount of time to finish the quizzes and check over my answers.






Sunday, 25 January 2015

Week 3: Why Geeks Should Write

Many people believe that computer science is all about coding and that just learning the proper syntax to correctly make a successful program is enough to excel as a programmer. Although this may be one of the aspects that are necessary to be successful, it is not the only one. One of the most important aspects that is needed to be a computer scientist is communication and the most effective way to improve communication is through writing.





By writing on a regular basis, we can effectively strengthen our ability to communicate our ideas to others, in particular the programmers that read our code. This can be done through the docstring which gives a description of our classes and functions and also provides examples. Your code may work a hundred percent but if a user cannot understand anything you have written, then it would be absolutely useless to everyone. For example, if you bought a product from a foreign country and the instructions were written in a language you could not read, then it would be highly unlikely you would know how to use the product. For this reason, we must be able to correctly convey the way our code works which is the main reason why Geeks should write. As we write more and more, we will also be able to pick up new vocabulary which is tremendously useful when we are naming our functions and variables. Instead of naming a variable "a" we could name it something more meaningful like "total" which is certainly a better name to describe what the variable "a" represents. Imagine writing a program in which all variable used were named after letters of the alphabet. This would almost certainly provide confusion to anyone that wants to implement the code in your program and also to you, the programmer. In the end just simply writing and improving your communication skills, everyone benefits.