![]() In this chapter you’ll learn about two important iteration paradigms: imperative programming and functional programming. Another tool for reducing duplication is iteration, which helps you when you need to do the same thing to multiple inputs: repeating the same operation on different columns, or on different datasets. One tool for reducing duplication is functions, which reduce duplication by identifying repeated patterns of code and extract them out into independent pieces that can be easily reused and updated. You’re likely to have fewer bugs because each line of code is Remembering to change every place that you copied-and-pasted the As your needsĬhange, you only need to make changes in one place, rather than It’s easier to respond to changes in requirements. It’s easier to see the intent of your code, because your eyes areĭrawn to what’s different, not what stays the same. ![]() Reducing code duplication has three main benefits: In functions, we talked about how important it is to reduce duplication in your code by creating functions instead of copying-and-pasting. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |