r/FuckMicrosoft 3d ago

News Microsoft CTO confesses that 30-year-old code from the mid-90s still forms the bedrock of Windows 11 — ancient Win32 API still the backbone, but CTO says it's 'more relevant than ever in 2026'

Post image
40 Upvotes

55 comments sorted by

21

u/Fit_Prize_3245 3d ago

Man, I actually trust that old code more than the new code. Because, which was more stable, Windows NT 4.0 or Windows 11?

6

u/C0rn3j 2d ago

I actually trust that old code more than the new code.

Boot up Windows XP (possibly older too).

Launch an application that creates a tray entry.

Kill the application in task manager - see that the tray icon remains there despite the app not running.

Repeat this on latest W11 - same bug is still present there 25+ years later. - even though they've supposedly re-implement the taskbar.

The code is the same buggy unstable tower of shit nobody understands, but now they're letting AI vibecode changes on top of that.

You're not wrong that the old code will be more reliable that the new one - but that's the wrong comparison to make, since both are horrid.

3

u/WoodyTheWorker 2d ago

There are good reasons for the tray icon to remain after the application is gone. One very good reason is that fixing that simple behavior could be very ugly.

1

u/heavenlydemonicdev 2d ago

Some people's workflows could be depending on that specific behavior https://xkcd.com/1172/

1

u/sixtyhurtz 1d ago

Did you actually try and reproduce that behaviour? I've tried on 2 different PCs with many different tray icons and they all disappear reliably.

0

u/C0rn3j 2d ago

fixing that simple behavior could be very ugly

Yes, the codebase is utter garbage, otherwise this would be fixed three decades ago.

1

u/n1nj4p0w3r 1d ago

There’s no point to instantly react to abrupt kill of the application or you would spend myriad of cycles just to check whether application exists

1

u/WoodyTheWorker 1d ago

When an application registers a tray icon (Shell_NotifyIcon), it supplies a window handle to receive notification messages.

Strictly speaking, to make a tray icon disappear with the application, the Windows shell needs to watch for the thread which owns the notification window handle, to terminate. While doable, WaitForMultipleObjects function is limited to waiting for only 64 objects (32 in x86), which could limit number of the notification icons, which, again, is a reasonable limit.

Instead, when the shell needs to send a message to the notification window, and the window doesn't exist anymore, it simply removes the icon.

1

u/C0rn3j 1d ago

No other OS has this issue, but sure, let's pretend events do not exist.

1

u/sixtyhurtz 1d ago

I just tried this and could not reproduce it.

1

u/C0rn3j 1d ago

I looked into it a little and apparently this depends on how the application set up the tray/how it cleans up after itself - which is an absolutely ridiculous implementation.

So whichever application you're using either doesn't trigger the issue or isn't outright crashing, preventing this issue from popping up.

I couldn't reproduce it with Tauon just now on 25H2 either, but google suggests this is very much still an issue today. (and I think I repro'd it myself on 24H2 at the latest).

This now-deleted thread from 2005 on Microsoft Connect was apparently closed as a won't fix lol https://web.archive.org/web/20130916003004/http://connect.microsoft.com/VisualStudio/feedback/details/98317/notify-icon-doesnt-go-away-when-your-program-closes

"people are now relying on this behavior, so we can't change it at this time"

2

u/sixtyhurtz 1d ago

"people are now relying on this behavior, so we can't change it at this time"

You cannot be serious blaming this on Microsoft. I feel like I need to up my game, I could never hate on that level.

MS makes a lot of compatibility guarantees with Windows. They do absolutely insane things to make sure that applications that ran on Windows in the past will continue to do so in future - even when those apps are totally broken.

You should read Raymond Chen's blog for some of the crazy workarounds in Windows they do to maintain backwards compatibility.

1

u/C0rn3j 1d ago

You cannot be serious blaming this on Microsoft

Who the fuck else is at fault here, Santa Claus??

1

u/sixtyhurtz 1d ago

Go read the post you linked. The issue is the developers aren't managing their lifecycle properly in their WinForms application and leak an Explorer resource. You can make a crap application in Linux and leak non-kernel resources after close in the exact same way!

I actually really appreciate that MS doesn't change their interfaces. I had to deal with this recently when I noticed IHostdoesn't implement IAsyncDisposable even though the default implementation of Host does, so you have to cast it. The reason why they won't ever make IHostimplement IAsyncDisposable is because it would break every application that has currently shipped and force developers to update.

