I Used To Hate Python

ArjanCodes · Beginner ·🌐 Frontend Engineering ·2mo ago

Key Takeaways

This video explains the criticisms of Python, including indentation, runtime errors, packaging, and performance, and why the creator still chooses to use it despite these criticisms.

Full Transcript

Confession time. I used to not like Python at all and now I run a pretty big Python focused YouTube channel. So either I completely changed my mind or perhaps something more interesting happened. Today I'll tell you why I didn't like Python and why most of the things that I didn't like about it are actually still true and why I use it anyway. And actually there's a bigger lesson here about how you think as a developer. So, no code examples today. It's just me sharing my thoughts about Python and what I think about it. By the way, I'm currently building something new called software design mastery. This goes much deeper into software design and architecture than I can do on YouTube. If you want to become a more confident senior level developer, make better design decisions in your code independent of the programming language, join the free weight list at iron.co/mastery. The link is in the video description. Now before I want to talk about Python, let's put this into context. Actually when I learned programming, I didn't start with Python at all. I actually started with basic on a Commodore 64 uh saving programs on cassette tapes. Yes, I'm that old. And then I went to Turop Pascal and then in high school I learned C++. Uh at university I learned modular 2 and then Java. When I became a teaching assistant, I built some simple web systems in PHP, HTML, JavaScript and during my PhD studies, I focused heavily on C and C++ for well computer graphics which was the topic that was that I was working on at the time and it had Python as scripting layers. That was actually the first time I came into touch with Python. After finishing my PC, I started working as a teacher and there I taught C. So yet another new language for me teaching game programming and later on in my businesses startup companies and even iron codes I used things like uh react and typescript for front- end work python for tooling and automation and javascript nodejs for the back end and I also experiment with a bunch of other things like uh rust golla some assembly even objective c and while I was at the university I even invented my own programming language that nobody uses called Pomeron in Yumur style programming in your mother's tongue. Uh basically it was a Dutch translation of Pascal. Now the point is I've seen strict languages, verbose languages, functional languages, systems languages, uh scripting languages. So when I criticized Python, it's not because I don't know any of the alternatives. Now what didn't I like about Python? The first thing that really got me with Python was that indentation defines the scope. I came from a world where basically formatting your code didn't matter because the uh syntax elements like braces defined scope. So coming from languages like C++ or Java, having to define scope by using indentation felt really fragile to me. I mean you misplace one space or you turn a tab into a space and then your logic basically changes. I was thoroughly convinced that whites space should not have semantic meaning which by the way I still kind of think but it also leads of course to an advantage which is that the code is typically shorter because you don't need to type all of these braces anymore. Now a second thing is lack of strictness in C++ or Java. Well the compiler basically stops you if you do something wrong. In Python it's possible that lots of errors only show up at runtime. Now, type annotations help, but they're optional. They're not enforced by the interpreter. You have to do work to make sure that this is taken into account. The third is that Python, in my opinion, has verbosity in really strange places. Uh, in particular, when you look at callables, if you want to specify a callable type there, the type annotations are just horrible to read. Uh, another example is generics before Python 3.12 with the type vars. This is not great. The fourth thing that I didn't like about Python is class design where you have a dunder in it method as a constructor which always felt hacky to me. Why do I have to write self everywhere? Another thing is the whole class variables versus instance variables. This is really easy to mess up. And then in data classes you define instance variables like you would normally define class variables. It's very confusing. So compared to other languages that I use, it felt very inconsistent. Fifth thing is imports and packaging. Relative versus absolute import. When is a folder a package versus when it isn't? Why does it work in one context but not in another? It confused me for years. The sixth thing is dependency management. Virtual environments pip requirements.txt poetry pipen. Uh it's much better now fortunately with tools like uv but historically this was actually really messy. And finally, performance. It's one of the main things that I get in my comments all the time. Python is a toy language. If you want to write real code, don't use Python. Yeah, it's not fast. If you compare raw execution speed to C++, Rust, Go, it just loses. And that bothered me a bit in the beginning. Now, in the end, actually, performance is not that important for the things that I do, but still, it's in the back of your mind. So when you look at that list and actually most of those things that I didn't like about Python are still there. There's still white space that has meaning. Uh type annotations can still be verbose and a couple of other things as well. So why would I still use Python? Now in my comment section I see all the time things like why use type hints just switch to a statically typed language? Python is a toy language. It's outdated. or from the other side, people saying that I'm some kind of Java programmer trying to turn Python into Java. Now, for the record, the last serious Java code I wrote was 25 years ago. Uh it just seems that programming languages divide people into camps. Uh I personally don't feel like I'm in a camp. I just like tools. And this is why I still use Python. It's incredibly easy to set up. It's fantastic for quick scripts and automations. It has a massive ecosystem. It integrates with basically everything, especially in AI and machine learning. Well, Python is basically the default language you should use. And as a consequence of that, AI coding agents also know Python extremely well because there's so much training data. And the big thing is that 90% of the things that I build is glue code. Connecting some APIs, getting some data from a database, orchestrating a couple of different services, integrating things like payment providers, email systems, LLM API, stuff like that. And in those cases, performance is rarely the bottleneck. The bottleneck is usually the network, the database, or an external API. So, I asked myself the question, does Python's performance matter to me? Well, most of the time it doesn't. Is it perfect? No. Is it the fastest? No. Does it solve my problems efficiently? Well, usually yes. And for me, that trade-off is just totally worth it. The bigger lesson here, I think, is about identity. If you tie your identity to a language, then any criticism on that language is going to feel personal. Like if you say I'm a Python developer and somebody criticizes Python, that's going to feel like a personal attack. And if you do that, you stop evaluating the trade-offs objectively and you defend your camp instead of solving problems. And I think senior developers should optimize for outcomes, not ideology. There is no best language in the world. There's just the one that works best for a particular context. Even the people saying that only use Rust because it's much faster than Python. Well, Rust also has its problem, right? It's just not as easy to use as Python. So, it all depends on the context. It depends on the team, the ecosystem, the existing infrastructure that you have. If you have like a huge code base in C++, yeah, Python is great, but you're going to need to work with C++. You simply have no choice. It depends on the domain. If you need to develop a web app, you're going to use different tools. than if you need to develop some embedded software, right? And for some things like embedded systems, well, probably Python isn't the best option for that. Although I wouldn't be surprised if there is actually an ecosystem for that within Python. Uh for an AI integration startup, Python might be the best thing ever. And the nice thing about life is that you're allowed to use multiple programming languages. Yes, one project in Python, do another in Rust, do another in Typescript. Don't feel like you have to pick always the same tool. You don't have to marry your tools. And finally, don't judge other developers for their choices. You don't know what their constraints are. You don't know their team's experience level. Uh architecture, design quality matter way more than the particular language that you're using. Anyway, this video ended up being kind of a rant. I do think it's important though to not only talk about writing code and design, but also about how we see ourselves as developers and the kind of mindset you need to develop if you want to grow into a more senior role. But I'd like to hear from you. What are your thoughts about this? Do you associate yourself with a particular language? Do you consider yourself a pythonista, a rustian, a CP? Have you ever changed your minds about a language after using it for a while? Let me know in the comments. Now, Python has its limitations, but it also has great features. If you want to learn more about those, including some features you probably don't even know exist, check out this video next. Thanks for watching and see you next

