https://agateau.com/feedAurélien Gâteau2024-03-04T14:57:15+01:00Aurélien Gâteaupython-feedgenhttps://agateau.com/2023/making-patches-easier-to-reviewThe gentle art of making patches easier to review2023-07-07T21:09:33+02:00<p>I recently stumbled upon this excellent 2014 article about patch review by Sage Sharp: <a href="https://sage.thesharps.us/2014/09/01/the-gentle-art-of-patch-review/">The Gentle Art of Patch Review</a>.</p>
<p>I highly recommend reading the whole article, but my main takeaway is that when reviewing code, one should follow three phases:</p>
<ol>
<li>Answer the question: "Good or bad idea?"</li>
<li>"Is this architecturally sound?": are the changes done in a way that makes sense given the existing project architecture?</li>
<li>only then, can you go all in on nitpicking on naming, spelling mistakes, or ask for the commit history to be cleaned.</li>
</ol>
<p>I do quite a lot of reviews at work. Sage article made me realize I am often guilty of jumping directly to #3. I have been reflecting on why that happens, and I concluded that it's because it's the path of least resistance.</p>
<p>When I receive a 10,000 line patchset, with 23 commits stepping on each other and no description, the temptation is high to skip phase 1 and 2 and instead say to myself: "I am just going to review the whole patch one line at a time, suggesting new names and micro-optimizations so that it does not look like I clicked on Approve while looking elsewhere".</p>
<p>Since jumping directly to phase 3 is the path of least resistance, when preparing code for review, you should make what you can to reduce the resistance of phase 1 and 2.</p>
<!-- break -->
<h2>Phase 1: Is this a good or bad idea?</h2>
<p>For this phase, the place to make review easier is in the description of your patchset: that is the pull request description on GitHub or the body of the mail presenting the patchset in a mail-based workflow.</p>
<p>It does not have to be extra long, just explain in one or two sentences the problem fixed by the patchset, or the new feature it adds... If the changes are significant, then hopefully you discussed them before diving full in: maybe there is an opened issue in the bug tracker, or it was discussed by chat or on a mailing-list. If so, add a link to it to your description.</p>
<h2>Phase 2: Are the changes architecturally sound?</h2>
<p>For this phase, there are 3 places to make review easier: patchset description, high-level comments and commit history.</p>
<h3>Patchset description</h3>
<p>The patchset description should not paraphrase the patchset, but it should give a high-level overview of the changes.</p>
<p>Let's say as part of your patchset, you moved class Foo from file A to file B. If a reviewer goes directly through the changes (as in, jumps directly to Phase 3), they will have to infer that given that class Foo was removed from A, and a very similar (but maybe not identical!) class Foo was added to B, then it means the patchset moved class Foo from A to B. By listing this move in your description, not only do you save the reviewer the pain of having to infer the move, but you also get the chance to explain <em>why</em> you moved this class.</p>
<p>This can be hard. Maybe you do not like writing so this is chore. Well, being able to write prose is a very useful skill, even for the developers! Stepping out of your comfort zone is difficult, but the more you practice, the better your writing will be, the less it will become a shore.</p>
<p>Another reason this can be hard is because you need to write this in English and you think your English is not good enough. As a friend once told me: "The language of Open-Source is broken English", so don't be afraid of this. A broken English description is much more helpful than no description at all, and if someone criticizes your English, well... shame on them! You did the work! And again, practice will improve your English writing too.</p>
<h3>High-level comments</h3>
<p>Some coding guidelines require every function, every constant, every class, every module to have documentation. I think those are misguided and often lead to Captain Obvious comments like that:</p>
<div class="codehilite"><pre><span/><code><span class="k">def</span> <span class="nf">activate_rear_engine</span><span class="p">():</span>
<span class="sd">"""Activate the rear engine"""</span>
<span class="o">...</span>
</code></pre></div>
<p><em>Thank you, Captain Obvious</em></p>
<p>On the other hand, having a comment attached to a new class or a module is very helpful, especially if it explains how the class works with other classes. Again, keep it high-level.</p>
<h3>Commit history</h3>
<p>Ideally changes should be small, but it's not always possible. If the changes are large, chances are they can be split in multiple smaller changes. It is a <em>lot</em> easier to review a large patchset if one can go through it commit by commit.</p>
<p>Except... this is a double-edged sword! It is only easier to review if each commit makes sense in isolation and if the set of commits "tell a story". If a commit adds a method to a class and the next commit renames or removes it with a "Oups, that was not a good idea" commit message, then it actually takes longer and is more painful to review commits individually than just reviewing the final state.</p>
<p>This is easier said than done, though: when you are working on your changes, it's common to hit road blocks, change directions, or make unrelated changes. The commit story usually won't be straight and easy to read on your first try.</p>
<p>You know what? That's fine! Just like the first draft of a novel writer is not perfect, so is your commit story. And just like the novel writer, you can edit your story to make it easier to read. Assuming you work with a VCS which lets you rewrite history like Git, once you are done with your first draft, it's time to warm up <code>git rebase</code>!</p>
<p>Again, this takes practice to get right, but here are a few tips to get started:</p>
<ul>
<li>Splitting commits is more complicated than joining them, so it's simpler to create smaller commits and join them later.</li>
<li>You can create partial commits using <code>git add -p</code> or <a href="https://agateau.com/2016/an-intro-to-git-gui">git gui</a>.</li>
<li>Before starting a large history rewriting session, create a quick backup branch with <code>git branch backup</code>. This serves two purposes:<ol>
<li>If things go wrong, it's easy to revert to a known good state using <code>git reset --hard backup</code> (you can also use <code>git reflog</code> to do that, but I find this approach simpler).</li>
<li>When you are done with your rewrite, you can run <code>git diff backup</code> to check if the end result is similar enough.</li>
</ol>
</li>
<li>Maybe some of the changes are unrelated? If it's possible, move them to a separate branch and create a separate patch review for them. The smaller the changes, the easier it is to review.</li>
</ul>
<h2>Addressing review issues</h2>
<p>This part depends on the policy of the project. Some projects prefer if you force-push the fixed patchset as you address issues spotted during review, so that the commit history always looks like what will be committed. Other projects have a no-force-push policy, they will ask you to push fixup commits. This often happens on forges which lack the ability to compare patch-sets (Unfortunately, GitHub is one of them, GitLab is much better in that regard).</p>
<p>If you get asked to do fixup commits, please make sure the history is squashed into a readable and coherent history before the patchset is merged. This greatly simplifies the lives of future developers if they have to revisit the past.</p>
<h2>Wrapping up</h2>
<p>To wrap up, to make the life of your reviewer easier (and thus make the review faster and/or more insightful):</p>
<ul>
<li>Provide a high-level description of your changes, refer any prior discussion about it.</li>
<li>Without going all-in and adding comments everywhere, do provide high-level comments for new classes or modules.</li>
<li>Try to keep your commit history easy to read.</li>
</ul>
<p>You may also find out during this preparation process that some of your changes are not optimal, or a bug slipped in. When this happens, take the time to fix these issues before posting your patchset for review. In a sense, this process makes you the first reviewer of your code. And the cleaner your patchset, the faster the review!</p>2023-07-07T21:09:33+02:00https://agateau.com/2023/2023-06-updateJune 2023 monthly update2023-07-11T09:05:30+02:00<h2>Introduction</h2>
<p>In June, real-life got in the way and I did not get as much done as I wanted. Still some good things happened for Pixel Wheels and Burger Party. Let's look at them.</p>
<h2>Pixel Wheels</h2>
<p>I started a new vehicle! This time it's an old Formula 1 car, inspired from the Lotus 25. It currently looks like this:</p>
<p><img alt="Old F1" src="https://agateau.com/2023/2023-06-update/old-f1.png"/></p>
<!-- break -->
<p>It's not in the master branch yet, as I still have to figure out a nice name for it. It's currently called "Old F1", which I think could use some improvements... Suggestions are welcome :)</p>
<p>Working on this car triggered a few minor changes to the game:</p>
<p>I introduced a new tire size: "thin". These F1 did not have the super large tires we see now.</p>
<p>I reduced the shadow offset for the vehicles so that they look less like they are floating. This was very visible with the thin tires.</p>
<h2>Burger Party</h2>
<p>I made some minor cleanups to Burger Party build system since the <a href="https://agateau.com/2023/return-of-the-burger">1.4.1 release</a>, which made it possible to publish Burger Party on <a href="https://f-droid.org/packages/com.agateau.burgerparty/">F-Droid</a>!</p>
<p>This took a bit longer than expected because Burger Party CI was... There was no CI 😅. Setting this up was nevertheless worth the price: the great thing about publishing on F-Droid is it brings contributors (and bug reports)! Since the release I received Spanish and Basque translations, as well as an interesting bug report about the game not being optimized for the large phone screens most people carry nowadays. Going to look at this and probably release a 1.5.0 version.</p>
<h2>Clyde Store</h2>
<p>Not much happened on Clyde Store, I only added one package: <a href="https://github.com/shssoichiro/oxipng">oxipng</a>.</p>
<h2>What's next?</h2>
<p>I wanted to release a new Pixel Wheels in June, but this did not happen. We'll see if I can get the new release out in July, but I have some family holidays planned, so I don't expect it to be a very active... We'll see!</p>2023-07-11T09:05:30+02:00https://agateau.com/2023/pixelwheels-0-25-0Pixel Wheels 0.25.0 is out!2023-08-18T19:48:33+02:00<p>Finally, after way too long, here is version 0.25.0 of <a href="https://agateau.com/projects/pixelwheels/">Pixel Wheels</a>!</p>
<p>Let's see what's in the box.</p>
<h2>Split-screen multi-player</h2>
<p>This has been requested for a long time. Pixel Wheels multi-player support was limited to 2 players sharing a single screen, the game would zoom out to ensure all players were visible. This was not a good approach because it imposed a constraint on the track size: in cases where two players were at opposite corners of the track, the game had to zoom out to show the full track on the screen. This could make the game unreadable if the track was too wide. Going back to split-screen solves this, at the price of limiting the player fields of view, as is often the case with split-screens.</p>
<p>So split-screen is back, but it actually got better: it now supports up to 4 players!</p>
<p><img alt="4 player split-screen" src="https://agateau.com/2023/pixelwheels-0-25-0/split-screen.png"/></p>
<!-- break -->
<h2>A new vehicle</h2>
<p>Pixel Wheels lets you visit the 60s with the BRGP42!</p>
<p><img alt="BRGP42" src="https://agateau.com/2023/pixelwheels-0-25-0/brgp42.png"/></p>
<p>Read more about the inspiration behind this car on the <a href="https://agateau.com/projects/pixelwheels/vehicles">vehicles page</a>.</p>
<h2>More translations!</h2>
<p>Pixel Wheels now speak Italian, thanks to Dario Canossi, and Dutch, thanks to Heimen Stoffels. In other translation news, Marek Szumny took over the polish translation, so Polish is in a good shape again.</p>
<h2>Bug fixes, many of them</h2>
<p>Version 0.25.0 comes with many bug fixes, too many to list them all here, but it's worth pointing out all the fixes plugging holes in the tracks, where a missing tree or building made it possible to cut large parts of some tracks. I hope you did not rely on those to establish records 😉. Thanks to Marek Szumny for reporting them.</p>
<p>If you want to learn more about the changes, have a look at the <a href="https://github.com/agateau/pixelwheels/releases/tag/0.25.0">release notes</a>.</p>
<h2>Get it!</h2>
<p>As usual, you can get the game from <a href="https://agateau.itch.io/pixelwheels">itch.io</a>, <a href="https://flathub.org/apps/details/com.agateau.PixelWheels">Flathub</a>, <a href="https://f-droid.org/packages/com.agateau.tinywheels.android/">F-Droid</a> or <a href="https://play.google.com/apps/testing/com.agateau.tinywheels.android">Google Play</a>.</p>2023-08-18T19:48:33+02:00https://agateau.com/2023/2023-0708-updateJuly-August 2023 monthly update2023-09-08T09:05:30+02:00<h2>Introduction</h2>
<p>Monthly updates are not dead! They just took some summer vacations 😅. Let's see what happened during these two months.</p>
<h2>Pixel Wheels</h2>
<p>I finally released Pixel Wheels 0.25.0. It's been a long time coming, but now it's there. Here is the <a href="https://agateau.com/2023/pixelwheels-0-25-0">release announcement</a>.</p>
<p>This release was made a bit harder by Google Play getting in the way, see this <a href="https://mastodon.xyz/@agateau/110977197958988935">frustrated Mastodon thread</a> for more details :)</p>
<h2>SFXR-Qt</h2>
<p><a href="https://github.com/agateau/sfxr-qt">SFXR-Qt</a> received a bit of build-system and dependency love. I merged a PR from Mailaender to add an option to use the system provided Catch2 library instead of the bundled one. This prompted me to update the bundled Catch2 to version 3.4.0.</p>
<h2>Burger Party</h2>
<p>Shortly after the release of <a href="https://agateau.com/projects/burgerparty">Burger Party</a> 1.4.2, I received two new translations: Basque by Josu Igoa (who also translates Pixel Wheels!) and Spanish by YottaMxt. Probably going to make a new release in September to make these translations available.</p>
<p>Keep these translations coming! I am still amazed how publishing the game on F-Droid injected some new life in it!</p>
<h2>Clyde store</h2>
<p>The Clyde store received two new packages:</p>
<ul>
<li><a href="https://github.com/bootandy/dust">dust</a></li>
<li><a href="https://vale.sh">vale</a></li>
</ul>
<p>I also improved the CI a bit further: adding pre-commit and making it even easier to trigger updates.</p>
<h2>Nanonote</h2>
<p><a href="https://github.com/agateau/nanonote">Nanonote</a> now speaks Polish, thanks to Marek Szumny. With Danish and Dutch, that makes 3 new translations since the last release. Another app to release in September...</p>
<h2>Colorpick</h2>
<p>Colorpick is a color picker I built a long time ago, whose distinctive features are the ability to check the contrast between a background and a foreground color as well as an arrow-keys-operated magnifying glass to pick the exact pixel you want to pick. I haven't been active on this app for years. Recently <a href="https://github.com/redtide">redtide</a> started contributing to it. They wanted to do many changes, and I was not that motivated to work on this app, so I offered to transfer it to them, which they accepted, so <a href="https://github.com/qtilities/colorpick">Colorpick</a> is now part of the <a href="https://github.com/qtilities">qtilities organization</a>!</p>
<h2>What's next?</h2>
<p>As mentioned in this report, I have some releases to do: a new Burger Party and a new Nanonote. Beside these, I have some work planned on Pixel Wheels. I need to add a 3rd track to Pix Cities championship, but that would increase the number of tracks to 9, which would not fit on the individual track selection screen anymore. This means I am going to work on this track selection screen first. I plan to change it so that one picks the championship first, and then the tracks inside it. This should fit the screen.</p>2023-09-08T09:05:30+02:00https://agateau.com/2023/2023-09-updateSeptember 2023 monthly update2023-10-18T08:05:30+02:00<h2>Introduction</h2>
<p>Welcome to this September 2023 update! I had Burger Party and Nanonote releases planned for this month, but that did not happen. I did however release version 0.25.1 of Pixel Wheels.</p>
<h2>Pixel Wheels</h2>
<p>0.25.0 had a bug where it would complain about a missing controller when started on Android (<a href="https://github.com/agateau/pixelwheels/issues/398">#398</a>). I released 0.25.1 to fix that. The release also includes updated translations and a fix for the score table not always fitting in the screen (<a href="https://github.com/agateau/pixelwheels/issues/397">#397</a>).</p>
<p>Beside this release, has announced in my previous monthly update, I reworked the track selector to fit another track, so that I can add a 3rd track to the "Pixel Cities" championship. It looks like this now:</p>
<p><img alt="New track selector" src="https://agateau.com/2023/2023-09-update/trackselector.png"/></p>
<p>The first row shows all championships. The second row shows the tracks within the selected championship.</p>
<!-- break -->
<p>I also worked on user-interface navigation: I removed the feature where moving the mouse cursor over a menu item gave it focus. I never really liked that feature and it was getting in the way for the design of the new track selector.</p>
<p>Finally, I improved keyboard navigation: it is now possible to move the focus all the way down to the back and forward buttons using the up and down keyboard keys.</p>
<h2>Clyde</h2>
<p>Only one small fix on Clyde this month. I recently added a <code>.pre-commit.yaml</code> file to the clyde-store repository and it turns out it broke <code>clyde search</code> because the command tried to load the <code>.pre-commit.yaml</code> file as a package… embarrassing. I fixed that.</p>
<h2>What's next</h2>
<p>That's all for this month, not as much work as planned, but progress nevertheless. Next month I shall finally do the Burger Party and Nanonote releases. I scheduled a day-off from work to make sure the releases really happen this time!</p>
<p>On Pixel Wheels, I am going to start work on the new track. I am looking forward to it, as this is one of the major blockers I defined before releasing Pixel Wheels 1.0.0!</p>2023-10-18T08:05:30+02:00https://agateau.com/2023/2023-1011-updateOctober-November 2023 monthly update2023-12-08T07:05:30+01:00<h2>Introduction</h2>
<p>Another double monthly update. Turns out moving to a new house is a voracious time eater… (who knew?). Here is what I still managed to get done when I was not busy emptying one house, filling another one, trying to give/trash as much crap as possible in the (still ongoing!) process.</p>
<h2>Pixel Wheels</h2>
<p>On Pixel Wheels, I worked on the third track for the "Pixel Cities" championship. It's mostly ready and now has a name: "The island".</p>
<p><img alt="Pixel Wheels "The Island" track" src="https://agateau.com/2023/2023-1011-update/pixelwheels-the-island.png"/></p>
<p>This new track was the opportunity to make some improvements on the tile engine. Creating obstacles requires less manual work now, making it faster to iterate and experiment.</p>
<!-- break -->
<p>I also made a user interface change: the focus indicator now glows, making it more explicit that it is the element controlled by the player. This is useful on the new track selection screen, to remove the ambiguity with the background of the selected championship.</p>
<p>On Tiny-sur-Mer, the lighthouse shadow now looks nicer.</p>
<p>Finally I worked on the AI pilot: it now tries to avoid other vehicles.</p>
<h2>Burger Party</h2>
<p>At the end of October, I released version 1.4.3 of Burger Party.</p>
<p>This was a translation release:</p>
<ul>
<li>Burger party now speaks Basque, thanks to Josu Igoa</li>
<li>Spanish translation has been updated, thanks to Victor Hck</li>
</ul>
<p><img alt="Burger Party speaking Basque" src="https://agateau.com/2023/2023-1011-update/burgerparty-eu.png"/></p>
<h2>Nanonote</h2>
<p>I was a bit late on this one but I'll count it as November. At the very very end of November (as in, around November 31th 😉), I released version 1.4.1 of Nanonote.</p>
<p>This one was also a translation release. Nanonote learned to speak:</p>
<ul>
<li>Danish, thanks to Morgenkaff,</li>
<li>Dutch, thanks to Heimen Stoffels,</li>
<li>Polish, thanks to Marek Szumny,</li>
<li>Norwegian, thanks to Vidar Karlsen.</li>
</ul>
<p><img alt="Nanonote speaking Polish" src="https://agateau.com/2023/2023-1011-update/nanonote-pl.png"/></p>
<h2>Clyde</h2>
<p>I made a small change to <code>clyde upgrade</code>: it now lists blocked upgrades. Blocked upgrades are upgrades which can't be installed because you pinned a version number. This is helpful in case you pinned to version N because N+1 had a bug. Now that N+2 is out, listing the blocked upgrade can remind you to unpin and try this new version.</p>
<p><img alt="Clyde blocked upgrade" src="https://agateau.com/2023/2023-1011-update/clyde-blocked-upgrade.png"/></p>
<h2>Clyde Store</h2>
<p>The CI of the Clyde store has an auto-update mechanism to automatically fetch new versions and update the packages. I improved this auto-update mechanism to overwrite the update branch if it exists. It is now one step closer to being runnable automatically on a regular basis.</p>
<h2>What's next</h2>
<p>I had this optimistic hope of releasing Pixel Wheels 1.0 for Christmas, but seeing how most of my leisure time is taken by getting the new house in shape, it's not going to happen. I am going to continue working on the new Pixel Wheels track, though, and the related game engine work (in particular it's triggering some bugs in rescue helicopters). On Clyde front, it's been too long since the last release, so Santa may bring you may a new Clyde version! 🎁</p>2023-12-08T07:05:30+01:00https://agateau.com/2023/introducing-clydeClyde: a cross-platform package manager for pre-built applications2023-12-31T19:17:40+01:00<h2>Introduction</h2>
<p>The popularity of Go and Rust and their ability to produce self-contained static binaries has made it easier for developers to publish builds of their applications working reliably on all platforms.</p>
<p>Downloading standalone binaries is easy and fast when one wants to try a new application (no need to build from source, no need to add a third-party repository...). On the other hand, keeping track of these applications over time is tedious and time consuming. This is what <a href="https://github.com/agateau/clyde">Clyde</a> is here to solve: Clyde is a cross-platform package manager for pre-built applications.</p>
<p>Installing <a href="https://github.com/sharkdp/fd">fd</a>, for example, can be done with <code>clyde install fd</code>.</p>
<p>Keeping installed applications updated consists of running <code>clyde update</code> to get an up-to-date list of packages, then <code>clyde upgrade</code> to install the latest version of all installed packages.</p>
<p><a href="https://asciinema.org/a/629496"><img alt="Clyde demo" src="https://asciinema.org/a/629496.svg"/></a>
<em>Recording of setting up Clyde and installing fd</em></p>
<!-- break -->
<h2>Other niceties</h2>
<p>In addition to making it easy to keep applications up to date, Clyde provides other niceties such as installing man pages or making auto-completion work out-of-the-box.</p>
<p>It is also simple to rollback to a previous version and pin it if the latest one does not work for you for some reason.</p>
<p>Finally, Clyde is cross-platform. It supports 3 OS: Linux, macOS and Windows, and 3 architectures: x86, x86-64 and Aarch64 (aka ARM64). Future versions may add other OS or architectures.</p>
<h2>Yet another package manager developers must take care of?</h2>
<p>No: compared to other package managers, Clyde does not require application developers to do anything when they release a new version: as long as the layout of the published archive does not change from one version to another, the Clyde store will pick up new releases and make them available.</p>
<h2>Getting started in 2 minutes</h2>
<ul>
<li>Download version 0.6.0 for your machine from the <a href="https://github.com/agateau/clyde/releases/0.6.0">release page</a>.</li>
<li>Unpack it and set it up:</li>
</ul>
<div class="codehilite"><pre><span/><code>$ tar xf clyde-0.6.0.tar.gz
$ cd clyde-0.6.0
$ ./clyde setup
(...)
All set! To activate your Clyde installation, add this line to your shell startup script:
. /home/demo/.cache/clyde/scripts/activate.sh
</code></pre></div>
<ul>
<li>
<p>Add the <code>activate.sh</code> script to your shell startup script as suggested (the path to <code>activate.sh</code> will be different on macOS and Windows)</p>
</li>
<li>
<p>Restart your shell</p>
</li>
</ul>
<p>You can now:</p>
<ul>
<li>search for packages with <code>clyde search <something></code>,</li>
<li>install a package with <code>clyde install <package></code>,</li>
<li>show package info with <code>clyde show <package></code>,</li>
<li>show package files with <code>clyde show -l <package></code>,</li>
<li>list installed packages with <code>clyde list</code>,</li>
<li>uninstall a package with <code>clyde uninstall <package></code>.</li>
</ul>
<h2>Under the hood</h2>
<h3>The installation directory</h3>
<p>Clyde installs all applications in "Clyde home directory": a directory created in the default cache directory of your home directory.</p>
<p>The hierarchy of Clyde home directory looks like this:</p>
<ul>
<li><code>$CLYDE_HOME</code><ul>
<li><code>inst</code>: Clyde "prefix": where package files are installed<ul>
<li><code>bin</code></li>
<li><code>share</code></li>
<li><code>opt</code></li>
</ul>
</li>
<li><code>download</code>: where Clyde downloads package assets</li>
<li><code>store</code>: Clyde store (see below)</li>
<li><code>scripts</code>: activation scripts</li>
<li><code>tmp</code>: used while installing</li>
<li><code>clyde.sqlite</code>: installed packages database</li>
</ul>
</li>
</ul>
<p>Clyde activation script ensures <code>$CLYDE_HOME/inst/bin</code> is in <code>$PATH</code> and other environment variables are set up accordingly.</p>
<h3>The Clyde store</h3>
<p>The Clyde store is a <a href="https://github.com/agateau/clyde-store">git repository</a> holding all Clyde packages.</p>
<p>A package is a YAML file containing:</p>
<ul>
<li>some metadata about the package (name, URL for its home and repository...)</li>
<li>for each version, a list of asset URLs with their sha256 checksum.</li>
<li>installation directives, telling Clyde where to put which files.</li>
<li>test commands. These are used by the store CI: after updating a package, the CI installs the new version and runs these test commands.</li>
</ul>
<p>You can learn more about the package format by reading <a href="https://github.com/agateau/clyde/blob/620a86dcc037d59666ad893a41f92b0a519a3afb/docs/package-file-format.md">its documentation</a>.</p>
<h2>What's next?</h2>
<p>Clyde itself is fully usable at this point, though a few new features are planned. What's needed is more packages! If you like the idea but do not see your favorite application, do not hesitate to add new packages. There is <a href="https://github.com/agateau/clyde/blob/620a86dcc037d59666ad893a41f92b0a519a3afb/docs/creating-a-package.md">a tutorial</a> to get you started, and I am always happy to answer any questions!</p>2023-12-31T19:17:40+01:00https://agateau.com/2024/2023-wrap-up2023 Wrap Up2024-01-09T08:59:37+01:00<h2>Introduction</h2>
<p>It's the start of 2024, so I want to reflect on how 2023 went, regarding my FLOSS activities.</p>
<h2>Releases</h2>
<p>In 2023 I made 17 releases:</p>
<table>
<thead>
<tr>
<th>Date</th>
<th>Project</th>
<th>Version</th>
</tr>
</thead>
<tbody>
<tr>
<td>2023-02-05</td>
<td>Pixel Wheels</td>
<td>0.24.2</td>
</tr>
<tr>
<td>2023-02-14</td>
<td>Cat Avatar Generator</td>
<td>0.2.1</td>
</tr>
<tr>
<td>2023-03-12</td>
<td>Nanonote</td>
<td>1.3.91</td>
</tr>
<tr>
<td>2023-03-20</td>
<td>Clyde</td>
<td>0.5.0</td>
</tr>
<tr>
<td>2023-04-02</td>
<td>Nanonote</td>
<td>1.3.92</td>
</tr>
<tr>
<td>2023-04-03</td>
<td>Nanonote</td>
<td>1.3.93</td>
</tr>
<tr>
<td>2023-04-11</td>
<td>Nanonote</td>
<td>1.4.0</td>
</tr>
<tr>
<td>2023-05-08</td>
<td>Burger Party</td>
<td>1.4.0</td>
</tr>
<tr>
<td>2023-05-20</td>
<td>Burger Party</td>
<td>1.4.1</td>
</tr>
<tr>
<td>2023-06-14</td>
<td>Burger Party</td>
<td>1.4.2</td>
</tr>
<tr>
<td>2023-07-03</td>
<td>Poglyph</td>
<td>0.0.1</td>
</tr>
<tr>
<td>2023-07-05</td>
<td>Poglyph</td>
<td>0.0.2</td>
</tr>
<tr>
<td>2023-08-30</td>
<td>Pixel Wheels</td>
<td>0.25.0</td>
</tr>
<tr>
<td>2023-09-21</td>
<td>Pixel Wheels</td>
<td>0.25.1</td>
</tr>
<tr>
<td>2023-11-02</td>
<td>Burger Party</td>
<td>1.4.3</td>
</tr>
<tr>
<td>2023-12-01</td>
<td>Nanonote</td>
<td>1.4.1</td>
</tr>
<tr>
<td>2023-12-28</td>
<td>Clyde</td>
<td>0.6.0</td>
</tr>
</tbody>
</table>
<p>or, grouped by project:</p>
<table>
<thead>
<tr>
<th>Project</th>
<th>Versions</th>
</tr>
</thead>
<tbody>
<tr>
<td>Burger Party</td>
<td>1.4.0, 1.4.1, 1.4.2, 1.4.3</td>
</tr>
<tr>
<td>Cat Avatar Generator</td>
<td>0.2.1</td>
</tr>
<tr>
<td>Clyde</td>
<td>0.5.0, 0.6.0</td>
</tr>
<tr>
<td>Nanonote</td>
<td>1.3.91, 1.3.92, 1.3.93, 1.4.0, 1.4.1</td>
</tr>
<tr>
<td>Pixel Wheels</td>
<td>0.24.2, 0.25.0, 0.25.1</td>
</tr>
<tr>
<td>Poglyph</td>
<td>0.0.1, 0.0.2</td>
</tr>
</tbody>
</table>
<p>(I haven't written about <a href="https://gitlab.com/agateau/poglyph">Poglyph</a> yet. It's a set of two small CLI tools to find missing glyphs in fonts. I extracted it from an internal Pixel Wheels tool and now use it in Burger Party)</p>
<p>I was happily surprised by the number of releases I managed to push. It's a bit more than I expected.</p>
<h2>Pixel Wheels</h2>
<p>I had the secret goal of getting <a href="https://agateau.com/projects/pixelwheels">Pixel Wheels</a> 1.0.0 out for the end of the year, but that did not happen. Moving houses ended up taking way more time than I expected :)</p>
<p>Still the game is in a good shape for a 1.0.0 release. The missing track is mostly done, I may add multiple difficulty levels (some equivalent to the 50cc, 100cc, 150cc and 200cc in Mario Kart) and that will be it.</p>
<h2>Burger Party</h2>
<p><a href="https://agateau.com/projects/burgerparty">Burger Party</a> made a surprising come-back this year! Google requesting the game to be updated otherwise it would no longer be available on Google Play finally got me working on it after leaving it untouched for 5 years.</p>
<p>I am happy that I finally got to add the end sequence I had in mind and that I pushed the game on F-Droid. This had the unexpected side-effect of gathering interest from several translators: the game received an update to the Spanish translation from a native speaker and got translated in Basque, Dutch and Polish! And it's not over yet: I recently merged an Hungarian translation too.</p>
<h2>Clyde</h2>
<p>I had high hopes on <a href="https://github.com/agateau/clyde">Clyde</a>, but it has failed to gain traction for now. Marketing is definitely not my forte, but I keep trying :). At least it's useful for me, and creating it was a nice way to gain more knowledge in Rust.</p>
<h2>Support</h2>
<p>I have a <a href="https://agateau.com/support">support page</a>, with links to various ways to give me money.</p>
<p>The thing is, even critical infrastructure projects struggle to get funded (<a href="https://xkcd.com/2347/">mandatory XKCD link</a>). Me, I just make tools and games. I am also not starving, there are more important projects or causes than supporting me. Still I would love to be able to reduce my time at $JOB to a 4 day week, keeping one day for my own projects, as I once did several years ago.</p>
<p>Support in 2023 breaks down to this:</p>
<table>
<thead>
<tr>
<th>Source</th>
<th align="right">Number</th>
<th align="right">Amount</th>
</tr>
</thead>
<tbody>
<tr>
<td>Patreon supporters</td>
<td align="right">2</td>
<td align="right">100.25€</td>
</tr>
<tr>
<td>Liberapay supporters</td>
<td align="right">1</td>
<td align="right">5.43€</td>
</tr>
<tr>
<td>One-time Ko-fi donations</td>
<td align="right">4</td>
<td align="right">25.42€</td>
</tr>
<tr>
<td>Itch.io sales</td>
<td align="right">1</td>
<td align="right">4.32€</td>
</tr>
<tr>
<td>GitHub sponsors</td>
<td align="right">0</td>
<td align="right">0€</td>
</tr>
<tr>
<td><em>Total</em></td>
<td align="right"/>
<td align="right"><em>135.42€</em></td>
</tr>
</tbody>
</table>
<p>The tricky part of being on platforms like Patreon or Ko-fi is they encourage you to give some rewards to supporters. It makes sense, but it does not match well with open-source work: I don't have any secret agenda I could share with insiders, all my work is in the open. As such I feel the least I can do is write monthly status updates, but it takes quite some time to do so, and I have no idea if they are useful. When I look back at them I often find them boring to read.</p>
<p>I actually like writing, and I'd like to write more interesting pieces than status updates. I am considering focusing on one interesting topic for each month, and write on it instead. What do you think?</p>
<h2>What to expect for 2024?</h2>
<p>My primary goal for 2024 is to get Pixel Wheels 1.0.0 out. I don't want to write down any other goal for now, we'll see when it's out! Once this one is achieved I am sure I am going to feel a huge relief :)</p>2024-01-09T08:59:37+01:00https://agateau.com/2024/2024-01-updateJanuary 2024 update, Pixel Wheels new track2024-02-06T18:42:24+01:00<p>Following my <a href="https://agateau.com/2024/2023-wrap-up">2023 wrap up</a>, here is the first status update where I focus on a single topic for the month, with the hope of making the update a more enjoyable read.</p>
<p>This month I finished <a href="https://agateau.com/projects/pixelwheels">Pixel Wheels</a> new track: "The island".</p>
<p>The track starts with a tight right turn around a tower.</p>
<p><img alt="Hairpin turn at the start" src="https://agateau.com/2024/2024-01-update/screenshot-01.png"/></p>
<p>Then you drive in front of an old fortified entrance:</p>
<p><img alt="In front of the old fortified entrance" src="https://agateau.com/2024/2024-01-update/screenshot-02.png"/></p>
<!-- break -->
<p>Turn around another tower, hit the turbo tiles to take advantage of the straight line:</p>
<p><img alt="Turning around the south-east tower" src="https://agateau.com/2024/2024-01-update/screenshot-03.png"/>
<img alt="Speeding on the south straight line" src="https://agateau.com/2024/2024-01-update/screenshot-04.png"/></p>
<p>Next is a wide turn, before reaching the tricky part...
<img alt="Wide turn in the south-west corner" src="https://agateau.com/2024/2024-01-update/screenshot-05.png"/>
<img alt="Approaching the tricky part" src="https://agateau.com/2024/2024-01-update/screenshot-06.png"/></p>
<p>The boardwalk over water section!</p>
<p><img alt="Start of the wood-over-water section" src="https://agateau.com/2024/2024-01-update/screenshot-07.png"/></p>
<p>You might want to go fast, like this Miramar...</p>
<p><img alt="Miramar is ahead of me" src="https://agateau.com/2024/2024-01-update/screenshot-08.png"/></p>
<p>But do not overdo it!</p>
<p><img alt="Miramar drove too fast and ended up in the sea" src="https://agateau.com/2024/2024-01-update/screenshot-09.png"/></p>
<p>As I said, do not go too fast, unless you want to say hello to the rescue helicopter.</p>
<p><img alt="Same happened to me, luckily the rescue helicopter is here" src="https://agateau.com/2024/2024-01-update/screenshot-10.png"/></p>
<p>After this part you head to the center of the town.</p>
<p><img alt="Driving south to the center of the town" src="https://agateau.com/2024/2024-01-update/screenshot-11.png"/>
<img alt="Multiple paths are available here" src="https://agateau.com/2024/2024-01-update/screenshot-12.png"/></p>
<p>Careful with the trees: it's easy to get stuck between them!</p>
<p><img alt="Targeting an Ant-On-1 with the missile" src="https://agateau.com/2024/2024-01-update/screenshot-13.png"/></p>
<p>Now you can take the shortcut to the end of the track.</p>
<p><img alt="Didn't have to fire, it hit a tree" src="https://agateau.com/2024/2024-01-update/screenshot-14.png"/></p>2024-02-06T18:42:24+01:00https://agateau.com/2024/2024-02-updateFebruary 2024 update, Pixel Wheels hit effect2024-03-04T14:57:15+01:00<p>For this February status update, I want to show the work I have been doing on Pixel Wheels "hit effect". The "hit effect" is what happens when a vehicle is hit by a gun bullet, a missile, or triggers a mine.</p>
<p>Up to know when this happens, the vehicle makes a 360°, which slows him down but keeps it in the same direction as it was before getting hit. This effect has two issues though:</p>
<ol>
<li>When the vehicle is hit close to a wall, the effect is canceled as soon the vehicle touches the wall. This means some time the vehicle is almost not slowed down.</li>
<li>On the other hand, the effect is too punishing when hit by bullets, because each bullet hit triggers another 360° and each bullet hit pushes the vehicle a bit further. If you are unlucky, you can end up stuck in the middle of a forest. This is what happened to the reporter of bug <a href="https://github.com/agateau/pixelwheels/issues/418">#418</a>.</li>
</ol>
<p>So the effect can be either not punishing enough or too punishing 🙃.</p>
<!-- break -->
<p>To remedy that, I replaced this 360° effect with a slow down, as if your vehicle motor temporarily shutdown. This solves both issues. In the case of multiple bullet hits from the gun, the slow down duration is reset by each hit, so getting hit twice or more is still more penalizing than getting hit only once, but it does not push your vehicle anymore, so you won't end up stuck in a forest.</p>
<p>Visually this looked a bit underwhelming though. I first made the vehicle go black and slowly get back to normal when the slow down effect ended, but that was not really spectacular. This was the perfect opportunity to play with a game element I have never used before: particles!</p>
<p>Using <a href="https://libgdx.com/wiki/tools/2d-particle-editor">GDX Particle Editor</a>, I put together a smoke effect:</p>
<p><img alt="Smoke effect in GDX Particle Editor" src="https://agateau.com/2024/2024-02-update/smoke-effect.png"/></p>
<p>Playing with the editor was a lot of fun, I am quite happy with the result. Here is what it looks like in game:</p>
<p><img alt="Smoke in game" src="https://agateau.com/2024/2024-02-update/smoke-in-game-1.png"/></p>
<p><img alt="More smoke in game" src="https://agateau.com/2024/2024-02-update/smoke-in-game-2.png"/></p>
<p>And here is a short video showing it in action:</p>
<video width="960" height="540" controls="">
<source src="https://agateau.com/2024/2024-02-update/smoke-effect.mp4">
</source></video>
<p>That's it for this update, let me know what you think of this new effect! You can try it from the <a href="https://builds.agateau.com/pixelwheels">latest builds</a>.</p>2024-03-04T14:57:15+01:00