• Visitors can check out the Forum FAQ by clicking this link. You have to register before you can post: click the REGISTER link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. View our Forum Privacy Policy.
  • Want to receive the latest contracting news and advice straight to your inbox? Sign up to the ContractorUK newsletter here. Every sign up will also be entered into a draw to WIN £100 Amazon vouchers!

WTF of the day

Collapse
X
  •  
  • Filter
  • Time
  • Show
Clear All
new posts

    WTF of the day

    I have some code to look at. The main method calls a constructor that calls a constructor that calls a method called run() halfway through. So neither constructor returns until the process is shutting down.

    I have never seen that done before.
    While you're waiting, read the free novel we sent you. It's a Spanish story about a guy named 'Manual.'

    #2
    It's years since I did proper software development, and I had just learned Java and OOP, before I retrained in stats, over 10 years ago.
    But I have a question for you current software dev gurus: my eighties CS education 25 years ago did not specify any particular methodology for development, we just learned about top level stuff like NP-complete problems and feasible versus non-feasible problems, algorithmic processes etc.
    So is all this OOP stuff just a distraction? It seems to me there's nothing you can't do with a standard procedural language where you just create software using top-down or bottom-up programming with a collection of black-box functions that you put together?
    Hard Brexit now!
    #prayfornodeal

    Comment


      #3
      Originally posted by sasguru View Post
      It's years since I did proper software development, and I had just learned Java and OOP, before I retrained in stats, over 10 years ago.
      But I have a question for you current software dev gurus: my eighties CS education 25 years ago did not specify any particular methodology for development, we just learned about top level stuff like NP-complete problems and feasible versus non-feasible problems, algorithmic processes etc.
      So is all this OOP stuff just a distraction? It seems to me there's nothing you can't do with a standard procedural language where you just create software using top-down or bottom-up programming with a collection of black-box functions that you put together?
      And what exactly is wrong with an "ad hominem" argument? Dodgy Agent, 16-5-2014

      Comment


        #4
        FYI languages I have used: Lisp, Prolog, Pop-11, C (a lot), various flavours of MS Basic, Java.
        That probably explains my previous comments
        Hard Brexit now!
        #prayfornodeal

        Comment


          #5
          Their first time at using MVVM perhaps and they got a bit overwhelmed ?
          Doing the needful since 1827

          Comment


            #6
            sasguru,

            you are right the OO in the sense it was originally designed to make things easier to design, develop, implement, and maintain has been a massive failure.

            made worse by most often the OO application code sitting on top of a realtional database, and relational and OO not being easy bed fellows.

            indeed many big bespoke OO systems are a bigger nightmare to maintain than an older structural approach, once a few generations of folk have come and gone and any discipline falls apart.

            also the way the compliers work can be interesting, on one programme we had "big X object" and "small Y object" with years of design effort in them, the whole point being that small would be less space and quicker to pass around... of course in the end the small object was bigger than the big object, this and other nonsenses make life tough.

            but ive not really been a proper coder for ages either.

            but having said that using C++ or whatever you really need to go with the flow of constructors and destructors etc even if you have given up on doing anything properly in OO.

            oh in the 80's some of us were taught JSP jackson structured programming and so on, so we were not completely free format were we?

            ha ha

            Comment


              #7
              Originally posted by sasguru View Post
              So is all this OOP stuff just a distraction? It seems to me there's nothing you can't do with a standard procedural language where you just create software using top-down or bottom-up programming with a collection of black-box functions that you put together?
              Yes and no. It's true there's nothing you do with it that you couldn't do in some other way, but it provides a different set of abstractions that can make thinking about some things and actually doing them considerably easier. Obviously that has to be assessed in the context of other developments that have made life considerably easier and more productive for the modern software developer. Modern IDEs, garbage collection, enormous amounts of free and open source library code and so on.
              While you're waiting, read the free novel we sent you. It's a Spanish story about a guy named 'Manual.'

              Comment


                #8
                Originally posted by doodab View Post
                Yes and no. It's true there's nothing you do with it that you couldn't do in some other way, but it provides a different set of abstractions that can make thinking about some things and actually doing them considerably easier. Obviously that has to be assessed in the context of other developments that have made life considerably easier and more productive for the modern software developer. Modern IDEs, garbage collection, enormous amounts of free and open source library code and so on.
                Can you give me some examples? I'm dabbling with R at the moment and I use it to "munge" data to get it into shape for stat analysis, but R also has OOP capabilities and I can't quite see the need for it - of course I'm programming from a very pragmatic and simplistic viewpoint at the moment.
                Hard Brexit now!
                #prayfornodeal

                Comment


                  #9
                  Originally posted by sasguru View Post
                  Can you give me some examples? I'm dabbling with R at the moment and I use it to "munge" data to get it into shape for stat analysis, but R also has OOP capabilities and I can't quite see the need for it - of course I'm programming from a very pragmatic and simplistic viewpoint at the moment.
                  It can make code a lot more maintainable and testable. Using interfaces rather than concrete implementations you can effectively plug and play components so using mock objects, your whole application can be easily unit tested, alternative providers of a component can be used for different scenarios or components can be replaced or rewritten without any disruption to other components.

                  Comment


                    #10
                    Originally posted by doodab View Post
                    I have some code to look at. The main method calls a constructor that calls a constructor that calls a method called run() halfway through. So neither constructor returns until the process is shutting down.

                    I have never seen that done before.
                    c++ - What (not) to do in a constructor - Stack Overflow

                    In other words, constructors should be used for constructing objects, not doing heavy lifting.

                    Comment

                    Working...
                    X