Like Tree2Likes

the three mutually exclusive goals of programming

This is a discussion on the three mutually exclusive goals of programming within the General Discussions forums, part of the Community Boards category; I imagine that the "triangle philosophy" referred to a programmers ability, not the amount of resources available. So maybe in ...

  1. #46
    (?<!re)tired Mario F.'s Avatar
    Join Date
    May 2006
    Location
    Portugal
    Posts
    7,487
    I imagine that the "triangle philosophy" referred to a programmers ability, not the amount
    of resources available. So maybe in some sense it was true. If it was true in some sense,
    then my refined question becomes:
    "Can a modern programmer meet all three, unassisted"?
    Yes, we can. (I know, I know... but it isn't intended)

    If your finished program meets all your performance, maintenance and usability requirements, you effectively did it. Thousands of programs shipped and will continue to be shipped that do just that. Necessarily this does not mean that in your code you didn't have compromised, here and there, something for something else. But your final variable is the program itself and how it stands to your objectives. It's unthinkable to believe that no program was ever developed that couldn't meet all the programming requirements. We would be in a lot of trouble to justify the world's dependency on computer technology.

    I'm not sure why you keep reaching out for an "Yes" answer as you keep changing the terms of your question. Maybe you want this triangle thing to be true? I can understand why. It gives some assurance in our lives. It's the type of saying that answers bad programming practices with "it's just the way things are". But it's not how things are.
    The programmer’s wife tells him: “Run to the store and pick up a loaf of bread. If they have eggs, get a dozen.”
    The programmer comes home with 12 loaves of bread.


    Originally Posted by brewbuck:
    Reimplementing a large system in another language to get a 25% performance boost is nonsense. It would be cheaper to just get a computer which is 25% faster.

  2. #47
    Registered User
    Join Date
    Jun 2005
    Posts
    6,337
    Technologies (hardware, compilers, programming languages, etc) have advanced. Programmers have also advanced in their ability and willingness to use the technologies, but have not advanced much in their ability to use the technologies effectively.

    The net effect is that, by default, programmers have better tools so can do more, but they use the tools as a crutch.
    Last edited by grumpy; 08-26-2011 at 05:55 PM.
    Right 98% of the time, and don't care about the other 3%.

  3. #48
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    21,794
    Quote Originally Posted by megafiddle
    I imagine that the "triangle philosophy" referred to a programmers ability, not the amount
    of resources available. So maybe in some sense it was true. If it was true in some sense,
    then my refined question becomes:
    "Can a modern programmer meet all three, unassisted"?
    Technology has advanced. Have programmers advanced also? Or have they just taken
    advantage of the technology?
    What does it mean to "meet all three, unassisted"? What's your real question that causes you to ask this again and again?

    It looks like you have already received the answers on page 1. Adding "modern" and "unassisted" does not change anything. The answer is "yes" if you are talking about these with respect to a requirements specification and "no" if you are talking about these as inherent trade-offs.

    It is kind of like asking: I am eating a meal and have these two goals:
    1. To finish my food.
    2. To quickly be done with the meal so as to do my next activity.
    Can these two goals be achieved simultaneously?

    Now, eating your food takes time. No matter how fast you finish your food (goal #1), you are still going to take some time, and this conflicts with goal #2, so you cannot achieve both 100% at the same time. But if you finish your food in time for your next activity, who cares?
    C + C++ Compiler: MinGW port of GCC
    Version Control System: Bazaar

    Look up a C++ Reference and learn How To Ask Questions The Smart Way

  4. #49
    Registered User
    Join Date
    Mar 2011
    Posts
    434
    Quote Originally Posted by Mario F. View Post
    I'm not sure why you keep reaching out for an "Yes" answer as you keep changing the terms of your question. Maybe you want this triangle thing to be true? I

    can understand why. It gives some assurance in our lives. It's the type of saying that answers bad programming practices with "it's just the way things are". But it's not how things

    are.
    That's a good point. Maybe the programmers I'm thinking of weren't that good. Or maybe the management
    was unrealistic. I tend not to think so, though. As I mentioned they had serious restraints, even to the point
    of building their own processor and microcode. For them at least, the philosophy was true.

    It was my own assumption that this could be extended to the early PC's. If that assumption was wrong, then
    I have no argument with that. It was just based on the limitations of the early machines.

    As to why I keep asking, my first question was way too general. And I had thought that there was some general
    truth to it.

    Quote Originally Posted by laserlight View Post
    What does it mean to "meet all three, unassisted"? What's your real question that causes you to ask this again and again?

    It looks like you have already received the answers on page 1. Adding "modern" and "unassisted" does not change anything. The answer is "yes" if you are talking about these with

    respect to a requirements specification and "no" if you are talking about these as inherent trade-offs.

    It is kind of like asking: I am eating a meal and have these two goals:
    1. To finish my food.
    2. To quickly be done with the meal so as to do my next activity.
    Can these two goals be achieved simultaneously?

    Now, eating your food takes time. No matter how fast you finish your food (goal #1), you are still going to take some time, and this conflicts with goal #2, so you cannot achieve both 100%

    at the same time. But if you finish your food in time for your next activity, who cares?
    Wen I say "modern" and "unassisted", I am asking, "If a competent programmer was given an old 286 PC with 1 Meg memory,
    and asked to produce some CAD program, could he/she do it quicker than the earler time period programmer"?
    (and with an old Borland compiler)

    Again, my original question was too general. It should have been in the form of specific questions.

    I realize that there is no practical difference between "fast as possible" and "fast enough". I use many programs
    that have no apparent speed problems. I would hate to look "behind the scenes" in some of them, but they do
    work well enough nonetheless. It seems that programmers way back then, used to care about speed and size,
    even when it wasn't important to the final product. There was at least an attempt to avoid large or slow programs
    if possible. I think that would be a programming skill that could be lost if not exercised. So part of what I am wondering
    is if the same philosophy is true today.

    I am not a professional programmer, so I have the luxury of talking my time on a project. I also have the luxury of simply
    plugging in more ram or a faster processor. Still, I try to avoid large or slow algorithms. Just seems like good programming
    practice.

  5. #50
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    21,794
    Quote Originally Posted by megafiddle
    Wen I say "modern" and "unassisted", I am asking, "If a competent programmer was given an old 286 PC with 1 Meg memory,
    and asked to produce some CAD program, could he/she do it quicker than the earler time period programmer"?
    (and with an old Borland compiler)
    It depends on the programmers

    I note that your scenario effectively gives "the earler time period programmer" a kind of "assistance".

    Quote Originally Posted by megafiddle
    There was at least an attempt to avoid large or slow programs
    if possible. I think that would be a programming skill that could be lost if not exercised. So part of what I am wondering
    is if the same philosophy is true today.
    It sounds like your real question is embedded right there: do programmers these days attempt to avoid unnecessarily large or slow programs when programming? Again, I would say that it depends on the programmers.
    C + C++ Compiler: MinGW port of GCC
    Version Control System: Bazaar

    Look up a C++ Reference and learn How To Ask Questions The Smart Way

  6. #51
    Registered User
    Join Date
    Mar 2011
    Posts
    434
    Quote Originally Posted by laserlight View Post
    I note that your scenario effectively gives "the earler time period programmer" a kind of "assistance".
    How do you mean?

    Quote Originally Posted by laserlight View Post
    It sounds like your real question is embedded right there: do programmers these days attempt to avoid unnecessarily large or slow programs when programming? Again, I would say that it depends on the programmers.
    Yes, that's a big part of what I was wondering.

    But I'm also wondering about differences between now and then. We can easily quantify speed
    and memory size. So we know how those have changed. Is there no way to speak of programmers
    abilities and philosophies in a general sense, for now vs then?

  7. #52
    spurious conceit MK27's Avatar
    Join Date
    Jul 2008
    Location
    segmentation fault
    Posts
    8,300
    Even for cboard->General Discussion, this thread plainly drips with excessive and flippant absurdism.

    These cats are playing w/ you, megafiddle, because your initial premise is just a logical truism, and there's not much to say about it (except to play semantic games).

    Quote Originally Posted by megafiddle View Post
    We can easily quantify speed
    and memory size. So we know how those have changed. Is there no way to speak of programmers
    abilities and philosophies in a general sense, for now vs then?
    There are more languages now than there used to be for a good reason -- in general, those newer languages prioritize development time, because that is the major co$t factor. Notice that the vast majority of them produce slower executables that use more memory resources than programs written in C, which was developed ~40 years ago. This is even true of C++, which still produces fast binaries but encourages practices that use considerably more memory. And, nb, C++ is not that young either.*

    The reason people use C++ instead of C is because it reduces development time and provides more mechanisms for standardizing/organizing the development process. It is a great language in that sense. End of story.

    I like to prototype things in perl, then when I'm happy with the form convert the code to C or C++ (recently, using Inline::C to further facilitate this). If the project is sufficiently large, for me this actually reduces the development time, because I can screw around and change stuff in perl much easier than I would in C. That also encourages me to experiment more which leads to a better product. And IMO, a perl program makes a great schematic or plan -- much better than just doodling on paper -- meaning the quality of the final C code is probably better than it would have been. So perl saves me time, and C delivers streamlined performance.

    * implying to me that C really does set a standard in relation to assembly that perhaps cannot be beaten.
    Last edited by MK27; 08-28-2011 at 02:05 PM.
    C programming resources:
    GNU C Function and Macro Index -- glibc reference manual
    The C Book -- nice online learner guide
    Current ISO draft standard
    CCAN -- new CPAN like open source library repository
    3 (different) GNU debugger tutorials: #1 -- #2 -- #3
    cpwiki -- our wiki on sourceforge

  8. #53
    Registered User whiteflags's Avatar
    Join Date
    Apr 2006
    Location
    United States
    Posts
    7,714
    I prefer to be a dog.
    quzah likes this.

  9. #54
    Registered User
    Join Date
    Mar 2011
    Posts
    434
    Quote Originally Posted by MK27 View Post
    There are more languages now than there used to be for a good reason -- in general, those newer languages prioritize development time, because that is the major co$t factor. Notice that the vast majority of them produce slower executables that use more memory resources than programs written in C, which was developed ~40 years ago. This is even true of C++, which still produces fast binaries but encourages practices that use considerably more memory. And, nb, C++ is not that young either.
    I don't understand. Doesn't that support the premise of my question?

    Quote Originally Posted by MK27 View Post
    * implying to me that C really does set a standard in relation to assembly that perhaps cannot be beaten.
    I agree with that. I always thought that C's power lies in it being one step up from assembly.

  10. #55
    spurious conceit MK27's Avatar
    Join Date
    Jul 2008
    Location
    segmentation fault
    Posts
    8,300
    Quote Originally Posted by megafiddle View Post
    I don't understand. Doesn't that support the premise of my question?
    Of course, what did you think I meant by calling it a "logical truism"? Which it is, and anyone who tries to claim differently is an absurdist.

    My point about "the cats" dogging you is that some people really will try to argue that up is down.

    - development effort
    - memory use
    - execution speed

    The ideal is to minimize the first two and maximize the last one. But if product A sets the bar on all 3 counts, someone will come along and best it on *two* of them by sacrificing one of the three, usually:

    Product B is faster and uses fewer resources, but cost more to develop.

    OR

    Product B cost the same or less to develop and is faster, but uses more memory.

    This is because:

    1) There is almost always a way to improve performance, but it takes more effort.
    2) It is easier to improve execution speed by splurging on mem usage than it is to reduce mem usage by sacrificing speed.
    3) It is very easy to reduce development time by choosing a model which sacrifices speed and/or mem usage.

    So if you hear someone claiming "there is no such relationship", "there never was such a relationship", "this relationship is not significant anymore", check your BS meter. Beep, beep, beep.

    I'd actually add another couple corners to this "triangle":

    PORTABILITY
    SECURITY
    RELIABILITY
    Last edited by MK27; 08-28-2011 at 07:29 PM. Reason: Needed more smarty-pants
    C programming resources:
    GNU C Function and Macro Index -- glibc reference manual
    The C Book -- nice online learner guide
    Current ISO draft standard
    CCAN -- new CPAN like open source library repository
    3 (different) GNU debugger tutorials: #1 -- #2 -- #3
    cpwiki -- our wiki on sourceforge

  11. #56
    Registered User
    Join Date
    Mar 2011
    Posts
    434
    Ok.

    I misunderstood which "cats" you were referring to.

  12. #57
    (?<!re)tired Mario F.'s Avatar
    Join Date
    May 2006
    Location
    Portugal
    Posts
    7,487
    Quote Originally Posted by megafiddle View Post
    Ok. I misunderstood which "cats" you were referring to.
    There's also catnip. It has the interesting property of being so evident that it distracts "cats" from their real purpose of hunting mice. Catnip; cats very own logical truism.

    Quote Originally Posted by MK27 View Post
    I'd actually add another couple corners to this "triangle"
    But, it isn't a triangle anymore... oh my! We need to redo this logical truism.
    The programmer’s wife tells him: “Run to the store and pick up a loaf of bread. If they have eggs, get a dozen.”
    The programmer comes home with 12 loaves of bread.


    Originally Posted by brewbuck:
    Reimplementing a large system in another language to get a 25% performance boost is nonsense. It would be cheaper to just get a computer which is 25% faster.

Page 4 of 4 FirstFirst 1234
Popular pages Recent additions subscribe to a feed

Similar Threads

  1. including headers mutually?
    By nacho4d in forum C++ Programming
    Replies: 6
    Last Post: 02-21-2010, 05:09 AM
  2. Mutually dependent classes
    By MacNilly in forum C++ Programming
    Replies: 9
    Last Post: 03-17-2009, 03:39 AM
  3. Exclusive or in if statement?
    By Quantum1024 in forum C Programming
    Replies: 3
    Last Post: 03-26-2005, 01:10 PM
  4. GUI Programming :: C++ Exclusive
    By kuphryn in forum C++ Programming
    Replies: 5
    Last Post: 01-25-2002, 02:22 PM
  5. bitwise-exclusive-OR operator: ^
    By mikebrewsj in forum C++ Programming
    Replies: 2
    Last Post: 01-15-2002, 10:52 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21