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. So I'm staring at <100 lines of Ruby code...

So I'm staring at <100 lines of Ruby code...

Scheduled Pinned Locked Moved The Lounge
csharprubycomfunctionallearning
19 Posts 7 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.
  • P Pete OHanlon

    Marc's taken up a new contract - they use Ruby.

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

    That's scary. Marc's one of the good guys, and deserves better!

    Will Rogers never met me.

    M 1 Reply Last reply
    0
    • M Marc Clifton

      and I could probably write an entire book ripping to shreds the stupid things in that 100 lines of code. And yes, you really only find this level of BS in people who write Ruby. For all that I complain about other C# code I've had to work on, you rarely see abuses like this. Yes, it can happen, but Ruby has a particular knack for "creating stupid." Marc

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

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

      I assume this is work related. Maybe, the new gig you got. If so, this could be why they hired you. To right the wrongs that have plagued them. Good luck, and may the force be with you.

      M 1 Reply Last reply
      0
      • M Mycroft Holmes

        So Ruby is the new VB!

        Never underestimate the power of human stupidity RAH

        M Offline
        M Offline
        Marc Clifton
        wrote on last edited by
        #12

        Mycroft Holmes wrote:

        So Ruby is the new VB!

        Basically. ;) I think that pretty much sums it up. It's advertised as a language you can learn really quickly, and so you see a lot of bad practices, no understanding of OO concepts, etc. Marc

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

        1 Reply Last reply
        0
        • L Lost User

          So it does not meet the goal:

          Wikipedia

          Ruby is said to follow the principle of least astonishment (POLA), meaning that the language should behave in such a way as to minimize confusion for experienced users.

          Peter Wasser "The whole problem with the world is that fools and fanatics are always so certain of themselves, and wiser people so full of doubts." - Bertrand Russell

          M Offline
          M Offline
          Marc Clifton
          wrote on last edited by
          #13

          pwasser wrote:

          meaning that the language should behave in such a way as to minimize confusion for experienced users.

          That's a joke. The abuse of "method_missing", allowing people to write extensions to classes, creates unknown side-effects. OOP is not really implemented in Ruby, it sort of looks OO, but it isn't, and when extending classes with include/extend/require/inherit/load (I can't keep it straight what does what) you get a mess of additional behaviors. C#'s "partial" was tolerable in separating out UI initialization from event handlers and has uses in other ways too, but Ruby really allows the programmer to makes a mess of things. Marc

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

          D 1 Reply Last reply
          0
          • L Lost User

            Weird and Wonderful? ...Or just mildly painful? Y U no post it?! :p

            Anything that could possibly go wrong in some moment, will definitely go wrong in the worst possible moment...
            In the worst way that could be possible!

            –Finagle's corollary to Murphy's Law (paraphrased).

            M Offline
            M Offline
            Marc Clifton
            wrote on last edited by
            #14

            Leandro Taset wrote:

            Y U no post it?!

            Because these are worthy of a real blog post, which I'll do soon enough. Marc

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

            1 Reply Last reply
            0
            • P Pete OHanlon

              Marc's taken up a new contract - they use Ruby.

              M Offline
              M Offline
              Marc Clifton
              wrote on last edited by
              #15

              Pete O'Hanlon wrote:

              Marc's taken up a new contract

              Shhhh! :~ Marc

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

              1 Reply Last reply
              0
              • R Roger Wright

                That's scary. Marc's one of the good guys, and deserves better!

                Will Rogers never met me.

                M Offline
                M Offline
                Marc Clifton
                wrote on last edited by
                #16

                Roger Wright wrote:

                That's scary. Marc's one of the good guys, and deserves better!

                Well, to the company's credit, this is code that they've inherited, and from what I've seen so far, I'm working with a bunch of really smart people, so I'm looking forward to expanding my knowledge as well. Plus, they also do .NET development, so hopefully one day I'll be able to move onto a project in that arena, but right now, they have a pressing need for some Rails work. Marc

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

                1 Reply Last reply
                0
                • S Slacker007

                  I assume this is work related. Maybe, the new gig you got. If so, this could be why they hired you. To right the wrongs that have plagued them. Good luck, and may the force be with you.

                  M Offline
                  M Offline
                  Marc Clifton
                  wrote on last edited by
                  #17

                  Slacker007 wrote:

                  Good luck, and may the force be with you.

                  Thanks! It'll be a journey. Smart people though, that I'm working with. (the code base is inherited) So that helps to balance things out. Marc

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

                  1 Reply Last reply
                  0
                  • M Marc Clifton

                    pwasser wrote:

                    meaning that the language should behave in such a way as to minimize confusion for experienced users.

                    That's a joke. The abuse of "method_missing", allowing people to write extensions to classes, creates unknown side-effects. OOP is not really implemented in Ruby, it sort of looks OO, but it isn't, and when extending classes with include/extend/require/inherit/load (I can't keep it straight what does what) you get a mess of additional behaviors. C#'s "partial" was tolerable in separating out UI initialization from event handlers and has uses in other ways too, but Ruby really allows the programmer to makes a mess of things. Marc

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

                    D Offline
                    D Offline
                    Dan Neely
                    wrote on last edited by
                    #18

                    More importantly, since the winform designer loves to randomly reorder its generated code even when you're not touching the designer itself, it shifts a huge cluster elephant of diff noise out of the files I care about 95% of the time.

                    Did you ever see history portrayed as an old man with a wise brow and pulseless heart, waging all things in the balance of reason? Is not rather the genius of history like an eternal, imploring maiden, full of fire, with a burning heart and flaming soul, humanly warm and humanly beautiful? --Zachris Topelius Training a telescope on one’s own belly button will only reveal lint. You like that? You go right on staring at it. I prefer looking at galaxies. -- Sarah Hoyt

                    M 1 Reply Last reply
                    0
                    • D Dan Neely

                      More importantly, since the winform designer loves to randomly reorder its generated code even when you're not touching the designer itself, it shifts a huge cluster elephant of diff noise out of the files I care about 95% of the time.

                      Did you ever see history portrayed as an old man with a wise brow and pulseless heart, waging all things in the balance of reason? Is not rather the genius of history like an eternal, imploring maiden, full of fire, with a burning heart and flaming soul, humanly warm and humanly beautiful? --Zachris Topelius Training a telescope on one’s own belly button will only reveal lint. You like that? You go right on staring at it. I prefer looking at galaxies. -- Sarah Hoyt

                      M Offline
                      M Offline
                      Marc Clifton
                      wrote on last edited by
                      #19

                      Dan Neely wrote:

                      it shifts a huge cluster elephant of diff noise out of the files I care about 95% of the time.

                      Exactly! And then, ironically, I saw "partial" abused by programmers, oh, let's write these methods here, those methods there, so that our class is smaller and it looks better, and we can just extend our class by adding another file defining a partial class! :sigh: Marc

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

                      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