147 ms·
This file was about 400 lines before we started adding these comments. You might think that's way too much code to do something as simple as finding a few libra
by tentacleuno 5y ago
This file was about 400 lines before we started adding these comments. You might think that's way too much code to do something as simple as finding a few library and executable paths. I agree. However, Microsoft's own solution to this problem, called "vswhere", is a mere EIGHT THOUSAND LINE PROGRAM, spread across 70 files, that they posted to github unironically. I am not making this up: https://github.com/Microsoft/vswhere https://github.com/Microsoft/vswhere
Such a seemingly simple problem and yet we have two very complicated solutions. Just goes to show how convoluted things can get at Microsoft scale.
- alexfromapex 5y agoReminds me of something I read earlier mentioning "design by consortium" where the complexity of something goes up because there's so many people working on it and not enough straightforward documentation
- shadowgovt 5y agoAnd sometimes (which is I think what most applies to Microsoft) too many authorities that must be pleased and nobody with imperial power to say "In the interests of simplifying, we're going to piss off key stakeholders for a period of time." Microsoft's OS team has, at points in the past, rebuilt data structures from C++ to C with very specific memory footprints rather than break, for example, Photoshop (which was getting more performance from running its own OS structure allocator instead of calling the APIs designed to allocate structures). Simple ecosystems and simple software usually have the same thing in common: they are either young, or they've recently survived an extinction-level-event. Older systems with many dynamic constraints breed complex webs.
- joe-collins 5y ago> Simple ecosystems and simple software usually have the same thing in common: they are either young, or they've recently survived an extinction-level-event. Older systems with many dynamic constraints breed complex webs. At the risk of digression, I wish some of the "small government" crowd would realize this.
- tompazourek 5y agoYes, the important keyword here is "seemingly". :)
- ChrisSD 5y ago`vswhere` is for querying a variety of information about all visual studio installs. It does far more than the "simple" problem of finding libraries.
- 323 5y agoBut how do you find vswhere? I have VS installed on my system, yet vswhere is not in PATH.
- Spivak 5y ago> vswhere is included with the installer as of Visual Studio 2017 version 15.2 and later, and can be found at the following location: %ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe The irony is that there is absolutely no guarantee that this path is stable so in 2025 I'm sure there will be a wherevswhere.exe
- ChrisSD 5y agoThere is a guarantee that this path is stable: https://github.com/Microsoft/vswhere/wiki/Installing https://github.com/Microsoft/vswhere/wiki/Installing > This is a fixed location that will be maintained.
- glandium 5y ago"Windows 10 will be the last Windows". Guarantees work as long as they don't change their mind.
- ziml77 5y agoFind me one place where Microsoft officially documented that there would be no version of Windows past 10.
- chrismorgan 5y ago
- grammarnazzzi 5y ago> Just goes to show how convoluted things can get at Microsoft scale. It's not so much a problem of "scale" as simply poor architecture, neglected technical debt and outright incompetance