Join Barron Stone for an in-depth discussion in this video Code reuse, part of Programming Fundamentals in the Real World.
- Eating nothing but omelets would get old real quick.…Variety is the spice of life so I should probably add…another function to my menu of breakfast recipes.…- How about making some pancakes?…- Sounds good to me.…To make a pancake, I start by mixing together…the ingredients in a bowl.…Then I pour that mixture into a frying pan,…I cook the pancake on one side,…flip it, I cook the other side,…and the output of that process,…is a delicious pancake.…Hmm, something seems familiar about this.…Ah, the process for making a pancake has a lot…in common with the process for making an omelet.…
Performing the same steps in multiple places is…the perfect time to consider functionalizing that process.…Back in idle I had the start a 102 breakfast function…scripts open which has a new function for making pancakes.…Inside of the make pancake function,…I perform all of the steps in the pancake making process.…I mix the ingredients, pour the mixture into a frying pan,…cook the first side, flip it, and cook the other side.…At the end, the make pancake function returns a string…
- Reusing functions
- Local vs. global variables
- Creating and naming custom objects
- Class inheritance
- Modules and packages
- Multidimensional lists and tuples
- Queues and stacks
- Creating and combining sets
- Storing data in dictionaries
- If/else and switch statements
- For vs. while loops
- Error handling
- Polling and event-driven programming
Skill Level Beginner
Foundations of Programming: Design Patternswith Elisabeth Robson2h 19m Intermediate
3. Class Inheritance
4. Modules and Packages
5. Lists and Tuples
6. Queues and Stacks
9. Conditional Execution
11. Error Handling
12. Polling and Event-Driven Programming
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.