Monday, March 30, 2015

My Final Impressions

I feel as if this post should be saved for after the exam, but alas, I'll write it in my last week here.

I know that if I didn't struggle with a just-being-diagnosed learning disability, I'd have had a much easier time this semester. However, that isn't the case so I must admit that this course was a bigger struggle than I thought it would be.

I'm good when it comes to understanding, I'm terrible when it comes to focusing to acquire said understanding. I know what I want to do with my life is work with computers. Move to silicon valley, where the weather is warm and I can work the way I want. However, doing this may be hard considering I'm just now learning of something that changed my grades for the worse and it might be irreversible. Sure, I can now let the university know what happened and I can get exemptions. But I'm going to be here longer. My youth is wasting away. That said, I sure as hell will still try.

CSC148 was good at illustrating to me, again, that I want to program. I love the feeling of programming and getting something to work. I just.. need some time to do so. I hope to go this exam session treats me well and that I can go on to next year in a computer science major. I love this field and want to do everything that I can to do well. That's why I went to the doctor's in the first place!

I suppose I should close with something a lot less personal and a lot more related to the course.

My favourite part of this course, by far, was learning efficient ways to approach problems. That's the best thing about this course. I hope to god I can continue on learning this sort of thing.

Sorting!

Sorting has always been a sore sport for me (ha).

Even in CSC148, I had a bit of an issue with sorting, and I had a hard time visualizing it in my head. However, looking at the sorting examples used in class and during the labs, I'm beginning to see how sorting works, even for abstract data structures such as trees. Recursive thinking is essential for sorting through objects that aren't straight forward lists or arrays. If the object contains other object, in order to sort the parent object, the sorting algorithm will have to go through the child objects and sort them relative to and with the parent object.

This leads to the runtime problems. Which sorting algorithm is the best for a certain data structure? Some algorithms go through a linear progression of elapsed time, whereas others may have an exponential time elapsed. I suppose this is why CSC165 is necessary.

Assertion and Unittesting

Now these are very interesting concepts, indeed.

Assertion is an efficient way of debugging in python. In it's simplest form, it returns a boolean that returns true if you assert that one thing is equivalent to another, and they are equivalent. Likewise, it will return false if the statements aren't equivalent. This is useful if you want to write a short program that analyses the output of another program. It's essentially a debugging tool so that you can run a program and see if it runs the way it is supposed to run.

Unittest is also a useful feature in python. It automates testing and allows for the testing of any given program when run. The useful if __name__ == '__main__' line allows the program to test an entire program when run. Instead of putting doctest into your program that clunks it up and doesn't do much, unittest allows for assertions and programs to run independent of the debugging and thus, keeps the original program clean and clutter free (hopefully).

Both are pretty useful items and I hope to explore them more.

The Test

With all tests in CSC148, we were allowed a cheatsheet with what we needed on it. While I have a pretty firm understanding of what was needed for the test, I decided to leave off a bit of code that ended up being worth 10 marks on the test. Oh boy, did I kick myself.

All in all, I would say I'm doing decently in the course. I'm not fantastic but I'm not failing. These blogs always slipped my mind and I'd have other things to do. However, I'm making an effort to look inward at each week's lessons and write a meaningful, but short, entry about each.

This week taught me that I should not delete things from aid sheets!

A Look at Linked Lists

Here's the thing, this is the concept that made me drop CSC148 in the fall. Linked lists, at the time, were a hard concept for me to grasp. I didn't understand how the worked because I feel like last semester, they didn't build upon recursive thinking properly.

Now that I have a better grasp of recursive thinking, Linked Lists are a little clearer to me. Of course, I'll have to study them pretty hard to do well on the final but I get the basic understanding now.

A linked list is a simple concept of a set of nodes that together make a "list". Of course, it's not a list in the sense that python recognises a list. Rather, a linked list has a first node, then the next node, which is a list. This occurs recursively, making it easy to access the first and last nodes of the list and making a more tree like data structure for programmers to use. The insertion and deletion of nodes is also made simple with a linked list.

Sunday, February 22, 2015

The Past Few Weeks

The past few weeks have been interesting, to say the least.

This blog post was supposed to be published three weeks ago but instead of publishing it, I saved it as a draft and left it. I'm a genius, I know.


