User Profile

Collapse

Profile Sidebar

Collapse
JohnBoy2
JohnBoy2
Last Activity: Jan 20 '11, 06:07 PM
Joined: Nov 10 '08
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • I don't know enough about other lang's to say that, but I trust that you do. I think the larger issue for Java is specifications. More than 95% of the JavaBeans I have ever written (or seen others write) all have getters and setters which simply get and set the private variable directly without any processing. This is annoying to code with, and it bloats the software by substantially increasing the size of the codebase, the compiled byte-code...
    See more | Go to post

    Leave a comment:


  • Well, I think I can agree with the spirit of what you're saying, but there are a couple points I'd like to clarify:

    - I'm not hung up on any particular kind of software - the OP noticed a posting that was from a game company, which is why I am using it as an example.

    - Properly initialized data is just as important in high-performance apps. as it is elsewhere, and is definitely not exclusive to OO. There are cases where...
    See more | Go to post

    Leave a comment:


  • It's absolutely not fair, but that is the way the world works. I have never - ever - experienced a project where all the requirements showed up in a nice organized pile right at the beginning of development. And even if you could get it that way, software requirements change over time. What worked last year doesn't fit the bill this year. New products, different ways of doing business, new laws, new taxes, new challenges. Software is a living...
    See more | Go to post

    Leave a comment:


  • Even that depends. The same list of objects might be being used by another part of the system that does not need totals, so you don't want to be incrementing/decrementing a static total for the List every time an object is inserted/deleted/changed.

    See what I mean? It just depends. Beyond simple and obvious algorithmic improvements, most decisions like that are a trade-off of some sort.

    The other thing you need to...
    See more | Go to post

    Leave a comment:


  • Ok, I have to ask: why is the 'solution' I came up with ludicrous?

    John...
    See more | Go to post

    Leave a comment:


  • Nicely stated, and absolutely true.



    This is not bad, but it suffers from the possibility that in many cases, even for the same List of objects, you may not need the total. But you're adding globally to the cost of inserting/deleting/updating objects in the List. It's still cheaper to just tally the total only when needed, and on the fly when you are iterating through the list already for some other reason.
    ...
    See more | Go to post

    Leave a comment:


  • lol, yes many years programming in C++ and Java, and recently a little dabbling in PHP, the latter versions of which have some OO support.

    Don't get me wrong, I didn't mean to come off sounding anti-OO. But I have seen it taken to what I consider to be illogical conclusions. In the example I posted about above, the OO extremists would want to extend the java.util.List class to include a method that would total the contents of the...
    See more | Go to post

    Leave a comment:


  • OO as a philosophy suffers from drawing a certain academic personality type - the type that can't put the textbook down and actually *do* something with what they've learned. Many of the OO ideals taught in schools and books sound beautiful and elegant, but, like poetry, cannot and should not be used in real-world dialog.

    I'll give you an example: once we had a need to enhance an existing report to provide totals at the bottom. The...
    See more | Go to post

    Leave a comment:

No activity results to display
Show More
Working...