Sunday, 15 March 2015

Week 10: Impressions of week 9

Week 10: Impressions of week 9

This week was test two. In the days leading up to the test, I reviewed linked lists, as they were the things I was the least familiar with.  I was feeling pretty good about all of the content, and about the test in general, up until the day of the test.  I realized that I had completely forgotten my cheat sheet, and I was praying that I wouldn't need it, as was the case for the last test.

The test itself was pretty simple.  The only trip ups I had were a question about pre order traversal which I forgot to review, and a question about linked lists, which I was a few lines short of completing in time.  I don't expect these two things will cause me to do too badly though. 

Week 9: Impressions of week 8

Week 9: Impressions of week 8


This week's main topic was linked lists.  Because of the nature of these, it seems like we diverged from recursion for a bit, as the only way I saw them being dealt with in class was iteratively,  These seem rather simple, although I'm unsure of what their use is, and as to what their advantage is over a regular list.  The linked list reading seems to say that their advantage is in their recursive structure, but why does that matter if we only deal with them without recursion?

The other major CSC148 event of the week is the due date for assignment 2.  My group and I expected this to be a simple short assignment, but thins got difficult quite quickly.  In total we spent about 2 hours on the tippy game state class and tippy move class, and then 6 hours working on the minimax strategy alone.  Even though it was only 20 lines or so of actual code,  it was a very tough problem for us to complete.  The concept of this strategy was very interesting, but also very difficult to get our heads around.  In the end we completed it through the use of "don't think about it too hard, just do what makes sense and let the recursion work its magic" and it worked out for us.

Sunday, 1 March 2015

Week 8: Impressions of Week 7

Week 8: Impressions of Week 7

The focus of week 7 has been on binary trees and their nodes.  This has been my favorite part of recursion so far, as I understand the structure of binary trees better, and appreciate their usefulness in binary search algorithms.

In preparation for the upcoming test, I downloaded the example BTnode.py class and practiced implementing some functions.  I found that the most tricky kind of function to implement was tree_sum,  which summed all of the elements of the tree.  I had to implement cases for whether or not node.left and node.right were equal to None or not, because a a for loop cant be used for the children like an ordinary tree.

I feel like I'm finally starting to get my head around recursion and trees.  Next on the list is linked lists.

Sunday, 15 February 2015

Week 6: Summary of OOP

Summary of OOP


Object oriented programming has always been a very satisfying aspect of computer science for me. When I first started programming, I constantly thought to myself "there must be an easier way to do this" as I scrolled through my horribly messy and unorganized code.  When I first discovered OOP, it not only kept my code neat and modular, but kept all of the methods organized, and made documentation easier.  This made certain problems much easier to get around, such as problems related to game design, which I was very interested in at the time.

So far Object Oriented Programming in Python, as taught in CSC148 has been very simple to me. Pyhon syntax for objects is very simple and English-like, which pretty much follows par with the rest of Python. One thing I found challenging was the custom of naming variables with an underscore at the beginning to prevent others from accessing them without using a get method.  I'm accustomed to having public and private variable in Java, so it's strange to me that private variables are not enforced, but politely followed by the python community.

Sunday, 8 February 2015

Week 5: Impressions of Week 4

CSC148 Week 5:



The main event of this week was term test 1.  My main focus leading up to this test was preparing a good aid sheet, as in the past the creation of the aid sheet has been a very useful study tool. I hand wrote it and included examples of functions and class that I would be able to quickly get information from during the test.  When Wednesday came, the test was much easier than the previous year's tests.  I was expecting much more on exceptions, which is probably my weakest area in the course so far. All in all the test went well and I didn't look at my aid sheet a single time, which showed me that the creation of the sheet was more important than the sheet itself.

Tuesday, 3 February 2015

Week 4: Impressions of the First Few Weeks

CSC148 Week 4:



As someone who's been wanting to study Computer Science at University for a long time, going to these lectures and tutorials has been a very good experience in these past few weeks.  The highlight this fat has been the first assignment, which was more complicated than my group and I had initially expected. We put roughly 10 hours into working on it, and it came out very well.  The most challenging aspect of it was figuring out how all of the classes and subclasses were to be organized.  In the end we got it all down and the user interface came out to be very nice and readable.  Even with the simple strategy, subtract square is a pretty interesting game to play, although I suppose games are always more fun when you've programmed them yourself.

Wednesday, 21 January 2015

Week 3: Why Geeks Should Write

CSC148 Week 3: 



Geeks are stereo typically portrayed as people with poor communication skills.  This is something that I have found to be very inaccurate.  The kinds of geeks that I know are all outgoing, social, and very well read people. Especially in computer science, being able to write is a very important skill for us geeks to have.  Commenting and documenting code is one of the most important parts of programming.  Anyone who has tried to read a large amount of undocumented code understands this. However,  commenting code is obviously not the only area in which a geek should be able to write.  Some of the most fascinating computer science related ideas I have learned about have been from articles and journals.  These are what remind me of why I love computer science.  They pull away from the code a bit and connect it to the real world.  Doing this makes me thankful that geeks don't follow the stereotype they're given. Geeks need to write to spread the awesome ideas that they geek over.