lshift & rshift

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Joachim Schmitz

    #61
    Re: lshift & rshift

    <iesvs@free.frs chrieb im Newsbeitrag
    news:1190987583 .941508.284220@ r29g2000hsg.goo glegroups.com.. .
    >Do you really think Mozilla Firefox, or Microsoft Internet Explorer,
    >could exist
    >if they had only one developer for their whole lifetime? If not, how
    >could they
    >be written in such a way that noone ever has to read or modify someone
    >else's
    >code? What if someone leaves the project?
    >
    With the modularity, others don't need to read your code, they just
    have to know in and out. Modularity it's not you take a piece and you
    transform it, it's you take a piece and you replace it. You care about
    what the old did not how it did (it's not your business). You can also
    add a new one.
    So you'd rather reinvent the wheel than to make an existing one rounder? Way
    too expensive in the real world. Better hire someone who can make pretty
    round wheels in the first place, ones that are maintainable and enables
    others to base their work on.

    Bye, Jojo


    Comment

    • iesvs@free.fr

      #62
      Re: lshift &amp; rshift

      So you'd rather reinvent the wheel than to make an existing one rounder? Way
      too expensive in the real world. Better hire someone who can make pretty
      round wheels in the first place, ones that are maintainable and enables
      others to base their work on.
      You're misquoting me.

      Comment

      • Joachim Schmitz

        #63
        Re: lshift &amp; rshift


        <iesvs@free.frs chrieb im Newsbeitrag
        news:1190989167 .377980.208250@ 22g2000hsm.goog legroups.com...
        >So you'd rather reinvent the wheel than to make an existing one rounder?
        >Way
        >too expensive in the real world. Better hire someone who can make pretty
        >round wheels in the first place, ones that are maintainable and enables
        >others to base their work on.
        >
        You're misquoting me.
        I didn't change a single letter


        Comment

        • santosh

          #64
          Re: lshift &amp; rshift

          iesvs@free.fr wrote:
          >Do you really think Mozilla Firefox, or Microsoft Internet Explorer,
          >could exist if they had only one developer for their whole lifetime? If
          >not, how could they be written in such a way that noone ever has to read
          >or modify someone else's code? What if someone leaves the project?
          >
          With the modularity, others don't need to read your code, they just
          have to know in and out. Modularity it's not you take a piece and you
          transform it, it's you take a piece and you replace it. You care about
          what the old did not how it did (it's not your business). You can also
          add a new one.
          In a team project, at some level, you've got to know how to read and modify
          other people's code. Even if other modules are treated as completely opaque
          black boxes, you still need to know about your module, which is itself, in
          most projects written by multiple people.

          Comment

          • iesvs@free.fr

            #65
            Re: lshift &amp; rshift

            On Sep 28, 4:27 pm, "Joachim Schmitz" <nospam.j...@sc hmitz-digital.de>
            wrote:
            <ie...@free.frs chrieb im Newsbeitragnews :1190989167.377 980.208250@22g2 000hsm.googlegr oups.com...>So you'd rather reinvent the wheel than to make an existing one rounder?
            Way
            too expensive in the real world. Better hire someone who can make pretty
            round wheels in the first place, ones that are maintainable and enables
            others to base their work on.
            >
            You're misquoting me.
            >
            I didn't change a single letter
            I used the bad verb.
            I never mean reinvent the wheel.
            And normally (like all my friends who work on project with many people
            said me) a file must be one page long, and the function must not
            surpass 10 or 20 lines.

            So rewrite a module is not a long work. But a code has to be well cut,
            if it's not it's because it's stinky. And it's there where we see the
            skill of a developer or of the project manager.

            Comment

            • Richard

              #66
              Re: lshift &amp; rshift

              "Joachim Schmitz" <nospam.jojo@sc hmitz-digital.dewrite s:
              <iesvs@free.frs chrieb im Newsbeitrag
              news:1190989167 .377980.208250@ 22g2000hsm.goog legroups.com...
              >>So you'd rather reinvent the wheel than to make an existing one rounder?
              >>Way
              >>too expensive in the real world. Better hire someone who can make pretty
              >>round wheels in the first place, ones that are maintainable and enables
              >>others to base their work on.
              >>
              >You're misquoting me.
              I didn't change a single letter
              No, but you didn't seem to fully understand what he said.

              What he said was actually correct with regard to modularity.

              You don't tinker with good modules to make them "more round" - god knows
              what else you might break which relies on that module being not quite so
              round.

              Comment

              • Joachim Schmitz

                #67
                Re: lshift &amp; rshift

                <iesvs@free.frs chrieb im Newsbeitrag
                news:1190990909 .633028.198570@ r29g2000hsg.goo glegroups.com.. .
                On Sep 28, 4:27 pm, "Joachim Schmitz" <nospam.j...@sc hmitz-digital.de>
                wrote:
                ><ie...@free.fr schrieb im
                >Newsbeitragnew s:1190989167.37 7980.208250@22g 2000hsm.googleg roups.com...>>
                >So you'd rather reinvent the wheel than to make an existing one rounder?
                >Way
                >too expensive in the real world. Better hire someone who can make
                >pretty
                >round wheels in the first place, ones that are maintainable and
                >enables
                >others to base their work on.
                >>
                You're misquoting me.
                >>
                >I didn't change a single letter
                >
                I used the bad verb.
                I never mean reinvent the wheel.
                If you throw away a module and create a new one, you do just that
                And normally (like all my friends who work on project with many people
                said me) a file must be one page long, and the function must not
                surpass 10 or 20 lines.
                uhh, in that case... while I agree that a code file with several 1000 lines
                is bad and hard to maintain, just one page (assuming 72 lines here?) is
                pretty restrictive, as is 20 lines per function.
                So rewrite a module is not a long work. But a code has to be well cut,
                It adds up. With sich short functions you'd have many of them and changing
                some funtionality would most probably involve changing many functions...
                if it's not it's because it's stinky. And it's there where we see the
                skill of a developer or of the project manager.

                Comment

                • Ben Bacarisse

                  #68
                  Re: lshift &amp; rshift

                  "robertwessel2@ yahoo.com" <robertwessel2@ yahoo.comwrites :
                  On Sep 27, 8:07 am, "ie...@free .fr" <ie...@free.frw rote:
                  >In beginning my question was theoretical.
                  >The real meaning was, is << a left shift or something who shift the
                  >numbers from the less important bit to the most important.
                  >And people said it's the second, not the first.
                  >
                  >
                  The C standard defines a<<b to be a shift operations, and further
                  defines that it will be equivalent to ((a*(2**b))mod Uxxx_MAX) for
                  unsigned a's and non-negative b's.
                  .... provided b is less than the width of the type of the result
                  (undefined, otherwise).

                  --
                  Ben.

                  Comment

                  • Charlie Gordon

                    #69
                    Re: lshift &amp; rshift

                    <iesvs@free.f ra écrit dans le message de news:
                    1190990909.6330 28.198570@r29g2 00...legr oups.com...
                    On Sep 28, 4:27 pm, "Joachim Schmitz" <nospam.j...@sc hmitz-digital.de>
                    wrote:
                    ><ie...@free.fr schrieb im
                    >Newsbeitragnew s:1190989167.37 7980.208250@22g 2000hsm.googleg roups.com...>>
                    >So you'd rather reinvent the wheel than to make an existing one rounder?
                    >Way
                    >too expensive in the real world. Better hire someone who can make
                    >pretty
                    >round wheels in the first place, ones that are maintainable and
                    >enables
                    >others to base their work on.
                    >>
                    You're misquoting me.
                    >>
                    >I didn't change a single letter
                    >
                    I used the bad verb.
                    I never mean reinvent the wheel.
                    And normally (like all my friends who work on project with many people
                    said me) a file must be one page long, and the function must not
                    surpass 10 or 20 lines.
                    >
                    So rewrite a module is not a long work. But a code has to be well cut,
                    if it's not it's because it's stinky. And it's there where we see the
                    skill of a developer or of the project manager.
                    project with many people = classroom
                    one page file = simple programming assignment (one function)
                    project manager = teacher

                    What grade are you in ?


                    Comment

                    • pete

                      #70
                      Re: lshift &amp; rshift

                      Charlie Gordon wrote:
                      >
                      <iesvs@free.f ra écrit dans le message de news:
                      1190923668.7122 39.93890@r29g20 00...legro ups.com...
                      Forget the concept that others will read your code. If they do that
                      it's because your code is stinky, if it was good they don't need to
                      have a look.
                      You must be a troll
                      I think it's just that he's fantasizing
                      about what it would be like to be a programmer;
                      and also that he has never met a programmer
                      and has absolutlely no idea of what he's talking about.

                      --
                      pete

                      Comment

                      • Stephen Sprunk

                        #71
                        Re: lshift &amp; rshift

                        "pete" <pfiland@mindsp ring.comwrote in message
                        news:46FEB6AD.1 74@mindspring.c om...
                        Charlie Gordon wrote:
                        ><iesvs@free.fr a écrit dans le message de news:
                        >1190923668.7122 39.93890@r29g20 00...legro ups.com...
                        Forget the concept that others will read your code. If they do that
                        it's because your code is stinky, if it was good they don't need to
                        have a look.
                        >
                        >You must be a troll
                        >
                        I think it's just that he's fantasizing about what it would be like to
                        be a programmer; and also that he has never met a programmer
                        and has absolutlely no idea of what he's talking about.
                        I've known many professional programmers that think like this guy does. No
                        _good_ ones, though.

                        S

                        --
                        Stephen Sprunk "God does not play dice." --Albert Einstein
                        CCIE #3723 "God is an inveterate gambler, and He throws the
                        K5SSS dice at every possible opportunity." --Stephen Hawking


                        --
                        Posted via a free Usenet account from http://www.teranews.com

                        Comment

                        • Old Wolf

                          #72
                          Re: lshift &amp; rshift

                          On Sep 27, 8:26 pm, "ie...@free .fr" <ie...@free.frw rote:
                          Hello guys,
                          every time a rode a doc or a book about the language C I saw that
                          operators << and >exist. But each time they said that << translate
                          the digit to the left (and >...) but no one said if a << 1 mean
                          every time a * 2, because there is the problem with the way the
                          integer are stored.
                          For unsigned integers, or for non-negative values of
                          signed integers, << 1 means exactly the same as * 2 .

                          For negative integers, left-shifting causes undefined
                          behaviour.

                          Comment

                          Working...