making the roaming future

Building like it's 1984: A comprehensive guide to creating intuitive context menus

Oh man, we’re in a desparate need of such instances of attention to detail.

Noticed some forks popping up of my Valetudo Homebridge plugin, since it’s become pretty out of date due to REST API changes in Valetudo and lack of time on my part. I released a new beta yesterday that actually works now. Sorry and thanks for the nudge.

I finally got to implementing app state restoration in Headlines. Hoo boy, there’s so little comprehensive info on how to implement it when app’s whole UI structure is implemented in code, especially when it involves UISplitViewControllers. But in the end, it’s magical when it works!

I find it a little bit sad that people working their asses off to make an app sold for $3 feel the need to take part in the Black Friday sale. The prices especially on the iOS market are already heavily discounted.

RIP Steam Controller. The best thing to happen to couch PC gaming outside of Steam Link.

Nice job, Apple and NVIDIA -- two of my favorite companies -- of making all of us lose, by being dicks to each other. But of them two it’s surely Apple that loses more by effectively limiting the eGPU hardware to one vendor.

Kind of hoping that it’s just NV forcing Apple’s hand for both to finally kiss and make up. Apple doesn’t even need to source NV GPUs for their computers, having been burned (haha) before — AMDs latest GPUs are completely fine. But having an option again to run CUDA on macOS would sure be nice.

Advertising is a cancer on society

It’s a good one

Enabling HomeKit compatibility on a rooted Xiaomi Roborock S50

I recently bought a Xiaomi Roborock S50 vacuum cleaner. On the surface, it sounds like a great product -- pretty affordable, makes for a good looking home appliance, and most importantly, good at taking over a mundane activity that should’ve been automated a long time ago.

On the software side, there is a pretty usable app that allows you to make the most of the device, like checking its current status, customizing some settings, such as cleaning speed, schedule, and several modes of cleanup - general one, spot cleaning, and with the use of the indoor navigation enabled by a laser sensor, zone cleanup, or setting up virtual barriers and no-go zones.

The app also enables you to control the vacuum when you’re away from your home Wi-Fi. It does that by taking advantage of the cloud, i.e. Xiaomi’s computers located in China.

That last thing creeped me out most about this product, and before making a purchase I made sure there’s a way to do something about that. Turns out, there is!

Rooting a vacuum cleaner is so 2019

The software is called Valetudo, and it is essentially a webserver that’s running on the vacuum locally, faking Xiaomi’s backend services. It is not the main piece of the puzzle, though, as putting that webserver on the device was enabled by the amazing work of a group of people behind Dustcloud, which brings a set of methods of opening up the device to hacking.

Installing Valetudo is a pretty simple procedure, and in the end, instead of a piece of software with an origin in a country of questionable respect for people’s privacy, you get a mobile-friendly web client served by that device as well. There is an option to run some of the stack on a home server, but that sounds like too much of a maintenance burden.

HomeKit it

As an Apple and home automation nerd, making all things HomeKit-enabled is important to me. The robot even with its original software is not compatible, but there are several plugins for Homebridge that connect both worlds. The thing is, those plugins don’t control the robot directly, but through the Xiaomi cloud. Once we freed the vacuum from it, we need to find another way. Valetudo with its locally-running web server is exposing a simple HTTP API, so there is a way to control it programmatically, but as niche Homebridge is, a rooted vacuum is surely an even narrower niche, although I can see an overlap in audience there.

There were some requests posted to the authors of the aforementioned Homebridge plugins to add compatibility with Valetudo, but rooting a vacuum seems to be too new of a thing, so in the end there were no plugins for Valetudo-enabled devices. Now that I’m recently also a Node.JS developer (huh?) making backends in Javascript (get off my lawn), I made one.

Make it

The plugin is called homebridge-valetudo-xiaomi-vacuum, it’s available through npm, and the basics are pretty solid already. It exposes a few cleaning modes as buttons, provides the battery status, and some other conveniences. And I had heck of a fun time making it.

Find function call sites in Xcode

Recently I have been asked a few times, mostly by disgruntled ex-iOS Android developers, whether Xcode does anything more with the source code than just color-highlight it or allow to jump around the sources by using Jump to definition.

One of the things people seemed to miss the most is the ability to find places which call the focused function, known as, among others, “Find calls” in other IDEs.

It’s true that Xcode has always felt more like a text editor with a compiler than an IDE that provides a rich user interface on top of the source code, like Eclipse or IntelliJ’s tools, for example.

Good news is, it does indeed have some cool code structure aware features hidden in the plain sight. This approach goes in line with Apple’s philosophy of a clean design that doesn’t overwhelm the user with available options. In case of a programming environment though, which is a specialized tool in hands of a perceptive and analytical user for several hours a day, such features could be perhaps a little more obviously visible.

And so there is an extremely useful Related Items editor menu, by default available under a Ctrl-1 shortcut, that includes, among others, a Callers submenu. Yay!

Of course, its contents become available once Xcode manages to index and process app’s source.

Xcode Calls

Enjoy!

Tom Cruise promoting disabling motion smoothing in TVs is something I did not expect.

Loved the New Mac mini intro video, reminiscent of That One Scene from The Last Jedi, with a cool Blade Runner-like audio background.

Finally managed to build working PyTorch and fast.ai with GPU support on macOS, and now my puny GTX 1060 is ready for some courses, phew.

The new 13-inch MacBook Pros are starting to look truly compelling. The keyboards seem to be fixed, all four Thunderbolt ports are full-speed, include crazy fast SSD. I’m ready to return my Escape 2016 as it’s broken by design. Thanks EU.

Sorry for the slight RSS feed screwup. I made a mistake of defining post and feed IDs as URLs containing blog site’s protocol. Had to rip that bandaid off.

