Coffeemon Code

Coffeemon Code

10 devlogs
20h 22m
•  Ship certified
Created by aal337

Pokémon Go but coding instead of walking.
Raise a counter of caught Coffeemon for every 30 minutes of coding recorded by Hackatime.

Timeline

Ship 1

1 payout of shell 177.0 shells

aal337

about 2 months ago

aal337 Covers 10 devlogs and 20h 22m

I wrote a README with the most necessary info.

Update attachment

If I said the number of caught Coffeemons is remembered by the app, it was just a joke. Everything else works. It‘s not what I imagined, and there‘s no but.
(aal337 gives a 404 from Hackatime)
This was weirdly fun, and it would have been even more enjoyable if my code wasn‘t a bunch of random support variables introduced to fix one issue.

Update attachment
Earned sticker

This suggests that the Android and desktop app won‘t just crash immediately or something like that.
For some reason, I‘m making requests to api.hackatime.hackclub.com/…, and I don‘t know why, because documentation clearly says hackatime.hackclub.com/… Also, the network request blocks the UI.

Update attachment
aal337 aal337 about 2 months ago

that qodana tab lurking in the corner does moral support and no more

Earned sticker

I made a gh-pages branch, tried it and found out I didn‘t apply the serialization plugin. So I‘m rebuilding right now to put silly-mistake-free files onto that branch.
Finally, IntelliJ IDEA touched my project, so it has a .idea folder now.
Soon, I‘ll be able to actually see the result of my work (creating virtual devices doesn‘t work for me for some reason).

Update attachment
Earned sticker

Now your number of Coffeemons survives the app being restarted or the webpage reopened. game‘s properties‘ setters and getters use a KStore (https://xxfast.github.io/KStore/overview.html).
Syntax highlighting went missing; big, big bounty. And I‘m too lazy to look up which properties are nullable again and which aren‘t, so compiler will have to tell me.

Update attachment
Earned sticker

i have a feeling i should start finishing soon
I started working on a way to save the coffeemon counter, but right now I‘m resolving some unresolved references.

Update attachment

This thing is now complete, but untested. You can (if I didn’t make any mistakes, which of course I did) enter your hackatime username, get the total number of seconds spent coding recorded, and click a button to raise the counter of your caught Coffeemon for every 30 minutes you spend creating crazily innovative things.
For the attachment, imagine the button that raises the counter and a display of the number of caught Coffeemon, and a text field, a button and a time display appearing when you click that button you can actually see in the picture (I kept the example code because it‘s probably the only thing working).

Update attachment

After adding wasm target, all went downhill, gradle daemon disappears unexpectedly.
As I just have to successfully build this thing once before september ends (and I‘m woken up), I‘ll just focus on writing code.
While writing this, I went back and tried to build just to make sure I‘m really not talking nonsense. When you read this, it surely will still have been running.

Update attachment
aal337 aal337 2 months ago

message received from daemon indicates it disappeared

There‘s a function now that makes a hackatime api call and gets a user‘s total time in seconds. Now I‘ll add an input field and make the button call this function and display the umber of seconds. I also realised that I could preview the app easily without having to install it on my phone by just adding a WASM source set, compiling and viewing it in the browser.
For unknown reasons, Gradle seems to use the JDK provided by the Redhat Java VS Code extension, which doesn‘t have jlink. I couldn‘t change the JDK location used by Gradle.
The API level that would be shown if anything was working would actually (maybe) be 36.

Update attachment

I mainly tried to set up the project in VS Code (Codespace) and getting Gradle, could‘ve as well done it with „echo >>“. I just now successfully ran the build task (still with the template from KMP wizard). Maybe I spent a bit too much time messing around with Gradle, but it was weirdly fun and I wholeheartedly believe fanatically updating plugin versions and upgrading Gradle to 9.0 was necessary for that successful build. Image in attachment from JetBrains as I don‘t know how I could create Composable previews (and see them).

Update attachment
HQ2000 HQ2000 3 months ago
relatable