658 subscribers
انتقل إلى وضع عدم الاتصال باستخدام تطبيق Player FM !
المدونة الصوتية تستحق الاستماع
برعاية


1 How AI is saving billions of years of human research time | Max Jaderberg 19:15
Measuring Python Code Quality, Simplicity, and Maintainability
Manage episode 334456698 series 2637014
How maintainable is your Python code? Is it possible to hold the code for your functions in your head? When is it appropriate to use measurements in a code review? This week on the show, Reka Horvath and Ben Martineau from Sourcery are here to discuss their recent PyCon talk, “Actionable insights vs ranking: How to use and how NOT to use code quality metrics.”
Reka and Ben share their thoughts on how metrics can provide insights into your Python code. We discuss four measurements of code complexity and what factors into each.
We also talk about deciding whether to refactor or rewrite code. Ben and Reka share their experience in code review situations and the importance of shifting the conversation from subjective opinions toward objective measurements.
Course Spotlight: Writing Idiomatic Python
What are the programming idioms unique to Python? This course is a short overview for people coming from other languages and an introduction for beginners to the idiomatic practices within Python. You’ll cover truth values, looping, DRY principles, and the Zen of Python.
Topics:
- 00:00:00 – Introduction
- 00:01:54 – Reka’s tutorials on Real Python
- 00:02:45 – PyCon US 2022 Talk
- 00:06:01 – Code reviews and metrics
- 00:09:42 – Trying to make things more objective
- 00:13:24 – Sponsor: CData Software
- 00:14:07 – Measuring WTFs/min and magical code
- 00:16:39 – Pythonic, idiomatic, and clean code
- 00:21:17 – Sourcery.ai and refactoring
- 00:24:04 – Four metrics to measure
- 00:24:56 – Function length
- 00:30:05 – Cyclomatic complexity
- 00:36:49 – Video Course Spotlight
- 00:38:21 – Cognitive complexity
- 00:44:38 – Working memory
- 00:51:49 – Suggestions on how to use the metrics
- 00:58:34 – Generating measurements
- 01:01:36 – What are you excited about in the world of Python?
- 01:03:30 – What do you want to learn next?
- 01:05:31 – Thanks and goodbye
Show Links:
- Sourcery | Automatically Improve Python Code Quality
- Can you fit all of this code in your head?
- Talk - Reka/Ben: Actionable insights vs ranking How to use and how NOT to use code quality metrics - YouTube
- Using Pandas and Python to Explore Your Dataset – Real Python
- Refactoring - Martin Fowler
- WTFs/m – OSnews
- Who’s Your Coding Buddy?
- Principle of least astonishment - Wikipedia
- Anthony Shaw - Wily Python: Writing simpler and more maintainable Python - PyCon 2019 - YouTube
- Refactoring Python Applications for Simplicity – Real Python
- Cyclomatic complexity - Wikipedia
- Cognitive Complexity: A new way of measuring understandability - SonarSource
- The Magical Number Seven, Plus or Minus Two - Wikipedia
- wily · PyPI
- sourcery-analytics: A command line tool and library for statically analyzing Python code quality.
- Clean Code: A Handbook of Agile Software Craftsmanship - Robert C. Martin
- Errors and Exceptions — Python 3.10.5 documentation
- Rust Programming Language
- Ben Martineau – Medium
- Sourcery | Blog
- The Prodigy - ‘Breathe’ - YouTube
Level up your Python skills with our expert-led courses:
258 حلقات
Manage episode 334456698 series 2637014
How maintainable is your Python code? Is it possible to hold the code for your functions in your head? When is it appropriate to use measurements in a code review? This week on the show, Reka Horvath and Ben Martineau from Sourcery are here to discuss their recent PyCon talk, “Actionable insights vs ranking: How to use and how NOT to use code quality metrics.”
Reka and Ben share their thoughts on how metrics can provide insights into your Python code. We discuss four measurements of code complexity and what factors into each.
We also talk about deciding whether to refactor or rewrite code. Ben and Reka share their experience in code review situations and the importance of shifting the conversation from subjective opinions toward objective measurements.
Course Spotlight: Writing Idiomatic Python
What are the programming idioms unique to Python? This course is a short overview for people coming from other languages and an introduction for beginners to the idiomatic practices within Python. You’ll cover truth values, looping, DRY principles, and the Zen of Python.
Topics:
- 00:00:00 – Introduction
- 00:01:54 – Reka’s tutorials on Real Python
- 00:02:45 – PyCon US 2022 Talk
- 00:06:01 – Code reviews and metrics
- 00:09:42 – Trying to make things more objective
- 00:13:24 – Sponsor: CData Software
- 00:14:07 – Measuring WTFs/min and magical code
- 00:16:39 – Pythonic, idiomatic, and clean code
- 00:21:17 – Sourcery.ai and refactoring
- 00:24:04 – Four metrics to measure
- 00:24:56 – Function length
- 00:30:05 – Cyclomatic complexity
- 00:36:49 – Video Course Spotlight
- 00:38:21 – Cognitive complexity
- 00:44:38 – Working memory
- 00:51:49 – Suggestions on how to use the metrics
- 00:58:34 – Generating measurements
- 01:01:36 – What are you excited about in the world of Python?
- 01:03:30 – What do you want to learn next?
- 01:05:31 – Thanks and goodbye
Show Links:
- Sourcery | Automatically Improve Python Code Quality
- Can you fit all of this code in your head?
- Talk - Reka/Ben: Actionable insights vs ranking How to use and how NOT to use code quality metrics - YouTube
- Using Pandas and Python to Explore Your Dataset – Real Python
- Refactoring - Martin Fowler
- WTFs/m – OSnews
- Who’s Your Coding Buddy?
- Principle of least astonishment - Wikipedia
- Anthony Shaw - Wily Python: Writing simpler and more maintainable Python - PyCon 2019 - YouTube
- Refactoring Python Applications for Simplicity – Real Python
- Cyclomatic complexity - Wikipedia
- Cognitive Complexity: A new way of measuring understandability - SonarSource
- The Magical Number Seven, Plus or Minus Two - Wikipedia
- wily · PyPI
- sourcery-analytics: A command line tool and library for statically analyzing Python code quality.
- Clean Code: A Handbook of Agile Software Craftsmanship - Robert C. Martin
- Errors and Exceptions — Python 3.10.5 documentation
- Rust Programming Language
- Ben Martineau – Medium
- Sourcery | Blog
- The Prodigy - ‘Breathe’ - YouTube
Level up your Python skills with our expert-led courses:
258 حلقات
كل الحلقات
×
1 Comparing Real-World Python Performance Against Big O 45:01

