Tag: Python

  • Managing Python Environments: pyenv and uv Tutorial (Data Science Engineering Gap Part 1)

    Managing Python Environments: pyenv and uv Tutorial (Data Science Engineering Gap Part 1)

    This is the second post in a series about bridging the gap from beginner programmer to advanced data science practitioner. These aren’t programming concepts – they’re software engineering practices that enable you to build robust, maintainable systems.

    How to Fix the “Works On My Machine” Problem in Python

    You’ve written some Python code that works perfectly on your laptop. You share it with a colleague, and suddenly nothing runs. Or worse – you come back to your own project from last year, and it’s completely broken. Python has been updated, some packages followed the new version, others didn’t, and your carefully crafted solution is now a pile of import errors.

    This isn’t a hypothetical scenario. It’s the daily reality of working with Python without proper environment management.

    I’ve seen this play out in painful ways. A colleague once spent hours trying to figure out why a package was running slowly, only to discover that the original implementation used PyPy (a super-fast Python implementation), but nobody had documented this crucial detail. Another project mysteriously failed because one developer used conda’s Python, another used the system Python, and a third had installed vanilla Python from python.org. Same code, three different Python installations, three different sets of problems.

    The fundamental issue: Python isn’t just Python. There are different versions (3.10, 3.11, 3.12), different implementations (CPython, PyPy, Jython), and countless package versions that may or may not work together. Without managing these variables explicitly, reproducibility becomes impossible.

    (more…)
  • The Data Science Engineering Gap: Part 0 – Your Development Environment

    The Data Science Engineering Gap: Part 0 – Your Development Environment

    This is the first post in a series about bridging the gap from beginner programmer to advanced data science practitioner. This transition isn’t just about learning more Python – it’s about adopting the software engineering practices and tools that enable you to build robust, maintainable systems.

    The Hidden Complexity of Professional Practice

    Here’s what nobody tells you about becoming an advanced data science practitioner: the hardest part isn’t mastering algorithms or learning new libraries. It’s developing the software engineering discipline that separates beginners from professionals.

    You can solve problems with Python. You understand pandas, numpy, and scikit-learn. You might even know some deep learning frameworks. But there’s still a massive gap between “I can write code that works” and “I can build systems that others can use, maintain, and extend.”

    This gap isn’t about programming knowledge – it’s about engineering practices. And honestly? It’s complex and takes time to master. We’re talking about a completely different skillset from the algorithmic thinking you’ve been developing. These are the practices that make the difference between code that works once on your machine and code that works reliably for everyone.

    (more…)
  • What Money Already Bought: How Economic Narratives Rewired Our Language

    What Money Already Bought: How Economic Narratives Rewired Our Language

    Something curious happened to the English language in the 1980s. The word “privatisation” appeared in just 0.0000012% of all published words in 1940—barely a whisper in the literary landscape. By its peak, this had surged to 0.0008%—a 670-fold increase. “Incentivise” increased by 780 percent between 1940 and 2021. These numbers may seem tiny, but in the vast ocean of published language, they represent a seismic shift.

    An analysis of 200 years of published text reveals that the Reagan-Thatcher era marked the moment when economic jargon escaped the academy and colonised everyday discourse. What philosophers had suspected, data can now prove: market logic didn’t just reshape policy—it rewired how we think.

    (more…)
  • Visualizing Economic History: The Kindleberger Spiral and its Modern Relevance

    Visualizing Economic History: The Kindleberger Spiral and its Modern Relevance

    I recently recreated Charles Kindleberger‘s famous “spiral” chart using Python – a powerful visualization that dramatically illustrates how global trade collapsed between 1929 and 1933, resembling “water circling a drain.”

    My inspiration came from a fascinating article in The Economist that highlighted how this decades-old visualization has gained renewed relevance in today’s discussions about trade policies and global leadership.

    (more…)
  • The Great Divergence

    The Great Divergence

    When did today’s vast economic inequalities between rich and poor nations emerge? The “Great Divergence” debate has occupied economic historians for decades. Based on the latest Maddison Project Database, our charts visualize this pivotal economic shift across major world regions since 1820.

    Kenneth Pomeranz’s influential book “The Great Divergence” (2000) challenged conventional wisdom by arguing that parts of Asia, particularly China’s Yangtze Delta, were on comparable economic footing with Europe until around 1800. According to Pomeranz, Europe’s subsequent surge ahead wasn’t inevitable but stemmed from fortunate access to coal and colonial resources.

    (more…)