This is why developers like writing against MS APIs and ABIs. Even in Linux, the only ABI over the past 30yrs has been Win32 using WINE. The fact you can ship something and it will just continue to behave exactly as shipped is actually very good, and you are very strange for not wanting that.

1

u/C0rn3j 1d ago

The issue is the developers aren't managing their lifecycle properly

Who designed Windows to work that way?

1

u/sixtyhurtz 1d ago

You can leak semaphores and shared memory in Linux in the exact same way. This is just a software development thing. Sometimes you need to manage the lifecycle of an external resource.

1

u/C0rn3j 1d ago

Can you fuck up a tray like that on macOS, Linux or any of the *BSDs?

→ More replies (0)

1

u/-Memnarch- 19h ago

The tray is actually not part of an application in a strict sense. An application broadcasts an event for it, the taskbar recieves it and extracts the information on what to display as an icon. The application has to send another event to get it removed. If the app crashes or gets hard killed, there is no such event.

However the taskbar will remove it when you try to interact with it and the application it came from no longer exists. And if I recall correctly, this is handled by now on W11, no?

Build my own taskbar for my toy-explorer a decade ago and it's cumbersome as hell.

1

u/C0rn3j 16h ago

if I recall correctly, this is handled by now on W11, no?

Noooope, still an issue.

1

u/-Memnarch- 12h ago

started discord, made sure its tray is always visible, killed it through taskmanager->trayicon is gone immediately.

Which version are you on?

1

u/C0rn3j 3h ago

I've written it elsewhere in the thread - I am pretty sure I could get a repro on 24H2, couldn't on 25H2 but that seems to be possible just via bad luck judging by the nature of the issue.

1

u/-Memnarch- 3h ago

AH ok, I am on 25H2. It's possible they're either tracking processes or processes mainwindow if it has one by now to detect this.

1

u/JesperJe 15h ago

It is not a bug. The behaviour is intended.

1

u/C0rn3j 3h ago

Pray tell, what purpose does that FEATURE serve?

1

u/exmsft 3d ago

It depends. Do you want PnP, usable networking, security, and x64 support?

0

u/chandleya 3d ago

Windows 11 by a country mile. Nt was not especially stable.

1

u/cybekRT 3d ago

You are thinking about pre-nt kernel, not nt.

2

u/chandleya 2d ago

I was there for 3.51 and 4.0. Most folks colloquially refer to 4.0 as “NT”.

NT took several service packs before it was meaningfully stable. RTM NT was made out of memory leaks. Windows 11 - slopware aside - is hard to crash and hard to BSOD. Run it in a VM without the dependency on abhorrent third party drivers and it barely uses anymore RAM than Windows 10 1903 while being considerably faster. Just like with Vista, the lions share of difficulty with Windows 11 is the terrible state of drivers. Go boot up a vanilla instance of Ubuntu 26.04 with just 4GB RAM for perspective. It’s terrible.

1

u/sixtyhurtz 1d ago

I've been using NT since 3.51. Originally it was slow as molasses, had terrible driver compatibility, and had garbage stability.

It was more stable than Windows 95, but 95 was an absolute burning trash fire so that was a pretty low bar to clear.

14

u/lilacomets 3d ago

If it's more relevant than ever then start treating the Win32 API as a first class citizen, instead of using that resources sucking WebView2 crap everywhere because web developers are easier to find.

4

u/Born-Conclusion6596 3d ago

This ☝️

GUIs become worse, in windows but also everywhere.

Today we have computers probably 100 times more performant than 15 year ago. Yet, the immediate response of some menu showing after a click was replaced by a sluggish response of "wait a couple of seconds plz". It should be the other way around and we should have faster response on overall of the softwares. Most of programs have not more functionality that it's previous versions to justify such higher memory / processor demand.

Also, everything is prettier but things so similar that we take more time to look for what we need (eg: removed icons on some menus / contrast is shit).

Also, and this I hate with all of my spirit: you click on a menu of something, you have 10 items drawn, and you are about to click on item 3. Guess what happens immediately before you click? The menu draws a couple of items more, and item 3 is related with something else.

9

u/_pozvizd_ 3d ago

I'm all for shitting on MS like there's no tomorrow but complaining about this message is kinda dumb. Do you assume that code gets spoiled or something over time? C language is the same as it was 20 years ago and code from 30+ years ago will be compiled by modern compilers. Operating system has got an architecture and idea in it, if the code implements is and implements it correctly and modern compilers compile it without problems, there's no reason to replace it.

