This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

HPs

Let me tell you a story about a guy named Jed...

A long long time ago (pre-ANSI C), in a galaxy far far away I had worked for a company that had to develop internal "C" coding standards and "Jed" worked on one aspect of the standard while I worked on another. We would hold weekly meetings to reconcile our differences. In attendance, we had other professionals for simple sanity checking and to gain insights from different points of view.

Chris was one of our attendees and was a very experienced software veteran who had plenty of code in various satellite systems orbiting our planet today. By then, Chris was in upper management and graced us with his wisdom when he could.

Well during one of our weekly meetings, "Jed" and I got into a simple disagreement on a Rule about header files. We were at an impasse, so we waited for Chris to arrive and have him make the final decision: about five of us professional engineers were in the room.

When Chris arrived, he heard the arguments, and quickly announced that I was right. (Hence, Jed was wrong).

Well, Jed freaked out and wanted to take the guy outside and teach him a lesson! ... Jed was red-faced, quickly stood up, even took a step towards Chris, and said "Chris, lets just step outside and settle this! I am right and you don't know what you're talking about!" etc etc.

The other attendees and I were duly impressed over Jed's technique of handling technical disagreements. Especially with upper management.

Instead of Jed trying to learn that he *might* be wrong, Jed leaped into the confrontation method of getting his way. Bullies do this because they lack the brain-power to reason through a disagreement. It is a childish trait.

Children are at a huge disadvantage when arguing with "an adult" (or somebody who is much smarter than they are) and they will become very frustrated over their strong desire to assert themselves and their inability to win the mental sparring. They will get physical and/or verbally abusive. Some people out grow this, and some don't.

I think Jed showed his 'abilities' quite well. I find that this is true with so many people on so many subjects. I've seen this behavior many times over. I've seen it here on this forum.

