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.