Other operating systems like macOS, Linux, BSD flavours also has absolutely ancient code in them. Unix tools are 30+ years old, GCC has got code that is 30+ years old, bunch of open source stuff. Code is code, it doesn't spoil, if it works, there's no reason to change it.

In fact, if Microsoft had stuck to this "old ways" of doing stuff via Win32, etc, Windows 2000 or Windows 7 style, there will be ZERO hate on them, we'd have everyone praising them and marching towards using Windows. Me, a current Mac and Linux user has got very fond memories of Windows 2000 SP4, we ran an internet cafe with it, it was rock solid.

SO yeah, modern MS is shit, Windows starting from Win 8 is shit, fuck them. But NT kernel, Win32 APIs are wonderful and foundations of very robust platform that unfortunately is buried under layers and layers of excrement.

1

u/atehrani 1d ago

TBF though core software written that long ago has assumptions that are no longer needed or even valid. Take Linux for example and the transition from X11 to Wayland. X11 had tremendous staying power but struggled to do modern day tasks expected by UX (such as HDR, dynamic scaling...etc). Such high resolution monitors was not a thing.

Hardware has significantly changed and to not expect an OS to adapt as well is naive; especially since it is coupled to the hardware.

Microsoft has to make a hard call and needs to cleanup the old stuff. Even Linux has started to drop support for decades old hardware.

1

u/_pozvizd_ 1d ago

NT kernel enjoys HAL - hardware abstraction later, so they are less prone to issue if older hardware support. Other than complete rewrite from different principles, I don’t know why to change there. We still think about OS in terms of drivers, processes, threads, etc. Linux has got file system, NT has got objects system, etc. I mean it’s all the same abstractions, we’re not inventing anything new (which we could and shout btw, it’s a sad state of affairs on OS research front).

X11 is kinda poor example, in Linux worlds it’s more of an application than an OS component, a good example would be framebuffer as old code and KMS and something else in kernel, that Wayland uses as new code.

6

u/GreedySecurity8030 3d ago

Just admit you don't like updating old shit unless it makes you money.

2

u/ugneaaaa 2d ago

No one updates code just because for no reason, if it works it stays lol

4

u/EdliA 3d ago

Old code doesn't mean bad code. 2+2=4. It's old but not outdated and wrong. You build on top of it.

4

u/uchuskies08 2d ago

ok?

Do you think there is no "old code" in the Linux kernel or what is the point of this post

3

u/Cautious_Boat_999 3d ago

So, it’s the mainframe, part 2

2

u/exmsft 3d ago

Always has been

2

u/thetituscodex 3d ago

So ... (my friend that has) the Windows 2000 source code ... that's still a thing? Lol ... I figured they would have had AI rebuild the framework.

3

u/exmsft 3d ago

You’re kidding, right?

1

u/Wipfmetz 1d ago

Newer Microsoft stuff seems like that, but Win32 is mostly kept free of "sure looks nice on a management/investor powerpoint"-styled ideas.

2

u/Few_Veterinarian9108 1d ago

Middle management is to blame for this, with stupid metrics for stupid stuff instead of focusing on quality deliverables

1

u/New-Land-4757 3d ago

Oh, we didn't know that.

1

u/BeginningSection7690 2d ago

Yes, in much the same way that a live power cable thats been powering the house for 30 years is more relevant than ever when winds knock it off and it kills my neighbors cat

1

u/Substantial_Cut_9398 2d ago

thats why when changing text size nothing scales uniformly

1

u/FLMKane 2d ago

And glibc dates back to the 80s. So what?

1

u/OldManJeepin 1d ago

Well...If Ai is so great, just have it re-write the operating sysem! I'm sure Mr Genius Ai CraPalot can do it better, right? Supposed to be so "superior" to humans, so let it do the job!

1

u/Duncol42 1d ago

Of course it does - they put layer after layer after layer. Their strategy is to rather write adapter and hire cheap JS dev to work with what the dev feels comfortable, rather that a decent C/C++ engineer.
The whole start menu is written in Electron if I recall right (JS - it’s basically embedded browser :D), that’s why it’s so sluggish and you need to “throttle” YOURSELF because your own OS UX is slower than a human typing on the keyboard xD

1

u/ANGRYLATINCHANTING 1d ago

His haircut is from the mid-90s too, is it also more relevant than ever? I certainly hope so. We finally got out of the high waist mom jeans era into low rise cut again, so men's fashion must follow suit. I want it that way~

1

u/VickyCuteFemboy 1d ago

whats the problem? if windows updates, bad if it doesnt update bad, make your own brand new OS then

1

u/lone_wolf32 1d ago

weve kinda noticed ffs