Friday, 6 December 2013

Bonus Update: OOP(s) and Recursively Recursing Recursion

From http://news.sabay.com.kh/wp-content/uploads
/2013/04/ObjectOrientedProgramming.png
.
Yes, the asymmetry is bothering me too.
No, I don't know why it's like that.
Well, now I feel silly. After I made two entries talking about recursion, we have to do a bonus entry about object-oriented programming and, yes, you guessed correctly, recursion! Is it too late to rename this thing Recursion: The Desolation of SLOG? (I don't know why I made that joke: I haven't even seen the previous Hobbit movie yet.)

From http://caseelse.net/wp-content/uploads/2008/05/recursionagain.jpg.
I'll confess: I do like recursion jokes.
     Anyways, object-oriented programming, as the name implies, revolves around objects, and the classes used to create them. You can give objects both attributes and methods, whereas in languages like the original FORTRAN, they have no such thing. It's useful for computer science, as you can represent things and manipulate them far easier than trying to associate random variables for each thing you're trying to represent.

     Recursion is taking a complex problem and simplifying it by having subsequent iterations of the function apply to smaller sections of the original problem until they're at their base cases and therefore easier to solve. Without it, functions would be a nightmare of trying to get things done with while loops, if they were even possible to replicate at all.

No comments:

Post a Comment