>Why do professional software developers use Visual Studio in the first place?
- to build C++/C# executables that are deployed to Windows computers. Examples are the millions of corporate desktops that already use Microsoft Office suite and home pcs with Windows for running AAA games.
- to build ASP.NET web apps because the corporation chose the Microsoft stack of WindowsServer+SQLServer+C# instead of Linux+MySQL+PHP.
Why do companies continue to use Windows instead of Linux? Often because they have lots of other desktop software that only runs on Windows. E.g. CAD, analytics, etc.
If the target audience is already on Windows and the implementation language is C++/C# instead of Javascript/Electron, the easiest path for the developer is to also use Microsoft Visual Studio on Windows.
I did C# dev for a couple of years. I think VS is a shitty IDE. It's slow and laggy. So much so I started to use Visual Studio Code for some of the C# development I did. It's way worse than for example Jetbrains products by a large margin.
What exactly with VS is so great? Maybe I didn't use that feature..
1. Most consumers using Windows. That might not be the case in USA, but definitely the case in the most of the world.
2. To develop for a platform, primary choice would be platform creator recommendation. In this case it's obviously .NET from Microsoft Visual Studio. It contains extensive UI libraries and components.
There are alternatives, of course, you can use Qt or Electron or just web app. But you would need a good reason to move from the primary path. For many projects there's no good reason, so you naturally using .NET to write GUI applications for Windows.
3. To develop .NET GUI applications, you need Windows. Any other option is inferior.
That was the case 10-20 years ago. So plenty of projects were created and plenty of developers were taught .NET and Windows.
Today web apps are more popular. But .NET provides excellent support to create web apps, so there's no reason to switch from Windows.
That's why many professional developers use C# even today.
Of course different people might move different paths. But I think for majority that's the way. .NET GUI frameworks and may be Sharepoint created huge number of Windows developers.
I was just following the running gag, but thanks anyway. I did a bit of C# when, as a sysadmin, I was asked to do some kind of frontend that would hide the pocket pc interface so that employees in an hospital can use those pocket PC to order menus for the patients and not end up using them to browse shit or install unwanted apps.
Security by obscurity in all its glory but they used to do the same with a very easily escapable panel replacing the default windows shell in Win95 and Win98. :)
Fast enough for most applications. Memory safe enough. Easy enough to learn. Good enough type system. And it helps that it’s integrated into unity and windows. Also the ecosystem, compiler and IDE support is exceptional.
It’s not perfect. It’s slower than native code. It has a worse type system than rust, Swift and typescript. (Burn the nulls!) And C# needs a runtime - which makes it annoying to deploy on Mac & Linux.
ARC and shared_ptr are net more expensive than GC, in throughput scenarios you will see that C++ often offers no meaningful performance advantage. Also Swift is significantly slower due to upfront ARC cost and defaulting to virtual dispatch in many places, more so than .NET with interface spam (Dynamic PGO takes care of it anyway).
Nulls have stopped being an issue in practical terms since you specify nullability explicitly e.g. string?/string.
C# does not need runtime installed on the host. You can produce JIT or AOT executables which include one. It also needs runtime on Windows just as much (if you don’t include it or host doesn’t have it installed). Only .NET Framework was preinstalled but no one (sane that is) chooses this legacy target for new code.
In short, nowadays it's a pretty strong contender and can fill in similar niches to Java (decent type system, good runtime, good tools, nowadays available on most platforms), with downsides that to me don't seem like dealbreakers (not as big of an ecosystem, which leads to breakages along the way when tools and libraries aren't as well maintained).
I've also used Node, Python, Ruby, PHP, a bit of Go and some others on the back end, I'd say that it's a bit slower to develop in than many of those but the performance and maintainability of the code (especially the refactoring you can do in the IDEs) feels worth it. Maybe for not quick MVPs, but probably for multi-year projects.
> I did c, cpp and c# for money and thats my experience.
>
> C# has lowest amount of WTFs per loc
Sure, C# looks great when compared with C or C++, but that's a very low bar to pass. Compare it with Java, and it's on par at best. Compare it with Rust, and C# might as well be C.
Because once a program is large enough, you can’t fit the whole thing in your head at once. Tools which help you bounce around and refactor code en masse help keep complexity under control and make you more productive.
In my experience, IDEs often result in code that's more complex in the first place. Instead of keeping complexity under control, they introduce it since it's easier to work with more complex code if you have an IDE.
IDEs don’t create complexity. But they do remove some of the natural downwards pressure on complexity that you get without an ide.
I’ve been programming for 30 years and I still feel very mixed about that. For some projects, I figure who cares if it took us 30k lines to solve the problem. It’s just that complex, and more code = more optimised data structures and faster runtimes. On other days I’m reminded of how productive I can be with tiny programs or libraries that just solve their own niche exceptionally well. The best small libraries basically never need to be modified or updated. They just work and keep working forever.
I don’t think this conflict can ever be solved once and for all. I’m sad that Chrome and Linux are around 20-30M lines of code. Would they be better or worse programs if they were smaller? It’s so hard to know.
My worry with large code bases is not so much about performance, or bloat. It's: bugs.
One of the first lessons I learned same 30 years ago in CS class was that invariably you'll find at least 3 bugs/kloc, regardless of where those 1000 lines of code came from. Highly critical battle tested code tended to have less, but even code where those 3 bugs had been fixed, ultimately given enough time would turn out to have yet another 3 bugs (on average). That's scary!
My professor suggested 2 ways to mitigate:
1. create robust systems that can handle malfunctions
2. never write a single line of code that doesn't need to be written
Ps. Don't think it's fair to attribute Linux's vast code base to IDEs.
> more code = more optimised data structures and faster runtimes.
Not sure if I agree, can you elaborate? Seems a more modest claim "more code allows for more optimized ds and faster runtimes" would be more accurate(?)
At least, in the Pentium era it used to be that instructing compiler to optimize for size often resulted in faster code than optimizing for speed. That was of course the result of relatively small (text segment) caches and the often underestimated effects of temporal and spacial locality.
> Seems a more modest claim "more code allows for more optimized ds and faster runtimes" would be more accurate(?)
Yeah; I’m assuming the code in question is produced at a similar skill level. Hence mentioning Linux and Chrome.
But you’re right; large projects are often large because they’re written poorly. Personally I think there’s a special place in hell for people who bloat programs unnecessarily. Making if statements into class hierarchies. Adding generic interfaces to things that don’t need them. Factories and factory factories. This stuff reduces your team’s productivity with no corresponding benefit. I hate working with people who argue for this stuff.
Nope, I use a compiler to compile, a makefile to drive the compiler an editor to edit and bash to control them all.
Do you compile with an IDE?
There used to be tools that built compiler, runtime, debugger and editor all into a single monolithic hammer, like 4D in late '90s (FourthDimension). There is excel, of course. Nice for prototyping, but very clunky if you want for build and maintain professional software packages that are easy to test and to deploy.
If visual studio were the only way to use Visual C++, we'd long ago abandoned cross platform development.