Live data from Hacker News

I shaved 187MB off United Airlines' 439MB iOS app

telkins.dev

441–450 of 452 posts

Re: I shaved 187MB off United Airlines' 439MB iOS app

#441
post #371

Earlier quoted context omitted.

I was thinking the same thing. What happened? I started programming on machines with 16K of memory or less. It was a point of pride for developers to make programs that did the most with less, like the whole demoscene movement. It's like the contest changed from who can make the leanest code to who can get away with packaging the most bloat in one app without causing the device to break. We went from shaving off indi…

What happened is that hardware got orders of magnitude more powerful, user expectations for performance stayed the same, and developers got lazy.

Developers have always been lazy. I think some of the best developers are the laziest developers, the ones who are motivated enough to find innovative ways to do less work.

When I was programming for DOS, if I wanted to write to the screen in color I had a few options. I could use Borland's conio.h, I could invoke INT 21h and rely on ANSI.SYS to render my color, I could use INT 10h to write a character at a time in the color I want, or I could write directly to screen memory. Writing directly was really the only way to get the performance I needed, but it added complexity, since I needed knowledge of the hardware I was running on (not all video adapters map character cells to segment B800h).

Today, for a similar "text mode" application, I can use ncurses, or I can write CSI codes directly to the terminal. I can write in C or Python or even Javascript. There are more moving parts, but it would be less work to dust off my old 386SX than it would be to get those moving parts out of the way.

No matter what, I'm always going to do the minimal amount of work I need to get the desired result. If someone comes up with a way to do less work and get better performance, that's the ticket to high speed.

Re: I shaved 187MB off United Airlines' 439MB iOS app

#442
post #441
post #371

Earlier quoted context omitted.

What happened is that hardware got orders of magnitude more powerful, user expectations for performance stayed the same, and developers got lazy.

Developers have always been lazy. I think some of the best developers are the laziest developers, the ones who are motivated enough to find innovative ways to do less work. When I was programming for DOS, if I wanted to write to the screen in color I had a few options. I could use Borland's conio.h, I could invoke INT 21h and rely on ANSI.SYS to render my color, I could use INT 10h to write a character at a time in t…

Its less about minimal amount of work and more about what you can get away with. You now tolerate less performant and lazier solutions because hardware is so much faster and you can now get away with it in front of your users. For example, microsoft excel feels no faster or more special or does anything more really than the version I was using in 1995 which was served on cd rom or even floppies, compared to a couple GB over the air download for an application that today still takes time to open up on modern hardware. MS gets away with this because users expect the same features as 30 years ago and also expect excel to remain as slow as it felt 30 years ago. You could be lazy back in the day, but you still had to ensure your program was small enough to actually ship on physical media, and could actually run on this hardware thats several orders of magnitude slower than what developers expect users to be running today. So you can definitely get away with being even more lazy, less optimized, less performant, and still have a job shipping 'functional' software today, than what the constraints were decades ago.

Re: I shaved 187MB off United Airlines' 439MB iOS app

#443
post #5

But even the stripped version is way way too much for an app like this. I can imagine it's layers upon layers of poor, bad and terrible architectural and organizational decisions.

This seems like a huge market opportunity for a service where you upload your "final" binary and some app goes through the thing and shows you all the stupid you are doing and how to fix it. This would have really pissed me off if I had to download it over my cell plan. I have one phone with minimum apps on it which I use for day-to-day, and then another with all the scummy bloated apps on it, but the data plan on th…

https://www.emergetools.com/

Re: I shaved 187MB off United Airlines' 439MB iOS app

#444

I once flew United and, like the author, didn't realise this until I was on the plane for a ten hour flight. Downloaded the app for Android. I opened it. I was immediately ip-blocked for having a rooted phone, which was then kicked off the network and couldn't get an IP address. United cabin crew then started trying to sell me an iPad loan for the duration. I read a book and vowed never to fly with them again.

Unrelated to their inflight entertainment, United pulled this stunt on me the other day. - Flight at 11AM, boarding at 10:20. - Show up at 10:25, boarding doors are closed. - "Didn't boarding start 5 minutes ago" - "Yeah we close the doors once 95% of people show up, sorry, you should show up when boarding starts" - "Yeah but didn't boarding start 5 minutes ago, how was I to know" - "You should have known, sorry"

I have trouble believing this is the entire story. You're saying you were at the gate thirty-five minutes before the scheduled departure time on the originally scheduled flight and were denied boarding? I could see this happening if there were a delay that was later truncated. In that case the airline does often expedite boarding to make up for the delay.