My impression of the first few weeks was wonderful. Danny Heap is a fantastic instructor and I wish I were a better student toward him. With the introduction of object oriented programming and class based programming, I wish I could say I'm a good student and keeping up with everything. However, due to illness, it's been hard for me to keep up.

Though, I have been learning a lot! My understanding of programming is slowly changing from how to do things on a base level to how to approach a problem without a language, first. Object oriented programming is obviously the way professional programmers go about doing their jobs, so I can't wait to become more involved with this sort of thinking.

A Summary of Recursion

Ah, recursion. Its a fairly hard concept to grasp onto at first; it seems counter intuitive to any programmer first starting out with it. How can a function or program call upon itself? Wouldn't that create an infinite loop? Contrary to what most beginners, including me, thought, recursive thinking in programming is actually quite useful; it saves on quite a bit of redundant code and allows for programs that would not normally run without recursion.

Recursion, in short, is when a program calls upon itself to solve smaller instances of a larger problem. A good example of this is a program that wants to add up all of the numbers in a list of lists. The program can call upon itself using an if statement while calling the function 'isinstance'. With a variable set to 0 already in place, this function will look into all of the instances of lists in the object the program was called on and add the numbers to the variable. Thus, it will return a cute little integer or floating point number without all the hassle of redundant code.

I'm still trying to wrap my head completely around the concept. I've spent quite a bit of time going through recursive functions and tracing how they go about accomplishing their tasks. While not quite in the clear of understanding, I'm starting to see the light!

The light from my monitor, at least.

My Summary of Object Oriented Programming

Oh gosh, how late is this? By two weeks, maybe? Well let's hope my marker is forgiving of my tardiness.

In short, object oriented programming is a way to approach a problem through the use of objects as opposed to the way a program runs. It focuses on data structures; object oriented programming looks at a problem and gives the steps as to how to approach it and how the data should be manipulated, but it doesn't give any sort on insight into how the code should look and never includes any code, itself.

This is useful because multiple people with different backgrounds in programming may want to see how a problem is solved, yet they do not want to program in the same language. Object oriented programming allows for a problem to be solved in different languages, following the same structure of logic.

Sunday, February 1, 2015

My Impression of the First Few Weeks of CSC148

I have a very hard time paying attention in most classes I attend. Not because they're boring; quite to the contrary, most material in class is interesting and helpful. It's just that the internet and what it has to offer is far more entertaining. It is far from the instructor's fault that cats falling off of things are funnier than a little bit of recursion.

That said, I have to say the first few weeks of this course have been greatly informative. I've learned quite a bit, regardless of how much I pay attention in class. At least I attend.

I'm a bit nervous for the test this week. I'm currently taking a break from studying so that I  can write this blog. I spend a lot of time in the library on weekends but today I'm feeling less than motivated to study. I need to, though, so it really doesn't matter how much I *want* to. Hopefully this test goes well. I want out of the physics major so badly and into the computer science major even more so.

Sunday, January 25, 2015

Why Geeks Should Write


I struggled with this topic for a few days for two reasons: first, what classifies a geek these days? Second, everyone should be able to write, regardless of social labels. This blog is necessary, however, and so is this topic. So I digress. I'll start by finding a clear definition of geek from a reputable source. Where else, other than Urban Dictionary? According to the internet's favourite place to find definitions, geeks are defined as:

"The people you pick on in high school and wind up working for as an adult."

That may not seem very helpful at first, but it leads me to a good idea of what a geek really is: someone who may forsake social norms in the pursuit of their own success and interests. With that in mind, I'll tell you why I think geeks should be able to write.

Geeks are an important component to our society; they're often driven, intelligent people that lead others into great unknowns and successes. Without the ability to write (or communicate in general) geeks would be forever alone in their pursuits of greatness and discovery. They wouldn't be able to get across to another person, or even another geek, why they want to do something or why something should pursued. And while geeks may be social outliers, that doesn't mean that they should be alone in either interest or company.

Writing these days is just as important as it was one hundred years ago. Communication through non-verbal mediums is exceptionally important for everyone, including the geeky intellectual revolutionaries discussed in the last paragraph. Writing and communicating one's ideas allows for greater amounts of people to invest interest and money into something that, one day, may be the next social media must have or the next life saving technology. Without written communication, ideas would be slow to fruition or just stall at the starting line.

And to me, that's a terrifying thing to picture.