And Now It’s The Last Post of The Year

I suppose it’s time to play that Vitamin C song, you know, the one that plays at graduations, la la la la la, or something or other.

Well now the only thing between my Computer Science credit and myself, is this final exam, and to be completely honest, I am kind of scared. I’ve done well (enough) on the tests, but absolutely atrocious on the assignments (but that may just be my fault). I will study as hard as I can and then harder for the test, and I’ll try my best not to do that thing where you calculate your mark beforehand and try to do the least possible work to get away with an acceptable mark because frankly, I need to do the best I can, no mark can go unnoticed, and I will definitely re do all the labs and all the exercises working up to this exam.

Now of the topics that need to be covered now, which is all just various sorting algorithms. I know that these sorting algorithms are essentially going to end up in me memorizing them, but I’m glad that the algorithm is not glued to the process of sorting, a series of processes which, I have actually understand, but then again, I also thought I did well on the second assignment (yeah, that didn’t go so well). But yeah, merge sort and quick sort actually made a lot of sense, even though it was a bit of an issue near the beginning. Once I got a handle of how the list would be infinitely merged, then compared and merged (obviously) then the method and its helper function make a lot of sense.

Well, I guess this is goodbye, I must bid farewell to this CSC148 corner of the internet. I was definitely skeptical about the whole SLOG concept at the beginning, but i’ll admit that the idea is charming, quaint, and has definitely grown on me, and allowed me to work out some problems I had with being confused and not being able to ask for help, and for that I will thank whoever happens to read this. Thank You.

We’re in the Home Stretch, Almost Done

I usually wait until the weekend to post up my slog for the week, just for the sake of finality i guess. Frankly, there’s a four day faux-reading break coming up, and i intend to enjoy every possible second of it, when I’m not, you know, studying for the test coming up this week. The second reason for dropping a slog on wednesday, just handed in the second assignment, just announced the details for the second tests, and had some clarification of some previous problems, so yeah, I may just finish CSC148, optimistic about my future in computer science, who would’ve thought?

As far as the second assignment goes, I am actually pretty proud of what i had come up with. Apparently the ideal code was supposed to run about a dozen lines, for the __init__, but i mean, mine didn’t run up into the triple digits or anything, and more importantly, I understood everything i did, and it answered pretty much every test situation i could think of. Trust me, finding something that returns true for both of those statements, not that easy to come by.

I understood recursion before, and I was proud, and now I really get to use it in practice, since it was pretty necessary for this assignment, not really for exercise 6 (figure it, the second i figure out recursion is the same second i would get a zero for getting anywhere near there). I worked out the kinks of recursion that don’t really come apparent with a basic understanding of recursion, how to deal with function without a return statement, the traversal of a tree through recursion, and specifically, the creation of a tree through recursion.

Big Oh and sort are the topics of the moment, today, but i feel like i am in a better situation to learn these topics. It was like my situation on recursion last week, i understand the concepts, in concept, but the technicalities elude me still, i do understand what log means though, which is good, a personal victory, even if it is not that big of a deal in general.

We’re in week 9 of 12, and it’s the end times, time to bring it home.

Trees: Binary, Search, and Otherwise, and the Nodes That Make Them Up

Learning about trees is surprisingly normal, actually. It’s not difficult to understand, but it is something new, so there is something to learn, something new to understand. What frustrates the hell out of me is efficiency and that dreaded Big Oh. 

I guess in concept, just like most other concepts, there is sense to be made. It’s just that log n and lg n and n squared and all these calculus numbers are complicated, and on sight frustrate and discourage me from moving forward. Of course that is no way to learn things so I will tie myself to my computer chair and scour the internet until efficiency and big Oh are etched into the back and side of my forehead, respectively, (and metaphorically, if it really matters). Fortunately enough, I’ve found the “just figure it out” tactic works for me, given what had happened when dealing with recursion. 

I understand that we learned nodes, trees, then binary trees, then binary search trees, but I feel when all is said and done, implementation is easier as you go further down the list. It really is nothing more than an observation, and one that is probably generally acknowledged, given that we didn’t have to do anything we didn’t know how to do, in the course. It’s just that as far as completely understanding concepts from every angle, before moving on, it’s just something that you can’t do without taking trees as a whole, head-on. Not that we were even looking at that direction, once again, just something I noticed. 

Recursion: My Great Blue Whale

