I believe that many of the arguments we have around software development practices could be avoided by the simple understanding that all of our mantras need to be understood as proverbs and not laws. If you understand proverbs, then you’ll know that every proverb has an equal and … | Continue reading
Some code and tips to combine Python and Django introspection APIs to enforce naming conventions in your Django models. | Continue reading
I’m developing some Python software for a client, which in its current early state is desktop software that will need to run on Windows. So far, however, I have done all development on my normal comfortable Linux machine. I haven’t really used Windows in earnest for more than 15 … | Continue reading
In a previous post, I did a case study on my attempts to add type hints to parsy. In this post, I’m continuing the series, but in a very different project. A while back I forked an existing tool called astpath to create my own tool pyastgrep, fixing various bugs and usability iss … | Continue reading
var script = document.createElement('script'); script.src = "https://unpkg.com/htmx.org@1.9.5" script.integrity = "sha384-xcuj3WpfgjlKF+FXhSQFQ0ZNr39ln+hwjN3npfM9VBnUskLolQAcN80McRIVOPuO"; script.crossOrigin = 'anonymous'; script.onload = function() { System Message: ERROR/3 (, l … | Continue reading
Most of this post was written a long time ago, but I thought it would be useful to have somewhere public that I can point people to for my answer to this question, so I’m finally publishing it. At the outset, I need to say that this issue is one that I think Christians should not … | Continue reading
Most of this post was written a long time ago, but I thought it would be useful to have somewhere public that I can point people to for my answer to this question, so I’m finally publishing it. At the outset, I need to say that this issue is one that I think Christians should not … | Continue reading
The reason that modern web development is swamped with complexity is that no one really wants things to be simple. We just think we do, while our choices prove otherwise. A lot of developers want simplicity in the same way that a lot of clients claim they want a fast website. You … | Continue reading
Many websites are still using a viewport meta tag like one of the following: These days, you can almost certainly remove the maximum-scale or user-scalable properties, to leave: This is the same as suggested by HTML5 boilerplate, so it should be a pretty good default for most … | Continue reading
Recently, while writing up some examples and pattern for using htmx with Django for form validation, I discovered a new trick for using externally defined CSS without having to change the HTML you are working with. To make it concrete, an example might be that you are using some … | Continue reading
Although they are less necessary than in the past, I like to use a CSS pre-processor when doing web development. I used to use LessCSS, but recently I’ve found that I can use Sass without needing either a separate build step, or a package that requires Node.js and npm to install … | Continue reading
This is the third in a short series of posts about ChatGPT’s capabilities and flaws. First I noted that ChatGPT often makes things up because that’s what it was designed to do. Second, it lacks an “inner monologue” and meta-cognition. In this post, I’ll take a brief look at its r … | Continue reading
This is the second in a series of short posts about ChatGPT. As I said before, the insights are not particularly original, I’m just raising awareness of issues. In this post, I’ll explore the deficiency that we could describe in human terms as “lacking an inner monologue”. Stephe … | Continue reading
This is the first in a series of short posts about ChatGPT based on my experience as this tool becomes more and more a part of my daily toolset. My insights are highly original, I’m just raising awareness of issues. ChatGPT can sound very human, and yet it’s behaviour is very unl … | Continue reading
At some point most Christians will have to face questions about the reality of the Christian faith. What if none of the things we believe are actually true? What if Jesus didn’t actually rise from the dead? I don’t think there are adequate reasons to doubt, but here are 3 answers … | Continue reading
When you use type hints in Python, you could be using them for one or more of at least 5 different things: Interactive programming help Many editors will be able to use type hints to give you help with: autocomplete (e.g. suggesting methods that actually exist on the type of obje … | Continue reading
In Hillel Wayne’s post “I am disappointed by dynamic typing”, he expresses his sense that the Python ecosystem doesn’t really make the most of the possibilities that Python provides as a dynamically typed language. This is an important subject, since every Python program pays a v … | Continue reading
This post is about a long-standing debate in churches of a credo-baptist persuasion about whether you can accept those baptised as infants into membership, and I approach this as someone standing in the Reformed tradition, in the baptist tradition, meaning I believe that the Bibl … | Continue reading
This post is an attempt to give a model for thinking about the Christian concept of the soul. It is not a theory. Models vs Theories I’m loosely borrowing the language of models and theories from the scientific world. If you present a theory, you will often be expected to give a … | Continue reading
When writing tests for Django projects, you typically need to create quite a lot of instances of database model objects. This page documents the patterns I recommend, and the ones I don’t. Before I get going, I should mention that a lot of this can be avoided altogether if you ca … | Continue reading
I have been trying to like static type checking in Python. For most of my Django projects, I get annoyed and give up, so I’ve had a go with some smaller projects instead. This blog post documents how it went with Parsy, a parser combinator library I maintain. Contents Intro to Pa … | Continue reading
When writing (or reviewing) code, you have better things to do than concern yourself with low-level details about coding style or other changes that are essentially mechanical in nature. Thankfully, the tooling ecosystem for doing these kind of boring changes to Python code has b … | Continue reading
A few weeks ago I released pyastgrep, a tool for grepping Python code at the syntax level (using AST - Abstract Syntax Trees), and today I released some more improvements. It builds on an earlier tool, astpath which now appears to be abandoned, and also had quite a few bugs. I’ve … | Continue reading
With examples from the web development world especially PHP, and lessons for Pythonistas | Continue reading
Katharine Birbalsingh asked on Twitter: This makes a good argument IMO for abortion instead of madness we see on twitterHaving said that, it doesn’t mention real numbers or culture changeWould love to hear from my pro-life followers why this doesn’t convince (other than religious … | Continue reading
The flows I use for exploratory programming using a REPL and their advantages. | Continue reading
How returning error objects can provide some advantages over raising exceptions in Python, such as for static type checking tools. | Continue reading
The technological case against Bitcoin and blockchain | Continue reading
OTP/TOTP for two factor auth (2FA/MFA) is very easy to misunderstand and implement insecurely | Continue reading
Some of the downsides of technology stacks that are massively scalable and general purpose | Continue reading