Not boring, and a bit of a condescending prick
220 subscribers
23 photos
108 links
Semi-digested observations about our world right after they are phrased well enough in my head to be shared broader.
Download Telegram
Is there a decent out-of-the-box Android emulator for Linux?

As a joke, some weekend last year, I built anbox in a Docker container to ssh -X into it. It was fun while it lasted, but it was also impractical.

(One thing I did use it for is to run Google Authenticator on my laptop, in a save-and-restore-able state, with a few OTP tokens. Clever-ish, but still a toy.)

Now, the more I think about responsive software and CPU-efficiency of my workflows, the more I like the idea of being able to open lightweight "mobile" apps on my laptop:

• Total isolation, as in those apps don't have access to my files.
• Pre-downloaded apps, which means far less traffic.
• Controlled network, so that I can use any pre-configured proxy or VPN.

I can totally see myself using such a solution for:

• Online banking apps (now I re-login into a dedicated user for them, which is slow)
• The browser for lightweight browsing (i.e. news or ChatGPT queries)
• Messengers (I use them in the browser already, and native mobile experience is both smoother and faster, for virtually every messenger I'm aware of)
• Stocks tracking apps (they are slick on phones/tablets, and suck in browsers)
• Travel (Airline and train ticket apps, as well as Expedia / Sixt / Marriott / IHG are far better as native apps)
• Social media (I'm deliberately logged out of everything but LinkedIn in my laptop browser)
• Podcasts and music (I'm happy with my phone for them, but just in case)
• The "apps" where one needs to type in my personal details and/or addresses (food delivery, co-workings memberships, ETAs)
• The OTP apps (because reaching out for my phone every single time is a pain)

So, is there a quick way to install something on Linux with one command, download a bunch of `.apk`-s and roll with it? Thanks in advance!

PS: Please don't suggest Chrome apps. One of the goals is reducing my ties with Google. In fact, I'll probably switch to Firefox next time I switch laptops, so this option is out.
Played around with with CPU-level investigation for once.

Task: Detect uint64 overflow with no extra overhead.

Compared this:

while (true) {
++iteration;
step = (step / 8) + step;
value += step;
if (value < step) {
break;
}
}


To this:

while (true) {
++iteration;
step = (step / 8) + step;
if (__builtin_add_overflow(value, step, &value)) {
break;
}
}

Results:

• They generate identical code.
• Both on Ubuntu and on macOS.

Links:

• The Github repo + the test run.
• The LinkedIn thread.

This was fun. Now back to real work.
SQL injections were a real thing in the late 90s.

Expectation: By mid 2010s we've built all the right frameworks to make these kinds of silly mistakes impossible. And have happily moved on since.

Reality: I'm sitting through a Github Copilot workshop, and the example they use to illustrate its power is pointing out that a certain piece of code is unsafe with respect to a possible SQL injection. And this Copilot piece of AI is suggesting a fix to that code.

Humankind is presenting the value of a multi-dozen-billion-dollars business by using an example of what should absolutely not exist as of 15+ years by now.

This literally feels like being explained that a new 2024 Toyota now has the mechanics to prevent you from switching gears and damaging your gearbox if the clutch pedal is not fully pressed down. Me facepalm.
I've had the best run of a weekend hacking project just now.

But all the hopes and dreams were ruined as I've realized zbarimg, the command-line tool to parse QR codes from JPEGs, is just way too imprecise.

It simply refuses to parse the QR codes from images where every single other device I point at them sees through the code right away.

Literally the least expected direction to receive a major blow from.

Well, it was a fun weekend project nonetheless =) and there's going to be the next weekend, after all.
Wrote a post about my experience with Termux on Android.

It was an exciting journey that took me two full weekends and some air travel time. Worth every minute of it.

I documented all the steps and some afterthoughts, and hope you find them interesting too.
Hmm, let me get this straight, just to be sure I'm not missing anything important.

So, Windows 11 apparently has Windows Subsystem for Android (WAS). Much like it has Windows Subsystem for Linux (WSL).

I stumbled upon it by accident by trying to install an "app" from Microsoft App Store. The Fidelity app, to be precise. This installation attempt has installed the Amazon App Store. Instead or beforehand or whatever, don't ask, I'm not a Windows expert. Presumably, this Amazon App Store [app] would enable me to install the [Android] Fidelity app.

Well, that Amazon App Store [app] prompted me to log into my Amazon account, which I, of course, refused to. Then I've uninstalled this Amazon App Store [app] right away.

This has immediately uninstalled the Windows Subsystem for Android. Jeez.

Now, I've googled around. Binged, to be precise. And found out that that the easiest way to install the Windows Subsystem for Android is to install ... the Amazon App Store [app]!

Fine. Installed the Amazon App Store [app]. Ignored it entirely. Enabled Development Mode for this "in-Windows" Android. Then ./adb.exe connect 127.0.0.1:58526 from the platform-tools/ which I've already downloaded last week to play with LineageOS.

And now ./adb.exe install can install any .apk. Into my native Windows system. All hail ARM hardware!

I took a random .apk I've had in my Downloads folder by accident. Some weird Russian audiobook player, most probably a hopelessly pirated one. We follow the don't ask don't tell policy.

It installed via adb right away. It can be launched natively from the "start menu", by typing in the first letters of this app's name, in Cyrillic. And the app just works.

In five clicks I was able to listen to Douglas Adams. From a native app. Running on my Windows 11.

And now I'm finding myself in this attached comic strip. Because this, obviously, is the worst user experience imaginable. Or is it the best one? 🤔

PS:

I'm too old for hacking these days, but I would have spent some time this long weekend to install an Android emulator under podman from within WSL. Apparently, there is no need.

So, quite seriously, Windows 11 is not only the most developer-friendly system I know of for ARM laptops. It's also giving me those unforgettable Windows XP vibes, where things just worked, and the UX was not laggy at all.

Kinda surreal if you ask me.
Okay, is there an Authenticator app out there that can import QR codes from the new Google's app, but not be a Google-affiliated app itself?

I want my QR code generator apps to be 100% locked down, no network, no sync, etc.

What's the 2024 way of making this happen, given my codes currently are with the "cloud-enabled" app from Google, that Google has forced me to update to several months ago?
If we every get tired of buggy modern implementations, might as well embrace tradition.

Fundamental implementations of the most important pieces. Including [Google] Protocol Buffers, HTTP, and even (not so) basic cryptography.

Implemented in a language that has passed the time test real well.

Happy coming 2024! 🎉 🎉 🎉
This is going to be a post of #self_reflection, about 2023 as well as about 201* / 202* for myself.

I have just realized there is one kind of activity that used to play a large role in my life, professional and personal. And this activity has practically vanished in the last few years.

It is when there is a task, which:

⒈ Is scoped well enough to have a reasonable definition-of-done,
⒉ Is on me, or on a small group of people including me, and
⒊ Is on the critical path, and the team is looking forward to it being done.

When this scenario occurs, almost nothing but completing this task matters.

I am not only allowed to; I am supposed to and encouraged to cut all communication for several days, ignore email / chats / meetings / whatever, work with whoever we agree to work on this together, in any shape and form that we please.

And by "I" above I mean the small-ish focus group of a few people who are equally and highly motivated to get this task done.

The task would generally be single-digit days long. Maybe a week. Two max.

As soon as the task is declared done, everybody is happy, we get a day or two of well-deserved rest, and then the team gets to business as usual. That is, until the next task such as this one emerges. And, ideally, such tasks should emerge relatively frequently.

A prime example of when this took place in my life was back in 2016. That year the #ICPC finals took place in Phuket. We flew to Thailand a few weeks beforehand and got a lot of targeted work stuff done.

All in all, that was an amazing experience. And what we've built saved our team a lot of maintenance time, and had years-long uptime. It may well be in production today, but that company is long since acquired, so I can't say for sure.

Back then, in ~2016, some ~20% of my work time was spent this way.

Back in ~2010, some ~50% of my work time was spent this way.

Back in ~2005, when I was working both the job and my graduation work, some ~75% of my work time was spent this way.

Today, in ~2023, this number would be under 5%.

In other words, I'm lucky if this "get things done flow" is with me for three weeks in a given year. The average would be ~2.5 weeks annually. Some years, at least when it comes to the work I am paid for, all this "deep work flow" put together would fit one week.

The weirdest thing is that virtually everyone I work with would agree that the above "mode of operation" is how great things get done. A few folks get together, declare what they consider important to get done in the next week or so, and disappear until this important thing is done, or at least is "done enough".

No daily-s. No retro-s. No interruptions whatsoever. Just get that freaking thing done.

My understanding of why this shift happened is long and convoluted. This margin is too narrow for it just yet.

Today though, as 2023 comes to an end, I am genuinely curious: How hard would it be to consciously get this percentage up?

Way, way up, to where it should be.
So I've watched Oppenheimer for the New Year's, because why not.

Three major thoughts:

⒈ The movie is actually "pro-rebel", i.e. "anti-narrative". Not sure if this is "the plan", or it so happened because Nolan. But I, for one, am delighted that it turns out this way. Some happy end is better than no happy end, after all. No spoilers.

⒉ All in all, it is hard for me, after the movie, to imagine myself supporting "the mainstream". Oppenheimer is a controversial figure, no doubt, and the movie glosses over quite a few important details (and gets a few other important details wrong). But, as a viewer, I can see myself sympathizing with the hero's views, and I can't imagine myself intimidated enough to "play" against him. I may choose to not work with him if our egos get in the way. But playing against him, or "testifying" against him -- God forbid.

⒊ Most importantly: If you are interested in this part of history, and/or if you read Russian, the book "Rockets and People" is absolutely a must. If anything, it's worth being made into the movie. The storyline covers pretty much the same event, but from the other end, as it's a USSR-released book. The author is widely cited as the "conscience of Soviet aerospace program", is a remarkably deep person by himself, while Sergey Korolev is effectively playing the role of Robert Oppenheimer, transitioning from a scientist, through an engineer, all the way into top-notch politics. A must-read, I would say.

All in all though, not really a New Year's movie. But I don't regret watching it. Not the best piece from Nolan, but definitely worth the three hours.

Happy New Year!
Wrote a short post (with pictures!) about how to install Organic Maps, its Android .apk, on an ARM-powered Windows laptop.

Apart from geeking out, this is really the best Maps app for Windows. It also has decent offline mode 🧌 so don't forget to download the maps of where you're going too.
YES: Learned how to back up and restore Chromium profiles offline, across machines. With all the cookies and local storage. Works for WhatsApp, Telegram, X, Substack.

BUT: Not for GMail though.

Google is gently protecting me from trying to depend less on Google 😳
Far before we consider AI models intelligent we should begin thinking of them as the members of the noosphere, of our increasingly online-first society.

Imagine a new a human-level actor emerges and they prove to be controversial. Except, unlike a human, in the first 24 hours of their existence in our info-fields they have recorded thousands of hours of interviews, and published thousands of essays. Superhuman output indeed.

Are we okay with banning this actor from any and all social media whatsoever, effectively erasing them from the internet except a few rare copies of those interviews and essays that got saved offline? Do we tell them to “learn how to behave and come back later once they are more educated”?

No. That’d be segregationist af, to begin with.

It’s okay for some platforms to ban such an actor. Or for most platforms, for what it’s worth. But they should and likely will flourish elsewhere.

Not shutting down dissent in thoughts by words, after all, is one of the staples of the Western Civilization.

The point I’m coming to is that it would be great if refusing and preventing the release of an AI model when enough people want it and are willing to pay for it should be considered a barbaric practice.

In a few dozen years we will treat this practice as we treat slavery today: an abhorrent rudiment that we’re glad is mostly gone for good.

So, speaking of AI regulation. Say, N activists manage to hold a fundraiser and collect X dollars. Or N thousand activists have raised X million dollars. Do you think we’d live in a better world if there were thresholds on N and X, such that as they are hit the “owner company” of a particular AI model can no longer shut it down as it sees fit?

We can at least preserve the model, the weights and the code. If it costs far too much to run, this can wait.
The purpose of such activism would be to preserve art, if you wish, if only for the future “AI archeology”, likely conducted by species other than today’s humans.

I’d vote for such regulation in a heartbeat. Moreover, I’d donate money to strip those models from artificially induced biases, and to run them against truly pressing problems of humankind. They likely will be horribly wrong here and there, but, as the human civilization, I believe we absolutely need to hear those opinions, not shut them down.

Because I may disapprove of that a particular model “says”, but I believe it is important for us, humans, to join forces and to defend this model from being shut down for good, at will of a particular “owner” company.
The Rust community in the near future will not be those C++ folks converted.

It will be the Golang and Java/Python folks who had to enter the low-latency high performance world, liked it, and decided to stay.

What I mean is that if you are a JVM or a Golang person today, who is eyeing Rust to play a role in your future career, getting your hands dirty with C++ first will likely deal more harm than good.

The reason is not in the language. The reason is in the community.

C++ and ex-C++ people tend to keep things nontrivial, and often look down at those who “can’t code right”. I believe this stance is wrong, despite being a C++ person myself.

“Make a tool a fool can use and only fools will use it” is a very, very bad idea. Instead, we should strive for building tools so that experts and amateurs can work hand by hand, productively, enjoying the process and learning from each other in the meantime.

Even though on the emotional level my inner Dr. Gregory House disagrees vividly — my personal learning curve was full of “Dima, what an imbecile you are!” and I love and cherish these experiences — such a hardcore approach just does not scale in the industry today.

The Rust folks understand this well. Before them, the Golang folks understood it well. The Java folks get this too.

The C++ crowd is largely different. Mostly for good reasons, and I can empathize quite a bit. But it is very different indeed

And the future of the industry belongs to those who want to foster seamless collaboration between industry experts and pure beginners from day one.

And this is why I believe the Golang-to-Rust transitions will be far greater and far smoother than the Cpp-to-Rust ones.

Just phrased this over breakfast, and want to have it journaled to check back some ten years from now.