So, Python (It's Not Just for Data, Mate)
Right then—I'm a 4th-year actuarial science student, and honestly, Python's been a game-changer for me. I've used it in proper projects, stashed on my GitHub (see github.com/lubasinkal). Whether it's my repo nvim for my Neovim setup, gniphyl (a handy file-management tool), or research (my data workflows & analysis stuff), Python helped me bridge that gap between statistical modelling, simple automation, and actually writing production-ready code. This page is basically a casual chat about why I reckon Python is worth your time and how I actually put it to use.
Why Learn Python? (The In-Depth Use Cases)
It's not just hype; Python genuinely simplifies your life and provides unmatched productivity in several critical domains. Here are the core reasons why it's the dominant choice for many projects:
- Low Barrier to Entry & Rapid Prototyping: The syntax is clear, using plain English keywords and relying on indentation, which makes it incredibly readable (adhering to the "Zen of Python"). This simplicity means you spend less time debugging syntax errors and more time solving the actual problem, making it perfect for quickly spinning up proof-of-concepts, especially crucial in academic and financial modeling where speed is everything.
- The Unrivaled Ecosystem (Batteries Included): Python's library collection is arguably its single greatest strength, covering three major areas:
- Data Science & AI: It is the default language for Machine Learning thanks to frameworks like TensorFlow, PyTorch, Scikit-learn, and the core numerical stack: NumPy, Pandas, and Matplotlib. This is indispensable for advanced statistical, actuarial, and quant analysis.
- Web Backend: Frameworks like Django (robust, full-featured) and FastAPI (modern, high-performance) enable quick development of scalable APIs and web applications.
- Scripting & Automation: Its standard library includes modules for working with the OS, file systems (like my
gniphyltool), networking, and testing. It excels at writing glue code between different systems.
- Reproducibility and Maintainability: The mandatory indentation and explicit style guidelines (PEP 8) enforce consistency, which drastically reduces cognitive load when maintaining or collaborating on large codebases. This makes handing off research models or production code much simpler for teams.
- Flexible Career Path: Knowing Python keeps your options wide open. Staying in quant, data, dev, or back-end roles means you're not locked into one specific technology, and that Python experience gives you serious leverage.
When NOT to use Python (The Trade-Offs and Constraints)
Python is not a silver bullet. Its interpreted nature and core design philosophy impose specific limitations that make other languages a better fit for certain projects.
- CPU-Bound Performance (The GIL): For tasks that require intense number crunching and parallel execution across multiple CPU cores (CPU-bound tasks), Python's Global Interpreter Lock (GIL) is a bottleneck. The GIL prevents multiple native threads from executing Python bytecodes simultaneously. While excellent libraries like NumPy bypass the GIL by offloading work to highly optimized C/Fortran code, purely native Python concurrency is limited compared to languages like Go, Rust, or C++.
- Client-Side Web & Native Mobile Apps: Python cannot run natively in a web browser (client-side) like JavaScript. Similarly, while there are frameworks like Kivy and BeeWare, it is generally impractical for building dedicated, high-performance native mobile applications (iOS/Android). For these, Swift, Kotlin, or React Native are the superior choices.
- Low-Level Systems & Memory Constraints: Python is not suitable for operating system kernels, device drivers, or high-reliability, resource-constrained environments like embedded systems. It also carries a larger memory footprint and a slower initial startup time compared to compiled languages like C or Rust.
- Deployment Size (Tiny Binaries): When creating standalone, minimal executable files, Python's need to bundle the entire interpreter and necessary dependencies results in larger binaries than those produced by languages designed for single-file deployment (e.g., Go or Rust).
What I Learnt (and Would Pass On)
- Start Small, Finish Fast: For instance, with my
gniphylrepo, I started with a simple file-organisation CLI (Command Line Interface) before adding more complicated modules. Solving one problem at a time is the best way to avoid getting swamped. - Get Cosy with the Core Stack: You'll be using the same tools over and over. I leaned heavily into pandas, numpy, and matplotlib/
plotly. They turned up again and again in my research work. - Testing & Environments are Crucial: I quickly learnt that reproducible scripts (via pytest) and environments like
venvorpoetrysave you huge headaches down the line. Don't skip testing—it's worth it, even though I rarely run tests. - Notebook → Module → Tool: This is a solid pipeline. I'd always start with a Jupyter notebook to explore data, then move the key, clean logic into reusable Python modules/scripts as the idea matured into an actual tool. This enforces better code structure.
The Next Evolution: Embracing uv (The Speed of Rust)
Built by the same team behind the super-fast linter Ruff, uv is an extremely fast package and project manager written in Rust. It's designed to be an all-in-one replacement for tools like pip, pip-tools, and virtualenv.
- Blazing Speed: It's often 10x–100x faster than pip.
- Unified Tooling: uv handles environments and installs with one tool.
- Reproducibility Solved: Generates clean lockfiles for consistent environments everywhere.
Resources I Actually Used
Short Roadmap (1–3 Months)
Weeks 1–2: Basics & scripting (e.g. file organiser like gniphyl).
Weeks 3–6: pandas, numpy, plotting.
Month 2: Data cleaning + reporting.
Month 3: Packaging, CLI, or API wrapper using uv.
Final Thoughts
Python bridged what I learned in class (stats, actuarial modelling) with what I wanted to build (real tools & workflows). Pick a small project, finish it, iterate—and remember: speed, simplicity, and readability matter most!