I’ve spent these 3h mostly on implementing the reminders feature, sadly I couldn’t find a good enough solution and had to drop the feature.
I’ve tested multiple go libraries but just couldn’t find one that reliably sent notifications across all platforms. Also, all of them sent desktop notifications instead of something more terminal-related which is what I had in mind. And then, after fighting with creating a background process for hours I decided that it simply wasn’t worth the effort, so I decided to not implement reminders and delete all reminder-related features already implemented in the UI. The due date feature remains intact.
It’s sad but I think it’s the best decision to keep the app consistent and manageable. Chasing processes in activity monitor to stop notification loops was fun though!
But not all the time in these 3 hours was wasted. I was able to add a button to reset the due date of a TODO and did a general cleanup of the code to prepare it for release.
I can almost see the next ship, I’ve made a lot of progress.
Main improvements:
Some bug fixes + minor improvements:
Things left to do:
After spending quite the time working with the time package I now think that our understanding of time is broken. Years should have a set amount of days, months a set amount of days and weeks. It would make my live much easier.
I implemented a lot of stuff in this 5 hours. Here you have a list:
I already wrote way too much on the last two devlogs and it’s already late so I’ve kept this one brief :)
After almost an hour of coding I was able get persistent storage working again and fix a couple of bugs.
In the last devlog I explained that because of the project’s rewrite I disabled persistent storage. The project now asked for the user’s name and supported multiple todolists so the previous logic didn’t work.
I thankfully was able to reuse a lot of code from the last version(mostly the file handling stuff). Now the project stores data on disk this way:
Both files get stored in the same directory in which the program runs.
Bugs fixed:
I used to be the number one hater of the stardance review process(you get pretty tired of it after having to review the same slack bot 15 times but with different names) but after reading the feedback other people have left on my shipped projects I’ve changed my mind.
Initially I decided to ship this thing quickly so I could get the sticker, but after seeing that a lot of people liked this project(and the Happiness meter too, check it out on my page) I’ve decided to keep improving it with the suggestions reviewers left.
I’ll start with fixing the number one complaint, the devlogs. I still stand by my belief of “ship first, talk later” but I recognize that people enjoy reading this devlogs and they also force me to think twice about what I implemented and the decisions I made.
Enough talk, what did I do in this 5h of coding time? Well, I basically rewrote the whole thing. Now there’s a new starting flow. Much more personalized, it even asks for your name! I tried to keep the todo selection logic mostly intact because it was a pain to write. Sadly I wanted to implement overflow handling and ended up having to rethink and rewrite a lot of code.
Other features I implemented:
Things I want to add that reviewers asked for:
I won’t change the AI declaration because it still applies to the first ship(even though the second is basically a rewrite) but in this one I tried to use even less and go back to good ol stack overflow.
One reviewer asked me to make a mobile app for this, I tried to port it to ios using gomobile but it was a mess and simply not worth the effort so I sent the original go code to an agent and asked it to port it to swift. For a vibedcoded prototype it works pretty well so I’ll explore that option too.
I still have to work on the persistent storage, it’s going to have to be more complex.
Lastly I would like to thank again to all the reviewers that took the time to write thoughtful reviews, it means a lot to me. Some people even went out of the way to test the builds for windows and linux that I couldn’t test, thanks a lot :)
First of all, I know that I haven’t been putting much effort into my devlogs recently. I prefer to work in silence and talk about my work once it’s finished.
Earlier this month, I created “HackClub Happiness Meter API” for the YSWS RaspAPI. The problem is that nobody used it. Probably because it’s an API, and most people don’t have an API client at arms reach. So I decided to create a frontend for it.
Why not? I already knew a bit about React, and this was the perfect opportunity to learn a more. However, having now made the API (backend) in Go, I realized that I hate React(and for that matter web development in general) with all my heart. Backend development is much better. If I ever need to make a front end again, I’m absolutely vibecoding it.
There isn’t much to say here. The main difficulties I encountered while developing this app were::
For the sake of the story, I’m going to say a little more about the second one, adding a touch of ‘storytelling magic’ (just note that this happened at 11 pm Spanish time and I hadn’t slept enough):
At the time, I was trying to implement the Status feature. What I didn’t realize is that if the function that fetches the state is inside of a React component, it will be called every time the component is re-rendered. If the status feature then changes something in that component (which it absolutely did), it creates a loop that constantly requests the status from my API. On top of that, when my API rate limits my IP (I’m very proud of that rate limiter I put there for the extra points in Raspapi), it sends back a 429 (as it should), and for reasons unknown, the Status feature fetches faster. I’m talking about dozens of requests per second. Thankfully, I was able to stop it and fix it before Cloudflare had to step in and block me.
I’m terrible at design. You can see how bad the design was in the previous devlogs. So, thank Tormentika for telling me which colours to use where! Another day survived without having to learn colour theory!
Enough talk. GO TRY IT NOW
https://happinessmeter-frontend.javim.dev/
Better new entry + small changes.
UPDATE: New Stats page, Happiness Friend now works, the layout adapts for mobile, status on the header(status and stats update every 30s).
I still have to clean up everything and add error messages. But it looks great.
While making writing the status feature I accidentally made a loop. At least I know that my rate limiter works :)
If anybody has any suggestions please tell me, especially about the design(I’m bad with colors).
Great progress! Rewrote fetch related functions to be asyncronous. Implemented error message when the user inputs wrong auth credentials. Now there are three auth states: unauthed(not logged in), bad-authed(wrong credentials) and authed(all good) and profile, auth and entry display messages according to that state. Entry displays a message when an entry is submitted(and 200 is sent back from the user). Added more info in Intro. Reordered grid(I still have to fix that a bit). Getting closer to release!
Lots of progress!! I added images and links to the info components. Also, profile works better and newEntry works too!
Built the basic skeleton of the web page plus some basic fetch to the API using user provided credentials. The Auth logic works but still needs error messages, same for the profile area. Everything is still in a very early stage.