Scratch that. macOS deserves more from apps than a remote rendered iOS UI ported to desktop.

Yay, Headlines for macOS coming probably “late 2019”. I did dabble in AppKit, but was too lazy to code the app’s UI. ;)

Your stuff on The Web in 2018

We want an open web? It needs to be a lot less nerdy. Read more…

If you happen to have issues resolving VPN-origin domains on a local network where your DNS server is a Tomato-powered router, make sure you have the “Prevent DNS-rebind attacks” option disabled.

MacBook Pro Escape 2016 first impressions

I didn't choose the dongle life. The dongle life chose me. Read more…

Tests are about design

Recommended post by Karl Seguin. I have come to the same realization pretty late in my development career, but at least early in the “tests are actually useful” phase. Before that I mostly relied on compiler’s work and somehow ignored the need to check the logic beyond syntactic correctness.

Oct 27 Special Apple Event made one more developer angry

And it's not about the full-on USB Type-C transition. It's watering down the Pro moniker. Read more…

Blogging workflow update

Loving the element that was missing in my blogging workflow — ability to post from my phone and have it published to the site automatically while keeping the static nature of content.

Thanks to Dropbox, DO Note and recently added features needed to blogger, which can now listen to post source directory changes, I finally connected the building blocks.

A* - A Truly Iterative Development Process

Nice post by Jason Gorman. It’s obvious, really, to focus on project’s goal. Tasks and features are secondary.

Surprised how much lint accumulated in my phone’s Lightning port. After some toothpick action the satisfying “click” is back!

Can we save the open web?

We need to. Our privacy is slipping away from under our fingers. And for what? Often times, to receive something “free” in exchange.

Keychain improvements in iOS 9

Recently the keychain on iOS has gained new capabilities in terms of security and privacy, especially around Touch ID. Let's explore some of those. Read more…

Headlines 1.4 released

I'm happy to announce that after months of tweaks, real-world testing and foot-dragging, version 1.4 of Headlines is finally up on the App Store. Thanks to a coworker and a friend of mine that happens to be an awesome UX and UI designer as well, I'm extremely happy with app's updated look. Read more…

It’s great how Swift’s flexibility and lightness allowed me to return to heavily protocol-oriented programming. I dropped that idea a few years ago when doing Objective-C projects as it was too cumbersome there. Cocoa APIs still need some protocol-aware treatment though.

Have been digging into web development lately for a side project, and boy did things change since early jQuery days!

Alphabet. Buy n Large of tech world.

Varieties of news readers

Brent Simmons puts news readers in three categories: Newspapers, mailbox-type, rivers. Read more…

You have to take pleasure in the little things. 😎

Chris Lattner retweeted

Application Transport Security override

iOS 9 will default to a new connection security mechanism called App Transport Security that essentially forces apps to transfer data from their backend services using secure HTTP connection practices, like TLS 1.2 for instance. Read more…

@macbirdie: Such a lost opportunity. Swift 2 has repeat-while, instead of repeat-until. 😢

Blogging easier

As the setup of my blog requires creating a markdown file that follows a special template, I kept finding excuses to not write anything, because I had to perform a few awkward steps:

It felt dirty and unelegant, so I implemented an option in blogger that prints out a specific template, be it a post or a snippet, which includes a header filled with time set to 15 minutes in the future, an example title and chosen author. My obsession for clean technical solutions to first-world problems is satisfied and blogging is fun again!

Passwords

What if we kept one master password and let our device generate an account- or site-specific passwords needed on-demand? It's definitely not a new idea, though I'm not entirely sure why not a very popular one. Perhaps there's a gap between the notebook/post-it and password database approaches I'm not aware of? Read more…

Welcome to 2015! After Headlines 1.1, 1.2 happened in December. And now, 1.3 is waiting for review with some great improvements. More details coming in a few days.

And here it is! Headlines 1.1 should become available during the next 24 hours.

Wow, the Apple review process seems to have crazily slowed down due to massive upgrade rush to iOS 8 and the new phones. More than 10 days after submitting, 1.1 was still stuck in “Waiting for review” status. Luckily (!) I found a crashing bug in the app, so I requested an expedited review and just got an email that the request has been accepted.

Decentralized

Posts by Manton Reece and Noah Read, as well as a recent Core Intuition episode 155 inspired me, among other things, to add snippets on my blog. Though it's a lot easier to switch to a Twitter app and simply tap away, Twitter owns whatever you write to the level of controlling the way it's allowed to be shared outside of the ecosystem. I.e. it's a platform that's open to content being added to it. Read more…

As a tangent to Pragmatic episode 38, I wonder if and when Apple will move to USB Type-C in Macs. For sure for a lot of people it will be either too late, or too soon.

Story timelines

Facebook's timeline algorithm has received a lot of heat in the last few months after it was revealed that the timeline was essentially a part of an experiment and users following the default "Top stories" timeline were the test subjects. Read more…

Contractually-obligated testing

I usually set up assertions in methods in order to guard correctness of incoming parameters, outgoing results and invariants, but this technique looks very interesting. Here the contract can be set up in one place and modified without changing the methods’ implementation.

Headlines app

So I made it to 1.0 and it was not easy. Read more…

Technical debt 101

Nice article summarising what technical debt actually is.

Compiler Writers Gone Wild: ARC Madness

ARC is magic, but sometimes, as with all magic, if one is not careful, it might become dangerous.

Hello world

So, you surely know about the whole shoemaker and his wife’s shoes thing. This has been a long time coming, but I finally got around to making a static site generator, like all the cool kids do these days.

I hope I will be able to find time and will to make good use of it.

func hello() -> String {
  return "Hello"
}

Hold on, that’s not Go. Looks like Apple cooked up something equally interesting. Good times!