When an "Original Poster", asks a question and people try to answer it (after much refinement of the OP's question) you get these side-bar posts where somebody will start attacking another poster's efforts. And I mean 'attack' and not augment or refine.

I don't have a problem with correcting or clarifying others, or even the occasional sprinkling of sarcasm, but when it is ALWAYS devolves into some vindictive vitriol between a brisling poster and the rest of 'us,' I wonder if it is out of ignorance, malice, or some twisted form of self-entertainment. All three of which are adolescent behaviors. (en.wikipedia.org/.../Adolescence)

Since the regular players here are detail oriented and thus they are savvy enough to know who I'm talking about, I don't think I have to name names.

He is critical enough to figure it out himself, so I would expect that the offender would read this and ask himself if he is demonstrating Ignorance, Malice, Entertainment, or is he being an adult and providing a constructive post before he does so.

And, I hope his "Mea Clupea" (en.wikipedia.org/.../Mea_culpa) will be a silent one, because I'm kind of tired of reading his Hostile Postings (HP).

</rant>
--Cpt. Vince Foster
2nd Cannon Place
Fort Marcy Park, VA

Parents
  • How do you reconcile the fact that C51 is an ANSI/ISO 'C' compiler with the existence of 'bit', I wonder?
    well, I asked, why do you not answer instead of 'wonder"

    'Wrapping code in preprocessor directives doesn't make it portable - in fact, it makes it clear that it is non-portable.
    how can this be portable without preprocessor directives
    #if COMPILER == C51
    bit47 = TRUE;
    #elif COMPILER == ACME
    bitword |= 0x04;
    #endif
    NOTE: it is, of course, possible to just use the OR and ignore the efficiency, but what if the C51 project is time critical (if you even know what that is) and the ACME project is not because it runs on a much faster processor?
    If the above is not "to your liking" come out of your hole and state what I suspect is your position that you do not give a hoot about efficiency.

    Another query
    if you were to be portable between Keil and SDCC how would you manage the bit definition without preprocessor directives

    In short "Wrapping code in preprocessor directives doesn't make it portable - in fact, it makes it clear that it is non-portable" is contradicted by your own statements.

    Erik

Reply
  • How do you reconcile the fact that C51 is an ANSI/ISO 'C' compiler with the existence of 'bit', I wonder?
    well, I asked, why do you not answer instead of 'wonder"

    'Wrapping code in preprocessor directives doesn't make it portable - in fact, it makes it clear that it is non-portable.
    how can this be portable without preprocessor directives
    #if COMPILER == C51
    bit47 = TRUE;
    #elif COMPILER == ACME
    bitword |= 0x04;
    #endif
    NOTE: it is, of course, possible to just use the OR and ignore the efficiency, but what if the C51 project is time critical (if you even know what that is) and the ACME project is not because it runs on a much faster processor?
    If the above is not "to your liking" come out of your hole and state what I suspect is your position that you do not give a hoot about efficiency.

    Another query
    if you were to be portable between Keil and SDCC how would you manage the bit definition without preprocessor directives

    In short "Wrapping code in preprocessor directives doesn't make it portable - in fact, it makes it clear that it is non-portable" is contradicted by your own statements.

    Erik

Children
  • you conveniently ignore that while "keil C" has a variable named BIT, you will not find that in the "ISO (formerly ANSI) Standard 'C'"

    How do you reconcile the fact that C51 is an ANSI/ISO 'C' compiler with the existence of 'bit', I wonder?

    well, I asked, why do you not answer instead of 'wonder"

    You didn't ask anything, you made a statement to which I responded with a question. In any case, given that you treat any suggestion that you have not read the standard as a "baseless accusation" then I'm sure you'll feel insulted if I suggest that you might not know the answer to my question.

    Do you still claim to have read the ISO 'C' standard?

    how can this be portable without preprocessor directives
    #if COMPILER == C51 ....

    It isn't portable. Wrapping code in preprocessor directives doesn't make it portable - in fact, it makes it clear that it is non-portable.

    NOTE: it is, of course, possible to just use the OR and ignore the efficiency, but what if the C51 project is time critical

    I'd be unlikely to have designed my way into a situation where a bit operation rather than a byte operation would make the difference between project success and project failure. Perhaps you write the code, compile and count the clock cycles before you select the processor and oscillator?

    and the ACME project is not because it runs on a much faster processor

    Ah, glad to see you agree with me. Use a faster processor.

    If the above is not "to your liking" come out of your hole and state what I suspect is your position that you do not give a hoot about efficiency.

    I care about efficiency where efficiency is the most important factor. With sensible design, however, it rarely is.

    In short "Wrapping code in preprocessor directives doesn't make it portable - in fact, it makes it clear that it is non-portable" is contradicted by your own statements.

    Really? Which ones?

  • Ah, glad to see you agree with me. Use a faster processor.

    Alas, in the real world, that is not always an option. Processors for embedded systems rarely get chosen for their ability to run 'portable' (and hence larger, slower) code - they get chosen for their ability to 'barely run the application for the lowest cost' - in this case - optimising for every last clock cycle can become an issue, especially when feature creep sets in.

  • a) "I care about efficiency"

    In short "Wrapping code in preprocessor directives doesn't make it portable - in fact, it makes it clear that it is non-portable" is contradicted by your own statements.

    Really? Which ones? a) above for example.

    If the above is not "to your liking" come out of your hole and state what I suspect is your position that you do not give a hoot about efficiency.

    I care about efficiency where efficiency is the most important factor. With sensible design, however, it rarely is.
    translated "if cost is an issue, do not involve the person hiding behind "Jack Sprat", he cares more about his fanciful ideas"

    Erik

  • I'd be unlikely to have designed my way into a situation where a bit operation rather than a byte operation would make the difference between project success and project failure.
    so would I. Confound it, can you not understand what an example is, www.merriam-webster.com/.../example see 3)

    Erik

  • Really? Which ones? a) above for example.

    You seem to be saying that my statement:

    "I care about efficiency <snip>"

    Contricts my other statement:

    "Wrapping code in preprocessor directives doesn't make it portable - in fact, it makes it clear that it is non-portable"

    You are very confused.

    I care about efficiency where efficiency is the most important factor. With sensible design, however, it rarely is.

    translated "if cost is an issue, do not involve the person hiding behind "Jack Sprat", he cares more about his fanciful ideas"

    Sensible design isn't a fanciful idea.

    Oh, have you decided yet whether my assertion that you haven't read the 'C' standard remains baseless?

  • I'd be unlikely to have designed my way into a situation where a bit operation rather than a byte operation would make the difference between project success and project failure.

    so would I. Confound it, can you not understand what an example is, www.merriam-webster.com/.../example see 3)

    Gosh, I had 5 definitions to choose from! Ok, but you think number 3 might suit your purpose:

    "one (as an item or incident) that is representative of all of a group or type"

    Here we go:

    I'd be unlikely to have designed my way into a situation where anything of the group or type represented by a bit operation rather than a byte operation would make the difference between project success and project failure.

  • Really? Which ones? a) above for example.

    You seem to be saying that my statement:

    "I care about efficiency <snip>"

    Contricts my other statement:

    "Wrapping code in preprocessor directives doesn't make it portable - in fact, it makes it clear that it is non-portable"
    if you do not "Wrap code in preprocessor directives" it can never be portable by the "sardine standard" and efficient. e.g. if you do not have a preprocessor directive for using 'bit' when running on a '51 your code is not efficient. Did that bend it in neon so you can see it? One one hand you claim the efficiency is not important, on the other you calim that the "sardine standard code" is not inefficient

    You are very confused.
    here you go again making statements about me that you have no background for making.

    I care about efficiency where efficiency is the most important factor. With sensible design, however, it rarely is.
    so, "sensible design" makes effciency irrelevant. I have always thought that "sensible design" was efficient desitgn.

    Sensible design isn't a fanciful idea.
    by most peoples definition no, by yours yes

    Erik

  • OH BOY, after posting that 'bit' is but an example, you write:
    I'd be unlikely to have designed my way into a situation where anything of the group or type represented by a bit operation rather than a byte operation would make the difference between project success and project failure.
    I stated (clearly to all but you) that using 'bit' was an example of where adapting code to a particular processor/compiler would affect efficiency.
    I am not going to waste my time on listing other examples if you do not know what they (or, at least, most of them) are, you will be lost anyhow. Then on the other hand since you state that efficiency is unimportant what would you care. I am sure the processor makers love you for buying a more expensive (faster, bigger) derivative than anyone else would need, just to make the code fit the "sardine standard"

    Erik

    PS do you do CAN

  • if you do not "Wrap code in preprocessor directives" it can never be portable by the "sardine standard"

    No. I said that wrapping code in preprocessor directives indicates that it is not portable. The preprocessor directives do not make non-portable code portable. Please try to understand this.

    One one hand you claim the efficiency is not important, on the other you calim that the "sardine standard code" is not inefficient

    No. Please re-read my comments on efficiency. The world is not black and white - there is only worth in making code efficient if it needs to be efficient, otherwise it is better to write it with portability and clarity as the foremost priorities. If you want to consider this further please take a look at my response to your comments about malloc() further down this thread.

    I care about efficiency where efficiency is the most important factor. With sensible design, however, it rarely is.

    so, "sensible design" makes effciency irrelevant. I have always thought that "sensible design" was efficient desitgn.

    There are many factors to consider in a sensible design - development cost, maintainability, reliability to name but a few. Perhaps you could do with broadening your horizons a little?

  • You are very confused.

    here you go again making statements about me that you have no background for making.

    Well, either you are confused or are deliberately misunderstanding a quite simple point.

    Any more thoughts on whether my apparently baseless assertion about your knowledge of the 'C' standard remains baseless?

  • I stated (clearly to all but you) that using 'bit' was an example of where adapting code to a particular processor/compiler would affect efficiency.

    An example, according to your favoured definition, is representative of a group or type. You are now arguing that what you presented as an example is not representative of what you meant. This makes no sense.

  • WOW, only a small insult at the end, I think this one deserves a civil answer.
    if you do not "Wrap code in preprocessor directives" it can never be portable by the "sardine standard"

    No. I said that wrapping code in preprocessor directives indicates that it is not portable. The preprocessor directives do not make non-portable code portable. Please try to understand this.
    now I am (I confess) totally lost.
    if you can not use preprocessor directives to make portable, how can you then make it portable, say between little endian and big endian situations, not to mention between different length ints?

    Please re-read my comments on efficiency. The world is not black and white - there is only worth in making code efficient if it needs to be efficient, otherwise it is better to write it with portability and clarity as the foremost priorities.
    even in a situation where code does not need to be efficient I would go, at least, half the way in making it efficient. I have had to do an almost total rewrite of an inherited project that was "efficient enough" till an added beature was requested. I do disagree with your implication that efficient code can not be reasonably portable and fully maintainable.

    I care about efficiency where efficiency is the most important factor. With sensible design, however, it rarely is.

    so, "sensible design" makes effciency irrelevant. I have always thought that "sensible design" was efficient desitgn.

    There are many factors to consider in a sensible design - development cost, maintainability, reliability to name but a few. Perhaps you could do with broadening your horizons a little?
    in addition to what I replied to the previous quote which applies here as well: re "development cost, maintainability, reliability", again, you make the asssumption that because I mention one point, I am ignorant of the remaining. I do my utmost to make what leaves my desk or my lab efficient, maintainable and reliable. As far as development cost, that is a function of anticipated production volume. I hope with the above to have clarified that I do not need "broadening your horizons a little". If you still ASS U ME so, that will be your problem.

    Erik (real name)

  • Any more thoughts on whether my apparently baseless assertion about your knowledge of the 'C' standard remains baseless?
    1) it is baseless if you mean 'none' not if you mean "can be recited completely without the document".
    2) what concern of yours is it whether I read the C standard as my bedside litterature or use it as a reference?
    3) 'assertion', I appreciate your choice of word www.thefreedictionary.com/assertion "a positive statement, usually made without evidence" however, some of your statements in this regard have bee quite a bit more than 'assertions'

    Erik

  • 'assertion', I appreciate your choice of word

    Sorry, I was actually trying to quote you. I meant to say 'baseless accusation':

    Any more thoughts on whether my apparently baseless accusation about your knowledge of the 'C' standard remains baseless?