Feb. 27, 2025

Python and Django

p and d

I first began coding around 2009, but I only started learning Python (which is my language of choice now) 2 or 3 years ago. Part of the reason I decided to pick up Python is because I wasn’t fully satisfied with the developer experience of JavaScript and especially Java, which I had worked with previously. I was aware of course of how popular Python had become in the past decade as the default language for coding newbies, as well as on the back of data science and machine learning, but in terms of use-cases I was had been happy enough learning JavaScript (dependency hell notwithstanding) because though I am a bit of a data geek (especially when it comes to demographics and electoral politics) I’ve always been more into web development. I’d say I enjoy building apps and the choose-your-own-adventure nature of web development more than doing any type of analysis.

I first bought the excellent Eric Matthes book Python Crash Course I think in 2022. The book is pretty long, and being busy with work and other things I was only studying about every other day, so it took me the better part of a year to get through it. It didn’t feel like a chore, though; I immediately felt the experience of coding in Python to be an upgrade of sorts compared to the languages I had previously used.

The Python syntax I’ve found to be an improvement over JavaScript and especially Java. I find it very clean with its use of indentation instead of brackets, and in general the core language feels less packed with ideas and functionalities, yet at the same time, more flexible. At runtime it’s definitely slower than Java, but that’s usually not a problem for most use cases.

I didn’t have much trouble learning Django, which is the final section in Python Crash Course: Eric is a very good teacher, I already knew Bootstrap and the fundamentals of web development, and the Model-View-Template (MVT) pattern, plus the URL which is a sort of fourth step to the pattern, seemed to me very intuitive. Django gets some heat for being very heavyweight (“batteries included” is just the nice way of saying that), but personally I found having practically everything one would need to build a production-level web app in one toolkit very helpful; I am going to need to use most/all of that eventually, after all, so better to have it in the framework than to rely on third party dependencies. I’ve known some SQL since my Java days, but I found the ORM great to work with, especially when it came to longer and complex SQL queries. Also, I had used PostgreSQL previously so picking it up for Django felt much more natural than MongoDB which is typical for Node.js/Express (I also just don’t love the JSON-like format for storing data - I think tables with columns for fields and rows for the entries/objects just feel more natural and intuitive.)

All three of the Will Vincent books I also found helpful. To really get into the spin of things, I started listening to Will Vincent’s Django Chat podcast, and eventually listened to every single episode. I originally started using function-based views, and found generic class based views confusing and unpythonic (why would one obfuscate a View, which is a Function, in such a way that is makes it so much less explicit? And why have 2 different ways of doing the same thing?), but I remember Will Vincent pointing out in one of his episodes that, by and large, “everything is CRUD. Facebook is CRUD, Instagram is CRUD, Reddit is CRUD”, and thus we should just focus on figuring out how to build CRUD more easily. Generic CBVs then made sense. I started using them, and I no longer use FBVs.


cbv

(I find these very readable)


By then I had made up my mind that I wanted to look for a job as a Django developer. I had gone over a few data science and visualization courses on Codecademy (working with libraries like pandas and Seaborn), and was well aware that Python web development had seen better days employment-wise, but I truly found Django development fun and exciting, much more so than doing Python data science. I studied Django REST Framework, learned how to use HTMX and Alpine.js, and over a couple of months developed a web app that I was very happy with called Betview. I initially deployed it around October last year, and I still continue to update and maintain it.

Around the New Year I began looking for work. I applied to any remote job listing that I would remotely fit the profile for, while being well aware that the job market for developers isn’t in a great place, and that it would be tough to get hired without professional experience coding and not knowing React; I guess I was just looking for someone to give me an opportunity to get started. As of late February, I estimate that I’ve applied to around 300 listings, completed 2 interviews, and haven’t received any offers yet. I actually did fairly well in a Python technical interview for an offshoring agency, but I never heard back from them.

At the same time, I’ve been learning Wagtail CMS. I had never worked with a CMS before and I found it difficult at first, but once I understood why a CMS is useful, things started to click. Someone suggested that creating a blog to document my story could help me land a job, so I thought building this website would not only achieve that goal but also serve as a fun project to practice working with Wagtail. I’ve been in Wagtail world for a few weeks now so I could go in depth about my experience so far, but I think that’s worth its own entry. I’ve been pretty much living in Wagtail world for a few weeks now, so I could go in-depth about my experience so far, but I think that’s worth its own post.

That’s it for now. See you on the next one!


Comments

Leave a Comment

captcha

© 2025 Nicolás Ferreira. All rights reserved. Landscape Vectors by Vecteezy.