Thoughts on why so much .NET code is just awful...



  • Bridget99 here... seems my original account got nuked in the 2014 upgrade.

    Anyway, I've noticed a really disturbing pattern lately: say whatever good things you want to about C# or .NET, but most of the .NET code out there is really terrible. Some antipatterns I keep seeing:

    1. "The new stuff is ASP.NET MVC but there's some old WebForms stuff too. There's a lot of React but some Knockout, too. Oh yeah... the admin tool is WPF."

    2. "Yeah, we use SOAP services pretty heavily. The old boss was big on WCF. Here's a 14-page guide on how to debug the SOAP stuff locally. What? Reused? No, nothing else uses it. WCF is just, like, an abstraction layer."

    3. "Nobody here really understands a lot of this stuff. The people who wrote it all got better jobs / retired / got fired when the CEO asked for something simple and it took 3 years."

    4. "To debug, just jam this stuff into your hosts file, browse to this URL, and attach to w3wp.exe. No, not that w3wp.exe... must be the other one."

    5. "Yeah, building is really slow. Don't forget to double-click this NPM Task Runner job after you build... Clojure can do what? Oh, we don't have time to learn Clojure with all the rebuilding and NPMing and attaching to w3wp.exe going on."

    6. "So this project is 'code-first,' but the other ones are 'database-first.' Oh, and the old stuff is just ADO.NET with a database project You know how to do all three, right?"

    7. "We've built so many interfaces into this system over the years that it's really just impossible to change anything. Just avoid the CEO, he doesn't like hearing that."

    Pretty depressing, all in all.




  • Notification Spam Recipient

    @MSgtSoupSandwich
    None of those points is about bad code. I don't really know what your post is about.

    1. Different techs in different projects. Nothing out of ordinary.
    2. I don't really understand this one. So they use SOAP, tough luck.
    3. Nothing to do with code.
    4. Standard stuff.
    5. What does NPM and Clojure have to do with .NET? Why are builds slow?
    6. Different techs in different projects. Nothing out of ordinary.
    7. This one really doesn't make sense. System is big and hard to change, ok. What interfaces have to do with that?

  • And then the murders began.

    @MSgtSoupSandwich said in Thoughts on why so much .NET code is just awful...:

    Anyway, I've noticed a really disturbing pattern lately: say whatever good things you want to about C# or .NET, but most of the .NET code out there is really terrible. Some antipatterns I keep seeing:

    Let's see how badly we score...

    1. "The new stuff is ASP.NET MVC but there's some old WebForms stuff too. There's a lot of React but some Knockout, too. Oh yeah... the admin tool is WPF."

    New versions of the front end are MVC, old ones are Web Forms, but they're not mixing (it's all one or the other), and there's only a handful of those left. JavaScript is all vanilla JS. Admin tool is Web Forms.

    1. "Yeah, we use SOAP services pretty heavily. The old boss was big on WCF. Here's a 14-page guide on how to debug the SOAP stuff locally. What? Reused? No, nothing else uses it. WCF is just, like, an abstraction layer."

    WCF? How about ASP.NET Web Services? 🤭

    Although our stuff is reused - both admin tool and front end use the same services.

    1. "Nobody here really understands a lot of this stuff. The people who wrote it all got better jobs / retired / got fired when the CEO asked for something simple and it took 3 years."

    Not true, everybody who wrote the core stuff is still here.

    1. "To debug, just jam this stuff into your hosts file, browse to this URL, and attach to w3wp.exe. No, not that w3wp.exe... must be the other one."

    Nope, just need to do Debug -> Start in Visual Studio.

    1. "Yeah, building is really slow. Don't forget to double-click this NPM Task Runner job after you build... Clojure can do what? Oh, we don't have time to learn Clojure with all the rebuilding and NPMing and attaching to w3wp.exe going on."

    Build does all the work. Depending on what you changed, takes 1-2 minutes.

    1. "So this project is 'code-first,' but the other ones are 'database-first.' Oh, and the old stuff is just ADO.NET with a database project You know how to do all three, right?"

    Everything is ADO.NET with a database project.

    1. "We've built so many interfaces into this system over the years that it's really just impossible to change anything. Just avoid the CEO, he doesn't like hearing that."

    Hmm. It's impossible to change anything, but that's not why. (Only the blessed core team can make changes to the shared DLLs; individual implementations have to work with/around what they provide.)

    So... 2-3/7 on the 💩 scale. Not too bad?


  • Dupa

    Bad projects are bad. News at 11. Dunno what .NET has to do with this.

    Are you suggesting that .NET causes a disease that eats your brains out or something?


  • Discourse touched me in a no-no place

    @kt_ said in Thoughts on why so much .NET code is just awful...:

    Are you suggesting that .NET causes a disease that eats your brains out or something?

    It's popular, therefore it attracts those developers who don't care to actually do good work and who are looking for magic bullets. They'll shit the place up, but that's kind of a constant for whatever they use: it's not the tool that's the problem, but rather the tools that use the tool.



  • Let's see our scorecard:

    1. "The new stuff is ASP.NET MVC but there's some old WebForms stuff too. There's a lot of React but some Knockout, too. Oh yeah... the admin tool is WPF."

    Here it's webforms for all websites, plus some client-side jQuery stuff that only one member of our team really understands.

    1. "Yeah, we use SOAP services pretty heavily. The old boss was big on WCF. Here's a 14-page guide on how to debug the SOAP stuff locally. What? Reused? No, nothing else uses it. WCF is just, like, an abstraction layer."

    Here in most projects we use WCF for our server processes (console apps), and old-school SOAP "ASP.Net web services"&"web references" for "actual" web services the outer websites call. On more recent projects we have replaced old "web references" with WCF "WCF services"&"service references", with a wrapper exposed as a SOAP webservice for "browser-based testing".

    1. "Nobody here really understands a lot of this stuff. The people who wrote it all got better jobs / retired / got fired when the CEO asked for something simple and it took 3 years."

    Here it's not all that bad, we still have veterans, I am one of them.

    1. "To debug, just jam this stuff into your hosts file, browse to this URL, and attach to w3wp.exe. No, not that w3wp.exe... must be the other one."

    Ew. Here it's just "set the service/website as startup project and fire up your browser".

    1. "Yeah, building is really slow. Don't forget to double-click this NPM Task Runner job after you build... Clojure can do what? Oh, we don't have time to learn Clojure with all the rebuilding and NPMing and attaching to w3wp.exe going on."

    I don't understand either Clojure nor NPM. Building isn't quite the problem, publishing is (we mostly have to do the latter manually)

    1. "So this project is 'code-first,' but the other ones are 'database-first.' Oh, and the old stuff is just ADO.NET with a database project You know how to do all three, right?"

    No idea what that means.

    1. "We've built so many interfaces into this system over the years that it's really just impossible to change anything. Just avoid the CEO, he doesn't like hearing that."

    Our later interfaces are specifically "isolated" from the rest of the code so we can change mostly freely. Drawback is, if you add a new field you want to expose to clients, that's one more layer you have to add it to.



  • @dkf said in Thoughts on why so much .NET code is just awful...:

    It's popular, therefore it attracts those developers who don't care to actually do good work and who are looking for magic bullets.

    One could say this about almost any new JavaScript framework or even Python :pendant:

    @dkf said in Thoughts on why so much .NET code is just awful...:

    it's not the tool that's the problem, but rather the tools that use the tool.

    QFT 😃


  • Considered Harmful

    None of this has anything to do with .NET. This is just generic 'our build system is broken crap and most of the project is an unmaintainable clusterfuck of outdated tech/practices and hacks that were never intended to be permanent'. Hell you mention NPM and Clojure which means you're definitely not talking about .NET anymore.


  • And then the murders began.

    @pie_flavor said in Thoughts on why so much .NET code is just awful...:

    Hell you mention NPM and Clojure which means you're definitely not talking about .NET anymore.

    Unfortunately NPM is now a generic front-end package manager; it’s not Node-exclusive anymore.


  • Discourse touched me in a no-no place

    @Unperverted-Vixen So what does the N stand for? “Nonsensical”?


  • BINNED

    @dkf said in Thoughts on why so much .NET code is just awful...:

    So what does the N stand for?

    Not a Package Manager ...



  • @MSgtSoupSandwich all of it sounds like... basically every enterprisey job I've worked on, with the single difference being that the not .NET ones were spread across technologies of various companies.

    otherwise, same thing.



  • I see this as being part of a more general problem. I think it is even more true in the open source/Java-based world. 90% of code that is written is not for unique problems. The majority of programming is simply getting data, transforming data, displaying data and storing data. The problem is that every shop does these things differently, so you have to learn, "How are they doing things here?" This was one thing I liked about .Net/Visual Studio, is that they provided a drag-and-drop way of doing a lot of routine tasks.

    It's a little bit like wandering through old India, where each village had it's own language or at least dialect. So you would have to learn the language/dialect of that particular village.



  • @dkf said in Thoughts on why so much .NET code is just awful...:

    It's popular, therefore it attracts those developers who don't care to actually do good work and who are looking for magic bullets. They'll shit the place up, but that's kind of a constant for whatever they use: it's not the tool that's the problem, but rather the tools that use the tool.

    @pie_flavor said in Thoughts on why so much .NET code is just awful...:

    None of this has anything to do with .NET. This is just generic 'our build system is broken crap and most of the project is an unmaintainable clusterfuck of outdated tech/practices and hacks that were never intended to be permanent'. Hell you mention NPM and Clojure which means you're definitely not talking about .NET anymore.

    This is about the closest to what my experience has been.

    The last real system I worked on was ASP/VBscript/SQL ported to ASP.NET/C#/SQL. It was a stock Microsoft stack as of .NET 2.0. No Entity, no jQuery, no NuGet, no Infragistics, none of that garbage. When I needed functionality, I usually wrote it myself. In C#. It's not NIH syndrome because there's a difference between rewriting Office and buying a library to flip bitmaps because you can't take five minutes to learn the relevant GDI+ calls.

    Over a year of on and off looking for different jobs and all I see is kitchen sink contracts. I need to know C#, and Java, and Python, and TFS, and Git, and powershell (WTF would I bother with powershell when I have Visual Studio for whatever a batch file can't handle?) and Oracle, and SQL Server, and IIS, and Entity, and Unity, and NuGet, and struts, and WCF, and XHTML, and MVC, and webforms, and VB, and Docker, and Azure, and 700 JScript libraries. I can't imagine what a horror show those applications are. I don't have to. I've seen them in action. They break all the time and nobody's documented any of it so there's a never-ending stream of angry executives that won't listen to anybody and just want it all slapped back together immediately so this can repeat forever. When they cry they "can't find anybody good," this sort of horseshit is why,

    This horseshit is all caused by non-programming programmers. They're the assholes that have a simple task (flip this bitmap) and run off in search of a framework. And another and another and another. It's frameworks all the way down and they don't know how any of it works. All they can do is Google for help and say "no, it's impossible" when nobody on Expert Sexchange gives them teh codez.

    Give me Visual Studio (SQL Server and IIS optional) and leave me alone.



  • @Unperverted-Vixen said in Thoughts on why so much .NET code is just awful...:

    @MSgtSoupSandwich said in Thoughts on why so much .NET code is just awful...:

    Anyway, I've noticed a really disturbing pattern lately: say whatever good things you want to about C# or .NET, but most of the .NET code out there is really terrible. Some antipatterns I keep seeing:

    Let's see how badly we score...

    1. "The new stuff is ASP.NET MVC but there's some old WebForms stuff too. There's a lot of React but some Knockout, too. Oh yeah... the admin tool is WPF."

    New versions of the front end are MVC, old ones are Web Forms, but they're not mixing (it's all one or the other), and there's only a handful of those left. JavaScript is all vanilla JS. Admin tool is Web Forms.

    At my last 3 jobs, there has been exactly that kind of mixing. I've seen MVC and WebForms in the same solution, and even a project that somehow had ASPX views in conjunction with MVC-style controllers and routes.

    I guess that's my main point. There is probably no other framework or development technologies that has suffered through so many radically different flavors-of-the-month. The result is a lot of code that's written by people learning the latest flavor-of-the-month vs. coherently applying something proven and well-known.

    1. "Nobody here really understands a lot of this stuff. The people who wrote it all got better jobs / retired / got fired when the CEO asked for something simple and it took 3 years."

    Not true, everybody who wrote the core stuff is still here.

    That's good for you, but not my observation at all.

    1. "To debug, just jam this stuff into your hosts file, browse to this URL, and attach to w3wp.exe. No, not that w3wp.exe... must be the other one."

    Nope, just need to do Debug -> Start in Visual Studio.

    Have not been at a place where we could do that since 2017. Not sure exactly why... I think it has something to do with wanting to use "real" IIS, and also relates to the perception that things are faster the "attach to process" way once you've done the attachment two-step.

    1. "Yeah, building is really slow. Don't forget to double-click this NPM Task Runner job after you build... Clojure can do what? Oh, we don't have time to learn Clojure with all the rebuilding and NPMing and attaching to w3wp.exe going on."

    Build does all the work. Depending on what you changed, takes 1-2 minutes.

    Other languages don't even suffer from this "build" issue. Two I have worked with professionally that have no such step are PHP and Clojure.



  • @kt_ said in Thoughts on why so much .NET code is just awful...:

    Are you suggesting that .NET causes a disease that eats your brains out or something?

    Yeah, kind of. I don't recall the rot and BS being nearly so bad when I was doing C++. I started to get into the reasons why .NET in particular is like this in my post, but I was curious to hear what others had to say about it (besides "ho hum, .NET is fine").

    I have considered several contributing factors. One is the paradigm-shifting roller-coaster Microsoft has had all of us on.

    They really want to be an innovative company, instead of the company that somehow got rich cloning CP/M-86 and SCP-DOS, so they throw a lot of stuff out there that's really, um, different. Then when it doesn't work, they oscillate back the other way and give us something relentlessly derivative.

    "Classic" ASP - Very similar to other early server-side Web technologies
    WebForms - Much different from anything else out there
    MVC - Completely in-line with what was happening in other languages
    WPF - Just bizarre. Never seen anything like it anywhere else.

    Another factor is probably that almost all .NET developers are pure mercenaries. Getting out the door by 5PM trumps just about anything else. Management is allowed to stick their nose into technical decisions. Contractors on visas with third world educations are prevalent, etc.

    The code you get is not so much crafted as it is allowed to evolve and then tolerated.



  • Wow, I left .NET over 5 years ago now, and all this sounds pretty much how I remember it.



  • @cartman82 said in Thoughts on why so much .NET code is just awful...:

    Wow, I left .NET over 5 years ago now, and all this sounds pretty much how I remember it.

    Help. How did you escape?


  • Considered Harmful

    @MSgtSoupSandwich said in Thoughts on why so much .NET code is just awful...:

    @cartman82 said in Thoughts on why so much .NET code is just awful...:

    Wow, I left .NET over 5 years ago now, and all this sounds pretty much how I remember it.
    Help. How did you escape?
    Certainly not by formatting stuff badly.



  • @pie_flavor said in Thoughts on why so much .NET code is just awful...:

    @MSgtSoupSandwich said in Thoughts on why so much .NET code is just awful...:

    @cartman82 said in Thoughts on why so much .NET code is just awful...:

    Wow, I left .NET over 5 years ago now, and all this sounds pretty much how I remember it.

    Help. How did you escape?

    Certainly not by formatting stuff badly.

    My bad. Fixed it.


  • And then the murders began.

    @MSgtSoupSandwich said in Thoughts on why so much .NET code is just awful...:

    I guess that's my main point. There is probably no other framework or development technologies that has suffered through so many radically different flavors-of-the-month.

    That's only because they keep starting over and making you learn new languages (e.g. Go, Node.js). .NET has been able to let you keep using the same language with newer web frameworks. IMO that's a feature, not a bug.

    The result is a lot of code that's written by people learning the latest flavor-of-the-month vs. coherently applying something proven and well-known.

    "Proven and well-known" != "the right tool for the job". If you want to do anything client-side on your site, Web Forms is poorly suited to the task.

    I'd also dispute that it qualifies as "well-known". I'd be surprised if I could find more than two devs here who know the page lifecycle.

    Have not been at a place where we could do that since 2017. Not sure exactly why... I think it has something to do with wanting to use "real" IIS, and also relates to the perception that things are faster the "attach to process" way once you've done the attachment two-step.

    There's no need to use real IIS for development. IIS Express does the job just fine.

    Other languages don't even suffer from this "build" issue. Two I have worked with professionally that have no such step are PHP and Clojure.

    No, instead they suffer from being PHP and Clojure. 😛



  • @Unperverted-Vixen said in Thoughts on why so much .NET code is just awful...:

    @MSgtSoupSandwich said in Thoughts on why so much .NET code is just awful...:

    I guess that's my main point. There is probably no other framework or development technologies that has suffered through so many radically different flavors-of-the-month.

    That's only because they keep starting over and making you learn new languages (e.g. Go, Node.js). .NET has been able to let you keep using the same language with newer web frameworks. IMO that's a feature, not a bug.

    Agreed that this is what's happening. Don't agree that there's some benefit vs. just making a new language or framework. Keeping it all ".NET" is what got us to this sad place.

    The result is a lot of code that's written by people learning the latest flavor-of-the-month vs. coherently applying something proven and well-known.

    "Proven and well-known" != "the right tool for the job". If you want to do anything client-side on your site, Web Forms is poorly suited to the task.

    In general, I'll take code written by someone who's not learning on the job over code written by someone who is.

    I'd also dispute that it qualifies as "well-known". I'd be surprised if I could find more than two devs here who know the page lifecycle.

    But if we hadn't all moved on to WPF / MVC maybe people would know those parts of the page lifecycle that actually matter.

    This is not to say that I think WebForms was particularly good, though. Honestly, none of .NET is very good outside of maybe Linq, but if it were better-applied it would be more than adequate.

    Have not been at a place where we could do that since 2017. Not sure exactly why... I think it has something to do with wanting to use "real" IIS, and also relates to the perception that things are faster the "attach to process" way once you've done the attachment two-step.

    There's no need to use real IIS for development. IIS Express does the job just fine.

    I agree, but something is motivating this "attach to process" shite. I'd dig into it more, but learning more about .NET isn't on my to-do list anymore. I endure it for money.

    Other languages don't even suffer from this "build" issue. Two I have worked with professionally that have no such step are PHP and Clojure.

    No, instead they suffer from being PHP and Clojure. 😛

    PHP? It's just unpretentious and unobtrusive. Ugly but useful.

    Clojure is functional. It seems unfamiliar to people, but every language still being enhanced is getting functional programming grafted onto it right now. JavaScript is. C# largely has already. C++ is becoming functional, in a very obnoxious way. You can't dodge the core of Lisp by hiding in C# Web development anymore.



  • @MSgtSoupSandwich said in Thoughts on why so much .NET code is just awful...:

    and even a project that somehow had ASPX views in conjunction with MVC-style controllers and routes.

    Before Razor (.cshtml) was introduced when MVC 3 came out, ASP.NET MVC used ASPX for its Views. Razor made things much more pleasant to the eye.



  • The issue doesn't seem to be .NET but rather web. Deadfast's Razor: If it's web, it's shit.

    But maybe I just became grumpy in my old age... wait, shit, I'm not even old!



  • Really all I can hold against .NET itself is some of the stupidity hidden behind the BCL. Read the .NET 4 reference sometime. The UI portions have some really convoluted parts like how buttons draw themselves (the old control rendering class draws the borders wrong so it does another pass to overwrite them and then there's all the logic to work around the Win32 button messages never being sent). Other places, they only half-convert some useful Win32 function, forcing you to P-Invoke around it to find what they decided to not return or not support. Fonts are only just barely translated enough to usually work and hardware details are difficult to reach. That's an open invitation for the developer to write their own functions. Fortunately, alot of the building blocks Just Work so a better developer can do that with relatively few WTFs.


  • Discourse touched me in a no-no place

    @Zenith said in Thoughts on why so much .NET code is just awful...:

    hardware details are difficult

    QFT, for all platforms, forever.



  • @MSgtSoupSandwich said in Thoughts on why so much .NET code is just awful...:

    @cartman82 said in Thoughts on why so much .NET code is just awful...:

    Wow, I left .NET over 5 years ago now, and all this sounds pretty much how I remember it.

    Help. How did you escape?

    Java. :trollface:

    In all seriousness though, there is no silver bullet. There are too few good software developers and system designers so most systems just turn to shit. It's rarely the fault of the framework or language. If you want to work with a good system that is low on the derp, try to get into a greenfield project and make sure you have some clout for the technical decisions. Or just ignore the dumb stuff others try to do and do it in a good way, and rewrite the bits that are not up to your standards.
    I've been doing that kind of stuff for years now, and the first couple of systems I got to design were horrible, but I'm getting the hang of it, and my last one is not projectile vomit horrible.



  • @MSgtSoupSandwich said in Thoughts on why so much .NET code is just awful...:

    Wow, I left .NET over 5 years ago now, and all this sounds pretty much how I remember it.

    Help. How did you escape?

    Slowly filed away bars with a file I hid in my butt, swam through sewers the entire night to reach freedom.


  • Dupa

    I love it when people generalize their anecdata.

    But I gotta tell you, I hate those mercenaries developers who want to have a life outside of work, too!


  • Dupa

    @cartman82 said in Thoughts on why so much .NET code is just awful...:

    @MSgtSoupSandwich said in Thoughts on why so much .NET code is just awful...:

    Wow, I left .NET over 5 years ago now, and all this sounds pretty much how I remember it.

    Help. How did you escape?

    Slowly filed away bars with a file I hid in my butt, swam through sewers the entire night to reach freedom.

    So, how does the sewer freedom taste?



  • @kt_ said in Thoughts on why so much .NET code is just awful...:

    So, how does the sewer freedom taste?

    The same, but they have foosball table, so eh.


  • Dupa

    @cartman82 said in Thoughts on why so much .NET code is just awful...:

    @kt_ said in Thoughts on why so much .NET code is just awful...:

    So, how does the sewer freedom taste?

    The same, but they have foosball table, so eh.

    Are you fed bitcoins for breakfast?


  • BINNED

    I briefly thought this was the dumb questions thread, and @cartman82 had despicably not asked a question of his own so @kt_ had to cover.



  • There's "this Win32 call structure for enumerating network connections is weird" and then there's "we think you only need to know if the network is up or not and nothing else."


  • Garbage Person

    @Unperverted-Vixen said in Thoughts on why so much .NET code is just awful...:

    There's no need to use real IIS for development. IIS Express does the job just fine.

    Negative.

    IIS Express is useful in the simple case, but as soon as you go HTTPS, add URL rewriting, or do anything nontrivial with authentication, it either just can't do it, or "WOMM" starts.

    Of course, you've been able to have VS transparently deploy to a local IIS install and auto attach since AT LEAST VS2012....


  • Garbage Person

    @Zenith said in Thoughts on why so much .NET code is just awful...:

    There's "this Win32 call structure for enumerating network connections is weird" and then there's "we think you only need to know if the network is up or not and nothing else."

    This sounds like a man who has also tried to get "the data shown in netstat"

    Pro tip: It's way easier just to shell out to netstat like a unixweenie.


  • Java Dev

    @Weng said in Thoughts on why so much .NET code is just awful...:

    @Zenith said in Thoughts on why so much .NET code is just awful...:

    There's "this Win32 call structure for enumerating network connections is weird" and then there's "we think you only need to know if the network is up or not and nothing else."

    This sounds like a man who has also tried to get "the data shown in netstat"

    Pro tip: It's way easier just to shell out to netstat like a unixweenie.

    But that's not the Windows Way!!!


  • Banned

    @AlexMedia said in Thoughts on why so much .NET code is just awful...:

    .cshtml

    I'm so glad we're past trying to cram all file types into 3 letters.


  • 🚽 Regular

    @MSgtSoupSandwich said in Thoughts on why so much .NET code is just awful...:

    Bridget99 here... seems my original account got nuked in the 2014 upgrade.

    Anyway, I've noticed a really disturbing pattern lately: say whatever good things you want to about C# or .NET, but most of the .NET code out there is really terrible. Some antipatterns I keep seeing:

    1. "The new stuff is ASP.NET MVC but there's some old WebForms stuff too. There's a lot of React but some Knockout, too. Oh yeah... the admin tool is WPF."

    You have a choice between spending 12 months dedicated to updating everything to the latest and greatest while still providing updates to your software as needed, or you do it more gradually and piecemeal to be better responsive to any new features or bug fixes that need to be done during that time. If you have the time and resources to do the former, it's definitely better, but not every team has that luxury. Furthermore, this isn't a .NET specific problem.

    1. "Yeah, we use SOAP services pretty heavily. The old boss was big on WCF. Here's a 14-page guide on how to debug the SOAP stuff locally. What? Reused? No, nothing else uses it. WCF is just, like, an abstraction layer."

    I hate SOAP as well, but this isn't a .NET thing. A lot of legacy systems I've worked with, regardless of its framework or runtime it's on, is still using SOAP. Thankfully a lot of them are at least starting to offer a REST alternative. Just be glad you don't need to see a URL with "cgi-bin" in it, as I did recently to connect to a service.

    1. "Nobody here really understands a lot of this stuff. The people who wrote it all got better jobs / retired / got fired when the CEO asked for something simple and it took 3 years."

    Again, not a .NET problem. PHP, Java, C... software companies who are shit are going to cause people to drop out without leaving a trace of documentation behind, and if they are shit at training newcomers, sooner or later you'll have The Legacy Production Code that nobody has any idea of how it works, and are terrified to touch it.

    1. "To debug, just jam this stuff into your hosts file, browse to this URL, and attach to w3wp.exe. No, not that w3wp.exe... must be the other one."

    Seeing the other replies, I am shocked at how people are saying just debugging straight from Visual Studio with the "start" button doesn't work for them. What the fuck are you guys doing?!

    1. "Yeah, building is really slow. Don't forget to double-click this NPM Task Runner job after you build... Clojure can do what? Oh, we don't have time to learn Clojure with all the rebuilding and NPMing and attaching to w3wp.exe going on."

    Besides w3wp.exe, none of the above things are even .NET related! If you're complaining about NPM and Clojure as .NET problems, then I think I know part of who the problem is. And slow builds has been a fact of life throughout my career from time to time, and it was not only .NET.

    1. "So this project is 'code-first,' but the other ones are 'database-first.' Oh, and the old stuff is just ADO.NET with a database project You know how to do all three, right?"

    How connected are these projects? Are they distinct projects that have nothing to do with each other? I'm just confused as to what the issue is here.

    1. "We've built so many interfaces into this system over the years that it's really just impossible to change anything. Just avoid the CEO, he doesn't like hearing that."

    I don't know what this means, but I'm just going to assume, likewise, it isn't a .NET specific problem.



  • @PleegWat said in Thoughts on why so much .NET code is just awful...:

    @Weng said in Thoughts on why so much .NET code is just awful...:

    @Zenith said in Thoughts on why so much .NET code is just awful...:

    There's "this Win32 call structure for enumerating network connections is weird" and then there's "we think you only need to know if the network is up or not and nothing else."

    This sounds like a man who has also tried to get "the data shown in netstat"

    Pro tip: It's way easier just to shell out to netstat like a unixweenie.

    But that's not the Windows Way!!!

    Are you telling me I should parse command line output and depend on it never changing? Isn't that a major source of WTFs?

    The Win32 calls for this stuff are consistent. Allocate a structure and keep passing it to EnumerateX() until it returns a non-zero code (failure). Works the same way for printers, network adapters, graphics cards, etc. I'd just rather receive an array of structures than have to loop through calls like that. WMI is no better either because it's got that same irritating GetNext() pattern except now you're guessing at what fields/types came back because it's a stupid hashtable.


  • Java Dev

    @Zenith For the linux way, there's probably a pseudo-file in /proc somewhere.



  • @Unperverted-Vixen said in Thoughts on why so much .NET code is just awful...:

    Unfortunately NPM is now a generic front-end package manager; it’s not Node-exclusive anymore.

    🤤

    Why unfortunately? The main repository has some management issues, but the package manager itself is quite reasonable and reusing it for other things is better than the usual package manager proliferation.


    @MSgtSoupSandwich said in Thoughts on why so much .NET code is just awful...:

    At my last 3 jobs, there has been exactly that kind of mixing. I've seen MVC and WebForms in the same solution, and even a project that somehow had ASPX views in conjunction with MVC-style controllers and routes.

    I've seen mixture of Swing and JavaFX in one client in previous project. And of SpringBoot and RestEasy for the server. And on this project we use XML serialization, but also JSON and for one use-case ProtoBuf…

    @MSgtSoupSandwich said in Thoughts on why so much .NET code is just awful...:

    I guess that's my main point. There is probably no other framework or development technologies that has suffered through so many radically different flavors-of-the-month. The result is a lot of code that's written by people learning the latest flavor-of-the-month vs. coherently applying something proven and well-known.

    Most of them did actually. Hell, C++ now and C++ 20 years are a stretch to even call the same language. And let's not even get started on JavaScript—it's latest flavors don't last even months. Also let's not forget the Great Python Schism (which was a pretty risky move; similar schism effectively killed D), Swift's syntax-of-the-month…

    No, this is no way specific to .NET. As the technologies evolve, every project, whatever it is written in, tends to end up an ungodly mixture of styles.


    @The_Quiet_One said in Thoughts on why so much .NET code is just awful...:

    You have a choice between spending 12 months dedicated to updating everything to the latest and greatest while still providing updates to your software as needed, or you do it more gradually and piecemeal to be better responsive to any new features or bug fixes that need to be done during that time. If you have the time and resources to do the former, it's definitely better, but not every team has that luxury. Furthermore, this isn't a .NET specific problem.

    I would even argue it might not be better to clean up everything in one sweep. If you do a big sweep, you'll make a lot of mistakes and will end up facing a huge pile of bugs to fix that will be difficult to address, because each might be anywhere. Piecemeal clean-up will let you test each change, so you'll have much smaller scope trying to find what you didn't port correctly. Plus the ability to still make a release almost anytime is a huge benefit.


  • Garbage Person

    @Zenith said in Thoughts on why so much .NET code is just awful...:

    @PleegWat said in Thoughts on why so much .NET code is just awful...:

    @Weng said in Thoughts on why so much .NET code is just awful...:

    @Zenith said in Thoughts on why so much .NET code is just awful...:

    There's "this Win32 call structure for enumerating network connections is weird" and then there's "we think you only need to know if the network is up or not and nothing else."

    This sounds like a man who has also tried to get "the data shown in netstat"

    Pro tip: It's way easier just to shell out to netstat like a unixweenie.

    But that's not the Windows Way!!!

    Are you telling me I should parse command line output and depend on it never changing? Isn't that a major source of WTFs?

    The Win32 calls for this stuff are consistent. Allocate a structure and keep passing it to EnumerateX() until it returns a non-zero code (failure). Works the same way for printers, network adapters, graphics cards, etc. I'd just rather receive an array of structures than have to loop through calls like that. WMI is no better either because it's got that same irritating GetNext() pattern except now you're guessing at what fields/types came back because it's a stupid hashtable.

    I ended up parsing it. And yes, it's WTFy as fuck.

    Problem in my case is that they DID actually change the commandline tool in Win10 and added some whizzo new features that are awesome.

    But those features aren't in the Win32 API docs.


  • ♿ (Parody)

    ".NET is dying."
    @cartman82



  • @boomzilla Did Netcraft confirm it?


  • kills Dumbledore

    @MSgtSoupSandwich said in Thoughts on why so much .NET code is just awful...:

    Another factor is probably that almost all .NET developers are pure mercenaries. Getting out the door by 5PM trumps just about anything else. Management is allowed to stick their nose into technical decisions. Contractors on visas with third world educations are prevalent, etc.

    This whole thread seems to be "I have seen some developers do a thing and assume without evidence that it's entirely due to them getting infected with Microsoft Syphilis"


  • ♿ (Parody)

    @Jaloopa said in Thoughts on why so much .NET code is just awful...:

    @MSgtSoupSandwich said in Thoughts on why so much .NET code is just awful...:

    Another factor is probably that almost all .NET developers are pure mercenaries. Getting out the door by 5PM trumps just about anything else. Management is allowed to stick their nose into technical decisions. Contractors on visas with third world educations are prevalent, etc.

    This whole thread seems to be "I have seen some developers do a thing and assume without evidence that it's entirely due to them getting infected with Microsoft Syphilis"

    TIL. I thought it was a form of herpes.


  • Fake News

    @Zenith said in Thoughts on why so much .NET code is just awful...:

    @boomzilla Did Netcraft confirm it?

    You insensitive clod!


Log in to reply