Recursion is where Python stopped making sense for me, and I have to admit, it was a tad discouraging. Up to that point, everything made complete sense, classes, instances, attributes, methods, i’ll admit inheritance had me stumped for a hot second, but I overcame that with a bit of research, but there was something about recursion that I could wrap my head around, and even worse, I couldn’t even articulate my problem with it, until i figured it out, so for the moment being, which was quite a few moments, I was essentially dead in the water. 

Having now answered my own question, I will retroactively describe the problem I had with recursion, although many people have many different issues with it. In particular with recursion being used to add to some sort of running total, I just couldn’t for the life of me figure out how the numbers would continue to add up, with the variable holding the number bring reset to zero at the beginning of each recursion; yes, you can laugh now. 

It definitely a silly problem, one that could have definitely been answered in one sentence, if I had known how to articulate this problem to anyone, at the time, but I feel as though this really is an indication of how easily someone can get stumped, just because I couldn’t see the bigger picture, it’s just one particular way of seeing this issue, and I just didn’t have the perspective. 

For anyone who was like myself, and didn’t know the answer to my question, it was because the internal counter does not reset, it does not go back to zero, each recursion is operating essentially parallel to one another, and each internal final count is added to the next and to the next, with the end result being the first call of the recursive function. 

This issue of mine was actually the reason I called my slog Spiraling Recursion, there something about the possibility of an endless recursion that is just dizzying, hopeless and frustrating, as opposed to something that is just a finite loop, for or while, something that I can control, something manageable. 

I’ll admit, the realization I had was during class, and supposedly had no relation to my previous studying, but the python visualizer does infinite good. There is something about the python visualizer that makes me want to recommend it to any person who has any issue with python. It is objective and precise with it’s breakdown of a python block of code, so much so that there will definitely be one little bit of the inner workings that did not just come to your line of sight until it was out in front of you. The answer will come to you, not immediately, but soon.  

Python: Making A Bit Too Much Sense

Python is a program of deceptive simplicity, and that deceptive simplicity is two-fold. On one hand, python is so deceptively simple, with its similarity to written English, that it seems like a starter language and not much more, without ability to do anything meaningful, but that’s not true, as evidenced by our deeper learning of python, it is a full-fledged programming language in any other sense of the word.

On the other hand, being simplistic and logical is in contradiction with having a universal full-fledged programming language, just because everyone’s idea of how something should be worded/programmed is different, therefore, in a program like python, unless you completely master the program on the first look, there will be a point where the simplistic python just doesn’t make sense to you. Personally, that point for me would definitely be recursion (but more on that later). 

Of course, with practically any task, or skill, or subject at school, there will be a point where something will just not make sense, that’s just the nature of learning. The issue that differentiates python from the rest of subjects is that python is deceptively simple, at least at the beginning, which shades the internal logic of learning when dealing with future problems. There is a lot of memorizing when dealing with courses, for example, Psychology or Sociology. When you don’t know what the answer to a particular problem is, you’ve got to find out what it is, with the tools given to you, and then remember it, end of story. 

With python, you’ve got to completely understand the concept, mechanics, capabilities and limitations of any given concept, so that it can be used as part of a bigger program, perhaps in ways not completely conceived before. The problem is, there is not real solution to this problem, apart from dealing with it just like you would any other learning curve, which is just a tad discouraging, if I’m being wholly honest. 

Just study, study, remember and understand, and the solution will just make sense one day, I can legitimately account for that, but sometimes you just got to stare at the screen for a couple of seconds (minutes). 

Object Oriented Programming: Is There Any Other Way?

To answer my own question, yes there are other ways, i guess. Honestly though, object-oriented programming just seems like the present and future of programming. I guess it is all about perception of the mechanics and principles, but there is something about focusing on the logic of a program instead of objects that just seems primitive and simplistic, isn’t it? 

Come to think of it, it’s not as night and day as it seems. On it’s face it seems as though OOP is concerned with the objects as opposed to other languages dealing with more of the input/output relation and the logic behind the change; it just took me a flat second to realize that all programming was about input and output, even though my recent familiarity with OOP makes it seems as though OOP is more complex and, self-sufficient, for lack of a better term; I mean, a object-oriented program seems to be able to work and produce a lot more output with very few instructions or input, with the ability to create objects and output them, as opposed to being forced to change the objects that have been inputted.

Frankly, saying object-oriented programming is my favorite type of programming, is like saying Toronto is my favorite city, I’m just most familiar with it. But just as for my favorite city, my familiarity allows me to make a strong case in support of it, and allow me to defend it, even if i do not know the name of every street, just as I do now know the intricacy of every rule of object oriented programming. Luckily, this, along with the rest of programming thus far, makes a lot of sense,