In 2022, David Guillot delivered an inspiring DjangoCon Europe talk , showcasing a web app that looked and felt as dynamic as a React app. Yet he and his team had done something bold. They converted it from React to HTMX, cutting their codebase by almost 70% while significantly improving its capabilities. Since then, teams everywhere have discovered the same thing: turning a single-page app into a…
This is the fifth entry in a five-part series about event sourcing: Why I Finally Embraced Event Sourcing—And Why You Should Too What is event sourcing and why you should care Preventing painful coupling Reactivity Without the React Overhead Get started with event sourcing today (this page) I hope this series has inspired you to try event sourcing. In this article, I will give you some suggestions…
This is the fourth entry in a five-part series about event sourcing: Why I Finally Embraced Event Sourcing—And Why You Should Too What is event sourcing and why you should care Preventing painful coupling Reactivity Without the React Overhead (this page) Get started with event sourcing today In this post, I’ll share some things I’ve enjoyed about event sourcing since adopting it. I'll start…
I see a lot of articles suggesting you use enums by mostly restating the Python documentation. Unfortunately, I feel this leaves readers without crutial practical advice, which I'd like to pass on here. This is especially true since most of the projects I've worked on, and developers I've coded with, don't seem to know this, leading to more complex code, including values and…
Every now and then I'm writing code deep in some Python project, and I realize that it would be nice to generate a file at the root of a project. The following is the way I'm currently finding the root folder with pathlib: if __name__ == '__main__': from pathlib import Path project_root = next( p for p in Path(__file__).parents if (p / '.git').exists() )…
This is the third entry in a five-part series about event sourcing: Why I Finally Embraced Event Sourcing—And Why You Should Too What is event sourcing and why you should care Preventing painful coupling (this page) Reactivity Without the React Overhead Get started with event sourcing today In the first article, I introduced this series with the spark that made me so happy to finally try event…
This is the second entry in a five-part series about event sourcing: Why I Finally Embraced Event Sourcing—And Why You Should Too What is event sourcing and why you should care (this page) Preventing painful coupling Reactivity Without the React Overhead Get started with event sourcing today In my last blog post, I introduced the concept of event sourcing and some of its benefits. In this post,…
This is the first entry in a five-part series about event sourcing: Why I Finally Embraced Event Sourcing—And Why You Should Too (this page) What is event sourcing and why you should care Preventing painful coupling Reactivity Without the React Overhead Get started with event sourcing today A project I’m working on processes files in multiple phases. To help users track progress, I built a status…
I've spent the last few days running head-first into a problem over and over, and I hope this might help someone else avoid this pain. The command `docker compose --env-file example.env up` does not do the same thing as `docker --env-file example.env run`. Docker `--env-file` When you add the `--env-file` argument to the `docker` command, docker will load the variables in the env file and…
Are you a Python developer striving to write better software with fewer bugs? If you've been intimidated by the concept of refactoring or felt frustrated by the lack of Python-specific advice, then you're in the right place. Welcome to the Python Refactoring Toolkit , a powerful resource designed to elevate your Python coding skills and bring clarity to the world of refactoring. When I…
In many browsers, select elements don't trigger HTMX to fire AJAX requests. In this post, I show a helper script to make your life easier. Read more...
Many people, especially those new to type hints, write hints that make things harder for users. This article will give you one tool to make your code easier to use. Read more...
For years, I have been using the Bullet Journal Method to organize my daily life and projects at work. During this time, I have found several unexpected benefits from this practice, including large bonuses. With the new year starting, I want to show you how you can get the most benefit. A normal review period I have worked at companies with a regular performance review process for most of my…
One of my frustrations with VisualStudio Code was creating a `launch.json` file whenever I wanted to debug a one-off Python file. Today, I learned that you could add a debugger configuration to your user settings. This allows you always to have a debugging configuration available. How to do this Create a debugging (or launch) configuration: Select the "Run and Debug" tab and click "create a…
This is a blogified version of my 18-minute PyJamas talk, Refactor refactoring—How changing your views on refactoring can make your job more satisfying. You can watch it here: html alignment normal Refactoring is a topic I have been interested in most of my programming career but struggled to grasp. Early in my journey, I watched several talks by brilliant developers that impressed and intimidated…
Pre-commit is a immensely useful tool for your projects. I use it for every project I work on. In a rare event, it might seem as though you lost many modified files—potentially hours of work, but the truth is your files are safe, and it's easy to restore them. Read more...
Closing the loop from my previous article about creative ways to solve the "fizzbuzz" kata and announcing a challenge for a small group of readers. Read more...
I'm convinced that the best way to grow as a developer is to practice. In particular, intentionally practicing things you aren't good at or haven't tried. In that vein, I started a weekly meeting at work in the spirit of a software kata. I am encouraging my teammates to solve these problems by practicing something they're not great at. For some people, solving the challenge in…
Most people are working to hard to access files and folders with python. Pathlib makes it so much easier, and I have released two resources to help you get started using it. Read more...
Recently, I had a great interaction with one of my coworkers that I think is worth sharing, with the hope you may learn a bit about refactoring and python. My colleague came to me to help him think through a problem that surfaced with a change to a project. The code in question sends a file to a remote storage service. It looked like this: This method will read the file at `file_path` and send it…
There have been a few thoughts about PyCon US 2019 that have been bouncing around my head, wanting to come out. Today, I want to talk about the opportunity to meet your Python heros, and why you should start planning on attending next year. Read more...
There have been a few thoughts about PyCon US 2019 that have been bouncing around my head, wanting to come out. Today, I want to talk about PyCon's Open Spaces, and why you should start planning on attending next year. Read more...
I recently started listening to the Friday Afternoon Deploy podcast and have been enjoying it. It's a weekly podcast where some of the developers at Lofty Labs let off steam on a Friday afternoon by recording a conversation about whatever comes up. They tend to focus on python web development, JavaScript, related topics, as well as random topics from food, pop culture, and some Fayetteville,…
No Plans to Merge is a newer podcast to me. The hosts, Daniel Coulbourne & Caleb Porzio, have a chemistry that is much deeper than their episode count would suggest, as this podcast is the successor to another show that ended a few months ago. The latest episode, " Your Feature Branches Are Too Long And We Can Prove It! ", is one of those episodes that I will be thinking about for some time to…
Throughout my career, the teams I’ve been on have had a wide range of views on using tests while developing code. As I’ve moved between teams, listened to podcasts, and read articles, I’ve assembled some notes that would have been very useful for me in the past. Some of these notes are getting compiled into a book, but some of them are too important to wait. I want to convince you to try testing…
Part of what I want to do with this site is recommend tools and resources that I’ve found valuable, in the hopes that you might benefit from them and enjoy them as I have. There has been one program, in particular, that I use most times I’m in a coding session. Sadly, I can’t use it at work, and I miss it dearly. Whenever I open it, I feel a sense of relief, knowing that I am in good hands. Today,…
Though `pathlib` was introduced in python 3.4 to some praise, I didn't "get" it. Like many things in python, I needed some time to come around and tinker with it before I realized the power within. I can't remember when `pathlib` started "clicking" for me, but I'm sure it was an accidental rediscovering of it via the Dash documentation application. I've found it incredibly…
At the most recent PyRVA meeting, I had the opportunity to coach an aspiring web developer to start his first local web server and view a website that he created. It was truly a privilege to see his excitement. In the realm of web development, this is a very basic step; one that I usually skip because of how routine it is. But being with him, I remember how hard it was to get going, how confusing…
A little while ago, I asked the Internet its thoughts about how best to work with CSS when following the BEM methodology. And in the following months, I've come across some ideas worth sharing. A little background When I was working on the website that inspired the question, I realized that I was creating a lot of components that were only slightly different. One example would be the listing…
I am glad that mental health is being discussed more often in the programming world. In particular, I would like to thank Kenneth Reitz for his transparency over the last few years and contributing his recent essay on developer burnout. Having just recently experienced a period of burnout, I would like to share some ideas that might help you skirt by it in your own life. And, before I go on, let…
I have written few articles about how Sublime Text has been such a great environment to get my work done—and there's more to come, I have been extremely happy with Sublime for years. But listening to Michael Kennedy and some guests on his Talk Python to Me podcast gush about PyCharm's great features made me wonder what I was missing. I was lucky to receive a trial license for PyCharm almost a year…
At work, we follow the BEM methodology in naming our HTML elements and CSS styles. But we've been struggling with the best way to inherit styles from similar blocks. As with many things in programming, there's great documentation to get you started, but the next level is up to you. From my research, there seems to be three primary behaviors for inheriting styles. Read more...
I've only recently started listening to the Giant Robots Smashing Into Other Giant Robots podcast, but I'm finding it a good source of ideas I want to be exposed to, particularly with product development, analytics, and marketing. In episode 214, I enjoyed listening to Nick Gauthier share some great tips about how he created his most recent business, MeetSpace. In particular, I'm enjoying hearing…
How many times have you had the thrill of releasing a new service or app to the world, only to have it crashing down when you test the URL and find a server error page instead of your work? I'm collecting a few tips I use when I'm trying to figure out why the new python service I have set up is not working. Read more...
The software industry believes every developer should be test-driven to the capacity she can be… and probably a little more. I tend to agree with that, but in individual conversations, (and if I'm honest, in my own head) I notice a lot of negativity, frustration, and confusion with the idea of testing. I think this is understandable, as the testing ecosystem is a lot bigger, and a lot less…
One Sublime Text feature I have found invaluable is having multiple folders associated with a project. This makes it easy to find the files I frequently work on and makes it trivial to create new files. When I'm working on a web development project, I'll make a new Sublime project out of the project's root folder, then add folders for the templates, sass, and JavaScript folders. This way, I have…
Five or so years ago, I was frustrated by my coding environment. I was working on .net web sites and felt like I was fighting Microsoft's Visual Studio to get my work done. I started jumping between Visual Studio, Notepad++, Eclipse, and other programs. With all my jumping around, I was not really happy with my experience in any of them. I came across an article that encouraged me to invest in my…
I have been looking forward to bringing this project to life for several years. Interest ebbed and flowed. Available time grew and disappeared. Server providers gave over-promising impressions over what they offered. And I had to come up with a name. Now, a lot of that has been solved, but the design hasn't, and there's no content in the database. Thankfully, I have a lot of ideas in my head, and…