changelog 003

I gaze into the mirror. In its reflection, I see only my own meaninglessness.

A random quote from my notes app. My notes app is full of random notes. Random notes and root passwords. Short sentences are fun.

My original idea was to write one of these posts roughly every two weeks. Well, these were some long two weeks. Once again I fell into this trap where I care too much and nothing's good enough.

Purpose / Week Three

Finding purpose in my work is something I've been always struggling with. Programming is such an over-powered ability. We can turn nothing into anything. Infinite possibilities. Do we build anything of a value though? More eshops to spend money in, ad tech to annoy people, bettting websites to lose all your money, crypto trading bots. God-damn crypto trading bots. Fuck crypto trading bots.

This was my third week at a new job. Having a job is kind of a new concept for me, being a freelance developer all my life. We build software for fighting "information threats" on the internet. Hoaxes, conspiracies, propaganda, toxic content, that type of thing.

So far it's been fun, cool people, interesting tech and most importantly a worthy purpose. It's nice to be a part of something with a positive impact for once.

Open-source remains a very important part of my life though. I made sure to set aside a few hours every week for my own creations. Speaking of the devil.

Clockwork 5

By the time you are reading this, Clockwork 5 is finally out. Wooo. As always, I wrote an introductory blog post for this release. This gives a good overview of the new features. With pictures. I don't read tech articles without pictures.

I'm pretty happy with this release. I do use Clockwork myself religiously on every single Laravel project I touch. So every new feature or improvement is immediately useful for me. One thing I'm not so happy about is the delay. I was originally on track for a late August or September release. This is a pretty late September. I suck, sorry.

While I'm ready to take a bit of a break from Clockwork, work slowly begins on 5.1. We already have this cool PR adding SQL highlighting and formatting by edgardmessias. And features that didn't make it into 5.0. And a bunch of new ideas already.

I will try to do more, faster minor releases this time. But you know how it goes.

Clockwork Share

One of the more interesting new features in Clockwork 5 is sharing. Thought it might be interesting to write a little behind the scenes story. About how this feature came to be.

Clockwork Share demonstration.

A few weeks ago I was working on some client-work, optimizing a bunch of endpoints on a Laravel app. Of course I used Clockwork to track down the performance issues. I was able to make some impressive improvements, like getting the search response time down from 8 seconds to about 300 miliseconds. I would take screenshots of Clockwork's performance tab to document the improvements and to flex on my colleagues a bit.

Taking and cropping the screenshots got annoying pretty fast. Wouldn't it be cool to have a button in Clockwork that would do all the work for me? That was the original idea.

There must be a browser api to do so, right? Well, the Screen Capture API kind of does. This api is really intended for capturing video though, not taking screenshots. You are limited to capture the whole screen or page. And the user has to give a permission to record the screen, which sounds scary. Clearly not the right solution.

Another option would be to render to a <canvas> element and save the content as an image. Html2canvas does just that. How does it work though? Reading the source you will find out it's actually a whole simple HTML renderer written in javascript. It's pretty unlikely this would accurately render the whole Clockwork UI. Also with 165K it's a pretty sizeable dependency for a feature that might not even be popular. No luck here.

At this point I've admitted defeat on the client-side. New plan. Let's build a web service that renders the Clockwork App and takes the screenshot using a headless Chrome instance. Obviously this is not something that can be part of the Clockwork library. This would need to be a separate service running on our own servers.

A server-side solution opens up a lot more possibilities. We can now receive Clockwork profiles and render a fully interactive Clockwork App with the data. Why not expose this funcionality to users? This is way more powerful than simply taking screenshots. You can save interesting profiles for later use, share them with a co-worker and interact with them the same way you always do.

This is how the feature pivoted from mere screenshot taking to a full-blown share service. And by the way, it's all open-source.

Fsck_hfs

It's Monday morning and I need to get a document off my external drive. Open up the Finder and.. the drive is nowhere to be found. Fuck mondays.

You know how macOS always complains about not disconnecting external drives safely? I guess it finally decided to punish me for my laziness.

There's a whole bunch of stuff on this drive, two important things in particular. Time machine backups, including all work I've done on my old Mac and all photos I took with my camera for the past 3 years.

Thankfully these issues can be usually easily fixed by running fsck_hfs. The cli tool for fixing broken HFS file systems. Except when they are not. I've run fsck_hfs with every combination of available arguments for hours. It did not work.

Enter the world of Mac disk recovery software. There are two things all these apps have in common. The website always look like a borderline scam designed in 2005. And the prices go into hundreds of dollars. After trying one of the apps for hours and having it crash for the most stupid reasons I gave up.

Back to the google. Let's try to find some open-source solutions, commercial apps suck anyway. Quickly I run into hfsexplorer. This is presented more as a cross-platform tool for accessing HFS drives, not necessary a data recovery software. I made the sacrifice and installed Java. Figured out it needs to be run under root. And.. it works! It works instantly. I was able to recover all my files at this point. Sent a small donation to the author as thanks.

Lessons learned:

Rescuing my photos.

Fvck_kvlt

My new-found favorite punk-rapper Fvck_kvlt recently released his sophomore album "Zabijem sa!" ("I'll kill myself!"). If there was a single album I looked forward to this year, this would be it. To say it matched my expectations would be an understatement.

As the title suggests, this might not be the happiest record. I like sad music. It has a weird therapeutical quality, hearing feelings you didn't even know you had put into words. Favorite tracks - Chlapec, Homecoming 1-3, Outro.

Speaking of Fvck_kvlt, my double-vinyl of "Kvlt Teachings" and "Karel Gott je mŕtvy keď hralo rádio" by Edúv Syn, arrived this week. I guess I'm collecting vinyl now.

Support your local artists. <3

Another artist I've been enjoying lately is RMR. I love the contrast between the music and the music video.

...

Got myself a Cam Link 4K, a cheap tripod and upgraded my video setup. Can recommend if you have a camera lying around.

Collecting dust, tripod edition.

Shout out to @k0rnel for bringing to my attention that this website had no https, oops.

Thanks for reading. You can also read the previous update. A link to the next update will be here, hopefully sooner than later.

—its