Thursday, November 21, 2013

New PoSt Requirements for Computer Science

Not sure if this is entirely relevant, but here goes. I feel like rant- discussing.

I, and presumably all the other first years taking a computer science course, received an email stating that the Comp. Sci. PoSts are going to have a high cut-off average that is to be announced. This is in order to ensure all students enrolled in a PoSt will make it into their required classes. This is really great for Comp. Sci. students but sucks for me.

I like computer science courses and programming in general because I see it as a useful and interesting skill, even if it isn't particularly relevant to my degree focus or future career. Technology is a huge and important part of most lives (in developed countries) and having an understanding of how it works is also key.

I intended to take maybe one computer science course a year, just to keep going. However, these new requirements have deterred this.

Oh well, I'll have to pursue my hobby outside of the university's bounds. Which leads back to how I started with python in the first place, an online programming course offered by MIT.

Resources are everywhere, I won't let this stop me.

Test 2 and Assignment 2

The final evaluations (besides this SLOG) for CSC 148 are complete and the marks are in.

Test 2

I was expecting a much wider variety of questions on Test 2, maybe something on sorting algorithms and big-O notation. Instead, the questions were focused on linked list and binary search trees and creating methods that involved recursion. Thankfully for me, this is one of my strengths. I did well on the test except for a few minor errors.

One thing I have noticed is that if you didn't get the hang of recursion when it was first introduced, you would find yourself falling further and further behind as the course progressed. While iteration is sometimes a possibility, it seems so much more difficult to me.

Assignment 2

This was the assignment on Regexes. My code seemed to pass all the tests but one, matching a string with a regex that contained  a * operator. I will probably go back and see if I can fix this over the winter break. Programming problems seem to stick with me, even outside of course work. I just like having the feeling of a problem to be solved. Other than that, there weren't many surprises. 

I'm curious to know the grade distribution for this assignment, especially compared to the last one. Danny may have went over it, but I left class after grabbing my test, I wasn't sure if there was more but others were leaving. I found A2 to be much easier than A1, mostly due to the aforementioned GUI component.

Wednesday, November 6, 2013

Assignment 2 - Regular Expressions

Assignment 2 was due this past Tuesday. Once again, I thought I did fairly well on it. I hope my feelings are more accurate than they were last time.

The assignment was centred around regular expressions -- expressing them in tree form, and matching whether a string met the requirements of a certain regular expression tree.

I just realized I forgot to write a proper helper function for my code shortcut. Whoops. Too late now.

While I understood everything the assignment asked, I'm still unclear on the role and uses of a regular expression. To the Google machine! (dun dun dun dun dunhhhhh)

From Wikipedia:
In computing, a regular expression (abbreviated regex or regexp) is a sequence of characters that forms a search pattern, mainly for use in pattern matching with strings, or string matching, i.e. "find and replace"-like operations.

That helps, a little. An applications of regexes is the Ctrl-F that I so dearly love. Maybe I'll find some more uses down below.

On a quick scan/scroll throught the article I noticed:

  • There are a lot more complicated regular expressions that we dealt with.
    • This is both in characters (more than '1', 'e', or '0').
    • And in operators (parentheses can do more fancy things. There are also ?, +, $, and many, many more.
  • There are three algorithms for matching a regex (okay I'm getting lazy.. it's an accepted shortcut) with a string.
    • I don't really understand the three or which I used because Wikipedia describes them in 'formal language' and well, I gave up.
  • More uses!
    • Apparently regexes are useful in the 'the production of syntax highlighting systems, data validation, and many other tasks'.
    • Again, I'm just going to leave it at that. I'm happy with a vague understanding.