Python Regex Multiple Repeat Error

Just like me an hour ago, you’re probably sitting in front of your regular expression code, puzzled by a strange error message: Why is it raised? Where does it come from? And, most importantly, how can you get rid of it? This article gives you answers to all of those questions. Alternatively, you can also … Read more

Christian Mayer

Chris is the founder of the programming education company FINXTER, author of the Coffee Break Python series of self-published books, the popular programming book Python One-Liners (NoStarch 2020), a doctorate computer scientist, and owner of one of the top 10 Python blogs worldwide. His research interests include graph theory and distributed systems. You can join … Read more

Law of Demeter

This tutorial gives you a short explanation of the Law of Demeter. It’s based on a rough chapter draft for my upcoming book “The Art of Clean Code” to appear with NoStarch in 2022. Overview You’ve already learned that one of the most important reasons for code complexity is interdependency. To write clean code, you … Read more

Show Don’t Tell: Commenting Python Best Practices

This tutorial taken from my upcoming programming book “From One to Zero” (NoStarch, 2021) will show you how to write great comments. While most online tutorials focus on a bullet list of commenting tips, we dive deeper into the meat exploring the underlying reasons for the commonly recommended commenting principles. So, let’s get started! Code … Read more

Freelance Developer – How to Code From Home and Earn Six Figures [Industry Report]

Six Figure Coder

What keeps you going day after day? Your motivation is the most important building block of your success. In the following, I’d like to give you some fact-based motivation why creating your coding business online can easily be the most rewarding decision in your life.Β  Yet, motivation is not everything. If you want to make … Read more

Python re.findall() – Everything You Need to Know

When I first learned about regular expressions, I didn’t really appreciate their power. But there’s a reason regular expressions have survived seven decades of technological disruption: coders who understand regular expressions have a massive advantage when working with textual data. They can write in a single line of code what takes others dozens! This article … Read more

Python Math Domain Error (How to Fix This Stupid Bug)

You may encounter a special ValueError when working with Python’s math module. Python raises this error when you try to do something that is not mathematically possible or mathematically defined. To understand this error, have a look at the definition of the domain: “The domain of a function is the complete set of possible values … Read more

Python Regex Match

Why have regular expressions survived seven decades of technological disruption? Because coders who understand regular expressions have a massive advantage when working with textual data. They can write in a single line of code what takes others dozens! This article is all about the re.match() method of Python’sΒ re library. There are two similar methods to … Read more

Minimum Viable Product (MVP) in Software Development — Why Stealth Sucks

This chapter from my upcoming book “The Art of Clean Code” (NoStarch 2022) teaches you a well-known but still undervalued idea. The idea is to build a minimum viable product (in short: MVP) to test and validate your hypotheses quickly without losing a lot of time in implementation. In particular, you’ll learn how to apply … Read more

np.shape()

This tutorial explains NumPy’s shape() function. Return the shape of an array or array_like object a. Argument Data Type Description a array_like NumPy array or Python list for which the shape should be returned. If it is a NumPy array, it returns the attribute a.shape. If it is a Python list, it returns a tuple … Read more

Python Regex Fullmatch

Why have regular expressions survived seven decades of technological disruption? Because coders who understand regular expressions have a massive advantage when working with textual data. They can write in a single line of code what takes others dozens! This article is all about the re.fullmatch(pattern, string) method of Python’s re library. There are three similar methods … Read more