Hacker News new | ask | show | jobs
by Arainach 605 days ago
Disclaimer: I used to work at Microsoft. These days I work at a competitor. All words my own and represent neither entity.

Microsoft has the culture and the technology to tell private and public APIs apart and to check code across the company to ensure that only public APIs are called. This was required for decades as part of the Department of Justice consent decree and every single product in the company had scanners to check that they weren't using any private APIs (or similar hacks to get access to them such as privately searching for symbols in Windows DLL files). This was drilled into the heads of everyone, including what I assume are 90% of VP+ people currently at the company, for a very long time.

For them to do this is a conscious decision to be anticompetitive.

3 comments

What a coincidence, I was just browsing Microsoft's Go fork (for FIPS compatibility, basically replacing Go crypto with OpenSSL and whatever API Windows has, just like there's a Google's fork that uses BoringSSL), and found this patch:

https://github.com/microsoft/go/blob/microsoft/main/patches/...

Upstream Go tricks Windows into enabling long path support by setting an undocumented flag in the PEB. The Microsoft Go fork can't use undocumented APIs, so this commit removes the hack.

So, even if they fork something, they have to strictly follow this guideline and remove undocumented API usage. I wonder if this only applies to Windows APIs though.

> Microsoft has the culture and the technology to tell private and public APIs apart and to check code across the company to ensure that only public APIs are called. This was required for decades as part of the Department of Justice consent decree and every single product in the company had scanners to check that they weren't using any private APIs (or similar hacks to get access to them such as privately searching for symbols in Windows DLL files).

I thought that only applied to private Windows APIs?

The antitrust case was about the Windows monopoly specifically, so other MS products calling Windows private APIs was in its scope. But, this is more comparable to another MS product calling a private Visual Studio API – I don't believe that was in the scope of that antitrust case. Did Microsoft have policies and processes against that scenario too?

The settlement was (presumably, I've never read it) about not using a monopoly in one area to gain influence in another, so I would not be surprised if Windows was the primary focus, but the overall message was fairly universal, and it makes sense: Microsoft builds platforms and overwhelmingly those platforms rely on other parties, so don't leverage anything internal/unfair as that hurts the platform.

This means that Office shouldn't use private Windows APIs and pin itself to the taskbar. It means that Surface shouldn't have special integrations (whether with Windows, Copilot, or whatever) that aren't available to third parties. It means that Azure shouldn't build things that are only available to Office. You build for the platform. The push was originally around a legal mandate, but it turns into a culture.

> The push was originally around a legal mandate, but it turns into a culture.

Whatever the scope of the legal mandate was, it expired over a decade ago now.

Culture can change over time. Even if Microsoft had this culture strongly when you worked there, it might have become much weaker in the years since. Within a corporation, culture can also vary a lot between different teams/divisions/etc - maybe it is still strong in some parts of the company but gone in others.

vscode is developed by VPs borged from github, no? those wouldn't know. not that I approve such things, certainly not.
> vscode is developed by VPs borged from github

Other way around:

In 2011 [Erich Gamma] joined the Microsoft Visual Studio team and leads a development lab in Zürich, Switzerland that has developed the "Monaco" suite of components for browser-based development, found in products such as Azure DevOps Services [0]

0. https://en.wikipedia.org/wiki/Erich_Gamma

1. https://microsoft.github.io/monaco-editor/

vscode predated github acquisition by several years