More Python Code Smells: Avoid These 7 Smelly Snags

Published: 30 July 2021
on channel: ArjanCodes
90,200
3.2k

💡 Learn how to design great software in 7 steps: https://arjan.codes/designguide.

These are 7 code smells to avoid plus a bonus smell. I describe each smell using a Python example and then show you how to fix it. At the end of the video, I have a few general tips to help you avoid introducing code smells in the first place in your design.

The code I worked on in this episode is available here: https://github.com/ArjanCodes/2021-mo....

🎓 ArjanCodes Courses: https://www.arjancodes.com/courses.

💬 Join my Discord server: https://discord.arjan.codes.

⌨️ Keyboard I’m using: https://amzn.to/49YM97v.

🔖 Chapters:
0:00 Intro
0:31 Explaining the example
2:45 What is a code smell?
3:04 #1 Too many parameters
5:03 #2 Too deep nesting
10:01 #3 Not using the right data structure
12:19 #4 Nested conditional expressions
13:39 #5 Using wildcard imports
15:33 #6 Asymmetrical code
16:58 #7 Using self when it's not needed
18:31 #8 (BONUS): Not using a main() function
19:02 Tips for avoiding code smells

#arjancodes #softwaredesign #python


On this page of the site you can watch the video online More Python Code Smells: Avoid These 7 Smelly Snags with a duration of hours minute second in good quality, which was uploaded by the user ArjanCodes 30 July 2021, share the link with friends and acquaintances, this video has already been watched 90,200 times on youtube and it was liked by 3.2 thousand viewers. Enjoy your viewing!