Sunday 2 February 2014

Week 4

Hello everyone! This week we went over recursion. What is recursion? Put in plain words, its repeating the same step over and over. In programming, we get implement a code that will call itself and do the same step, until it fulfills a certain "basic case". The basic case is essentially the last calling of itself and does something else. Reading my explanation right now, and man i just confused myself. Anyhow, recursion can be very confusing at times and complicated, but to be honest when i see myself finishing a complicated problem though recursion i always think: "This looks so cool, good job!".

Anyway, i also had a lot of fun in my tutorial. The TA is pretty chilled and its all very casual. Don't get me wrong we do finish up all the work. Anyway, we practiced inheritance. We basically had to make two "basic" classes which all other classes will inherent. One was motorized, and the other one was humanpowered. Now these classes refer to type of vehicle, and each has its own attributes. Motorized had fuel capacity, fuel economy, fuel_level, number of wheels and current position, while h.p had number of wheels, current position and speeds. And the classes that should inherent these were: car, bicycle, motorcycle, unicycle. There wasn't anything difficult in the task, it was just soooooooooo much typing. Dont take this the wrong way, it was awesome practice, but man those classes...

Anyhow, that pretty much sums my week up! Thanks for tunning in and see you next week. 

Wednesday 22 January 2014

Week 3: Object Oriented Programming

Hello people! Welcome to my csc148 blog. I've been thinking allot about what i should be writing in this post, and i must say it was really hard to come up with anything. I've jumped up from 108 from last semester, but my real programming knowledge come from c#.

Anyhow, these few weeks we worked on Object Oriented Programming (OOP). To be perfectly honest, these are some concepts i already grasped from c#, so i didn't have any problems understanding the professor.

So, what is OOP? OOP is a programming language model. Programmers focus on on objects, instead of just functions and procedures. Believe me, this makes life allot easier. What is an object? Or rather what could be one? It refers to an instance of a class (a class being anything you want it to be!). Hmm mm, what could you possibly gain by doing this and not get by directly programming the logic, ignoring all this gibberish about object? Well the answer is pretty straight forward. Structure and organization. You can easily modify each aspect of your code without affecting other parts (that you want to stay the same of course and you also wont have to start from the beginning if you mess one part up) not to speak of the clarity and quite readable style that your code will have (so you don't get those headaches scrolling though your code trying to make something of it) . Also, each part of your code is reusable (without using copy paste).

Anyway, since i assume all of you already understand OOP, i didn't go into much detail. Looking forward to recursion because i really like it (even though at times it can be very confusing and impossibly hard).

See you next week!