1 Solving Problems and Saving Time in Chemistry With Python 1:13:10

1 Structuring Python Scripts & Exciting Non-LLM Software Trends 54:07

1 Scaling Python Web Applications With Kubernetes and Karpenter 1:04:47

1 Starting With marimo Notebooks & Python App Config Management 51:41

1 Rodrigo Girão Serrão: Python Training, itertools, and Idioms 1:02:49

1 Python Thread Safety & Managing Projects With uv 34:48

1 DjangoCon Europe 2025: Live Recording From Dublin 57:19

1 Going Beyond requirements.txt With pylock.toml and PEP 751 1:31:46

1 Experiments With Gen AI, Knowledge Graphs, Workflows, and Python 59:18

1 Exploring DuckDB & Comparing Python Expressions vs Statements 52:01

1 Learning Intermediate Python With a Deep Dive Course 56:26

1 GUIs & TUIs: Choosing a User Interface for Your Python Project 46:39

1 A Decade of Automating the Boring Stuff With Python 1:06:01

1 Manage Projects With pyproject.toml & Explore Polars LazyFrames 48:43
مرحبًا بك في مشغل أف ام!
يقوم برنامج مشغل أف أم بمسح الويب للحصول على بودكاست عالية الجودة لتستمتع بها الآن. إنه أفضل تطبيق بودكاست ويعمل على أجهزة اندرويد والأيفون والويب. قم بالتسجيل لمزامنة الاشتراكات عبر الأجهزة.