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. Fine, I'll jump on the "I hate Microsoft" bandwagon

Fine, I'll jump on the "I hate Microsoft" bandwagon

Scheduled Pinned Locked Moved The Lounge
67 Posts 26 Posters 2 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.
  • J Jono Stewart

    Looks like a 'Right' to me, rather than a 'Left' :)

    S Offline
    S Offline
    Super Lloyd
    wrote on last edited by
    #40

    Ahem.. you know what? You could even be right! :rolleyes: :laugh:

    All in one Menu-Ribbon Bar DirectX for WinRT/C# since 2013! Taking over the world since 1371!

    1 Reply Last reply
    0
    • S Super Lloyd

      Oh my, you are the quick to hate type, are you not? One tiny method missing and *boom* I hate you MS! That escalated rather quickly! :O At any rate I give you here, free of charge, a solution to use for your own coding pleasure! No, no, no, there is no need to thank me!

      public static class StringExtensions {
      public static string Left(this string s, int n) {
      if (n >= s.Length)
      return "";
      return s.Substring(s.Length - n);
      }
      }

      All in one Menu-Ribbon Bar DirectX for WinRT/C# since 2013! Taking over the world since 1371!

      D Offline
      D Offline
      den2k88
      wrote on last edited by
      #41

      Excuse me but: Several GB worth of Framework, poorly documented, with an inextricable Hell of dependencies and Assembly idiosyncrasies and seemingly duplicated functionality which should live in the same ecosystem but are as incompatible as coffe and salt... and I have to write my farking own version of a function that existed 20 years ago to do the easiest and stupidest thing on Earth? So much for The Framework™.

      GCS d--- s-/++ a- C++++ U+++ P- L- E-- W++ N++ o+ K- w+++ O? M-- V? PS+ PE- Y+ PGP t++ 5? X R++ tv-- b+ DI+++ D++ G e++>+++ h--- ++>+++ y+++*      Weapons extension: ma- k++ F+2 X If you think 'goto' is evil, try writing an Assembly program without JMP. -- TNCaver When I was six, there were no ones and zeroes - only zeroes. And not all of them worked. -- Ravi Bhavnani

      S 1 Reply Last reply
      0
      • D den2k88

        Excuse me but: Several GB worth of Framework, poorly documented, with an inextricable Hell of dependencies and Assembly idiosyncrasies and seemingly duplicated functionality which should live in the same ecosystem but are as incompatible as coffe and salt... and I have to write my farking own version of a function that existed 20 years ago to do the easiest and stupidest thing on Earth? So much for The Framework™.

        GCS d--- s-/++ a- C++++ U+++ P- L- E-- W++ N++ o+ K- w+++ O? M-- V? PS+ PE- Y+ PGP t++ 5? X R++ tv-- b+ DI+++ D++ G e++>+++ h--- ++>+++ y+++*      Weapons extension: ma- k++ F+2 X If you think 'goto' is evil, try writing an Assembly program without JMP. -- TNCaver When I was six, there were no ones and zeroes - only zeroes. And not all of them worked. -- Ravi Bhavnani

        S Offline
        S Offline
        Super Lloyd
        wrote on last edited by
        #42

        I am still wondering if you are really throwing a tantrum for a "missing 2 lines function" or it is in fact a joke!? Haha! :laugh: Your seemingly deep anger make it all the more laughable! haha! :wtf: :rolleyes: :laugh:

        All in one Menu-Ribbon Bar DirectX for WinRT/C# since 2013! Taking over the world since 1371!

        D 1 Reply Last reply
        0
        • S Super Lloyd

          I am still wondering if you are really throwing a tantrum for a "missing 2 lines function" or it is in fact a joke!? Haha! :laugh: Your seemingly deep anger make it all the more laughable! haha! :wtf: :rolleyes: :laugh:

          All in one Menu-Ribbon Bar DirectX for WinRT/C# since 2013! Taking over the world since 1371!

          D Offline
          D Offline
          den2k88
          wrote on last edited by
          #43

          My tantrum is directeed to the pile of sunshine that is the .NET framework, in fact I usually make my own libraries anyway. Still for a "framework" so bloated not having a simple and fundamental function is basically an indication of utter failure.

          GCS d--- s-/++ a- C++++ U+++ P- L- E-- W++ N++ o+ K- w+++ O? M-- V? PS+ PE- Y+ PGP t++ 5? X R++ tv-- b+ DI+++ D++ G e++>+++ h--- ++>+++ y+++*      Weapons extension: ma- k++ F+2 X If you think 'goto' is evil, try writing an Assembly program without JMP. -- TNCaver When I was six, there were no ones and zeroes - only zeroes. And not all of them worked. -- Ravi Bhavnani

          S 1 Reply Last reply
          0
          • S Super Lloyd

            Oh my, you are the quick to hate type, are you not? One tiny method missing and *boom* I hate you MS! That escalated rather quickly! :O At any rate I give you here, free of charge, a solution to use for your own coding pleasure! No, no, no, there is no need to thank me!

            public static class StringExtensions {
            public static string Left(this string s, int n) {
            if (n >= s.Length)
            return "";
            return s.Substring(s.Length - n);
            }
            }

            All in one Menu-Ribbon Bar DirectX for WinRT/C# since 2013! Taking over the world since 1371!

            Z Offline
            Z Offline
            ZurdoDev
            wrote on last edited by
            #44

            Super Lloyd wrote:

            you are the quick to hate type, are you not?

            No.

            Super Lloyd wrote:

            One tiny method missing and boom I hate you MS!

            I'm trying to fit in with the Lounge crowd. :-\

            Super Lloyd wrote:

            public static class StringExtensions { public static string Left(this string s, int n) { if (n >= s.Length) return ""; return s.Substring(s.Length - n); } }

            You tried to sneak that one there. return "". How dare you. :mad:

            There are only 10 types of people in the world, those who understand binary and those who don't.

            1 Reply Last reply
            0
            • Z ZurdoDev

              So, C# has no left method on a string? :omg: :omg: It would be so easy to add one, lazy Microsoft C# developers. So, use substring. Whoops. Nope. Errors if you give it a length that is longer than the string. I miss VB. :sigh:

              There are only 10 types of people in the world, those who understand binary and those who don't.

              M Offline
              M Offline
              Member 10952144
              wrote on last edited by
              #45

              While MS gave you the power of Linq in C#....this gives you an infinite amount of possibilities. That combined with extensions, and you are so much better off than with VB! It's true, you'll have to spend 2 minutes of your personal precious time to write this code once, and to remember to add this extension 'lib' to all your projects where you might need them....boohoo. Sth like this... one line of code...

              public static string Left(this string inputString, int length) { return new string((from ch in inputString select ch).Take(length).ToArray()); }

              Now you can just Left a string by doing string.Left(5)....so easy but 1000 times more powerful (and prob as many times more performant) than VB....

              Z 1 Reply Last reply
              0
              • M Member 10952144

                While MS gave you the power of Linq in C#....this gives you an infinite amount of possibilities. That combined with extensions, and you are so much better off than with VB! It's true, you'll have to spend 2 minutes of your personal precious time to write this code once, and to remember to add this extension 'lib' to all your projects where you might need them....boohoo. Sth like this... one line of code...

                public static string Left(this string inputString, int length) { return new string((from ch in inputString select ch).Take(length).ToArray()); }

                Now you can just Left a string by doing string.Left(5)....so easy but 1000 times more powerful (and prob as many times more performant) than VB....

                Z Offline
                Z Offline
                ZurdoDev
                wrote on last edited by
                #46

                Member 10952144 wrote:

                you'll have to spend 2 minutes of your personal precious time to write this code

                Exactly!

                There are only 10 types of people in the world, those who understand binary and those who don't.

                M 1 Reply Last reply
                0
                • D dandy72

                  Well, he did mention VB. Which teaches everyone bad habits.

                  S Offline
                  S Offline
                  Slow Eddie
                  wrote on last edited by
                  #47

                  Since when is increasing programmer/developer (Whatever the term hipsters are using these days...) "teaching bad habits" ?:confused:

                  D 1 Reply Last reply
                  0
                  • Z ZurdoDev

                    Member 10952144 wrote:

                    you'll have to spend 2 minutes of your personal precious time to write this code

                    Exactly!

                    There are only 10 types of people in the world, those who understand binary and those who don't.

                    M Offline
                    M Offline
                    Member 10952144
                    wrote on last edited by
                    #48

                    Well it'll be less now if you just copy/paste the code....I think 30 secs will do now. Is prob just about as much as VB would need to show you its 'intellisense' info on the Left function ;-)

                    Z 1 Reply Last reply
                    0
                    • M Member 10952144

                      Well it'll be less now if you just copy/paste the code....I think 30 secs will do now. Is prob just about as much as VB would need to show you its 'intellisense' info on the Left function ;-)

                      Z Offline
                      Z Offline
                      ZurdoDev
                      wrote on last edited by
                      #49

                      My point is, why after all these years have the C# builders not added it in. It would only take a few minutes of their time.

                      There are only 10 types of people in the world, those who understand binary and those who don't.

                      M 1 Reply Last reply
                      0
                      • S Slow Eddie

                        Since when is increasing programmer/developer (Whatever the term hipsters are using these days...) "teaching bad habits" ?:confused:

                        D Offline
                        D Offline
                        dandy72
                        wrote on last edited by
                        #50

                        For one, VB teaches its users to take shortcuts. Like leaving words out of your sentences, and then taking for granted that others will understand what you meant just by context.

                        S 1 Reply Last reply
                        0
                        • Z ZurdoDev

                          My point is, why after all these years have the C# builders not added it in. It would only take a few minutes of their time.

                          There are only 10 types of people in the world, those who understand binary and those who don't.

                          M Offline
                          M Offline
                          Member 10952144
                          wrote on last edited by
                          #51

                          I understand your frustrations, but to be honest, I didn't ever miss that function. I did VB6 for years, I did Java for years, even did some Delphi, but now C# for quite some years, and every language has its benefits and its downsides, but C# really is the nicest language I've used, Delphi comes in second :-) The reasoning behind not providing a Left function I think is since it's not a core function, but more of a "convenience function", one that would give discussions among developers, since they would make their own 'more performing' version of that function. VB6 provided more convenience functions out of the box, since it was mainly meant to make software development 'as easy as possible'. And to be honest, I like the fact that C# provided us with Extensions, Linq, Entity Framework,... more than the couple of arguable functions they might have 'forgotten'. Here they were really one of the first to incorporate these new ideas, where Java now tries to catch up...

                          Z 1 Reply Last reply
                          0
                          • Z ZurdoDev

                            So, C# has no left method on a string? :omg: :omg: It would be so easy to add one, lazy Microsoft C# developers. So, use substring. Whoops. Nope. Errors if you give it a length that is longer than the string. I miss VB. :sigh:

                            There are only 10 types of people in the world, those who understand binary and those who don't.

                            P Offline
                            P Offline
                            PSU Steve
                            wrote on last edited by
                            #52

                            Left isn't a method of the String class in VB.NET either. It's hidden in the Microsoft.VisualBasic.Strings class. I work in VB.NET all the time and just created my own Left extension method, just like you would in C#.

                            1 Reply Last reply
                            0
                            • M Member 10952144

                              I understand your frustrations, but to be honest, I didn't ever miss that function. I did VB6 for years, I did Java for years, even did some Delphi, but now C# for quite some years, and every language has its benefits and its downsides, but C# really is the nicest language I've used, Delphi comes in second :-) The reasoning behind not providing a Left function I think is since it's not a core function, but more of a "convenience function", one that would give discussions among developers, since they would make their own 'more performing' version of that function. VB6 provided more convenience functions out of the box, since it was mainly meant to make software development 'as easy as possible'. And to be honest, I like the fact that C# provided us with Extensions, Linq, Entity Framework,... more than the couple of arguable functions they might have 'forgotten'. Here they were really one of the first to incorporate these new ideas, where Java now tries to catch up...

                              Z Offline
                              Z Offline
                              ZurdoDev
                              wrote on last edited by
                              #53

                              Member 10952144 wrote:

                              I understand your frustrations,

                              Actually, I don't think you do, but that is my fault. I think a lot of other people thought I was seriously "hating" on Microsoft. My original post was done tongue-in-cheek. I do find it weird that they don't have the LEFT method on a string but it doesn't actually bother me at all. I just wanted to get in on all the hating going on with something silly. :-\ But, you do make good points.

                              There are only 10 types of people in the world, those who understand binary and those who don't.

                              1 Reply Last reply
                              0
                              • D dandy72

                                For one, VB teaches its users to take shortcuts. Like leaving words out of your sentences, and then taking for granted that others will understand what you meant just by context.

                                S Offline
                                S Offline
                                Slow Eddie
                                wrote on last edited by
                                #54

                                Well it seems to me that documenting your code resolves that issue. AND it is easier and quicker to do, and still more productive. Bad programmers will always "take shortcuts". Do not blame that on VB, or any other language, for that matter. The language, any language, doesn't "teach" anything, to a programmer. If you shoot yourself in the foot with a handgun (after completing the required safety training), is it the gun's fault? VB's problem is that it is not "Hip" anymore. Go listen to Billy Joel's "Still Rock and Roll". It is universally applicable.

                                What's the matter with the clothes I'm wearing? "Can't you tell that your tie's too wide?" Maybe I should buy some old tab collars? "Welcome back to the age of jive.

                                1 Reply Last reply
                                0
                                • Z ZurdoDev

                                  So, C# has no left method on a string? :omg: :omg: It would be so easy to add one, lazy Microsoft C# developers. So, use substring. Whoops. Nope. Errors if you give it a length that is longer than the string. I miss VB. :sigh:

                                  There are only 10 types of people in the world, those who understand binary and those who don't.

                                  J Offline
                                  J Offline
                                  jtmueller
                                  wrote on last edited by
                                  #55

                                  C# doesn't have ANY methods on string. The methods on string are part of the .NET framework, and are the same for any .NET language - C#, VB, F#, you name it.

                                  1 Reply Last reply
                                  0
                                  • Z ZurdoDev

                                    So, C# has no left method on a string? :omg: :omg: It would be so easy to add one, lazy Microsoft C# developers. So, use substring. Whoops. Nope. Errors if you give it a length that is longer than the string. I miss VB. :sigh:

                                    There are only 10 types of people in the world, those who understand binary and those who don't.

                                    S Offline
                                    S Offline
                                    StatementTerminator
                                    wrote on last edited by
                                    #56

                                    Wow, go do some string manipulations in ANSI C, that'll give you something to complain about :) As a general rule, the more powerful the language the more responsibility the programmer has for implementing algorithms correctly. Checking bounds before taking a bite out of an array is basic stuff, why should the language hold your hand for that? This kind of thing annoys me about VB, getting back a string that is shorter than the length you specified is like just having the language ignore an exception and give an arbitrary result. It's not what you asked for, and you shouldn't get it. What if code down the line is expecting the string to be that exact length?

                                    Z 1 Reply Last reply
                                    0
                                    • S StatementTerminator

                                      Wow, go do some string manipulations in ANSI C, that'll give you something to complain about :) As a general rule, the more powerful the language the more responsibility the programmer has for implementing algorithms correctly. Checking bounds before taking a bite out of an array is basic stuff, why should the language hold your hand for that? This kind of thing annoys me about VB, getting back a string that is shorter than the length you specified is like just having the language ignore an exception and give an arbitrary result. It's not what you asked for, and you shouldn't get it. What if code down the line is expecting the string to be that exact length?

                                      Z Offline
                                      Z Offline
                                      ZurdoDev
                                      wrote on last edited by
                                      #57

                                      StatementTerminator wrote:

                                      This kind of thing annoys me about VB, getting back a string that is shorter than the length you specified is like just having the language ignore an exception and give an arbitrary result.

                                      Not even close. It's like being a human. If you asked someone, "hey, give me the first 100 characters of the phrase 'i love VB'", would you expect them to yell at you with an exception or to just return your string? Maybe you think too much like a computer instead of a human. :-\

                                      There are only 10 types of people in the world, those who understand binary and those who don't.

                                      S 1 Reply Last reply
                                      0
                                      • Z ZurdoDev

                                        StatementTerminator wrote:

                                        This kind of thing annoys me about VB, getting back a string that is shorter than the length you specified is like just having the language ignore an exception and give an arbitrary result.

                                        Not even close. It's like being a human. If you asked someone, "hey, give me the first 100 characters of the phrase 'i love VB'", would you expect them to yell at you with an exception or to just return your string? Maybe you think too much like a computer instead of a human. :-\

                                        There are only 10 types of people in the world, those who understand binary and those who don't.

                                        S Offline
                                        S Offline
                                        StatementTerminator
                                        wrote on last edited by
                                        #58

                                        RyanDev wrote:

                                        If you asked someone, "hey, give me the first 100 characters of the phrase 'i love VB'", would you expect them to yell at you with an exception or to just return your string?

                                        I would expect different answers from different people, which is exactly the point. And yes, I would be the elephanting Vulcan who says that the question is unanswerable, because what is being asked for can't be given.

                                        Z 1 Reply Last reply
                                        0
                                        • D den2k88

                                          My tantrum is directeed to the pile of sunshine that is the .NET framework, in fact I usually make my own libraries anyway. Still for a "framework" so bloated not having a simple and fundamental function is basically an indication of utter failure.

                                          GCS d--- s-/++ a- C++++ U+++ P- L- E-- W++ N++ o+ K- w+++ O? M-- V? PS+ PE- Y+ PGP t++ 5? X R++ tv-- b+ DI+++ D++ G e++>+++ h--- ++>+++ y+++*      Weapons extension: ma- k++ F+2 X If you think 'goto' is evil, try writing an Assembly program without JMP. -- TNCaver When I was six, there were no ones and zeroes - only zeroes. And not all of them worked. -- Ravi Bhavnani

                                          S Offline
                                          S Offline
                                          Super Lloyd
                                          wrote on last edited by
                                          #59

                                          Yes, just like you, I wouldn't use the .NET Framework for anything, obviously! It doesn't even have a .Left() method on string, for god's sake man! Who make that shit?! :omg: :laugh:

                                          All in one Menu-Ribbon Bar DirectX for WinRT/C# since 2013! Taking over the world since 1371!

                                          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