98 days ago · Tech · hide · Fediverse post

2026/08/13 Thursday I did this small "gambiarra" on the playback logic of my player the other day... but there's so much I have to clean in the code, even though I modularized everything, a lot I only edited when I had a problem in that section, there is a huge use of || and && logic everywhere, and lots of things are way more complicated than they have to be simply because of... no standardization I guess? I was looking at it and I realized I can just make a global fallback logic, which I just did (not on the widget yet) and it's so elegant, three functions in six lines that allow me to remove so much of the code because I added it directly to every key retrieve and there are tons of them... and in some I added the fallback in the key apply lol. I'm also creating standardized "building blocks" for the three operations that are probably 90% of what the code is doing: apply style, apply src (for images) and apply style on mouseenter/mouseleave (to simulate CSS :hover). The code is…

Commenting on Bubbles has been removed. Why? If you want to talk about this post, write to the author, use the comments on their blog if it has them, or reply with a "RE:" post on your own blog. Suggestions? feedback@bubbles.town