need help..

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Richard Bos

    #31
    Re: need help..

    Keith Thompson <kst-u@mib.org> wrote:
    [color=blue]
    > dot@dot.dot writes:[color=green]
    > > On 31 Mar 2005 21:59:13 GMT, Nils Weller <me@privacy.net > wrote:[/color]
    > [...][color=green]
    > > Easy solution...
    > >
    > > #define is ==
    > >
    > > int x = 10;
    > >
    > > if (x is 10)
    > > puts("it worked");[/color]
    >
    > That will make your code difficult to read.[/color]

    So will the usual reversed-operand trick. The easy solution is learning
    to pay attention.

    Richard

    Comment

    • pete

      #32
      Re: need help..

      dot@dot.dot wrote:[color=blue]
      >
      > On Mon, 04 Apr 2005 09:45:05 GMT, pete <pfiland@mindsp ring.com> wrote:
      >[color=green]
      > >We were just discussing how bad your coding style is.
      > >It's very bad.[/color]
      >
      > And exactly when have you seen my source code?[/color]

      I believe it was 2 April 2005. It looked like this:
      [color=blue][color=green]
      >> So I have a little header I use with a bunch of defines...
      >>
      >> #define is ==
      >> #define lt <
      >> #define gt >
      >> #define ne !=
      >> #define or ||
      >> #define and &&
      >> #define shiftl <<
      >> #define shiftr >>
      >> etc.
      >>
      >> Gives me syntax like this:
      >>
      >> if (x and (y lt 7))
      >>
      >> if ((x lt y) or (y is 7))[/color][/color]
      [color=blue]
      > Only an idiot pronounces judgement without evidence.[/color]

      I don't see how that's relevant.

      --
      pete

      Comment

      • CBFalconer

        #33
        Re: need help..

        dot@dot.dot wrote:[color=blue]
        > pete <pfiland@mindsp ring.com> wrote:
        >[color=green]
        >> We were just discussing how bad your coding style is.
        >> It's very bad.[/color]
        >
        > And exactly when have you seen my source code?
        > Only an idiot pronounces judgement without evidence.[/color]

        The following appeared in this thread earlier. Are we to conclude
        they were either forged or the words of an idiot? They do seem to
        describe some idiots programming style. They were combined with a
        recommendation that legitimate C statements be flagged as syntax
        errors.
        [color=blue][color=green][color=darkred]
        >>> So I have a little header I use with a bunch of defines...
        >>>
        >>> #define is ==
        >>> #define lt <
        >>> #define gt >
        >>> #define ne !=
        >>> #define or ||
        >>> #define and &&
        >>> #define shiftl <<
        >>> #define shiftr >>[/color][/color][/color]

        --
        "If you want to post a followup via groups.google.c om, don't use
        the broken "Reply" link at the bottom of the article. Click on
        "show options" at the top of the article, then click on the
        "Reply" at the bottom of the article headers." - Keith Thompson


        Comment

        • Keith Thompson

          #34
          Re: need help..

          rlb@hoekstra-uitgeverij.nl (Richard Bos) writes:[color=blue]
          > Keith Thompson <kst-u@mib.org> wrote:
          >[color=green]
          >> dot@dot.dot writes:[color=darkred]
          >> > On 31 Mar 2005 21:59:13 GMT, Nils Weller <me@privacy.net > wrote:[/color]
          >> [...][color=darkred]
          >> > Easy solution...
          >> >
          >> > #define is ==
          >> >
          >> > int x = 10;
          >> >
          >> > if (x is 10)
          >> > puts("it worked");[/color]
          >>
          >> That will make your code difficult to read.[/color]
          >
          > So will the usual reversed-operand trick. The easy solution is learning
          > to pay attention.[/color]

          I agree, but there are enough competent programmers who use the
          reversed-operand trick, and who actually like it, that the rest of us
          just have to learn to read it, even if we'd never write it.

          --
          Keith Thompson (The_Other_Keit h) kst-u@mib.org <http://www.ghoti.net/~kst>
          San Diego Supercomputer Center <*> <http://users.sdsc.edu/~kst>
          We must do something. This is something. Therefore, we must do this.

          Comment

          • Christopher Benson-Manica

            #35
            Re: need help..

            dot@dot.dot spoke thus:
            [color=blue]
            > Ok, now I see... you're just an idiot looking for a fight.[/color]

            My sentiments exactly...

            *plonk*

            --
            Christopher Benson-Manica | I *should* know what I'm talking about - if I
            ataru(at)cybers pace.org | don't, I need to know. Flames welcome.

            Comment

            • Keith Thompson

              #36
              Re: need help..

              dot@dot.dot writes:
              [snip][color=blue]
              > Ok, now I see... you're just an idiot looking for a fight.[/color]

              "dot": You are overreacting. I suggest we all drop this current
              discussion and go back to talking about C, and I suggest that everyone
              else refrain from responding to what might be perceived as trollish
              behavior on dot's part. We don't need yet another interminable
              argument about nothing in particular.

              I'm not optimistic that my attempt to end this will be successful, but
              I'm prepared to be pleasantly surprised.

              --
              Keith Thompson (The_Other_Keit h) kst-u@mib.org <http://www.ghoti.net/~kst>
              San Diego Supercomputer Center <*> <http://users.sdsc.edu/~kst>
              We must do something. This is something. Therefore, we must do this.

              Comment

              • Chris Croughton

                #37
                Re: need help..

                On Sat, 02 Apr 2005 20:53:42 -0500, dot@dot.dot
                <dot@dot.dot> wrote:
                [color=blue]
                > On Sat, 02 Apr 2005 19:13:53 -0500, Lew Pitcher <lpitcher@sympa tico.ca>
                > wrote:
                >[color=green][color=darkred]
                >>> So I have a little header I use with a bunch of defines...
                >>>
                >>> #define is ==
                >>> #define lt <
                >>> #define gt >
                >>> #define ne !=
                >>> #define or ||
                >>> #define and &&
                >>> #define shiftl <<
                >>> #define shiftr >>[/color]
                >>
                >>Reminds me of the poster a decade back or so who posted macros that made C
                >>look "pascal-like". Macros of the sort of
                >> #define BEGIN {
                >> #define END }
                >>
                >>Just as useless, too.[/color]
                >
                > Given that in my learning phase this cut the number of errors I was making
                > to less than a third... not useless.[/color]

                I remember many years ago some education theorists brought out the
                Initial Teaching Alphabet, which was basically English spelt
                phonetically. It was designed to make learning to write easier -- and
                it worked, children who learnt ITA indeed made fewer mistakes and found
                it easier.

                There were just a few problems:

                Other people couldn't understand ITA.
                The children couldn't understand ordinary written English.
                A large proportion of the children /never/ learnt ordinary English
                spellings, they were fine at their own version but not at the "real
                world" one.
                [color=blue]
                > Lately I don't use them all that much ... you see I'm learning... eventually
                > I'll most likely abandon them altogether.[/color]

                Well, it depends why you are bothering to learn C. If it's only a
                hobby, and you never need to understand what anyone else writes and they
                never need to understand you, then that's fine, write in any language
                you like (including ones you invent). But if you ever want to come out
                into the real world and talk with the grown-ups, you need to bite the
                bullet and learn the real language.

                Chris C

                Comment

                • Mark McIntyre

                  #38
                  Re: need help..

                  On Sun, 03 Apr 2005 23:46:20 -0400, in comp.lang.c , dot@dot.dot
                  wrote:
                  [color=blue]
                  >Well, except for you and Falconer who seem mostly concerned with litigating
                  >a case against every posting that doesn't fit your ideal guidelines.[/color]

                  Actually CBF and Keith mostly help people round here. True, they can
                  sometimes be grumpy with persistently idiotic posters, but so can we
                  all. And a top tip: its a bad plan to start a fight with the regulars,
                  you find you get less help from them afterwards.
                  [color=blue]
                  >Really... It's effing amazing to watch the self-appointed group leaders on
                  >Usenet litigate their way to dominance and control, mostly by nitpicking
                  >posts and defaming participants.[/color]

                  There /.are/ no group leaders. Those who comment authoratively do so
                  by reason of being experienced and having knowledge.
                  [color=blue]
                  >I came here to discuss C ... so far I've been ruled off topic, ordered out
                  >of the group, lectured about etiquette and now subjected to micro-analysis
                  >of my ever word.[/color]

                  Then why not learn from your mistakes, stop posting offtopic, stop
                  being rude, and stop pushing your micro-style on everyone else?
                  [color=blue]
                  >What's next? Bamboo under my toenails?[/color]

                  Code review. :-)

                  --
                  Mark McIntyre
                  CLC FAQ <http://www.eskimo.com/~scs/C-faq/top.html>
                  CLC readme: <http://www.ungerhu.com/jxh/clc.welcome.txt >

                  Comment

                  • Mark McIntyre

                    #39
                    Re: need help..

                    On Mon, 04 Apr 2005 09:34:58 -0400, in comp.lang.c , dot@dot.dot
                    wrote:
                    [color=blue]
                    >On Mon, 04 Apr 2005 09:45:05 GMT, pete <pfiland@mindsp ring.com> wrote:
                    >[color=green]
                    >>We were just discussing how bad your coding style is.
                    >>It's very bad.[/color]
                    >
                    >And exactly when have you seen my source code?[/color]

                    Just what you've posted. And its bad. If there's better, please post
                    some of it so we may judge again
                    [color=blue]
                    >Only an idiot pronounces judgement without evidence.[/color]

                    Fatuous, but it is true that only an idiot expects to be treated with
                    consideration after hurling insults and invective.

                    --
                    Mark McIntyre
                    CLC FAQ <http://www.eskimo.com/~scs/C-faq/top.html>
                    CLC readme: <http://www.ungerhu.com/jxh/clc.welcome.txt >

                    Comment

                    • Mark McIntyre

                      #40
                      Re: need help..

                      On Mon, 04 Apr 2005 18:44:00 -0400, in comp.lang.c , dot@dot.dot
                      wrote:
                      [color=blue]
                      >On Mon, 4 Apr 2005 21:45:56 +0100, Chris Croughton <chris@keristor .net>
                      >wrote:
                      >[color=green]
                      >>But if you ever want to come out
                      >>into the real world and talk with the grown-ups, you need to bite the
                      >>bullet and learn the real language.[/color]
                      >
                      >Ohhh... bad assumption. I've never said I wasn't about to learn C.[/color]

                      Then I think the consensus recommendation is to *learn* it, rather
                      than trying to make it into something its not, because either you
                      don't like or don't understand how it works.
                      [color=blue]
                      >you would see that *twice now* I've pointed out that my little "easy header"
                      >was a learning tool that I don't use much anymore...[/color]

                      good. Perhaps you should have mentioned that at the outset, or said it
                      louder later on, but these things happen.
                      [color=blue]
                      >Now what part of "don't use much anymore" don't you understand?[/color]

                      The part where you didn't say that in any post I've seen (till this
                      one)[color=blue]
                      >[/color]

                      --
                      Mark McIntyre
                      CLC FAQ <http://www.eskimo.com/~scs/C-faq/top.html>
                      CLC readme: <http://www.ungerhu.com/jxh/clc.welcome.txt >

                      Comment

                      • Christopher Benson-Manica

                        #41
                        Re: need help..

                        Mark McIntyre <markmcintyre@s pamcop.net> spoke thus:
                        [color=blue]
                        > The part where you didn't say that in any post I've seen (till this
                        > one)[/color]

                        In his defense, he did say it, although I couldn't tell you in which
                        post.

                        --
                        Christopher Benson-Manica | I *should* know what I'm talking about - if I
                        ataru(at)cybers pace.org | don't, I need to know. Flames welcome.

                        Comment

                        • Mark McIntyre

                          #42
                          Re: need help..

                          On Mon, 04 Apr 2005 21:24:19 -0400, in comp.lang.c , dot@dot.dot
                          wrote:
                          [color=blue]
                          >On Tue, 05 Apr 2005 00:16:49 +0100, Mark McIntyre <markmcintyre@s pamcop.net>
                          >wrote:
                          >[color=green]
                          >>Then I think the consensus recommendation is to *learn* it, rather
                          >>than trying to make it into something its not, because either you
                          >>don't like or don't understand how it works.[/color]
                          >
                          >And you got a complete critique of my competence from a simple #define
                          >showing a way to avoid beginner's mistakes?[/color]

                          no, from a combination of your initial posting, your belligerent
                          defense of it in the face of almost universal criticism, your
                          insistence that certain things should be errors which plainly should
                          not be, your insistence that its a way to avoid beginners mistakes and
                          so forth.
                          [color=blue]
                          >WOW... now THAT is impressive. Can I borrow your crystal ball sometime?[/color]

                          Certainly.

                          --
                          Mark McIntyre
                          CLC FAQ <http://www.eskimo.com/~scs/C-faq/top.html>
                          CLC readme: <http://www.ungerhu.com/jxh/clc.welcome.txt >

                          Comment

                          • Mark McIntyre

                            #43
                            Re: need help..

                            On Mon, 4 Apr 2005 23:52:09 +0000 (UTC), in comp.lang.c , Christopher
                            Benson-Manica <ataru@nospam.c yberspace.org> wrote:
                            [color=blue]
                            >Mark McIntyre <markmcintyre@s pamcop.net> spoke thus:
                            >[color=green]
                            >> The part where you didn't say that in any post I've seen (till this
                            >> one)[/color]
                            >
                            >In his defense, he did say it, although I couldn't tell you in which
                            >post.[/color]

                            fair enough, I didn't see that post, such is usenet. My apologies to
                            dot for missing it.
                            --
                            Mark McIntyre
                            CLC FAQ <http://www.eskimo.com/~scs/C-faq/top.html>
                            CLC readme: <http://www.ungerhu.com/jxh/clc.welcome.txt >

                            Comment

                            Working...