<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Hugo Baldwin</title><link>https://www.hugobaldwin.com/</link><description>I'm a software developer who likes to keep things simple.</description><atom:link href="https://www.hugobaldwin.com/feeds/all.rss.xml" rel="self"/><lastBuildDate>Thu, 30 Oct 2025 00:00:00 +0000</lastBuildDate><item><title>90sleep - a sleep cycle calculator</title><link>https://www.hugobaldwin.com/90sleep/</link><description>&lt;p&gt;I've launched a new project: &lt;a href="https://90sleep.com?utm_source=hugobaldwin.com&amp;amp;utm_medium=blog&amp;amp;utm_campaign=90sleep_launch"&gt;90sleep.com&lt;/a&gt; - a sleep cycle calculator to help you figure out the best times to sleep and wake.&lt;/p&gt;
&lt;p&gt;I was inspired by an old sleep calculator that's no longer available.  The original app worked by calculating sleep cycles between now and your targeted wake time, helping you wake during the shallow phase of your sleep rather than in the middle of a deep sleep cycle. I rebuilt it as 90sleep.&lt;/p&gt;
&lt;p&gt;The science is straightforward: sleep &amp;#9758;&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Hugo Baldwin</dc:creator><pubDate>Thu, 30 Oct 2025 00:00:00 +0000</pubDate><guid>tag:www.hugobaldwin.com,2025-10-30:/90sleep/</guid><category>misc</category><category>programming</category><category>development</category><category>sleep</category><category>calculator</category><category>tailwind</category><category>netlify</category></item><item><title>Introducing Remotely.nz</title><link>https://www.hugobaldwin.com/remotely/</link><description>&lt;p&gt;I've launched a new project: &lt;a href="https://remotely.nz?utm_source=hugobaldwin.com&amp;amp;utm_medium=blog&amp;amp;utm_campaign=remotely_launch"&gt;Remotely.nz&lt;/a&gt; - a job board for genuinely remote work in New Zealand.&lt;/p&gt;
&lt;p&gt;My story is straightforward.  I fell in love with New Plymouth and want to settle here.  It's a beautiful place - good waves, good coffee, stunning landscape - but let's face it, it's no tech hub.  My search for a truly remote job in New Zealand opened my eyes to how broken the current job market is for remote workers here.&lt;/p&gt;
&lt;p&gt;The frustrations are real &amp;#9758;&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Hugo Baldwin</dc:creator><pubDate>Wed, 17 Jul 2024 00:00:00 +0100</pubDate><guid>tag:www.hugobaldwin.com,2024-07-17:/remotely/</guid><category>misc</category><category>remote work</category><category>jobs</category><category>side project</category><category>New Zealand</category></item><item><title>I've launched BuyVsRent.co.uk</title><link>https://www.hugobaldwin.com/buyvsrent/</link><description>&lt;p&gt;I've launched &lt;a href="https://buyvsrent.co.uk/?utm_source=hugobaldwin.com&amp;amp;utm_medium=blog&amp;amp;utm_campaign=launch"&gt;BuyVsRent.co.uk&lt;/a&gt;, a simple calculator to help you figure out whether buying or renting makes more financial sense.&lt;/p&gt;
&lt;p&gt;The motivation behind this came from a pretty simple problem: there are a lot of property calculators out there, but most of them are either incomplete, misleading or don't give much flexibility in the investment comparisons.  When I was trying to work through the numbers myself, I realised I needed something that actually accounted for investment returns on the &amp;#9758;&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Hugo Baldwin</dc:creator><pubDate>Wed, 03 Jul 2024 00:00:00 +0100</pubDate><guid>tag:www.hugobaldwin.com,2024-07-03:/buyvsrent/</guid><category>misc</category><category>project</category><category>calculator</category><category>property</category><category>finance</category><category>renting</category><category>investing</category></item><item><title>Rental yield calculator</title><link>https://www.hugobaldwin.com/rental-yield-calculator/</link><description>&lt;p&gt;I put a new project online: &lt;a href="https://rentalyieldcalculator.co.uk?utm_source=hugobaldwin.com&amp;amp;utm_medium=blog&amp;amp;utm_campaign=launch"&gt;rentalyieldcalculator.co.uk&lt;/a&gt;.  It's a simple tool to help mortgage lenders, letting agents, landlords (or potential landlords!) calculate their annual rental yield.&lt;/p&gt;
&lt;p&gt;There are many yield calculators online already but this one is mine :D and it's conveniently located at a memorable UK domain name.&lt;/p&gt;
&lt;p&gt;This is the first single page application I've created.  It's also the first form I've written which doesn't POST to a server.  The auto-calculate functionality was implemented using the &amp;#9758;&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Hugo Baldwin</dc:creator><pubDate>Mon, 27 Feb 2023 00:00:00 +0000</pubDate><guid>tag:www.hugobaldwin.com,2023-02-27:/rental-yield-calculator/</guid><category>misc</category><category>programming</category><category>development</category><category>hyperscript</category><category>netlify</category><category>rental yield calculator</category></item><item><title>Weekly routine changes</title><link>https://www.hugobaldwin.com/weekly-routine-changes/</link><description>&lt;p&gt;I recently made four weekly routine changes all at the same time.  This is rare for me - the last comparable change I made would be in June 2019 when I decided (and started) to lift consistently three days a week.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Three weeks ago I started swiming in the sea at 6pm on workout days;&lt;/li&gt;
&lt;li&gt;A week ago I moved my 3x weekly weightlifting from 7pm to 5:30am;&lt;/li&gt;
&lt;li&gt;I stopped drinking coffee (usually 2 cups over the course of a &amp;#9758;&lt;/li&gt;&lt;/ul&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Hugo Baldwin</dc:creator><pubDate>Fri, 02 Sep 2022 00:00:00 +0100</pubDate><guid>tag:www.hugobaldwin.com,2022-09-02:/weekly-routine-changes/</guid><category>misc</category><category>weightlifting</category><category>swimming</category><category>coffee</category><category>green tea</category><category>theanine</category></item><item><title>How to Refactor Code</title><link>https://www.hugobaldwin.com/how-to-refactor-code/</link><description>&lt;p&gt;Seems obvious, right?  You just edit it until it works the way you want it to.  Not so fast.  Reckless code changes will turn your project into a &lt;a href="https://en.wikipedia.org/wiki/Big_ball_of_mud"&gt;big ball of mud&lt;/a&gt; before you know it.  Done in the right way you'll experience less frustration and fewer crises.&lt;/p&gt;
&lt;p&gt;While you may write code as a developer, your main task is not writing code: it's removing ambiguity and mitigating project risks.&lt;/p&gt;
&lt;p&gt;If you're working on a personal project or in a &amp;#9758;&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Hugo Baldwin</dc:creator><pubDate>Thu, 21 Jan 2021 00:00:00 +0000</pubDate><guid>tag:www.hugobaldwin.com,2021-01-21:/how-to-refactor-code/</guid><category>misc</category><category>software</category><category>methodology</category></item><item><title>A Gherkin styleguide</title><link>https://www.hugobaldwin.com/a-gherkin-styleguide/</link><description>&lt;p&gt;Few, if any websites make useful recommendations about how to phrase Gherkin steps, so allow me to make some suggestions in the hope they will make life simpler.&lt;/p&gt;
&lt;h2&gt;Given steps establish state&lt;/h2&gt;
&lt;p&gt;Given steps describe a current, present, extant state of the test environment (I use the term loosely) before some (to be tested) action is performed.&lt;/p&gt;
&lt;p&gt;The fact that your Given step definition likely &lt;em&gt;creates&lt;/em&gt; that state in code behind the scenes is irrelevant.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Given steps must be in &amp;#9758;&lt;/li&gt;&lt;/ul&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Hugo Baldwin</dc:creator><pubDate>Wed, 20 Jan 2021 00:00:00 +0000</pubDate><guid>tag:www.hugobaldwin.com,2021-01-20:/a-gherkin-styleguide/</guid><category>misc</category><category>software</category><category>gherkin</category></item><item><title>The ultimate AeroPress technique</title><link>https://www.hugobaldwin.com/the-ultimate-aeropress-technique/</link><description>&lt;p&gt;&lt;img alt="AeroPress!" src="/images/aeropress.jpg"&gt;&lt;/p&gt;
&lt;p&gt;Having made countless cups of AeroPress'd coffee (mostly &lt;a href="https://catalyst.net.nz/"&gt;at work&lt;/a&gt;), I've finally arrived at the perfect cuppa.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Boil the jug.  Yup, boil.  You'll see why in a moment.&lt;/li&gt;
&lt;li&gt;Pour boiling water into your coffee cup.  If you take milk in your coffee leave room for milk.  Otherwise fill it up.&lt;/li&gt;
&lt;li&gt;Grind coffee / put ground coffee in an inverted AeroPress.&lt;/li&gt;
&lt;li&gt;Fill AeroPress with hot water from cup.  Your cup is now hot and the water has cooled to the perfect temperature &amp;#9758;&lt;/li&gt;&lt;/ol&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Hugo Baldwin</dc:creator><pubDate>Thu, 16 Mar 2017 00:00:00 +0000</pubDate><guid>tag:www.hugobaldwin.com,2017-03-16:/the-ultimate-aeropress-technique/</guid><category>misc</category><category>aeropress</category><category>coffee</category></item><item><title>New project: CourseMonger.com</title><link>https://www.hugobaldwin.com/new-project-coursemongercom/</link><description>&lt;p&gt;So! I have a new project underway, &lt;a href="http://www.coursemonger.com"&gt;CourseMonger.com&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Unlike many solutions, this one started with a problem.  My partner teaches parenting courses, each comprised of multiple workshops.  Each workshop can be at a different price and vary in number of places available.  Any prospective system would also need to provide a reservation system whereby a place is reserved for say, 8 minutes while a student completes her booking.&lt;/p&gt;
&lt;p&gt;Eventbrite provides registration-locking, but the Eventbrite model is based on &lt;em&gt;events &amp;#9758;&lt;/em&gt;&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Hugo Baldwin</dc:creator><pubDate>Mon, 13 Mar 2017 00:00:00 +0000</pubDate><guid>tag:www.hugobaldwin.com,2017-03-13:/new-project-coursemongercom/</guid><category>misc</category><category>startup</category><category>project</category><category>bootstrap</category></item><item><title>How to create many-to-many relationships with associated properties in SQLAlchemy</title><link>https://www.hugobaldwin.com/how-to-create-many-to-many-relationships-with-associated-properties-in-sqlalchemy/</link><description>&lt;p&gt;I once had a scenario where one business could be managed by multiple users, and each user could manage multiple businesses.  To further complicate matters, only one user could be the Administrator of a business, which should ideally also be represented by the relationship.&lt;/p&gt;
&lt;p&gt;Finding out how to represent that relationship was tricky as I couldn't find it in the SQLAlchemy docs, and StackOverflow was a mixed bag.  This is what I pieced together:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="nn"&gt;datetime&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;datetime&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="n"&gt;dt &amp;#9758;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Hugo Baldwin</dc:creator><pubDate>Sun, 05 Jun 2016 00:00:00 +0100</pubDate><guid>tag:www.hugobaldwin.com,2016-06-05:/how-to-create-many-to-many-relationships-with-associated-properties-in-sqlalchemy/</guid><category>misc</category><category>SQLAlchemy</category><category>Python</category><category>database</category></item><item><title>What's your capacity to hustle?</title><link>https://www.hugobaldwin.com/whats-your-capacity-to-hustle/</link><description>&lt;p&gt;This gem turned up in the Ribbonfarm post &lt;em&gt;&lt;a href="https://www.ribbonfarm.com/2013/01/31/stone-soup-for-the-capitalists-soul/"&gt;Stone-Soup for the Capitalist’s Soul&lt;/a&gt;&lt;/em&gt;:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Your rights to your wealth do not extend beyond your understanding of it.&lt;/li&gt;
&lt;li&gt;You are fair game for hustlers who understand your wealth better than you do.&lt;/li&gt;
&lt;li&gt;The role of the state is to limit the violence with which you can be hustled.&lt;/li&gt;
&lt;li&gt;If you are poor you have the right to hustle the rich within certain limits.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;It's a take on the old stone-soup fable &amp;#9758;&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Hugo Baldwin</dc:creator><pubDate>Sun, 29 May 2016 00:00:00 +0100</pubDate><guid>tag:www.hugobaldwin.com,2016-05-29:/whats-your-capacity-to-hustle/</guid><category>misc</category><category>ribbonfarm</category><category>venkatesh</category><category>hustling</category></item><item><title>Installing Apache Cordova on BunsenLabs Linux</title><link>https://www.hugobaldwin.com/installing-apache-cordova-on-bunsenlabs-linux/</link><description>&lt;p&gt;&lt;img alt="Apache Cordova header image" src="/images/cordova.jpg"&gt;&lt;/p&gt;
&lt;p&gt;Installing &lt;a href="https://cordova.apache.org/"&gt;Cordova&lt;/a&gt; wasn't straightforward, so I wrote up what worked for me.&lt;/p&gt;
&lt;p&gt;First &lt;a href="https://nodejs.org/en/download/package-manager/#debian-and-ubuntu-based-linux-distributions"&gt;install Nodejs&lt;/a&gt; and create a symlink because it gets installed as nodejs rather than node.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;curl&lt;span class="w"&gt; &lt;/span&gt;-sL&lt;span class="w"&gt; &lt;/span&gt;https://deb.nodesource.com/setup_5.x&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;sudo&lt;span class="w"&gt; &lt;/span&gt;-E&lt;span class="w"&gt; &lt;/span&gt;bash&lt;span class="w"&gt; &lt;/span&gt;-
sudo&lt;span class="w"&gt; &lt;/span&gt;apt-get&lt;span class="w"&gt; &lt;/span&gt;install&lt;span class="w"&gt; &lt;/span&gt;-y&lt;span class="w"&gt; &lt;/span&gt;nodejs
sudo&lt;span class="w"&gt; &lt;/span&gt;ln&lt;span class="w"&gt; &lt;/span&gt;-s&lt;span class="w"&gt; &lt;/span&gt;/usr/bin/nodejs&lt;span class="w"&gt; &lt;/span&gt;/usr/bin/node
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;NPM is thankfully in the debian repos:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;sudo&lt;span class="w"&gt; &lt;/span&gt;apt-get&lt;span class="w"&gt; &lt;/span&gt;install&lt;span class="w"&gt; &lt;/span&gt;npm
sudo&lt;span class="w"&gt; &lt;/span&gt;apt-get&lt;span class="w"&gt; &lt;/span&gt;install&lt;span class="w"&gt; &lt;/span&gt;-y&lt;span class="w"&gt; &lt;/span&gt;build-essential
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Install Cordova using NPM and &lt;a href="https://cordova.apache.org/docs/en/latest/guide/cli/index.html"&gt;create your first project&lt;/a&gt;:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;sudo&lt;span class="w"&gt; &lt;/span&gt;npm &amp;#9758;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Hugo Baldwin</dc:creator><pubDate>Sat, 27 Feb 2016 00:00:00 +0000</pubDate><guid>tag:www.hugobaldwin.com,2016-02-27:/installing-apache-cordova-on-bunsenlabs-linux/</guid><category>misc</category><category>linux</category><category>cordova</category><category>android</category></item><item><title>Calling the Top</title><link>https://www.hugobaldwin.com/calling-the-top/</link><description>&lt;p&gt;Some time mid-2013 I was reading through &lt;a href="https://bitcointalk.org/index.php?action=profile;u=68520;sa=showPosts"&gt;rpietila's posts&lt;/a&gt; on the bitcointalk.org forums and came across the theory that you could "call the top" of a bubble simply by selling if the price doubles in 7 days.&lt;/p&gt;
&lt;p&gt;Unfortunately, he's got 4.7k-odd posts now, so the exact post has eluded me so far.&lt;/p&gt;
&lt;p&gt;While the old trope "past performance doesn't indicate future results" always applies, there's no harm in being prepared to take advantage of an identified pattern should &amp;#9758;&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Hugo Baldwin</dc:creator><pubDate>Wed, 12 Nov 2014 22:41:00 +0000</pubDate><guid>tag:www.hugobaldwin.com,2014-11-12:/calling-the-top/</guid><category>misc</category><category>bitcoin</category><category>python</category><category>requests</category><category>trading</category></item><item><title>blogging with Pelican and Github pages</title><link>https://www.hugobaldwin.com/blogging-with-pelican-and-github-pages/</link><description>&lt;p&gt;Hey! Welcome to my new blog.&lt;/p&gt;
&lt;p&gt;So, when it came to setting up a blog again, I didn't want to go the old route to Livejournal / Blogger / Tumblr.  Too much Y2K, Google, and teenage girl angst, respectively.
Svbtle &amp;amp; Ghost cost money, and Medium's focus is on the platform, not you.  That's when I remembered Github pages allows you to setup a free static site.&lt;/p&gt;
&lt;p&gt;First create a &lt;a href="https://github.com/new"&gt;new Github pages repo&lt;/a&gt; called &lt;em&gt;username&lt;/em&gt;.github.io, where &lt;em&gt;username&lt;/em&gt; is your Github &amp;#9758;&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Hugo Baldwin</dc:creator><pubDate>Wed, 12 Nov 2014 21:40:00 +0000</pubDate><guid>tag:www.hugobaldwin.com,2014-11-12:/blogging-with-pelican-and-github-pages/</guid><category>misc</category><category>pelican</category><category>hello world</category><category>github</category></item></channel></rss>