<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
  <title>BergBuilds devlog</title>
  <subtitle>Short written posts about what gets built, what broke and what it taught.</subtitle>
  <link href="https://bergbuilds.dk/en/devlog/"/>
  <link rel="self" href="https://bergbuilds.dk/en/devlog/feed.xml"/>
  <id>https://bergbuilds.dk/en/devlog/</id>
  <updated>2026-11-21T12:00:00+01:00</updated>
  <author><name>BergBuilds</name></author>
  <entry>
    <title>A macro that stopped itself and an 800 kg squat</title>
    <link href="https://bergbuilds.dk/en/devlog/2026-11-21/"/>
    <id>https://bergbuilds.dk/en/devlog/2026-11-21/</id>
    <updated>2026-11-21T12:00:00+01:00</updated>
    <summary>Seven stories: an Esc press that stopped everything, an 800 kg squat, a minus-800 target, a backup that never happened, a sideways photo and vanished stocks.</summary>
    <content type="html">&lt;h2&gt;Pi: the macro that pressed Esc&lt;/h2&gt;&lt;p&gt;Pi is an auto clicker for Windows that runs whole sequences of clicks and key presses. Instead of new features, this round asked one question: what breaks the features it already has?&lt;/p&gt;&lt;p&gt;The best answer was a recorded Esc. Esc is Pi&#x27;s emergency stop, and Windows hands the keys a program presses to the hotkeys too. So a sequence that pressed Esc to close a popup stopped itself, and the popup never saw the key. Now the hotkey steps aside for that one press. The same round found that pausing in the middle of a held Ctrl left Ctrl held down, so your own typing turned into shortcuts. A pause now lets go of every held key and presses it again when you resume.&lt;/p&gt;&lt;p&gt;&lt;b&gt;Take away:&lt;/b&gt; if your tool can press keys, it can press its own off switch. Test your features against each other, not just one at a time.&lt;/p&gt;&lt;h2&gt;Reppr: an 800 kg squat&lt;/h2&gt;&lt;p&gt;Type 800 instead of 80 in a workout log, and until this week that 800 kg squat stayed forever: a record nobody could beat, and a coach cheerfully suggesting 805 next time. The only way out was deleting the whole workout.&lt;/p&gt;&lt;p&gt;Now the tick asks first whether 800 kg was a typo, shows your heaviest squat so far and offers 80 with one tap. Past workouts also got a button to fix their sets, and if you fill in every set but forget to tick them, finishing asks whether to log those too instead of quietly dropping them.&lt;/p&gt;&lt;p&gt;&lt;b&gt;Take away:&lt;/b&gt; people will type nonsense by accident. Compare a new number with their own history, and make the fix one tap instead of a lecture.&lt;/p&gt;&lt;h2&gt;Nibblr: the Sunday that asked for minus 800&lt;/h2&gt;&lt;p&gt;Nibblr treats the week as one budget: eat a bit less on Monday and you get a bit more later. Fresh eyes on the code found the dark side of that idea. After a big pizza night on Saturday, Sunday&#x27;s week-adjusted target could drop below zero. No app should tell anyone to eat negative calories.&lt;/p&gt;&lt;p&gt;Now the target never goes more than a quarter under the day&#x27;s goal, and the app says so. The rest of the overshoot is simply let go. The same review lowered the protein suggestion for heavier users: 2 g per kilo is 260 g a day at 130 kg, so protein now goes by the weight that fits your height.&lt;/p&gt;&lt;p&gt;&lt;b&gt;Take away:&lt;/b&gt; any number your app works out from other numbers needs a floor and a ceiling. Try the extremes before your users do.&lt;/p&gt;&lt;h2&gt;Greed: the backtest that graded itself&lt;/h2&gt;&lt;p&gt;Greed tests stock strategies and runs the best ones on pretend money. After a chip sell-off the momentum account was 42% below its peak, and the dashboard called its gap to the S&amp;amp;P 500 almost never seen: the lowest 0.03%.&lt;/p&gt;&lt;p&gt;Then the catch. The history it compared against ran right up to today, so the live weeks were partly being compared with themselves. And it started in 2012, skipping the 2008-09 crash that momentum is famous for. Fixed, the honest line reads: a fall this deep happened once before, in 2008-09, and took over five years to win back. A fairer yardstick helped too: a real momentum fund fell 22% over the same days, so much of the gap was the bet on only 20 stocks.&lt;/p&gt;&lt;p&gt;&lt;b&gt;Take away:&lt;/b&gt; when you ask “how unusual is this?”, make sure the answer can&#x27;t include the thing you&#x27;re asking about. And this is an experiment with pretend money, not investment advice.&lt;/p&gt;&lt;h2&gt;Nibblr: the backup that never happened&lt;/h2&gt;&lt;p&gt;Nibblr keeps everything on the phone, so it keeps an eye on how long it&#x27;s been since you saved a backup file. On Android you save it through the share sheet, and closing the share sheet looks exactly like saving the file. So the app thought you&#x27;d backed up and went quiet for a month, while nothing had been saved anywhere.&lt;/p&gt;&lt;p&gt;Now it simply asks whether you saved it. The same bug hunt found a label scanner that could read the kJ number as kcal, which makes a food look about four times as rich as it is, and a home-screen widget that only spoke English. All three are fixed in a test build, waiting for a real phone to try them on.&lt;/p&gt;&lt;p&gt;&lt;b&gt;Take away:&lt;/b&gt; when the system can&#x27;t tell you whether something worked, ask the user instead of guessing in your own favour.&lt;/p&gt;&lt;h2&gt;Zeta: the photo lying on its side&lt;/h2&gt;&lt;p&gt;Zeta is the video editor that cuts BergBuilds&#x27; devlogs from a script. This afternoon it was fed what a new user actually has, starting with a portrait photo from a phone. Phones often store those sideways, with a small note in the file that says “turn me 90 degrees”. ffmpeg reads the note, so the finished video looked fine, and that hid the bug. Everything else, the part that ranks shots, the face finder that aims the crop and the thumbnails, saw the photo lying on its side. One test picture with the note set proved it, and now every part sees it upright.&lt;/p&gt;&lt;p&gt;The same round moved captions on vertical videos in from the edges, out from under TikTok&#x27;s like and share buttons, and turned “Error opening input files: End of file” into a message that names the half-copied file and says what to do.&lt;/p&gt;&lt;p&gt;&lt;b&gt;Take away:&lt;/b&gt; when one part of your pipeline quietly fixes the input, the other parts may still see it broken. Test with the files real people have, not the ones you made.&lt;/p&gt;&lt;h2&gt;Greed: the stocks that vanished from the past&lt;/h2&gt;&lt;p&gt;Every backtest has a ghost problem. Companies that went bust or were bought out disappear from free price data, so the past looks like it was full of survivors, and a strategy tested on it looks better than it was. Instead of guessing how much, Greed measured it against a real fund that held every one of those companies: the survivors-only version came out about a percentage point a year ahead since 2012. That&#x27;s the size of the flattery.&lt;/p&gt;&lt;p&gt;Then the twist: the leak was still happening. The free data source keeps only the last price of a stock that&#x27;s gone, and every nightly refresh replaced the saved copy, so two delisted companies lost twenty years of history in seven weeks. Now the saved history never forgets.&lt;/p&gt;&lt;p&gt;&lt;b&gt;Take away:&lt;/b&gt; free data is written by the winners. Measure the bias against someone who held the losers. And this is a paper-trading experiment, not investment advice.&lt;/p&gt;&lt;h2&gt;What&amp;#x27;s out and what isn&amp;#x27;t&lt;/h2&gt;&lt;p&gt;Lofye is the one BergBuilds app on Google Play right now. Reppr, Nibblr and Arcmode are on their way to a closed test there, and the app fixes in this post are in test builds that aren&#x27;t out yet. Pi, Zeta and Greed are tools built for use here, not something you can download.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>An auto clicker behind a locked screen and a stock split that looked like a crash</title>
    <link href="https://bergbuilds.dk/en/devlog/2026-11-16/"/>
    <id>https://bergbuilds.dk/en/devlog/2026-11-16/</id>
    <updated>2026-11-16T12:00:00+01:00</updated>
    <summary>Four small stories from the workshop: a clicker that wasn&#x27;t allowed to click, a clock change that ate a weigh-in, a muscle called “Shoul…”, and an 86% drop that never happened.</summary>
    <content type="html">&lt;h2&gt;Pi: an auto clicker that wasn&amp;#x27;t allowed to click&lt;/h2&gt;&lt;p&gt;Pi is an auto clicker for Windows that does more than click: it runs whole sequences of clicks, key presses, text and waits. The first version was built in a morning, and a day later it was at version 2.1, with recording, loops, “wait for a window” and over 120 automated tests.&lt;/p&gt;&lt;p&gt;The catch: the screen was locked the whole time, and Windows refuses simulated clicks on a locked screen. So the one thing an auto clicker exists for, real clicks, was the one thing that couldn&#x27;t be tried. Everything else was tested with a fake window and a fake mouse, without a single window popping up.&lt;/p&gt;&lt;p&gt;&lt;b&gt;Take away:&lt;/b&gt; if you can&#x27;t test the real thing yet, build it so a fake mouse can test it today, and try the real clicks as soon as you can.&lt;/p&gt;&lt;h2&gt;Nibblr: the clock change that ate a weigh-in&lt;/h2&gt;&lt;p&gt;Nibblr can now answer the question everyone who weighs in asks: when do I reach my goal? It draws a straight line through the last four weeks of weigh-ins and gives a date. If the line points the wrong way, it says so plainly instead of promising anything.&lt;/p&gt;&lt;p&gt;The first test failed for a sneaky reason. The clocks went back in October, so “28 days ago” landed an hour after midnight and quietly dropped a weigh-in. Counting whole days instead of hours fixed it.&lt;/p&gt;&lt;p&gt;&lt;b&gt;Take away:&lt;/b&gt; count in whole days when you mean days. A day isn&#x27;t always 24 hours.&lt;/p&gt;&lt;h2&gt;Reppr: ten to twenty sets, and a muscle called “Shoul…”&lt;/h2&gt;&lt;p&gt;Most studies on muscle growth land on roughly the same number: ten to twenty hard sets per muscle a week. Reppr already knew every set you ticked, so the stats now have a card with one bar per muscle group, the 10-20 band shaded, and a line naming the groups that fell short.&lt;/p&gt;&lt;p&gt;On the phone, “Shoulders” got cut to “Shoul…”, which no test would ever have caught. The same evening the app was tried with all text at double size, and the set rows ran off the edge. Now the boxes can shrink.&lt;/p&gt;&lt;p&gt;&lt;b&gt;Take away:&lt;/b&gt; look at your app with large text turned on. Plenty of people use it, and that&#x27;s where layouts break.&lt;/p&gt;&lt;h2&gt;Greed: an 86% drop that never happened&lt;/h2&gt;&lt;p&gt;Greed is a lab that tests stock strategies with pretend money. Fresh eyes on the code found a bug that hadn&#x27;t bitten yet: the bot only knew stock splits from a fixed list (2-for-1, 3-for-1, 10-for-1). Apple&#x27;s 7-for-1 split in 2014 wasn&#x27;t on it. Had that happened to a holding, the price would drop to a seventh overnight while the share count stayed put: a fake 86% loss. Now any whole-number ratio counts.&lt;/p&gt;&lt;p&gt;The backtester also had a quiet freebie: it assumed the portfolio was rebalanced every single day at no cost. Letting the weights drift, as in a real account, took about half a percent a year off every strategy.&lt;/p&gt;&lt;p&gt;&lt;b&gt;Take away:&lt;/b&gt; when a backtest looks too good, look for what it gets for free. And this is an experiment, not investment advice.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>Sugar, spinach and an app that thought it was yesterday</title>
    <link href="https://bergbuilds.dk/en/devlog/2026-10-23/"/>
    <id>https://bergbuilds.dk/en/devlog/2026-10-23/</id>
    <updated>2026-10-23T12:00:00+01:00</updated>
    <summary>Four small stories from the workshop this week: an animation that took three tries, data that looked wrong, a clock that stood still, and music that wasn&#x27;t as free as it looked.</summary>
    <content type="html">&lt;h2&gt;Reppr: three tries at swapping two exercises&lt;/h2&gt;&lt;p&gt;In Reppr you can swap exercises around in a workout, and the two cards should slide past each other. Try one used React&#x27;s built-in layout animation. It does nothing at all on Android&#x27;s new architecture. Try two measured each card&#x27;s height and moved them by hand. Better, but frame by frame there was one frame at the end where the old order flashed back. Try three rebuilds the cards in place, and the whole swap now takes about a third of a second, with no flash.&lt;/p&gt;&lt;p&gt;The same day the exercise library grew by 39, from the Pallof press to shrugs, each with three short form cues.&lt;/p&gt;&lt;p&gt;&lt;b&gt;Take this with you:&lt;/b&gt; record the screen and step through it frame by frame. Something that looks fine at full speed can hide a bug you only see in slow motion.&lt;/p&gt;&lt;h2&gt;Nibblr: 105 grams of sugar in 100 grams of sugar&lt;/h2&gt;&lt;p&gt;Nibblr ships with over 18,000 foods. A check of every row, just looking for things that can&#x27;t be true, found one: table sugar with 105 grams of sugar per 100 grams. It&#x27;s not a typo. The British database counts sugar as what it becomes once it&#x27;s digested and has picked up a little water. Values are now capped at 100.&lt;/p&gt;&lt;p&gt;The app also got a line in its history that says what you&#x27;re running low on this week, with three foods to try. Spinach was the obvious pick for iron. The test said no: 9% of your daily iron per 100 grams. Six picks failed the rule of at least 15% in one normal portion and were swapped for foods like lentils, chickpeas and quinoa.&lt;/p&gt;&lt;p&gt;&lt;b&gt;Take this with you:&lt;/b&gt; when data is missing, &quot;unknown&quot; and &quot;zero&quot; are not the same thing. And what everybody knows is worth checking against the numbers.&lt;/p&gt;&lt;h2&gt;Arcmode: the app that thought it was still yesterday&lt;/h2&gt;&lt;p&gt;Arcmode is a habit app. After a night in the background it still showed yesterday as &quot;today&quot;, so the morning&#x27;s habits landed on the wrong date and your streak looked broken. The fix was ten lines: check the date again when the app comes to the front, and set a small timer for midnight.&lt;/p&gt;&lt;p&gt;The same week, an accessibility check: about sixty buttons, and zero of them had a label for the screen reader. A blind user would hear &quot;button, button, button&quot;. And the faint grey used for small text scored 3.6 in contrast against black, where the rule of thumb is 4.5. It&#x27;s a little lighter now, about 5.&lt;/p&gt;&lt;p&gt;&lt;b&gt;Take this with you:&lt;/b&gt; anything that depends on &quot;now&quot; needs something that wakes it up when &quot;now&quot; changes. And try your app with the screen reader on, once.&lt;/p&gt;&lt;h2&gt;YouTube: a claim is not a strike&lt;/h2&gt;&lt;p&gt;Out of 12 Shorts, four had a copyright claim, and none of them was a strike. A claim means any ad money from the video goes to the music&#x27;s owner. But one Short was blocked worldwide over a track that was labelled free. The artist had registered their music with YouTube under another name. YouTube Studio&#x27;s &quot;Erase song&quot; removed only the music and kept the voice, and the video played again. Three of six &quot;safe&quot; tracks were never safe.&lt;/p&gt;&lt;p&gt;&lt;b&gt;Take this with you:&lt;/b&gt; look the artist up on YouTube before you use a track. If they have an auto-generated &quot;Topic&quot; channel, the music is most likely registered.&lt;/p&gt;</content>
  </entry>
</feed>
