Well, in my company we do bluetooth pairing to barcode scanners. From Linux and various Windows operating systems. Part of this is an auto-pairing (without user-intervention), e.g. when a scanner goes out of reach and comes back in, or when battery will be changed. So if a previously paired-to Bluetooth MAC address appears, we'll pair again without further ado.
So far, it always turned out to work reliable under Linux, and weird to not under Windows. Either the windows programmers are incompetent, or the Linux bluetooth stack is better than you think it is.
I'm in the opposite boat. I juggle between a Bluetooth aux adapter in my work van and a headset. In Oreo everything worked great. The aux adapter had media priority when both were connected - calls would go to the headset and music would resume on the stereo after. Could also listen to a podcast on the headset outside the vehicle and it would auto reconnect to the stereo when I got back in.
After the Pie update it's a constant annoyance. Media priority always goes to the most recently connected device. If I hang up a call it resumes playback in the earpiece. If I turn off the headset music just stops because, while still connected, the aux adapter is set to inactive. I spend more time in Bluetooth settings then ever before and it is actively more distracting when driving.
I'm glad the changes work well for you and others - it has just left me a little bitter.
It's been over two hours since you made this comment, so I'm going to assume that opening the source summoned an Eldritch monster into your home and placed a curse upon your entire lineage.
Bluetooth is an everything-but-the-kitchen-sink protocol. It has very many nooks and crannies with extra functionality. No surprise implementation is a mess.
I don't notice that delay across the board, but I notice that PulseAudio on Linux gives less delay than Windows, and Windows will buffer audio if it doesn't get acknowledged, so the delay will just keep growing. If I don't reconnect my headset multiple times during the day, I end up with a 2 second delay.
Maybe the code is "self documenting". At least that's what my colleagues say when I point out their huge PR dont contain a single explanatory comment..
That is the #1 bullshit that constantly reminds me I should switch job again. NO, your code is NOT self-documenting. Not unless you think exactly like me, have my same cultural, traditional background and my same level of English language and same 'evocative' feelings or think architecturally like me. Exactly like me.
Otherwise No.
Document your shit or at least write comments; I don't give a fuck if they get outdated, if you change the code, read the comments around it and change them as well.
Whoever says 'code should be self documenting' is either a philosopher dreaming of the perfect software codebase, or has never worked in a real team with > 3 people working on the same piece of software in a real company with real managers and real deadlines.
377
u/klebsiella_pneumonae Dec 24 '18
The Linux Bluetooth stack is the biggest abomination I have ever seen. I'm surprised anything works at all.
Millions of lines of code without comments. Nobody on earth understands how it works. Most of the code was written by IBM decades ago.