Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. The Lounge
  3. Why is .NET so popular? (Serious Question)

Why is .NET so popular? (Serious Question)

Scheduled Pinned Locked Moved The Lounge
csharphelpquestionc++java
146 Posts 75 Posters 48 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • G grgran

    DIP switch !!! DIP switch!!!! that's for you little ones just out of diapers Paddle switches are what you need I don't want to get out my bifocals magnifying glass just to move a switch with a toothpick. Real men use big beefy paddle switches for input (directly into memory) in octal, cause hex is for sissies.

    G Offline
    G Offline
    ghle
    wrote on last edited by
    #133

    :thumbsup:

    Gary

    1 Reply Last reply
    0
    • L Lost User

      In languages like C, C++, C#, Java etc you still "have to" know how numbers are represented - ok you might get away with ignoring issues like that, but then your code is likely to suck. Such as this, I never want to see this, if I see this I will tell you in your face that you suck and I will tell your boss to fire you:

      bool IsPowerOf2(int x)
      {
      for (int i = 0; i < 32; i++)
      if ((int)Math.Pow(2, i) == x)
      return true;
      return false;
      }

      And yes, I saw that one in the wild. Suggested replacement: return (x & (x - 1)) == 0; edit: the replacement treats 0 as power of 2, of course, usually not a problem in my experience and easy enough to change.

      G Offline
      G Offline
      ghle
      wrote on last edited by
      #134

      harold aptroot wrote:

      Suggested replacement: return (x & (x - 1)) == 0;

      Um, faster, more clear...

      return (x & 0x01) == 0; // Powers of two can't have LSB set, cause that would be an odd number

      Or better, why would this need a routine, consuming those wasteful machine instructions and wait states?

      if 0 != x & 0x01
      {
      }

      Gary

      L 1 Reply Last reply
      0
      • _ _beauw_

        > The language and the framework are two different things. True, but I also think that ends up being a trivial distinction in practice. C# typically implies the .NET Framework, while assembly language typically does not. My comment attempted to make the point that working in a low-level development shop is not as agonizingly slow and difficult as .NET programmers seem to think it is. If nothing else, those .NET programmers spend more time scratching their heads and looking at the "hourglass cursor" than their assembly language counterparts do. Beyond that, Microsoft has done a good job of conflating .NET with its languages. C# is not C; it does not run on a wide variety of hardware, and it does not seem to be used independently of the .NET Framework to any significant degree. Personally, I like .NET because of its development tools. Breakpoints, step-by-step execution, watches, Intellisense, etc. are all easily available right out-of-the-box.

        G Offline
        G Offline
        ghle
        wrote on last edited by
        #135

        _beauw_ wrote:

        Personally, I like .NET because of its development tools. Breakpoints, step-by-step execution, watches, Intellisense, etc. are all easily available right out-of-the-box.

        I don't understand what is so unique here. I work with a 25-year old KMAN language, has all of above built in except Intellisense. C, C++, Assembly have the same capabilities in their tools. And before you ask, because it's not broke, that's why. :-O It bothers me that every month MS is downloading .NET updates to Windows. And when the update doesn't work, you have to unload all .NET (per MS knowledge base), then start over with a reinstall, followed by all updates to date. That kills productivity for users and support staff.

        Gary

        _ 1 Reply Last reply
        0
        • G ghle

          harold aptroot wrote:

          Suggested replacement: return (x & (x - 1)) == 0;

          Um, faster, more clear...

          return (x & 0x01) == 0; // Powers of two can't have LSB set, cause that would be an odd number

          Or better, why would this need a routine, consuming those wasteful machine instructions and wait states?

          if 0 != x & 0x01
          {
          }

          Gary

          L Offline
          L Offline
          Lost User
          wrote on last edited by
          #136

          That is not even correct..

          G 1 Reply Last reply
          0
          • L Luc Pattyn

            Rama Krishna Vavilala wrote:

            Depends on whom you ask

            Indeed. Let's see: 1. My editor: C# 2. My IDE: C# 3. My system tools: C# 4. My cross-compilers: C# 5. My simulators: C# 6. My image processing: C# + native C 7. My automation stuff: C# 8. My chess utilities: C# 9. My model railroad: C (on Mac), to be ported to C# 10. My web site: PHP (unfortunately) 11. My embedded stuff: C I'll use a native DLL when it is the right choice that fits the requirements, however I can't remember when I last did a native EXE. :)

            Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles] Nil Volentibus Arduum

            Please use <PRE> tags for code snippets, they preserve indentation, and improve readability.

            G Offline
            G Offline
            ghle
            wrote on last edited by
            #137

            Luc Pattyn wrote:

            Indeed. Let's see: 1. My editor: C# 2. My IDE: C# 3. My system tools: C# 4. My cross-compilers: C# 5. My simulators: C# 6. My image processing: C# + native C 7. My automation stuff: C# 8. My chess utilities: C# 9. My model railroad: C (on Mac), to be ported to C# 10. My web site: PHP (unfortunately) 11. My embedded stuff: C

            Ah yes, but my compiler compiles your compiler. :)

            Gary

            1 Reply Last reply
            0
            • L Lost User

              That is not even correct..

              G Offline
              G Offline
              ghle
              wrote on last edited by
              #138

              harold aptroot wrote:

              That is not even correct..

              Um, I think it is, unless I am missing something. Powers of 2: 1,2,4,8,16,... :-O Oops, not even/odd. My bad. I stand corrected. I shall delete my post. Duh. Guess I shouldn't code at 3:30 AM. [Edit: 1,2,4,... not 0,2,4,... I'm going to bed now. :zzz: ]

              Gary

              modified on Friday, December 3, 2010 4:00 AM

              1 Reply Last reply
              0
              • L Lost User

                In languages like C, C++, C#, Java etc you still "have to" know how numbers are represented - ok you might get away with ignoring issues like that, but then your code is likely to suck. Such as this, I never want to see this, if I see this I will tell you in your face that you suck and I will tell your boss to fire you:

                bool IsPowerOf2(int x)
                {
                for (int i = 0; i < 32; i++)
                if ((int)Math.Pow(2, i) == x)
                return true;
                return false;
                }

                And yes, I saw that one in the wild. Suggested replacement: return (x & (x - 1)) == 0; edit: the replacement treats 0 as power of 2, of course, usually not a problem in my experience and easy enough to change.

                G Offline
                G Offline
                ghle
                wrote on last edited by
                #139

                harold aptroot wrote:

                Suggested replacement: return (x & (x - 1)) == 0;

                Had to rethink this one. I think wiki algorithm won't work for maximum negative int number. Subtract 1 from it and you'll end up with zero (plus overflow), passing the test with an incorrect returned result.

                Gary

                L 1 Reply Last reply
                0
                • G ghle

                  harold aptroot wrote:

                  Suggested replacement: return (x & (x - 1)) == 0;

                  Had to rethink this one. I think wiki algorithm won't work for maximum negative int number. Subtract 1 from it and you'll end up with zero (plus overflow), passing the test with an incorrect returned result.

                  Gary

                  L Offline
                  L Offline
                  Lost User
                  wrote on last edited by
                  #140

                  That's true, however even with 2 special cases for 0 and int.MinValue, it's still a heck of a lot better than a loop with Math.Pow (which, btw, is super inaccurate)

                  G 1 Reply Last reply
                  0
                  • B b_dunphy

                    I have some limited experience with C# and VS 2008 and I don't understand why the .Net framework is so popular. It is a meta environment running on top of the operating system just like Java and the non-Windows implementations do not have all of the capabilities of the Windows version so it's not truly cross platform. I don't see why -- other than Microsoft's semi-forcing the issue -- someone would choose to use this. Shouldn't Win32/64 code run just as well, if not better, since there is no runtime between the code and the system? I can't help thinking of Java or even UCSD P-System Pascal when I look at this. I realize .Net has a large amount of built-in functionality but the same thing could be implemented in native code as well. What am I not seeing here?

                    S Offline
                    S Offline
                    Steve Naidamast
                    wrote on last edited by
                    #141

                    You're right! Let's just chuck the whole thing and start over... :) :-D

                    Steve Naidamast Black Falcon Software, Inc. blackfalconsoftware@ix.netcom.com

                    1 Reply Last reply
                    0
                    • L Lost User

                      That's true, however even with 2 special cases for 0 and int.MinValue, it's still a heck of a lot better than a loop with Math.Pow (which, btw, is super inaccurate)

                      G Offline
                      G Offline
                      ghle
                      wrote on last edited by
                      #142

                      harold aptroot wrote:

                      That's true, however even with 2 special cases for 0 and int.MinValue, it's still a heck of a lot better than a loop with Math.Pow (which, btw, is super inaccurate)

                      Harold, you are absolutely correct. I had an Oh-My-Gawd moment when I saw that original logic. Reminds me of a programmer - previous experience was IBM-Assembly - that was given to me for a good-sized project. He would get his work done, but he would struggle. I took time to review his code one day. The man started by writing 90% debug code in his logic, then commenting - I mean GoToing around - his code as he got it to work. Nothing but a pile of garbage. I think someone didn't do their due diligence before hiring this guy. [ What is your experience? IBM-Assembler! You're hired. ]

                      Gary

                      1 Reply Last reply
                      0
                      • B b_dunphy

                        I have some limited experience with C# and VS 2008 and I don't understand why the .Net framework is so popular. It is a meta environment running on top of the operating system just like Java and the non-Windows implementations do not have all of the capabilities of the Windows version so it's not truly cross platform. I don't see why -- other than Microsoft's semi-forcing the issue -- someone would choose to use this. Shouldn't Win32/64 code run just as well, if not better, since there is no runtime between the code and the system? I can't help thinking of Java or even UCSD P-System Pascal when I look at this. I realize .Net has a large amount of built-in functionality but the same thing could be implemented in native code as well. What am I not seeing here?

                        M Offline
                        M Offline
                        mbb01
                        wrote on last edited by
                        #143

                        Simply put, .NET environment provides so much support that you don't really need to worry about a lot of the low level stuff most of the time; rather you can spend your mental engeries on actually delivering a product.

                        1 Reply Last reply
                        0
                        • G ghle

                          _beauw_ wrote:

                          Personally, I like .NET because of its development tools. Breakpoints, step-by-step execution, watches, Intellisense, etc. are all easily available right out-of-the-box.

                          I don't understand what is so unique here. I work with a 25-year old KMAN language, has all of above built in except Intellisense. C, C++, Assembly have the same capabilities in their tools. And before you ask, because it's not broke, that's why. :-O It bothers me that every month MS is downloading .NET updates to Windows. And when the update doesn't work, you have to unload all .NET (per MS knowledge base), then start over with a reinstall, followed by all updates to date. That kills productivity for users and support staff.

                          Gary

                          _ Offline
                          _ Offline
                          _beauw_
                          wrote on last edited by
                          #144

                          I was just trying to answer the original question (why I like .NET) after spending a couple of paragraphs basically relating the opposite (why I do not). But that's a good point; the interactive debugger definitely did not originate with .NET. I would go on to say that it also did not invent (or even improve upon) the idea of automatic garbage collection. The update problem bothers me, too, as does the fact that .NET and Visual Studio seem to be getting needlessly flabby. I recall migrating a WPF project from VS 2005 to VS 2008 during development, for example, and watching IDE memory usage more than double. The sad thing is that I was hoping for specific bug fixes that didn't end up getting included (e.g. designer support for ViewBoxes, which I know to be an easy fix for Microsoft.) None of this is to say that I hate .NET; it does have some problems, though.

                          1 Reply Last reply
                          0
                          • B b_dunphy

                            I have some limited experience with C# and VS 2008 and I don't understand why the .Net framework is so popular. It is a meta environment running on top of the operating system just like Java and the non-Windows implementations do not have all of the capabilities of the Windows version so it's not truly cross platform. I don't see why -- other than Microsoft's semi-forcing the issue -- someone would choose to use this. Shouldn't Win32/64 code run just as well, if not better, since there is no runtime between the code and the system? I can't help thinking of Java or even UCSD P-System Pascal when I look at this. I realize .Net has a large amount of built-in functionality but the same thing could be implemented in native code as well. What am I not seeing here?

                            F Offline
                            F Offline
                            freenky
                            wrote on last edited by
                            #145

                            Probably you ask yourself why all the ppl here make fun of this thread, well more or less :D. The answer you are seeking for would be a document of about 200 pages with brief descriptions of all the advantages, disadvantages and all the other elements that come with development like the community. Long story short: when you experience a few environments and a few companies and try solving complex problems in each environment then and only then you will get an answer to your question. Regards, Sanjin.

                            1 Reply Last reply
                            0
                            • B b_dunphy

                              I have some limited experience with C# and VS 2008 and I don't understand why the .Net framework is so popular. It is a meta environment running on top of the operating system just like Java and the non-Windows implementations do not have all of the capabilities of the Windows version so it's not truly cross platform. I don't see why -- other than Microsoft's semi-forcing the issue -- someone would choose to use this. Shouldn't Win32/64 code run just as well, if not better, since there is no runtime between the code and the system? I can't help thinking of Java or even UCSD P-System Pascal when I look at this. I realize .Net has a large amount of built-in functionality but the same thing could be implemented in native code as well. What am I not seeing here?

                              J Offline
                              J Offline
                              jschell
                              wrote on last edited by
                              #146

                              b_dunphy wrote:

                              I have some limited experience with C# and VS 2008 and I don't understand why the .Net framework is so popular.

                              What makes you think that it is "popular"? How do you define that term? The only data I have seen that seems realistic in terms of the commercial space is the following. http://www.tiobe.com/index.php/content/paperinfo/tpci/index.html[^] In terms of that C# is going up but VB is going down. Thus .Net as a group over time has remained basically flat.

                              1 Reply Last reply
                              0
                              Reply
                              • Reply as topic
                              Log in to reply
                              • Oldest to Newest
                              • Newest to Oldest
                              • Most Votes


                              • Login

                              • Don't have an account? Register

                              • Login or register to search.
                              • First post
                                Last post
                              0
                              • Categories
                              • Recent
                              • Tags
                              • Popular
                              • World
                              • Users
                              • Groups