how many times in your life have you implemented recursive methods
-
Where ever you go, there you are.
VS2010/Atmel Studio 6.0 ToDo Manager Extension
Version 3.0 now available. There is no place like 127.0.0.1I feel more like I do now than I did a while ago.
".45 ACP - because shooting twice is just silly" - JSOP, 2010
-----
You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010
-----
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass." - Dale Earnhardt, 1997 -
I can count with the fingers of my hand the times I had to implement recursive methods in my life, so what was the fuzz all about when you are in school ant programming teachers tell you that that is the holy grail of programming!!! ps: i know that is important but most of recursive functions are implememnted and you only have to use them.
-
Linear algebra is another one. Don't use it at all for most things, but good luck doing 3D graphics without it. It's good to have a varied tool kit, just in case.
I don't get to use that very often, as I took a class called "Linear Algebra" in college and now I have no idea what linear algebra is. :)
-
I don't get to use that very often, as I took a class called "Linear Algebra" in college and now I have no idea what linear algebra is. :)
Well the name makes no sense to me (I guess its because it has to do with linear systems or something like that) but that's the one with the matrices. Very necessary for 3D applications. But most apps aren't 3D, and outside of that and scientific simulation I don't think it gets used for anything.
-
I can count with the fingers of my hand the times I had to implement recursive methods in my life, so what was the fuzz all about when you are in school ant programming teachers tell you that that is the holy grail of programming!!! ps: i know that is important but most of recursive functions are implememnted and you only have to use them.
Many times, it's a useful type of solution to know that it exists. One of the key concepts they really focused on when I was in college was the "Divide and Conquer" approach in programming. It is very simple to illustrate this concept with recursion and I think that is why it's demonstration is so pronounced. One thing to consider, is that a tail-recursive algorithm can be re-written into a loop that resides in a single function. How many functions have you written that only contain a loop and could have just as easily started out as a recursive implementation?
All of my software is powered by a single Watt.
-
I can count with the fingers of my hand the times I had to implement recursive methods in my life, so what was the fuzz all about when you are in school ant programming teachers tell you that that is the holy grail of programming!!! ps: i know that is important but most of recursive functions are implememnted and you only have to use them.
Many. Dave.
-
I can count with the fingers of my hand the times I had to implement recursive methods in my life, so what was the fuzz all about when you are in school ant programming teachers tell you that that is the holy grail of programming!!! ps: i know that is important but most of recursive functions are implememnted and you only have to use them.
I don't think I ever have in the real world, but maybe once. Certainly did in college, and in some games.
-
I can count with the fingers of my hand the times I had to implement recursive methods in my life, so what was the fuzz all about when you are in school ant programming teachers tell you that that is the holy grail of programming!!! ps: i know that is important but most of recursive functions are implememnted and you only have to use them.
Wrong teachers, I think. My Prof told us, that there is an iterative solution for every recursive algorithm and that it is better to use the iterative one in 99.99% of all cases. Yet I didn't found the case where the recursive one is better. Perhaps faster to programm because you don't need to think about it, perhaps acceptable because it's needed just one time. :rolleyes:
------------------------------ Author of Primary ROleplaying SysTem How do I take my coffee? Black as midnight on a moonless night. War doesn't determine who's right. War determines who's left.
-
I can count with the fingers of my hand the times I had to implement recursive methods in my life, so what was the fuzz all about when you are in school ant programming teachers tell you that that is the holy grail of programming!!! ps: i know that is important but most of recursive functions are implememnted and you only have to use them.
Almost every time I've had to deal with a hierarchical data structure, which has been fairly often. I don't understand the big deal. Recursion in programming is like ketchup on a hamburger. Whether you use recursion or iteration is largely a matter of personal taste.
Software Zen:
delete this;
-
I can count with the fingers of my hand the times I had to implement recursive methods in my life, so what was the fuzz all about when you are in school ant programming teachers tell you that that is the holy grail of programming!!! ps: i know that is important but most of recursive functions are implememnted and you only have to use them.
Countless. I event made recursion is SQL... However today I use a better way to implement the idea of recursion - faster and lighter...
-
I can count with the fingers of my hand the times I had to implement recursive methods in my life, so what was the fuzz all about when you are in school ant programming teachers tell you that that is the holy grail of programming!!! ps: i know that is important but most of recursive functions are implememnted and you only have to use them.
I used to write recursive methods, then I took an arrow to the knee.. I've been a developer just for a couple of years by now, but I actually never used recursive methods yet.
-
I can count with the fingers of my hand the times I had to implement recursive methods in my life, so what was the fuzz all about when you are in school ant programming teachers tell you that that is the holy grail of programming!!! ps: i know that is important but most of recursive functions are implememnted and you only have to use them.
From my point of view, recursion can indeed be considered the Holy Grail of programming, as it relates to a very general technique of problem solving: you solve an instance of a problem by solving one or more smaller instances of the same problem. In programming, this is implemented by iteration in the simple cases and recursion in the general ones. By example, in Straight insertion sort, assume you have sorted the N-1 first elements, you pick some unsorted element and insert it where should, yielding a sort of the N elements. Sorting N elements is done from sorting N-1 elements, iteratively. In MergeSort, you sort two subarrays of N/2 elements and then merge them. The natural way to implement that is by recursion, solving an N problem from two N/2 problems, themselves from four N/4 problems... There's nothing as powerful as breaking a problem into subproblems. I use recursion on all these occasions where the Divide & Conquer approach is fruitful, i.e. when the algorithm shapes as a tree traversal. Among them are combinatorial optimization problems, using breadth-first, depth-first or iterative-deepening strategies. Like root finding by coarse to fine approaches, error correction in Verterbi, split & merge techniques for paralellization... Other occasions to use recursion is when the data structures in use are recursive by nature, such as binary or k-ary trees used in dictionaries, graphs for numerous purposes, k-D trees for fast geometric searches, abstract syntax trees in parsing... Obviously, if you never deal with algorithmics explicitly, chances are low that recursion will be of any help to you.
-
I can count with the fingers of my hand the times I had to implement recursive methods in my life, so what was the fuzz all about when you are in school ant programming teachers tell you that that is the holy grail of programming!!! ps: i know that is important but most of recursive functions are implememnted and you only have to use them.
Last time: Yesterday afternoon (code to sort out message replies into a correct hierarchy - each reply could have any number of sub-replies; each sub-reply could have any number of sub-sub-replies etc). OK, it is not a tool that I use every day, but it is essential to have it in your armoury. Same as a carpenter might not need a router every day; but there are times when it is useful.
-
-
I can count with the fingers of my hand the times I had to implement recursive methods in my life, so what was the fuzz all about when you are in school ant programming teachers tell you that that is the holy grail of programming!!! ps: i know that is important but most of recursive functions are implememnted and you only have to use them.
At a guess/judgment, maybe over 300 distinct instances. (Not re-use of my library code) Or maybe more.
-
I can count with the fingers of my hand the times I had to implement recursive methods in my life, so what was the fuzz all about when you are in school ant programming teachers tell you that that is the holy grail of programming!!! ps: i know that is important but most of recursive functions are implememnted and you only have to use them.
-
I can count with the fingers of my hand the times I had to implement recursive methods in my life, so what was the fuzz all about when you are in school ant programming teachers tell you that that is the holy grail of programming!!! ps: i know that is important but most of recursive functions are implememnted and you only have to use them.
Almost daily when writing Prolog.
-
I've done it a few times...but who really needs to learn about them are the people who write the instructions on shampoo. I get stuck doing lather, rinse, repeat until I stack overflow because they forgot an end condition...
the end condition might be an empty bottle of shampoo, as the user you must specify the amount of shampoo you want (need) to use, so it´s possible to get out of the "not-so-endless-loop" in just one turn... ;)
-
I can count with the fingers of my hand the times I had to implement recursive methods in my life, so what was the fuzz all about when you are in school ant programming teachers tell you that that is the holy grail of programming!!! ps: i know that is important but most of recursive functions are implememnted and you only have to use them.
A LOT. Hell, a lot of the time I use recursion with static variables (searching a nodal structure for the highest value springs to mind). Pretty much any time you're working with nodal data, you probably should be using a recursive function, just sayin'. I can't tell you how many times I've been told that the depth of the data will not be more than X. Yeah right. Hope for X, implement for N I always say.
-
Nope, it's an infinite recursion. The link is a method call.
To alcohol! The cause of, and solution to, all of life's problems - Homer Simpson ---- Our heads are round so our thoughts can change direction - Francis Picabia