• 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

    #11
    OOP and Threads are too hard to cope with for most programmers especially the offshore variety. This can easily be demonstrated by watching the CPU/core activity on any random server. I have lost count of the number of times I have been dragged into software performance meetings smugly armed with a set of SAR stats or Windows Performance counters both showing a consistently spinning thread and 15 other cores in a wait state.

    Those meetings tend to be short and VERY brutal...

    Comment


      #12
      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.
      OOP is an excellent conceptual fit for event driven GUI apps. In fact I'd argue that the rise of graphical desktops drove it's widespread adoption more than anything else. By encapsulating code and data together it also facilitates or makes much easier a lot of modern software development practices like TDD, inversion of control and so on.

      I'd say that functional programming is a better fit for expressing mathematical ideas though.
      While you're waiting, read the free novel we sent you. It's a Spanish story about a guy named 'Manual.'

      Comment


        #13
        Originally posted by DimPrawn View Post
        c++ - What (not) to do in a constructor - Stack Overflow

        In other words, constructors should be used for constructing objects, not doing heavy lifting.
        It's ******* hard work to unit test an object you can't actually construct as well
        While you're waiting, read the free novel we sent you. It's a Spanish story about a guy named 'Manual.'

        Comment


          #14
          Originally posted by sasguru View Post
          I
          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?
          There's nothing you can do with a standard procedural language (such as you describe) that you can't do in raw assembly language, it's about creating reusable and maintainable code rather than doing things which were impossible before.
          Originally posted by MaryPoppins
          I'd still not breastfeed a nazi
          Originally posted by vetran
          Urine is quite nourishing

          Comment


            #15
            I don't know why people struggle conceptually to write OO programs but even today the vast majority of programmers misunderstand and misuse it.

            Last 4 apps I have worked on have been written in the last 3 years and are built up of anaemic data objects and a set of procedural classes that manipulate the data objects. And these were designed by supposedly guru OO people.

            Comment


              #16
              Originally posted by doodab View Post
              OOP is an excellent conceptual fit for event driven GUI apps. In fact I'd argue that the rise of graphical desktops drove it's widespread adoption more than anything else. By encapsulating code and data together it also facilitates or makes much easier a lot of modern software development practices like TDD, inversion of control and so on.

              I'd say that functional programming is a better fit for expressing mathematical ideas though.
              Grouping code and data together as a tenet of OO went out 10 years ago. It actually reduces encapsulation. Read Scott Myers on that. How Non-Member Functions Improve Encapsulation | Dr Dobb's

              These days you will see a data object and lots of classes implementing services. That came out of visitor pattern and it makes it possible to scale systems better through passing around identity rather than pinning identity to an endpoint.

              Bottom up and top down are ways of breaking down a problem. You still use those techniques in OO. You have to apply both simultaneously to build anything substantial.

              OO makes it possible to deal with large bodies of code , through abstraction and generalisation. It makes modification easier through polymorphic substitution.

              Comment


                #17
                Simples, innit:

                IDENTIFICATION DIVISION.
                PROGRAM-ID. Iteration-If.
                AUTHOR. Not Me.

                DATA DIVISION.
                WORKING-STORAGE SECTION.
                01 Num1 PIC 9 VALUE ZEROS.
                01 Num2 PIC 9 VALUE ZEROS.
                01 Result PIC 99 VALUE ZEROS.
                01 Operator PIC X VALUE SPACE.

                PROCEDURE DIVISION.
                Calculator.
                PERFORM 3 TIMES
                DISPLAY "Enter First Number : " WITH NO ADVANCING
                ACCEPT Num1
                DISPLAY "Enter Second Number : " WITH NO ADVANCING
                ACCEPT Num2
                DISPLAY "Enter operator (+ or *) : " WITH NO ADVANCING
                ACCEPT Operator
                IF Operator = "+" THEN
                ADD Num1, Num2 GIVING Result
                END-IF
                IF Operator = "*" THEN
                MULTIPLY Num1 BY Num2 GIVING Result
                END-IF
                DISPLAY "Result is = ", Result
                END-PERFORM.
                STOP RUN.
                Brexit is having a wee in the middle of the room at a house party because nobody is talking to you, and then complaining about the smell.

                Comment


                  #18
                  Originally posted by aussielong View Post
                  Grouping code and data together as a tenet of OO went out 10 years ago. It actually reduces encapsulation. Read Scott Myers on that. How Non-Member Functions Improve Encapsulation | Dr Dobb's

                  These days you will see a data object and lots of classes implementing services. That came out of visitor pattern and it makes it possible to scale systems better through passing around identity rather than pinning identity to an endpoint.

                  Bottom up and top down are ways of breaking down a problem. You still use those techniques in OO. You have to apply both simultaneously to build anything substantial.

                  OO makes it possible to deal with large bodies of code , through abstraction and generalisation. It makes modification easier through polymorphic substitution.
                  You always desperately try to prove yourself on these threads, I think you have confidence issues.

                  Comment


                    #19
                    I'm very impressed boys... this is all very sensible for General....

                    Heat getting to you...?

                    I've seen a lot so-called OO code in C++ - most of it badly wrapped C.

                    Be interested to see what they "teach" in Uni these days in terms of techniques since I've been less than impressed with a lot of developers who learnt their design and coding from text books as opposed to being self-taught. (not trolling to wind up recent grads btw, just genuine observation from a lot of code I've seen lately - equally there's some awful self-taught coding out there)
                    Last edited by Dark Black; 25 October 2013, 12:38. Reason: spellink
                    Do what thou wilt

                    Comment


                      #20
                      Originally posted by minestrone View Post
                      You always desperately try to prove yourself on these threads, I think you have confidence issues.
                      I didn't understand a word of it either

                      Comment

                      Working...
                      X