|
| 1 | +--- |
| 2 | +tags: |
| 3 | +- articles |
| 4 | +- python |
| 5 | +- skateboarding |
| 6 | +- software |
| 7 | +title: "Skatelog: a Python project" |
| 8 | +date: 2026-06-15 |
| 9 | +--- |
| 10 | +<p> |
| 11 | + For the past few weeks I worked on a new project with the goal of learning Python: |
| 12 | + <a href="https://github.com/cberes/skatelog">Skatelog</a>. |
| 13 | +</p> |
| 14 | +<p> |
| 15 | + Skatelog is the software equivalent of my |
| 16 | + <a href="/articles/skateboard-journal/">skateboard journal</a>. |
| 17 | + I can add my sessions with details like location, shoes I wore, board I skated, and obstacles I skated. |
| 18 | + I can list past sessions and generate some basic analytics including |
| 19 | + how I skate each obstacle and how much I use my gear. |
| 20 | + I can import the spreadsheets I've been using as a journal |
| 21 | + and export back to a spreadsheet. |
| 22 | +</p> |
| 23 | +<figure> |
| 24 | + <img src="skatelog_cli.png" alt="Skatelog CLI for listing sessions and showing a single session" /> |
| 25 | + <figcaption>Skatelog CLI for listing sessions and showing a single session</figcaption> |
| 26 | +</figure> |
| 27 | +<p> |
| 28 | + Skatelog includes: |
| 29 | +</p> |
| 30 | +<ol> |
| 31 | + <li>CLI using <a href="https://typer.tiangolo.com/">Typer</a> and |
| 32 | + <a href="https://rich.readthedocs.io/en/latest/">Rich</a> |
| 33 | + </li> |
| 34 | + <li>API with <a href="https://fastapi.tiangolo.com/">FastAPI</a></li> |
| 35 | + <li>HTML dashboard with FastAPI, <a href="https://htmx.org/">htmx</a>, |
| 36 | + and <a href="https://matplotlib.org/">charts made by matplotlib</a> |
| 37 | + <li><a href="https://sqlite.org/">SQLite</a> database to store sessions</li> |
| 38 | +</ol> |
| 39 | + |
| 40 | +<h3>Motivation</h3> |
| 41 | +<p> |
| 42 | + My goal with this project was to learn Python. |
| 43 | + I used Python professionally around 2014. |
| 44 | + However, that was back in the early-ish days of Python 3. |
| 45 | + The project used <a href="https://www.tornadoweb.org/">Tornado</a>, and that's all I remember. |
| 46 | +</p> |
| 47 | +<p> |
| 48 | + When I started my re-learning-Python journey, I read some Python guides. |
| 49 | + But working on an actual project is more engaging. |
| 50 | + And this project was something I could see myself actually <em>using</em>. |
| 51 | +</p> |
| 52 | +<figure> |
| 53 | + <img src="skatelog_api.png" alt="Skatelog API docs" /> |
| 54 | + <figcaption>Skatelog API docs</figcaption> |
| 55 | +</figure> |
| 56 | + |
| 57 | +<h3>Implementation</h3> |
| 58 | +<p> |
| 59 | + After working on <a href="https://skateindex.com">Skate Index</a>, |
| 60 | + I wanted to go back to programming everything by hand. |
| 61 | + Unless it's code I really don't want to write, I'd rather write it by hand. |
| 62 | + (Maybe there's a minimum code coverage threshold that for unknown reasons includes unit tests only.) |
| 63 | + Especially if it's something I'm trying to learn. |
| 64 | + Not only am I more likely to remember what I write, but I think the code turns out better. |
| 65 | + And bugs are easier to solve. |
| 66 | +</p> |
| 67 | +<p>Furthermore, I <em>really</em> wrote everything by hand considering I used <a href="https://neovim.io/">Neovim</a> |
| 68 | + as my editor with a relatively small configuration. |
| 69 | + Neovim and <a href="https://github.com/tmux/tmux/wiki">tmux</a> |
| 70 | + are 2 projects I've been interested in lately. |
| 71 | + I've also been using <a href="https://github.com/JetBrains/ideavim">ideavim</a> |
| 72 | + for Intellij, but not with Skatelog. |
| 73 | + I used to think I was incapable of using vim, but I stuck with it, and now it feels much more natural. |
| 74 | +</p> |
| 75 | +<figure> |
| 76 | + <img src="skatelog_dash1.png" alt="Skatelog dashboard (board usage)" /> |
| 77 | + <figcaption>Skatelog dashboard (board usage)</figcaption> |
| 78 | +</figure> |
| 79 | +<p> |
| 80 | + With Skatelog, I started with the CLI. |
| 81 | + I was pretty impressed with rich. |
| 82 | + The app was very simple, but the output looked very nice. |
| 83 | + Once I could store all the data I needed, I moved onto some analytics. |
| 84 | + I like to see how many times I've used each board or worn each pair of shoes. |
| 85 | +</p> |
| 86 | +<p> |
| 87 | + When that was done, I added trick parsing. |
| 88 | + I have a notes field where I usually enter tricks I learned, |
| 89 | + but I also enter anything of interest or why I took the day off. |
| 90 | + This is probably the weakest part of the app, but I got to work with regexes a lot. |
| 91 | + Next was the api. I used FastAPI. |
| 92 | + Since the CLI was already done, the API was quick. |
| 93 | + Finally there was the dashboard. |
| 94 | + I wanted the dashboard to be right, because I figured it's the interface I'm most likely to use. |
| 95 | +</p> |
| 96 | +<figure> |
| 97 | + <img src="skatelog_dash2.png" alt="Skatelog dashboard (adding a session)" /> |
| 98 | + <figcaption>Skatelog dashboard (adding a session)</figcaption> |
| 99 | +</figure> |
| 100 | +<p> |
| 101 | + I wrote tests as I went along. |
| 102 | + I added a Github workflow with linting, formatting checks, and test reports. |
| 103 | + I used modern features and tools, including type hints and <a href="https://docs.astral.sh/uv/">uv</a>. |
| 104 | + In these ways I treated it like a professional project. |
| 105 | +</p> |
| 106 | +<p> |
| 107 | + However, it <em>is</em> a personal project, so I took some liberties. |
| 108 | + The CLI and dashboard are mostly untested. |
| 109 | + While Rich looks nice, I thought it might complicate testing. |
| 110 | + And I'm not very familiar with front-end testing. |
| 111 | + As I said, it was a <em>personal project</em> so I wanted to keep things <em>fun</em>. |
| 112 | + I didn't want this project to become a chore. |
| 113 | +</p> |
| 114 | + |
| 115 | +<h3>Conclusion</h3> |
| 116 | +<p> |
| 117 | + I feel much more comfortable with Python after working on Skatelog. |
| 118 | + I may even use Skatelog on a daily basis to replace one of my skateboard spreadsheets. |
| 119 | + So, I believe it was a success. |
| 120 | +</p> |
| 121 | +<p> |
| 122 | + Compared to Skate Index, in which I used generative AI almost exclusively, |
| 123 | + I enjoyed writing Skatelog by hand. I feel like I <em>bought</em> Skate Index, |
| 124 | + whereas I feel like I <em>made</em> Skatelog. |
| 125 | +</p> |
0 commit comments