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. AARRGGHHHH!!!!!

AARRGGHHHH!!!!!

Scheduled Pinned Locked Moved The Lounge
comfunctionalquestion
58 Posts 27 Posters 0 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.
  • M Marc Clifton

    I absolutely despise when people say "oh, I'm using this because it reduces the amount of code I have to type". F**** me. If you don't like typing, why are you a programmer? I need a punching bag in my home-office. Marc

    Imperative to Functional Programming Succinctly Contributors Wanted for Higher Order Programming Project!

    M Offline
    M Offline
    Mark_Wallace
    wrote on last edited by
    #18

    Marc Clifton wrote:

    If you don't like typing, why are you a programmer?

    Voice control is always an option. I know devs who'd happily use it very loudly when inputting code that they (erroneously) believe to be genius, and only use the keyboard to input their dirty hacks. I'd say that there's a possible connection between those guys and your guys.

    I wanna be a eunuchs developer! Pass me a bread knife!

    1 Reply Last reply
    0
    • M Mladen Jankovic

      I am. Why the hell not? It's more aesthetically pleasing and in most cases it does not reduce readability (for me, for you - don't care). I haven't use it much in C# before C++11 assigned new meaning to auto. Then I started replacing crap like this std::unordered_map<std::string, boring_class>::const_iterator with auto and then moved the habit to C#.

      Commodore 64 emulator for Windows Phone

      S Offline
      S Offline
      Slacker007
      wrote on last edited by
      #19

      Thank you. Exactly.

      F 1 Reply Last reply
      0
      • M Marc Clifton

        I absolutely despise when people say "oh, I'm using this because it reduces the amount of code I have to type". F**** me. If you don't like typing, why are you a programmer? I need a punching bag in my home-office. Marc

        Imperative to Functional Programming Succinctly Contributors Wanted for Higher Order Programming Project!

        M Offline
        M Offline
        Mycroft Holmes
        wrote on last edited by
        #20

        Thank you, I needed a good chuckle this morning. I do enjoy your rants, they align with my thinking rather nicely.

        Never underestimate the power of human stupidity RAH

        1 Reply Last reply
        0
        • M Marc Clifton

          I absolutely despise when people say "oh, I'm using this because it reduces the amount of code I have to type". F**** me. If you don't like typing, why are you a programmer? I need a punching bag in my home-office. Marc

          Imperative to Functional Programming Succinctly Contributors Wanted for Higher Order Programming Project!

          A Offline
          A Offline
          Abhinav S
          wrote on last edited by
          #21

          Marc Clifton wrote:

          oh, I'm using this because it reduces the amount of code I have to type

          Have you used LINQ? Do you know it reduces the amount of.....Oops.

          Mobile Apps - Sound Meter | Color Analyzer | SMBC | Football Doodles

          1 Reply Last reply
          0
          • P PIEBALDconsult

            Same thing I see with Linq/Lambdas ; it's still just the Cult of Fewer Keystrokes. X|

            J Offline
            J Offline
            JimmyRopes
            wrote on last edited by
            #22

            PIEBALDconsult wrote:

            Same thing I see with Linq/Lambdas ; it's still just the Cult of Fewer Keystrokes. X|

            I really like linq/lambdas. They unify the way many various things are accessed, and in my opinion make the code more readable. Just my opinion. Your mileage may vary.

            Once you lose your pride the rest is easy. In the end, only three things matter: how much you loved, how gently you lived, and how gracefully you let go of things not meant for you. – Buddha Simply Elegant Designs JimmyRopes Designs

            P 1 Reply Last reply
            0
            • J JimmyRopes

              PIEBALDconsult wrote:

              Same thing I see with Linq/Lambdas ; it's still just the Cult of Fewer Keystrokes. X|

              I really like linq/lambdas. They unify the way many various things are accessed, and in my opinion make the code more readable. Just my opinion. Your mileage may vary.

              Once you lose your pride the rest is easy. In the end, only three things matter: how much you loved, how gently you lived, and how gracefully you let go of things not meant for you. – Buddha Simply Elegant Designs JimmyRopes Designs

              P Offline
              P Offline
              PIEBALDconsult
              wrote on last edited by
              #23

              JimmyRopes wrote:

              They unify the way many various things are accessed

              To the lowest common, and therefore the least efficient, method possible. And it's unreadable.

              S J 2 Replies Last reply
              0
              • M Marc Clifton

                I absolutely despise when people say "oh, I'm using this because it reduces the amount of code I have to type". F**** me. If you don't like typing, why are you a programmer? I need a punching bag in my home-office. Marc

                Imperative to Functional Programming Succinctly Contributors Wanted for Higher Order Programming Project!

                B Offline
                B Offline
                Brady Kelly
                wrote on last edited by
                #24

                I always try and reduce the amount of code I type. I live by Intellisense and code snippets, or ReSharper's Live Templates, but, I am not scared of typing out long and meaningful member names to start with. That is, I loath contractions and acronyms in code.

                No object is so beautiful that, under certain conditions, it will not look ugly. - Oscar Wilde

                L 1 Reply Last reply
                0
                • M Marc Clifton

                  I absolutely despise when people say "oh, I'm using this because it reduces the amount of code I have to type". F**** me. If you don't like typing, why are you a programmer? I need a punching bag in my home-office. Marc

                  Imperative to Functional Programming Succinctly Contributors Wanted for Higher Order Programming Project!

                  R Offline
                  R Offline
                  Roger Wright
                  wrote on last edited by
                  #25

                  You sound like me, sometimes; you must be getting old, too. I once set out to master C++, and I spent many years trying to do so. But MS decided that everything had to run on an event-driven model, and get filtered through MFC, and have most of the code written by a robot and hidden from the programmer who was trying to learn the language. After 10 years, I gave up trying; coincidentally, MS gave up MFC about the same time. I come from a background in which, if there's no OS to work with, write one. If there's no off-the-shelf compiler, write one. If there's no language appropriate to the task, create one, and the tools to compile and link the modules. We're dinosaurs, Marc. The kids want all the hard parts done for them, while they spend their time making pretty, politically correct GUIs to make the Great Unwashed feel like they know how to operate a computer. We all know better, but if we tell them what we really think about their silly ideas and idiotic notions about what computers can and should do for us, we'll probably get fired. Roll with it, and keep praying for that big Lottery win; that's my retirement plan, and I'm sticking to it! :-D

                  Will Rogers never met me.

                  L 1 Reply Last reply
                  0
                  • S Slacker007

                    harold aptroot wrote:

                    There's a school of thought that it is applicable any time it is allowed.

                    I use ReSharper a lot, and it will ask you everytime it can to use implicit type declaration. So, I can see why some devs out there may think that it is good for everything. However, I have debugged code files that have had "var" all over the place, and it has not been an issue. If for some reason, I cannot tell the type, then hovering over "var" will tell you.

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

                    No. I will not rely on some IDE to tell me what my code means. Often enough the IDE is too busy showing me hysterical error messages or the parser got lost a little further up in the code and simply is not able to provide any useful information anymore. Second, especially when I have to work with complex baseclasses, I tend to use some good oldschool printouts of those baseclasses as reference. I tried using intellisense on a printout, but the result always was a classic 'Funny, no response!'. Third. I don't hover, not even when flying a helicopter.

                    The language is JavaScript. that of Mordor, which I will not utter here
                    This is Javascript. If you put big wheels and a racing stripe on a golf cart, it's still a fucking golf cart.
                    "I don't know, extraterrestrial?" "You mean like from space?" "No, from Canada." If software development were a circus, we would all be the clowns.

                    S S 2 Replies Last reply
                    0
                    • B Brady Kelly

                      I always try and reduce the amount of code I type. I live by Intellisense and code snippets, or ReSharper's Live Templates, but, I am not scared of typing out long and meaningful member names to start with. That is, I loath contractions and acronyms in code.

                      No object is so beautiful that, under certain conditions, it will not look ugly. - Oscar Wilde

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

                      Let's make the list a little longer: - Use 'this' wherever you can. It makes things much more readable when every second word is 'this'. - Use magic numbers, but not as a numeric type. Write only stringly typed code and use all kinds of error prone conversions where you can.

                      // I'm not good at this :-)
                      foreach(var MiscVal in LMAA)
                      {
                      var xdbrnf = this.DoReMiFaSo(MiscVal, 1);
                      if((xdbrnf == "0" || xdbrnf == "-1" || xdbrnf == "4") && int.parse(xdbrnf) < 42)
                      {
                      this.SlfDestrct();
                      }
                      }

                      The language is JavaScript. that of Mordor, which I will not utter here
                      This is Javascript. If you put big wheels and a racing stripe on a golf cart, it's still a fucking golf cart.
                      "I don't know, extraterrestrial?" "You mean like from space?" "No, from Canada." If software development were a circus, we would all be the clowns.

                      1 Reply Last reply
                      0
                      • R Roger Wright

                        You sound like me, sometimes; you must be getting old, too. I once set out to master C++, and I spent many years trying to do so. But MS decided that everything had to run on an event-driven model, and get filtered through MFC, and have most of the code written by a robot and hidden from the programmer who was trying to learn the language. After 10 years, I gave up trying; coincidentally, MS gave up MFC about the same time. I come from a background in which, if there's no OS to work with, write one. If there's no off-the-shelf compiler, write one. If there's no language appropriate to the task, create one, and the tools to compile and link the modules. We're dinosaurs, Marc. The kids want all the hard parts done for them, while they spend their time making pretty, politically correct GUIs to make the Great Unwashed feel like they know how to operate a computer. We all know better, but if we tell them what we really think about their silly ideas and idiotic notions about what computers can and should do for us, we'll probably get fired. Roll with it, and keep praying for that big Lottery win; that's my retirement plan, and I'm sticking to it! :-D

                        Will Rogers never met me.

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

                        Roger Wright wrote:

                        We're dinosaurs, Marc.

                        No. We have forgotten more about this stuff than some of them have ever known and by the time they catch up with us, they will be having the same discussions with the next generation of clowns who insist on commiting every old mistake in new ways.

                        The language is JavaScript. that of Mordor, which I will not utter here
                        This is Javascript. If you put big wheels and a racing stripe on a golf cart, it's still a fucking golf cart.
                        "I don't know, extraterrestrial?" "You mean like from space?" "No, from Canada." If software development were a circus, we would all be the clowns.

                        1 Reply Last reply
                        0
                        • M Marc Clifton

                          I absolutely despise when people say "oh, I'm using this because it reduces the amount of code I have to type". F**** me. If you don't like typing, why are you a programmer? I need a punching bag in my home-office. Marc

                          Imperative to Functional Programming Succinctly Contributors Wanted for Higher Order Programming Project!

                          S Offline
                          S Offline
                          Stefto
                          wrote on last edited by
                          #29

                          well, my boss pays me by the hour and he wishes to see results asap, that why.. oh! and i'm lazy

                          Life's like a nose, you've got to get out of it whats in it!

                          1 Reply Last reply
                          0
                          • P PIEBALDconsult

                            Same thing I see with Linq/Lambdas ; it's still just the Cult of Fewer Keystrokes. X|

                            S Offline
                            S Offline
                            Simon ORiordan from UK
                            wrote on last edited by
                            #30

                            linq in the xml context is faster, less lumpen, and more direct. An awful lot of advantages over xsd-generated classes. But I am forced by the seniors to use xsd because it requires less coding as it is automatic. Tomorrow I'm running a marathon wearing lead boots. :-D

                            1 Reply Last reply
                            0
                            • M Marc Clifton

                              I absolutely despise when people say "oh, I'm using this because it reduces the amount of code I have to type". F**** me. If you don't like typing, why are you a programmer? I need a punching bag in my home-office. Marc

                              Imperative to Functional Programming Succinctly Contributors Wanted for Higher Order Programming Project!

                              P Offline
                              P Offline
                              Paul Benson
                              wrote on last edited by
                              #31

                              Marc Clifton wrote:

                              If you don't like typing, why are you a programmer?

                              I'm a programmer because I like puzzles. Software development is usually the process of: 1. identifying the 'puzzle' 2. developing a solution 3. implement the solution with whatever tools you are given/have available Whilst 3 is still fun I don't want to write reams of code I don't need to so reducing the amount of code I type is fine by me. (Sorry for the boring answer to a hilarious rant :-\ )

                              1 Reply Last reply
                              0
                              • M Marc Clifton

                                I absolutely despise when people say "oh, I'm using this because it reduces the amount of code I have to type". F**** me. If you don't like typing, why are you a programmer? I need a punching bag in my home-office. Marc

                                Imperative to Functional Programming Succinctly Contributors Wanted for Higher Order Programming Project!

                                J Offline
                                J Offline
                                Jorgen Andersson
                                wrote on last edited by
                                #32

                                So you like assembly? Everything else is just reducing the amount of code you need to type.

                                Wrong is evil and must be defeated. - Jeff Ello

                                L 1 Reply Last reply
                                0
                                • M Marc Clifton

                                  I absolutely despise when people say "oh, I'm using this because it reduces the amount of code I have to type". F**** me. If you don't like typing, why are you a programmer? I need a punching bag in my home-office. Marc

                                  Imperative to Functional Programming Succinctly Contributors Wanted for Higher Order Programming Project!

                                  V Offline
                                  V Offline
                                  V 0
                                  wrote on last edited by
                                  #33

                                  There's a synonym for "punching bag". It's called "colleagues". Knock yourself one out! ;P

                                  V.
                                  (MQOTD rules and previous solutions)

                                  G 1 Reply Last reply
                                  0
                                  • P Pete OHanlon

                                    Try doing a code review in Crucible where someone's abused var and then see how you feel about that. ;)

                                    P Offline
                                    P Offline
                                    Paul Benson
                                    wrote on last edited by
                                    #34

                                    Interesting discussion. I found var a bit difficult to cope with at first as it does hide the actual type. Fortunately many IDEs will, as has been pointed out elsewhere, give you the type if you hover over the 'var'. This, however, doesn't help when dealing with printed/quoted code snippets or when working in an environment that doesn't reveal the type. So, my definition of 'appropriate' is where the type is obvious (usually because the assignment includes the type as part of a 'new' or a typecast of some kind) or because the type is so complicated that it obfuscates itself (e.g. nested generics with multiple parameters). In the latter case I either rely on VS for an explanation or, where possible, simplify the type by creating a new wrapper class/struct with XML help to explain what the class is about. The basic rule is "Think about other people when writing your code." Always ask yourself 'Can this be understood without having to look through reams of code or relying on an IDE to find variable/type definitions?' If not can it be simplified or explained?" If all else fails use a comment to explain (and thereby starts another argument :sigh: ).

                                    F 1 Reply Last reply
                                    0
                                    • J Jorgen Andersson

                                      So you like assembly? Everything else is just reducing the amount of code you need to type.

                                      Wrong is evil and must be defeated. - Jeff Ello

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

                                      Really? Writing (perhaps) a lable, an opcode and typically 0 - 2 operands actually looks quite spartan to me. Also, you have the single most important abstraction at your disposal: Structuring your code in subroutines or functions. The biggest bonus: There is little room for religious wars over styles or language features.

                                      The language is JavaScript. that of Mordor, which I will not utter here
                                      This is Javascript. If you put big wheels and a racing stripe on a golf cart, it's still a fucking golf cart.
                                      "I don't know, extraterrestrial?" "You mean like from space?" "No, from Canada." If software development were a circus, we would all be the clowns.

                                      J 1 Reply Last reply
                                      0
                                      • M Mladen Jankovic

                                        I am. Why the hell not? It's more aesthetically pleasing and in most cases it does not reduce readability (for me, for you - don't care). I haven't use it much in C# before C++11 assigned new meaning to auto. Then I started replacing crap like this std::unordered_map<std::string, boring_class>::const_iterator with auto and then moved the habit to C#.

                                        Commodore 64 emulator for Windows Phone

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

                                        Well ok, if it's some shitty long name it makes sense. If it's int or similar, it does not.

                                        1 Reply Last reply
                                        0
                                        • S Slacker007

                                          harold aptroot wrote:

                                          There's a school of thought that it is applicable any time it is allowed.

                                          I use ReSharper a lot, and it will ask you everytime it can to use implicit type declaration. So, I can see why some devs out there may think that it is good for everything. However, I have debugged code files that have had "var" all over the place, and it has not been an issue. If for some reason, I cannot tell the type, then hovering over "var" will tell you.

                                          OriginalGriffO Offline
                                          OriginalGriffO Offline
                                          OriginalGriff
                                          wrote on last edited by
                                          #37

                                          Slacker007 wrote:

                                          f for some reason, I cannot tell the type, then hovering over "var" will tell you.

                                          Yes, it will - but that wastes time and breaks the "flow" when reading the code. An explicit declaration is always clearer - particularly when it's to hold a method return value:

                                          var myVar = GetSomething();

                                          Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...

                                          "I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
                                          "Common sense is so rare these days, it should be classified as a super power" - Random T-shirt

                                          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