Improving Readability Through Fewer Arguments
Passing arguments into classes and functions is an important part of any programming language. But what happens when a function has too many arguments? Let’s dive into how you can clean up functions that have slowly grown over time and now take in too many parameters. While the examples in this video are all in python, this concept should be applicable to every programming language. You can see the first two code examples referenced in this video here: https://seniorcodereviewbuddy.com/youtube-video-details/improving-readability-through-fewer-arguments/ Example 3: https://github.com/seniorcodereviewbuddy/podcast/blob/c60f9e1970f01d02c451957d9cc41fd9dd60f598/move_file.py#L11 Example 3 Improved: https://github.com/seniorcodereviewbuddy/podcast/blob/560d95d24a118fc53740c912bb0341817c8d5ade/move_file.py#L11 The intro music is: Acid Jazz by Kevin MacLeod is licensed under a Creative Commons Attribution 4.0 license. https://creativecommons.org/licenses/by/4.0/ Source: https://freemusicarchive.org/music/Kevin_MacLeod/Jazz_Sampler/AcidJazz_1430 Artist: http://incompetech.com/ The outro music is: Funk Game Loop by Kevin MacLeod is licensed under a Creative Commons Attribution 4.0 license. https://creativecommons.org/licenses/by/4.0/ Source: http://incompetech.com/music/royalty-free/index.html?isrc=USUAN1100839 Artist: http://incompetech.com/ 00:00 Introduction 02:46 Example 1 05:51 Example 2 09:15 Example 3 12:28 Conclusion
Download
0 formatsNo download links available.