Web Excursions 2021-12-30
Why Aren't the Most Useful Mac Apps on the App Store?
it’s Tuesday night and I’m Command Tab-ing my way through 10 different apps, some with 3-4 windows
I feel my brain pulsing and my ring finger going numb on the Tab key.
That’s how the idea of rcmd began.
We have two Command keys on a Mac keyboard, and the right hand side one is almost never used.
What if I use it exclusively for switching apps?
I remembered using Contexts for a while, which provides a Spotlight like search bar for fuzzy searching your running apps.
But that needed a bit more key presses than I wanted (that is 1) and more attention than I wanted to give (which is none).
My idea sounded a bit simpler: Right Command + the first letter of the app name
Just for this simple app we had to solve the following problems:
What do I do when there are multiple running apps with the same first letter?
How do I persist key assignments if necessary?
What if the user assigned the key to an app that’s no longer running?
There are dozens of running apps while only about 10% of them are actual apps launched by the user. How do I filter those out?
How do I only listen to the Right Command key?
The sandbox also limits what APIs you can use, and which system components you can communicate with.
The defacto way of reacting to Right Command + some other key is to monitor all key events (yes, just like a keylogger), and discard events that don’t contain the Right Command modifier flag.
that’s not allowed on the App Store.
because with those permissions, an app would be able to do all kinds of nasty stuff
But for rcmd’s use case, we’re restricted to APIs that don’t require these permissions.
That’s the Carbon API
only lets us listen to Any Command + R, not specifically the Right Command.
A workaround I found for this was: - Listen for flagsChanged - Set a global boolean to true when the there’s a rightCommand modifier - Discard the event if the boolean is false
Now the weirdest limitation hits me.
There’s no way to discard a hotkey event and forward it back to the system so it can use it for the next handler.
At this point we seriously considered dropping the App Store idea and just going the self publishing route.
But just thinking what we would have to do for that triggered something akin to PTSD.
Implement the Paddle SDK for licensing
Add Sentry for error reporting
Lose the useful App Store analytics
Lose ratings and reviews
Add Sparkle for auto-updating
Host the app bundle for download somewhere
Finding yet another workaround seemed much easier.
It turns out that RegisterEventHotKey is plenty fast.
So fast that we were able to register the hotkeys only when Right Command was being held,
and unregister them when the key was released.
Because of the sandbox, there’s no way to get a list of windows for an app and, say, focus a specific one, or cycle between them.
But I found a little gem while I was customising my fork of yabai, a way to trigger Exposé for a single app:
CoreDockSendNotification("com.apple.expose.front.awake" as CFString)
rcmd is one of those things: a bit quirky, unique in its approach, and incredibly useful for a specific group of people.
Free trials for non-subscription apps have been allowed since mid-2018 on the App Store, and are supposed to be implemented using in-app purchases.
Unfortunately, this approach has a lot of inconveniences
The trial doesn’t start immediately
You have to create your own UI for starting a trial, buying the full app after the trial ends, showing the trial status etc.
You have to provide some kind of limited functionality if the trial ends
we decided to not implement any free trial and just sell the app for a one-time fair price.
3 years ago, I would have probably chosen to make the app open source and give it away for free
I would have thought: I’m making a ton of money at this company, what I would get by selling a small app would be peanuts anyway.
Only recently I realised that this approach kept me dependent on having a job where I click-clack useless programs 8 hours a day, only to get 1-2 hours after work for my projects, and sacrifice my health and sanity in the process.
In my whole 7-year career as a professional API Glue Technician and experienced Wheel Reinventer, I never did anything remotely as useful as even the simplest app I can code and publish in 2 months right now.
At those companies, most of my work was scraped anyway when the redesign period of the year came.
So I’d rather have those peanuts please.
Here are some of the apps I find most useful, and what I think is the main reason for them not being in the App Store:
Alfred - Full Disk Access - Accessibility Permissions
BetterTouchTool - Accessibility Permissions.
Karabiner-Elements
Reacting to and changing keyboard input in realtime needs a special keyboard driver which is only allowed by Apple on a case by case basis.
You have to request DriverKit entitlements from Apple, and they have to deem you worthy of those entitlements.
Sublime Text - Full Disk Access
Of course, there are other code editors on the App Store like BBEdit but they have this initial phase where you have to manually give them access to your / (root) directory.
Swish
Resizing windows, listening for global trackpad gestures, detecting titlebars, moving windows to other spaces/screens.
All of these need Accessibility Permissions.
Sip - the sandbox limitation is the primary reason
CleanShot X
Audio recording (this needs installing an audio loopback device)
Pressed keys overlay (needs Input Monitoring permissions)
Select single window (needs Accessibility Permissions for getting the window position and size)
Sketch - the unique pricing model is something they would have a hard time implementing on the App Store.
Parallels Desktop
They actually have an App Store edition, but it’s severely limited.
Sharing things between the host and the VM is probably the largest functionality affected by the sandbox.
Lunar
Low-level communication with monitors is only possible by using a lot of private and reverse engineered APIs (IOKit, DisplayServices, IOAVService etc.)
Accessibility Permissions are also needed for listening and reacting to brightness and volume key events.
Soulver - I think the free trial limitation is the only thing keeping such a self-contained app outside the App Store.
The Peanut Butter Secret: A Lavish Tax Dodge for the Ultrawealthy
Today Mr. Baszucki’s company, Roblox, the maker of one of the world’s most popular video-gaming platforms, is valued at about $60 billion.
Mr. Baszucki is worth an estimated $7 billion.
Yet he and his extended family are reaping big benefits from a tax break aimed at small businesses.
The tax break is known as the Qualified Small Business Stock, or Q.S.B.S., exemption.
It allows early investors in companies in many industries to avoid taxes on at least $10 million in profits.
The goal, when it was established in the early 1990s, was to coax people to put money into small companies.
But over the next three decades, it would be contorted into the latest tax dodge in Silicon Valley, where new billionaires seem to sprout each week.
Thanks to the ingenuity of the tax-avoidance industry, investors in hot tech companies are exponentially enlarging the tax break.
The trick is to give shares in those companies to friends or relatives.
Even though these recipients didn’t put their money into the companies, they nonetheless inherit the tax break, and a further $10 million or more in profits becomes tax-free.
The savings for the richest American families — who would otherwise face a 23.8 percent capital gains tax — can quickly swell into the tens of millions.
The maneuver, which is legal, is known as “stacking,” because the tax breaks are piled on top of one another.
The idea for this tax break came from the venture capital and biotech industries in the early 1990s.
Venture capital firms were raking in huge profits from early investments in high-flying start-ups like Gilead Sciences and MedImmune.
The exemption became law in August 1993.
It allowed investors in eligible companies to avoid half the taxes on up to $10 million in capital gains
(it would later be changed to eliminate all taxes on the $10 million)
or 10 times what the investors paid for their shares.
There were a few restrictions.
To be eligible for the tax break, investors had to hold the shares for at least five years.
Industries like architecture and accounting were excluded.
And, at least in theory, the companies couldn’t be big: They had to have “gross assets” of $50 million or less at the time of the investments.
That number wasn’t picked at random. At the time, a new professional hockey team, the Mighty Ducks of Anaheim, had just been created with a price tag of $50 million.
The team was owned by the Walt Disney Company. Lawmakers feared that if Disney stood to benefit from the tax break, it risked a public backlash
Tax experts had discovered a big loophole.
While the law said that the benefit was off-limits to people who bought shares from other investors, there was no similar restriction on people who received the shares as gifts.
If investors gave shares to family or friends, they, too, could be eligible for the tax break.
And there were no limits on the number of gifts they could make.
Stacking was born — and it became a rite of passage for a select slice of Silicon Valley multimillionaires, according to lawyers, accountants and investors.
As the tax break’s popularity has grown, the strategies for exploiting it have grown more aggressive.
The benefit is limited to either $10 million in tax-free capital gains or 10 times the “basis” of the original investment.
The tax basis is the cost of an investment — the money you spent or the assets you contributed in exchange for shares.
One way to expand the value of the tax break is to find ways to inflate the basis.
The strategy is called “packing.”
But let’s say you want to save more. Here’s how you can pump up the basis.
Little Company developed software patents, and you put those patents into a new company that you also own.
The patents grow to be worth $5 million.
Then you merge the two companies. The basis for your investment in the original Little Company has now soared to $6 million.
That means you are eligible to avoid taxes on 10 times that — $60 million — even though your out-of-pocket investment remains $1 million.
Another increasingly common strategy has been to put shares into multiple trusts that benefit the same children.
All China’s Gamers Want for Christmas Is an AAA Game to Call Their Own
Within China, players like to joke that AAA titles are defined as those that take “a lot of time, a lot of resources, and a lot of money” to make.
These qualities are not typically counted among the Chinese gaming industry’s strengths,
which is one reason miHoYo’s announcement attracted such attention domestically.
they have traditionally not been willing to invest the time and money needed to create original AAA titles.
domestic PC games remain heavily indebted to JRPG conventions,
with critics expressing frustration at their emphasis on story over gameplay.
Hunger for a domestically produced AAA game has increased as Chinese players are exposed to European and American titles, and especially since the popular gaming platform Steam became accessible in China in 2018.
The experience of the Chinese film industry is a useful reference here.
When Hollywood films were first screened widely in Chinese theatres in the early 21st century,
domestic filmmakers struggled to match the high production values of their Hollywood competitors.
this increased competition and pressure was not a death knell for the local film industry,
as producers eventually cracked the code,
melding Hollywood styles and tropes with Chinese stories to great success
Obviously, Chinese gamers hope that the country’s game makers can replicate the success of their film industry peers, but the comparison overlooks key differences between the two industries.
In particular, the ascension of China’s film industry over the past decade has coincided with the country’s rise to the top of the global box office rankings.
By comparison, China’s single-player PC and console game markets, which are key to the success of any AAA game, remain miniscule.
The disparity between gamers’ expectations and the overall state of the market can be seen from the overinflated hype that surrounds every new major Chinese console game release.
To put that in context, arguably the most successful Chinese AAA-style game to date is 2018’s “Sword of Legends 3,” which has sold 2 million copies,
many of them discounted from the game’s already low 99-yuan ($15) original price point.
Outside of the AAA space, some Chinese console and PC-game developers have had success selling to overseas gamers.
Yet, even if this overseas strategy does prove viable, it’s unlikely to satisfy Chinese gamers who are hungry for a true Chinese AAA title.
In the absence of strong domestic demand, the most successful Chinese PC and console games generally skirt around overly “Chinese” subject material and themes to avoid alienating international gamers.
For local players still harboring dreams of seeing AAA techniques used to tell a truly Chinese story, these successes can feel disappointing.