Original Description

🧱 Build software that lasts. Join the Software Design Mastery waiting list → https://arjan.codes/mastery. In this video, I explain what I didn’t like about Python when I first encountered it. From indentation and runtime errors to packaging and performance, and why many of those criticisms are still valid. More importantly, I explain why I still choose Python anyway. 🎓 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:57 Languages That I Used 2:44 What I Didn’t Like About Python 5:49 Why Still Use Python? 7:30 The Lesson 9:25 Final Thoughts #arjancodes #softwaredesign #python
Watch on YouTube ↗ (saves to browser)
Sign in to unlock AI tutor explanation · ⚡30

Playlist

Uploads from ArjanCodes · ArjanCodes · 0 of 60

← Previous Next →
1 Full stack WEB DEVELOPMENT in 2021 - the ULTIMATE tech stack for FAST web app development
Full stack WEB DEVELOPMENT in 2021 - the ULTIMATE tech stack for FAST web app development
ArjanCodes
2 FROM PRODUCT IDEA TO SOFTWARE - turn your idea into reality in a few steps
FROM PRODUCT IDEA TO SOFTWARE - turn your idea into reality in a few steps
ArjanCodes
3 Cohesion and Coupling: Write BETTER PYTHON CODE Part 1
Cohesion and Coupling: Write BETTER PYTHON CODE Part 1
ArjanCodes
4 Build a GLASSMORPHISM React Component - Typescript & Material-UI
Build a GLASSMORPHISM React Component - Typescript & Material-UI
ArjanCodes
5 Observer Pattern Tutorial: I NEVER Knew Events Were THIS Powerful 🚀
Observer Pattern Tutorial: I NEVER Knew Events Were THIS Powerful 🚀
ArjanCodes
6 100% CODE COVERAGE - Think You're Done? Think AGAIN.☝
100% CODE COVERAGE - Think You're Done? Think AGAIN.☝
ArjanCodes
7 Two UNDERRATED Design Patterns 💡 Write BETTER PYTHON CODE Part 6
Two UNDERRATED Design Patterns 💡 Write BETTER PYTHON CODE Part 6
ArjanCodes
8 1000 Subscribers! 🚀 WHY I Started this Channel and WHAT'S NEXT
1000 Subscribers! 🚀 WHY I Started this Channel and WHAT'S NEXT
ArjanCodes
9 Channel Trailer ArjanCodes - March 2021
Channel Trailer ArjanCodes - March 2021
ArjanCodes
10 Exception Handling Tips in Python ⚠ Write Better Python Code Part 7
Exception Handling Tips in Python ⚠ Write Better Python Code Part 7
ArjanCodes
11 Monadic Error Handling in Python ⚠ Write Better Python Code Part 7B
Monadic Error Handling in Python ⚠ Write Better Python Code Part 7B
ArjanCodes
12 GW BASIC Games I Wrote When I Was a Kid 🎮 Running 30 Year Old Code
GW BASIC Games I Wrote When I Was a Kid 🎮 Running 30 Year Old Code
ArjanCodes
13 Why You Should Think About SOFTWARE ARCHITECTURE in Python 💡
Why You Should Think About SOFTWARE ARCHITECTURE in Python 💡
ArjanCodes
14 Uncle Bob’s SOLID Principles Made Easy 🍀 - In Python!
Uncle Bob’s SOLID Principles Made Easy 🍀 - In Python!
ArjanCodes
15 QUESTIONABLE Object Creation Patterns in Python 🤔
QUESTIONABLE Object Creation Patterns in Python 🤔
ArjanCodes
16 If You’re Not Using Python DATA CLASSES Yet, You Should 🚀
If You’re Not Using Python DATA CLASSES Yet, You Should 🚀
ArjanCodes
17 CODE ROAST: Yahtzee - New Python Code Refactoring Series!
CODE ROAST: Yahtzee - New Python Code Refactoring Series!
ArjanCodes
18 7 UX Design Tips for Developers
7 UX Design Tips for Developers
ArjanCodes
19 Going All-in on Software Design in Python + an ANNOUNCEMENT 🎙
Going All-in on Software Design in Python + an ANNOUNCEMENT 🎙
ArjanCodes
20 🎙 Interview with Sybren Stüvel, Developer @ Blender 3D
🎙 Interview with Sybren Stüvel, Developer @ Blender 3D
ArjanCodes
21 Do We Still Need Dataclasses? // PYDANTIC Tutorial
Do We Still Need Dataclasses? // PYDANTIC Tutorial
ArjanCodes
22 7 Python Mistakes That Instantly Expose Junior Developers
7 Python Mistakes That Instantly Expose Junior Developers
ArjanCodes
23 Answering Your Most Frequently Asked Python Questions // Q&A 07-2021
Answering Your Most Frequently Asked Python Questions // Q&A 07-2021
ArjanCodes
24 GitHub Copilot 🤖 The Future of Software Development?
GitHub Copilot 🤖 The Future of Software Development?
ArjanCodes
25 More Python Code Smells: Avoid These 7 Smelly Snags
More Python Code Smells: Avoid These 7 Smelly Snags
ArjanCodes
26 Test-Driven Development In Python // The Power of Red-Green-Refactor
Test-Driven Development In Python // The Power of Red-Green-Refactor
ArjanCodes
27 5 Tips To Keep Technical Debt Under Control
5 Tips To Keep Technical Debt Under Control
ArjanCodes
28 Refactoring A Tower Defense Game In Python // CODE ROAST
Refactoring A Tower Defense Game In Python // CODE ROAST
ArjanCodes
29 The Factory Design Pattern is Obsolete in Python
The Factory Design Pattern is Obsolete in Python
ArjanCodes
30 Why the Plugin Architecture Gives You CRAZY Flexibility
Why the Plugin Architecture Gives You CRAZY Flexibility
ArjanCodes
31 Refactoring A Data Science Project Part 1 - Abstraction and Composition
Refactoring A Data Science Project Part 1 - Abstraction and Composition
ArjanCodes
32 Refactoring A Data Science Project Part 2 - The Information Expert
Refactoring A Data Science Project Part 2 - The Information Expert
ArjanCodes
33 Refactoring A Data Science Project Part 3 - Configuration Cleanup
Refactoring A Data Science Project Part 3 - Configuration Cleanup
ArjanCodes
34 Purge These 7 Code Smells From Your Python Code
Purge These 7 Code Smells From Your Python Code
ArjanCodes
35 Running A Software Development YouTube Channel
Running A Software Development YouTube Channel
ArjanCodes
36 Refactoring A PDF And Web Scraper Part 1 // CODE ROAST
Refactoring A PDF And Web Scraper Part 1 // CODE ROAST
ArjanCodes
37 Refactoring A PDF And Web Scraper Part 2 // CODE ROAST
Refactoring A PDF And Web Scraper Part 2 // CODE ROAST
ArjanCodes
38 How To Easily Do Asynchronous Programming With Asyncio In Python
How To Easily Do Asynchronous Programming With Asyncio In Python
ArjanCodes
39 The Software Designer Mindset
The Software Designer Mindset
ArjanCodes
40 NEVER Worry About Data Science Projects Configs Again
NEVER Worry About Data Science Projects Configs Again
ArjanCodes
41 Powerful VSCode Tips And Tricks For Python Development And Design
Powerful VSCode Tips And Tricks For Python Development And Design
ArjanCodes
42 8 Python Coding Tips - From The Google Python Style Guide
8 Python Coding Tips - From The Google Python Style Guide
ArjanCodes
43 What Is Encapsulation And Information Hiding?
What Is Encapsulation And Information Hiding?
ArjanCodes
44 8 Tips For Becoming A Senior Developer
8 Tips For Becoming A Senior Developer
ArjanCodes
45 Building A Custom Context Manager In Python: A Closer Look
Building A Custom Context Manager In Python: A Closer Look
ArjanCodes
46 GraphQL vs REST: What's The Difference And When To Use Which?
GraphQL vs REST: What's The Difference And When To Use Which?
ArjanCodes
47 You Can Do Really Cool Things With Functions In Python
You Can Do Really Cool Things With Functions In Python
ArjanCodes
48 Announcing The Black VS Code Theme (Launching April 1st)
Announcing The Black VS Code Theme (Launching April 1st)
ArjanCodes
49 7 DevOps Best Practices For Launching A SaaS Platform
7 DevOps Best Practices For Launching A SaaS Platform
ArjanCodes
50 Refactoring a Rock Paper Scissors Lizard Spock Game // Code Roast Part 1
Refactoring a Rock Paper Scissors Lizard Spock Game // Code Roast Part 1
ArjanCodes
51 Refactoring a Rock Paper Scissors Lizard Spock Game // Part 2
Refactoring a Rock Paper Scissors Lizard Spock Game // Part 2
ArjanCodes
52 Things Are Going To Change Around Here
Things Are Going To Change Around Here
ArjanCodes
53 Dependency Injection Explained In One Minute // Python Tips
Dependency Injection Explained In One Minute // Python Tips
ArjanCodes
54 How To Setup A MacBook Pro M1 For Software Development
How To Setup A MacBook Pro M1 For Software Development
ArjanCodes
55 A Simple & Effective Way To Improve Python Class Performance
A Simple & Effective Way To Improve Python Class Performance
ArjanCodes
56 How To Write Unit Tests For Existing Python Code // Part 1 of 2
How To Write Unit Tests For Existing Python Code // Part 1 of 2
ArjanCodes
57 How To Write Unit Tests For Existing Python Code // Part 2 of 2
How To Write Unit Tests For Existing Python Code // Part 2 of 2
ArjanCodes
58 Make Sure You Choose The Right Data Structure // Python Tips
Make Sure You Choose The Right Data Structure // Python Tips
ArjanCodes
59 5 Tips For Object-Oriented Programming Done Well - In Python
5 Tips For Object-Oriented Programming Done Well - In Python
ArjanCodes
60 Next-Level Concurrent Programming In Python With Asyncio
Next-Level Concurrent Programming In Python With Asyncio
ArjanCodes

Related AI Lessons

Had my Frontend Developer interview with Capgemini (Application Developer) today, and I wanted to…
Prepare for a frontend developer interview with Capgemini by reviewing JavaScript fundamentals and practicing common interview questions
Medium · JavaScript
10 Frontend Developer Tools to Boost Productivity in 2026
Boost frontend productivity with 10 essential tools for modern web app development
Medium · Programming
10 Frontend Developer Tools to Boost Productivity in 2026
Boost frontend productivity with top 10 developer tools in 2026
Medium · JavaScript
The US Frontend Engineer Market in 2026: A Data-Driven Reality Check (and the Bias That Stops Us Seeing It)
US frontend engineer hiring demand peaked in 2022 and remains flat-depressed in 2026, contrary to common assumptions
Dev.to AI

Chapters (6)

Intro
0:57 Languages That I Used
2:44 What I Didn’t Like About Python
5:49 Why Still Use Python?
7:30 The Lesson
9:25 Final Thoughts
Up next
How to Open KIT Files (CodeKit Project)
File Extension Geeks
Watch →