Writing about AI, Machine Learning and Programming
I built a dev.to comment reviser so I'd stop re-pasting the same AI prompt
Before posting a comment on dev.to, I used to paste my draft into an AI chat window, paste the same long prompt, copy the revision back, and paste it into dev.to. Every. Single. Time. I’m a non-native English speaker. dev.to is where I learn to write in public. I don’t want spelling or grammar mistakes to distract readers from what I’m trying to say, so I use AI to catch them before I post. But re-pasting the same prompt every time was tedious. So I built a small local web app: paste a comment, get a revision and an explanation, without re-pasting the prompt. ...
SQL for absolute beginners: a map of CRUD
Have you heard of SQL but aren’t sure where to start? I felt the same way once. It turns out SQL is easier than most people imagine, especially if you already know your way around Excel. In this post, I’ll give you a map of SQL: the four core operations, the keywords to perform them, and enough examples to run your first queries right away. What SQL actually is SQL is not a database. I used to think it was, because of the names of database management systems like SQLite and MySQL. ...
How to publish posts via the dev.to API
I write on dev.to (Julie - DEV Community). Every time I copied a post into the dev.to editor, added tags and cleaned up the formatting, I’d wonder whether there was a way to automate it. If you have the same question, this article is for you. The answer: the dev.to API. In this post I’ll show you two ways to use it. First a curl command, so you’ll see the exact request the API expects. Then a Python script that automates it. I’ll also cover the one thing that trips people up: images. ...
The minimum you need to know about GitHub Actions
What is GitHub Actions? Have you heard of GitHub Actions but assumed it was too complicated to learn? I had the same thought — until I used it on a real project (Build and deploy Hugo site with GitHub Actions, Schedule future-dated posts with Github Actions). Think of GitHub Actions as a robot living on GitHub: you call it, and it does exactly what you’ve told it to do. More precisely, it’s GitHub’s built-in automation. You write a workflow, and GitHub runs it for you whenever one of the events you specify happens. ...
How to schedule future-dated posts with Github Actions
Sometimes you may write several posts in one sitting when you have ideas, but you may not want to publish them all at once. Instead, you’d like to publish them one at a time on future dates. You can automate this with GitHub Actions. Here’s how. Step 1: Add a scheduled trigger to the GitHub Actions workflow First, set the schedule in hugo.yml. Open your Hugo workflow file, usually at .github/workflows/hugo.yml or .github/workflows/hugo.yaml. In the on: section, add a schedule trigger as follows: ...
GitHub Actions tutorials failed me. AI got me through
The first time I tried to deploy a static site using GitHub Actions, I gave up halfway through the tutorials. The second time, with the help of an AI agent, I had the site deployed in several hours — and I finally understood how it all worked. The first time, I gave up I first encountered GitHub Actions while reading Hugo static site deployment tutorials. Most showed the classic approach: run hugo locally, push the public folder to GitHub, done. A few mentioned GitHub Actions. This approach uses a workflow and saves time. The automatic workflow sounded efficient and I wanted to give it a try. ...