Posts

Showing posts from February, 2019

A concise solution to a fiddly coding problem

Image
I My pomodoro timer is coming on nicely. I'll post about progress in the next day or so. For now, here is a short story about a problem I hit while working on the project, and the happy solution that I came up with. For some time I've kept an online journal for each project I'm working on. Like some blogs, the journals used to have the latest entries at the top. Here's a sample journal file: # Project journal for zero-web ## Thursday 07 February 2019 I added 2 new pages. ## Monday 04 February 2019 I've created a homepage. I'll serve it with websocketd. I found that order confusing. I decided that I'd prefer the posts ordered as they would be in a paper diary, with the latest posts last. That way I could read the  project history like a book. The problem: I have a lot of project journals, and I really didn't want to edit them all by hand. I decided to write a program to do it. The problem was simple to solve using APL. Regul

Pomodoro timer with ToF sensor in CircuitPython

Image
Yesterday I started working on a fun application using a time of flight sensor. It looks as if it's going to solve a problem I've had for years. Like many of my friends I use P omodoro time management when I'm writing or coding. The Pomodoro technique uses a timer to you to get up and take a five minute break after 25 minutes at the keyboard. This helps you focus during the 25 minutes of work and the break keeps you healthy and fresh. The original Italian creator used a kitchen timer shaped like a tomato - hence the name. I don't have a suitable kitchen timer so I use a web browser to access http://e.ggtimer.com/pomodoro . That works well if I remember to start the timer whenever I sit down to write or code, and to restart it if I am interrupted. Often I forget, and that's annoying. A while ago I came up with the idea of automating the Pomodoro. My first idea used a pressure sensitive cushion on my study chair. I had some fun wit