Baxx: but I’m sure I’ll.

 
Defusco: I wrote a little function for adding ‘debugger’ and everything

Reineck: I mean for example in the C# debugger, you can set a breakpoint, and then “rewind” the code

Reineck: Say you want to see what happened before the breakpoint, you can just move back and re-run the code

Reineck: Or you can change the code, move the execution point, and re-run with your changes

Reineck: Can be quite convenient for some things

Defusco: Yeah sounds pretty flexible

Reineck: I was actually writing an article describing how to debug problems using chrome’s dev tools :

Reineck: Not done with it yet though

Defusco: Zomg: cool feel free to pm or whatever when it’s done, I’m using firebox atm as chrome didn’t run this code properly for some reason

Reineck: The functionality is fairly similar in both FF and Chrome, maybe some minor UI differences in places

Defusco: Yeah i never realised there was so much given with a browser, re debugging, emultators etc

Defusco: I got that there was stuff, but never ‘got’ the stuff as I’d never used it

Kleypas: None understands my library :

Felciano: Torkable, above you said and you get 13 because n * 2 -1 I believe where this multiplication come ? could you please in this link http://jsfiddle.net/ea604hy4/ just put a single comment as to how this recursion progresses and Ill guess the rest, I dont even see what happens in order to figure out the answer.

Spickerman: RonRichie: ignore the n*2-1 thing

Economos: You get a tree of function calls that all return 1

Watlington: If you trace the execution with some paper you will understand it

Brinkerhoff: Torkable so, are you saying that this whole line growBeanstalkyears – 1 + growBeanstalkyears – 2 all in all returns 1 ?

Chaudhry: It returns the sum of a bunch of functions that all return 1

Scrichfield: Because it makes two function calls that both return 1

Goyette: RonRichie, for every recursive algorithm there is a base case, in this example the base case returns 1

Goyette: The purpose of recursion is to reach the base case, then unravel the stack

Lamarque: Because 4-1 3 returns 2, and 2 returns 1

Defusco: What’s a ‘Call Stack’ ? Is this the order that functions are called in?

Reineck: Baxx: I think many are aware that browsers have some kind of debugging tools, but because the UI can be a bit obscure, they don’t really know how to use them effectively

Margaret: Because 4 returns 3, and 3 returns 2

Ondo: Aha I get it, the base case is if years is equal or less to 2 right? so what if years is 7 ? so then if statement is not true and it should not return 1?

Goyette: RonRichie, right, it will recurse until it reaches the base case

Reineck: Baxx: my hope is to make the article show a practical debugging scenario in a way that I can demonstrate the use of the different bits and bobs in a way that it makes sense

Defusco: Zomg: yeah, I knew they had ‘other stuff’ but never used it until yesterday , it’s been very helpful!

Elchert: Lol I wonder if this is really something complicated or Im just complete dumb for not even understanding what you guy saying 😀

Defusco: Zomg: yeah – I think tracing the variables and stuff is a biggy – console.log is just crap in comparrison and that’s what I was using

Goyette: RonRichie, well, it is recursion, it is a matter of doing it, rather than understanding it. The understanding comes when you’ve done it enough times

Goyette: Like they said “you can only understand recursion if you understand recursion”

Acebedo: RonRichie: seriously, draw the tree

Reineck: Baxx: I just wish I had some good demo project for this, the only thing requiring heavier debugging for me right now is super secret work code 😀

Sinopoli: How do i use a jquery plugin like colorbox on jsbin or jsfiddle?

Reineck: Baxx: but I’m sure I’ll come up with something