The title should be something like: What is a code formatter (and why should I use one?)
Target audience
People who know even a tiny bit of some programming language (probably python or javascript?), particularly if they are working on code with multiple people. They probably need to know what indentation means
This probably isn't a thing humanities programmers would think to look up, or need to know about unless they run across some code that is using them, but in my mind falls under the set of tools (like linters, task runners, good autocomplete, configuring your IDE) that would make programming easier if you knew they existed/were possible.
Things to cover
what's a formatter - something that reformats your code, does things like fix indentation, line breaks, consistent quote styles
some names of formatters, and links to them - black, ruff (or less commonly yapf or autopep8) for python, prettier for javascript (but also HTML and markdown?) (are there ones for R? I don't know the ecosystem at all)
some (black) have basically no things you can configure, so all code formatted with black looks basically the same. some (prettier) have a million configuration options, but there's some common config files you can start from
what does having a formatter make easier?
lays things out nicely for you without having to do things by hand, which can make code easier to read - show an example of badly formatted JS vs what prettier does
makes all code you write look the same, so it's less hard to switch between files/projects (would be good to find a study to back this up?)
if you're working in a team, having a shared formatter setup means you don't waste time discussing/arguing about formatting
Is it related to anything else we've written about?
Linters. General IDE setup stuff. Should probably also write a concrete article about how to add black/ruff to your python project
Anything else?
nope?
Next steps
I'll write this. @danwaterfield do you think this is a useful set of topics to cover in fairly short articles? Its things that I've always picked up from other people's code or watching them work, which I guess people programming in the humanities don't really get to do often, but makes a real difference to workflows and code quality
Article type
This is a conceptual article
The title should be something like: What is a code formatter (and why should I use one?)
Target audience
People who know even a tiny bit of some programming language (probably python or javascript?), particularly if they are working on code with multiple people. They probably need to know what indentation means
This probably isn't a thing humanities programmers would think to look up, or need to know about unless they run across some code that is using them, but in my mind falls under the set of tools (like linters, task runners, good autocomplete, configuring your IDE) that would make programming easier if you knew they existed/were possible.
Things to cover
Is it related to anything else we've written about?
Linters. General IDE setup stuff. Should probably also write a concrete article about how to add black/ruff to your python project
Anything else?
nope?
Next steps
I'll write this. @danwaterfield do you think this is a useful set of topics to cover in fairly short articles? Its things that I've always picked up from other people's code or watching them work, which I guess people programming in the humanities don't really get to do often, but makes a real difference to workflows and code quality