Programming Loops vs Recursion - Computerphile

preview_player
Показать описание
Programming loops are great, but there's a point where they aren't enough. Professor Brailsford explains.

This video was filmed and edited by Sean Riley.

Рекомендации по теме
Комментарии
Автор

I love the way loops were animated in this video. I've never seen it done that way.

smergibblegibberish
Автор

The depth and breadth of Professor Brailsford's computer science, logical and philosophy pedagogical ability is really astounding

BeCurieUs
Автор

My old IT teacher told us to look up the definition of recursion in his IT lexicon. We checked the index at the back (that wasn’t numbered itself) and it had a number for the page recursion could be found. We started paging through from the middle only to make our way back to the same page…

ryanaiden
Автор

I love his analogy about running recursive functions with only one stack frame in FORTRAN: "tramples in its muddy gum-boots over ALL your data area and you end up with total garbage!" Brailsford is the best.

chrismcgee
Автор

This video had some excellent and illustrative animations. The "nested loop" animation was super cool. Cheers to the animator!

esond
Автор

To understand recursion, you must first understand recursion..!

kkakroo
Автор

11:27 - "...and if you don't get things sorted out correctly then \*prff\*..." - I completely agree.

josemvacar
Автор

when an OG like this talks about recursion, you watch and listen

Anonymous-njow
Автор

These videos are amazing and this guy is a treasure. Thank you, and him, so much for putting these up! There is so much noise in compsci, and so many folks who want to prove their intelligence by making subject matter harder than it has to be - it's refreshing to see somebody who knows it well enough that they can explain it like it's simple!

TheCALMInstitute
Автор

Fortran 77 was still what I used in the 80's in high school. I can remember writing a program that would calculate how many days old you were based on your birth date. Now that may not seem like a lot, but considering leap years and the odd number of days actually in a year (it's like 365.25) it was quite the feat. I can remember at the end of class saving my work to this huge IBM floppy that was like 10 inched in diameter and putting it in a special storage vault that was grounded and static free. Ah..back in the day...

valuedhumanoid
Автор

11:28 - "If you don't get things sorted out correctly then..." *shrugs and farts* lol

MrVasteel
Автор

What a beautiful time we live to have a lecture of this amazing human being avaible at any time and anywhere in the globe! I wish he was my grandpa, I would be alredy a good programer when a kid! Thank you so much for this master piece whoever is responsible for that!

AlbatrossDude
Автор

This guy should narrate nature shows. He's like the David Attenborough of mathematics.

doresearchstopwhining
Автор

Practical example - The first time I used recursion was to parse a directory structure in C. Using findfirst/next in my function, I would check to see if the file type was another directory (folder). If it was, the function would go into to that folder, then call itself. It would do that until it reached the depth of the current branch of the tree, process the files therein, stop, and exit back to the previous place it had left off. Eventually it would make it's way back to the top. This of course was a memory hog. So I had to track that. To test it I wrote batch code that created massively large file structures. Never had it run out of ram. And that was back in the late 80's using Turbo C by Borland.

AtomkeySinclair
Автор

I loved the demonstration of a nested for-loop. Beautiful imagery.

neonz
Автор

Just to say that I'm proud to be part of this band wagon, where I'm just constantly baffled with the ingenuity and humbleness that resides in science that helps me and others to hopefully build better tools that can improve our society. Thank you for your time, passion and kindness.

MrCOPYPASTE
Автор

I thoroughly enjoy this professor's talks. He has an amazing grasp on both the subject matter and ability to explain things.

frankindude
Автор

256 nested loops in C++... I've often wondered how many inner loops Eclipse ( Java ) could stomach....I become gunshy at just three or four.
I like this old guy. I want to be in HIS class. He probably actually knows an instruction set, or two.

josephfatur
Автор

Also, binary search tree's are often a real world example of a good place to do recursion

BeCurieUs
Автор

If I may recursion seems to do well when dealing with any tree like structure. For example if you want to know how many files are on your hard drive the simplest way to do it would be to have a function that counts all the files in a directory, and calls itself to count the files in sub directories.

aarondavis