Comparing VAT Solutions for Bootstrapped UK Businesses Feb 23, 2021 Laws on when to apply VAT have always been a complex beast - in 2015 the EU made changes that meant that VAT was to be calculated based on a customer location, introducing a VATMOSS system for its collection. Since leaving the EU things have become even more complicated if you happen to be based in the UK. You now are no longer able to make use of the VATMOSS system, meaning you potentially need to register for VAT in every EU country you sell products to (! ...
Creating Social Images with Puppeteer Feb 16, 2021 In this post I’m going to show how to generate images for sharing content on social networks like twitter and facebook using Puppeteer. This could be for any content - a post on our blog or something more complex like a dynamic storefront. So long as we correctly include open graph meta tags within the markup appropriate for the sites in question, our nicely designed image will be included as part of the apps feeds, rather than a blank preview. ...
The Years I've Spent on Side Projects Have Not Been Wasted Feb 04, 2021 In my 18 years online, I’ve spent large chunks of time exploring ideas that never came into fruition. I’ve gone years building out software I’ve never made into saleable products for a multitude of reasons. The standard indie hacker journey would have you believe that this is time wasted, pointless where iterating quickly and shipping products that sell would get you to that magic monthly recurring revenue you so desperately desire. ...
Building a Cookiecutter Template for Multiple Python Package Managers Jan 25, 2021 In my previous post, I described how you can use Python and Makefiles to quickly get new projects started. In this post I explore how you can use cookiecutters more advanced Jinja templating techniques to make a cookiecutter that can be used for multiple package managers. Specifically, we’ll be extending the existing template to build another that can be used with either Poetry or Pipenv. Our New Cookiecutter Template As a reminder, Cookiecutter allows us to template project and directory content and structure using Jinja2 logic. ...
Bootstrapping Python Projects with Cookiecutter and Makefiles Jan 07, 2021 When starting a new project, it’s easy to get caught up in the excitement of starting the `shiny new thing’ and forget about some basics. What starts out as a script slowly evolves into an application and before long you’ll find yourself repeating common steps for every project to get it to match personal preferences. If you happen to be working within on a team, you may have many repositories that should have the same setup and inconsistencies between them can quickly lead to large amounts of lost time to get them aligned. ...
What is a PEP and why should I care? Nov 16, 2020 No doubt if you’ve been developing in Python for any length of time, you will have heard the acronym “PEP” mentioned quite frequently. More often than not you hear it when talking about Python code style, usually followed by the number “8”. So what is a PEP and why should you care? What is a PEP? PEP stands for “Python Enhancement Proposal”. They are used to describe and summarise the technical design and reasons for enhancements to Python and surrounding processes. ...
Interesting Features in Python 3.9 Nov 05, 2020 Here’s some features I found interesting in the release of Python 3.9 last month. You can see me talk about each of these in my latest video on youtube. Full Release Notes Merging and Updating Dictionaries PEP 584 - Dictionaries now have new union operators to work with them. Python 3.8: x = {'key': 'original_value'} y = {'key': 'updated_value'} print({**x, **y}) # Python 3.8 unpacking, kind of confusing Python 3.9: ...
Use Black to Format Python and get on with Your Life Nov 03, 2020 When I first started working in software development teams, I can remember heated discussions on pull requests on a few occasions. Typically these were when I or other developers reviewed code that didn’t meet formatting rules that were felt best for that piece of work. It didn’t matter whether the rules in question were in code, documented in a README or just held in a developers head, the simple fact that something was wrong on the project meant the author needed to make changes, be severely reprimanded and never make the mistake again. ...
How to Deploy a Django App to the DigitalOcean App Platform Oct 28, 2020 Digitalocean recently launched their App platform, a platform as a service (PaaS) which can be seen as a competitor to the likes of Heroku. As a Python developer, I wanted to see how easy it was to deploy a django app to App platform. It took me a little while to configure everything correctly so I thought I’d go through some of the points that tripped me up here. I’ve been looking for some time for a relatively simple method for deploying my projects, but I also want to use a pattern where my repo is the primary source of truth for my app. ...
Publishing to PyPI Using Github Actions Oct 23, 2020 In creating my first package on PyPI, I realised that many of the tasks I’d want to do on a subsequent publish would be repetitive. If I wanted to push out a simple fix, I wanted to automate away those tasks so I could focus on my code rather than a sequence of repetitive steps. Github actions is a simple way to do this and has given me the ability to quickly push out changes without lots of manual work. ...