Re: I shaved 187MB off United Airlines' 439MB iOS app

#445
post #351

Earlier quoted context omitted.

React Native is one cause. Another is that they ship a tremendous amount of cross-platform c++ Office code, which is not small.

What I also find very annoying is that the Outlook app even embeds a whole browser (with GUI; is it Edge?). It makes me furious to be forced to use the embedded browser when opening links in emails instead of a preferred, already installed browser. I mean... what advantage has it to use an embedded browser? I lose my cookies/sessions, browser extensions, passwords, and the usability is worse than of my preferred brow…

What context are you seeing an embedded browser in?

Re: I shaved 187MB off United Airlines' 439MB iOS app

#446

Earlier quoted context omitted.

You don't need to introduce any problems. Splitting a package and deduplicating the downloads doesn't imply mixing versions.

Maybe there is a dep linking pattern I'm unfamiliar with then. Afaik static linking, or packaging dependencies along with the main binary and dynamic linking or depending on libraries present on the system (with or without the integrated feature of conditionally fetching those prior to install/execution of that main binary) are the two battle tested approaches to distribute apps. The first duplicates stuff, the secon…

You're thinking of a system that's too clever for its own good. Go dumber.

Start with a setup where you're packaging all dependencies with your binary, dynamically linked.

Then, instead of a single zip file, put each dependency in its own zip, or even each file in its own zip. But each release is still a full set of specific files. You never refer to a dependency by name or version. That's too clever and fragile.

If two releases of two separate programs happen to share the same exact file, then you only need to download it once.

Words like "compatible" and "semver" have no meaning to this system, because you only deduplicate the exact same file. You save space if a developer reuses code correctly, but otherwise there are no visible side effects and no bugs.

Re: I shaved 187MB off United Airlines' 439MB iOS app

#447

Earlier quoted context omitted.

I suspect it's a hard issue for the App Store model. You don't want a situation where someone updates App A, it updates a lib, then App B breaks because it hasn't been checked against the new library. I know you are a good developer who would check that, use major / minor library versions correctly etc. but there are lots of developers on the App Store. Or the fun case of updating App A, it updates a lib and then mag…

Just use a sha256 hash of the library. If it matches something you already have, you can skip a download. If not, you download another copy.

And given that’s a new approach in a Unix-like environment, let’s call it Nix, and the content-addressed download location should probably be called the binary cache :)

[Not really, Nix integrates a build system into the process, and there was prior work I can’t remember that was binary-only and so closer, but the essence of the idea is very similar.]

Re: I shaved 187MB off United Airlines' 439MB iOS app

#448
post #433

Earlier quoted context omitted.

Apple content caching is built into MacOS. A Mac mini connected to the in-plane wifi would likely do the trick. https://support.apple.com/guide/mac-help/what-is-content-cac... https://support.apple.com/en-us/HT204675

You still need an initial internet connection before the caching though.

[deleted]

Re: I shaved 187MB off United Airlines' 439MB iOS app

#449
post #305

Earlier quoted context omitted.

They've shoved all that functionality into the Gmail app. I actually uninstalled Gmail because it became the default app to open Google Meet video calls, even with Google Meet installed. I don't need my email app asking me for video and microphone permissions...

> I don't need my email app asking me for video and microphone permissions... You do if it is also your video chat app. If not, decline permissions.

....which I said I did but still could not opens video chat links in their dedicated video chat app because it open Gmail anyways, which then just crashes with an error that it doesn't have permissions

Re: I shaved 187MB off United Airlines' 439MB iOS app

#450

Earlier quoted context omitted.

There is a boarding time on every ticket. Anyone who has flown more than once knows this is not optional - closing the gate and departing early is at the airline’s discretion. Once they started boarding and the queue is empty, they will continue with the procedures for the flight, they have an incentive to keep their on-time stats. It’s not like a train where you can simply step in a minute before it leaves.

There is not a boarding time on any airline ticket; you can book a flight for yourself and look at the issued eTicket. Your ticket will only have a departure (and perhaps arrival) time. Some airlines print a boarding time for their flights onto their boarding passes , or show it in their app. This is often a fake number simply computed by deducting 30 or 40 minutes from your flight's departure time; it's certainly no…

Right, I meant boarding passes. Since as you said, (estimated) boarding time is usually set to 30-40 minutes before departure, and gates usually close 20m-15m before departure, arriving 15m after the announced "boarding time" is obviously risky. Not sure what's up for debate here.
Post reply on HN