4 ms·
A bit depressing in some ways. This is a pattern I've seen repeatedly, especially in the last 10 years or so - people want to do something innovative but shoot
by mike_hearn 4y ago
A bit depressing in some ways. This is a pattern I've seen repeatedly, especially in the last 10 years or so - people want to do something innovative but shoot themselves in the foot up front by insisting it has to be in the browser. Then they discover that browsers are incredibly hostile environments for doing innovation projects, and instead of concluding the obvious (we should do it with a desktop app) they either ship something far worse than their original vision, or decide it can't be done at all.
This one gives off especially Stockholm Syndrome-y vibes:
> You need the physical dimensions of your screen, which can’t be queried even in modern web browsers ... That’s precisely what we needed, but MediaPipe Iris isn’t exposed to JavaScript ... Despite our failure to ship this to a massive audience, we still think it’s important to take a step back and marvel at what’s currently possible in modern web browsers ... It’s hard not to be excited about the future of the web right now.
Seriously? Their project failed to replicate a demo from 2007 partly because browsers don't expose the APIs they needed or even basic data you could get easily from Windows 95, yet modern web browsers are a "marvel" and "it's hard not to be excited about the future of the web right now"? How is that exciting? How is any of this a marvel? It seems the opposite of exciting to me; it shows that browsers still, after 30 years of continuous development, cannot be used to push technical boundaries.
The sad thing is their project didn't have to fail. They could easily have shipped Lee's demo on Shopify sites by writing a small native app for Windows and Mac, then making it download if the user clicks "View stereoscopically". The app would have access to the screen geometry and additionally detailed data from the camera driver, which could then be used to look up the necessary data from a Shopify API where they have pre-calculated the metrics for the most popular brands. On Windows the number of clicks required would be identical to in a web browser, because whilst the user would have to click the download in their tray to start the 3D view, as a web app they'd have to click a permission button to grant webcam access anyway so it amounts to a very similar UX. (On macOS Chrome it'd take one further click, on macOS Safari it will extract a .app inside a zip for you, so the number of clicks is equivalent to Windows).
It's because of repeated frustrating experiences like this with teammates in my own prior research projects that I eventually took the time to write Hydraulic Conveyor, because part of the reason devs are so reluctant to go outside the browser is that the distribution DX is traditionally quite terrible. Conveyor makes massive improvements there. The goal is to have a DX similar to shipping a (static!) website and it gets very close to that indeed.
Still, even now that distribution is fixed there are other reasons why research teams dig themselves into web-shaped holes like this. Not all of them can be fixed with software:
1. Experience. According to the StackOverflow survey, half of all developers have been devs for less than 10 years. We can safely assume that only a tiny minority of them have ever written a native app for Windows or macOS. Also about 50% of devs "dread" working with C++, rising to 60% for C and a whopping 75% for Objective-C, so that's not really conducive to working with the Windows or Mac APIs (Swift and C# do better).
2. Disinterest in learning. Probably due to "resumé driven development"; we devs always have one eye on the next job and what skills will be attractive to future employers. This can cause appropriate tech to get stuck in a catch-22/local minima where people don't want to learn it because other employers aren't using it, so people don't use it, so people don't want to learn it, etc. The strongest engineers will figure out what tech is most appropriate for a project and learn it if necessary even if that skill may be a one-off for that employer, but especially for people earlier in their careers they may prefer to aggressively chase what's popular to unlock job-hop pay rises.
3. The (inaccurate) perception that people don't download desktop apps. The proliferation of popular Electron versions of websites and general apathy towards PWAs is perhaps starting to correct this but it's still an issue I see sometimes.
4. Ideological loyalty. People like the idea of community/collectively developed open source tech, for all sorts of valid reasons, but this can easily turn into blindness. A complete failure to implement a 15 year old tech demo despite using vastly more advanced technology is objectively not "exciting" or "a marvel", it's actually quite embarrassing for our whole industry. But if you're emotionally committed to seeing technological progress through the lens of an ever larger HTML5 spec and nothing else, then it may seem somehow like this is still progress.
- diegomacario 4y agoHey mike, I'm the Diego, the person who wrote this blog post and implemented the majority of it. Reading this comment, I feel the need to challenge some of your assumptions. I don't expect to change your mind, but here's my take on this: - I have only been a developer for 7 years, and I don't have a degree in Software Engineering. I actually studied electrical engineering and upon graduating I landed my first job writing device drivers for graphics cards, which got me started writing software professionally. - I did that for 3 years, and after discovering a passion for computer graphics I worked at Autodesk for 3 years on a desktop application called 3ds Max. - After all those years working on that old and heavy desktop application I started seeing web-based applications like Figma as the right way to do things. Nothing beats the convenience of opening a link to launch an app, and of being able to launch an app on any device. That's why I joined Shopify's Spatial Commerce Team. - My favorite programming language is C++, and the demos you see in the blog post are written in C++. I developed them as desktop applications, and compiled them to WebAssembly using Emscripten. - I have never done "resume driven development." I studied computer graphics as a hobby for years because of a deep interest in it, and I was poorly paid all those years. Thanks for your time.
- mike_hearn 4y agoThank you for your reply and I apologise if you feel offended. I was trying to summarise many experiences I've had over the years in one place and for sure, it sounds like what I've seen before doesn't apply to you. To give a couple of examples, I've had someone tell me that they'd rather buy every dev who signs up for their platform (for free) a new iPhone, rather than write a desktop app to let them manage their API keys. I also worked on Bitcoin for a while and had to warn people that their users would lose large sums of money in avoidable ways if they implemented their idea as a web app, I was ignored because I was assured nobody downloads desktop apps anymore, and then people lost large sums of money in exactly the ways predicted. Note that Bitcoin itself was a Windows-only desktop app! This sort of thing is what I was thinking of. Still, I'd ask you to reconsider the conclusions of your project. Yes it would of course be convenient to have it all run as a web app, but the alternative you faced wasn't a tradeoff between something more convenient and something less, it was between something a bit less convenient (albeit same number of clicks in many cases) or, apparently, nothing at all. You clearly have the skills to try again with an alternative approach that runs outside the browser. It would be a cool feature, and even if in the end you conclude without being in-browser it's not convenient enough, it would be interesting to learn how users reacted in usability studies. I spend my time trying to make the desktop app UX as fast and smooth as possible, and if Shopify are up for the challenge then I'd be happy to work with you guys to try and build the most optimal UX possible for this project. Not every EXE is Autodesk! This kind of problem is exactly why I quit my job to make a new product for shipping desktop apps. Projects like this one don't have to wither on the vine.