Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Other Discussions
  3. The Weird and The Wonderful
  4. Efficiency redux

Efficiency redux

Scheduled Pinned Locked Moved The Weird and The Wonderful
ruby
21 Posts 10 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • B Brady Kelly

    Andrei Straut wrote:

    And yes, I'm a fan of ternaries

    Brother! :rose:

    B Offline
    B Offline
    BillW33
    wrote on last edited by
    #9

    Hey, bros, I like ternaries too. :)

    Just because the code works, it doesn't mean that it is good code.

    A 1 Reply Last reply
    0
    • F Fran Porretto

      Measuring "productivity" by lines of code written per unit time is bad, but I know of a case that's worse: measuring it by the number of faults found and fixed per unit time.

      I was assigned to a project about twenty years ago that actually used such a metric. The top guy thought it was a clever twist on SLOC metrics. He reasoned that what really matters is whether the program meets its specification and is working properly -- so far, so good -- so lines-of-code-written is an irrelevant metric. But bug fixing, which is, after all, the process by which a faulty program approaches acceptability, struck him as just right!

      I'd never before seen software engineers deliberately write huge numbers of bugs into their code. Pray God, I never see it again.

      (This message is programming you in ways you cannot detect. Be afraid.)

      B Offline
      B Offline
      BillW33
      wrote on last edited by
      #10

      Yeah, you get what you reward for, but rewarding for bug fixes is really bad. X|

      Just because the code works, it doesn't mean that it is good code.

      B 1 Reply Last reply
      0
      • F Fran Porretto

        Measuring "productivity" by lines of code written per unit time is bad, but I know of a case that's worse: measuring it by the number of faults found and fixed per unit time.

        I was assigned to a project about twenty years ago that actually used such a metric. The top guy thought it was a clever twist on SLOC metrics. He reasoned that what really matters is whether the program meets its specification and is working properly -- so far, so good -- so lines-of-code-written is an irrelevant metric. But bug fixing, which is, after all, the process by which a faulty program approaches acceptability, struck him as just right!

        I'd never before seen software engineers deliberately write huge numbers of bugs into their code. Pray God, I never see it again.

        (This message is programming you in ways you cannot detect. Be afraid.)

        O Offline
        O Offline
        onemorechance
        wrote on last edited by
        #11

        A friend of mine used to work at a place that had a similar situation. The powers that be had decided to tie the group's bonus structure to the number of cases/bugs that were closed. So what did that encourage? Of course, all the project managers were closing bugs left, right, and center (fixed or not), and QA would just open a brand new one ... pretty much a copy/paste of the old. It was a great team building exercise that everybody could get excited about.

        1 Reply Last reply
        0
        • B BillW33

          Yeah, you get what you reward for, but rewarding for bug fixes is really bad. X|

          Just because the code works, it doesn't mean that it is good code.

          B Offline
          B Offline
          BobJanova
          wrote on last edited by
          #12

          It would be okay if either the development was done in the past (so not influenced by the reward), or you only got a reward if the bug you fixed wasn't introduced by your team. But yeah otherwise that is a really stupid thing to measure. I know it's really vague but basing rewards on customer satisfaction is really the way to go. Basing it on any particular code-related metric will just result in developers working to that metric and ignoring the actual end product.

          1 Reply Last reply
          0
          • B BillW33

            Hey, bros, I like ternaries too. :)

            Just because the code works, it doesn't mean that it is good code.

            A Offline
            A Offline
            Andrei Straut
            wrote on last edited by
            #13

            CIDev wrote:

            Hey, bros, I like ternaries too. :)

            We should make a club. "The Ternary Project" sounds just about right :)

            Full-fledged Java/.NET lover, full-fledged PHP hater. Full-fledged Google/Microsoft lover, full-fledged Apple hater. Full-fledged Skype lover, full-fledged YM hater.

            B L 2 Replies Last reply
            0
            • J John Hunley

              Just unearthed the following gem to display a progress bar:

              // display the battery gauge and percentage
              switch(uiBattBarPosition)
              {
              case(0):
              DisplayMessage(MAC_MSG_PTR(SS_BATTERY_CHARGE),s,"");
              break;
              case(1):
              DisplayMessage(MAC_MSG_PTR(SS_BATTERY_CHARGE),s,"\xff");
              break;
              case(2):
              DisplayMessage(MAC_MSG_PTR(SS_BATTERY_CHARGE),s,"\xff\xff");
              break;
              case(3):
              DisplayMessage(MAC_MSG_PTR(SS_BATTERY_CHARGE),s,"\xff\xff\xff");
              break;
              case(4):
              DisplayMessage(MAC_MSG_PTR(SS_BATTERY_CHARGE),s,"\xff\xff\xff\xff");
              break;
              case(5):
              DisplayMessage(MAC_MSG_PTR(SS_BATTERY_CHARGE),s,"\xff\xff\xff\xff\xff");
              break;
              case(6):
              DisplayMessage(MAC_MSG_PTR(SS_BATTERY_CHARGE),s,"\xff\xff\xff\xff\xff\xff");
              break;
              case(7):
              DisplayMessage(MAC_MSG_PTR(SS_BATTERY_CHARGE),s,"\xff\xff\xff\xff\xff\xff\xff");
              break;
              case(8):
              DisplayMessage(MAC_MSG_PTR(SS_BATTERY_CHARGE),s,"\xff\xff\xff\xff\xff\xff\xff\xff");
              break;
              case(9):
              DisplayMessage(MAC_MSG_PTR(SS_BATTERY_CHARGE),s,"\xff\xff\xff\xff\xff\xff\xff\xff\xff");
              break;
              case(10):
              DisplayMessage(MAC_MSG_PTR(SS_BATTERY_CHARGE),s,"\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff");
              break;
              case(11):
              DisplayMessage(MAC_MSG_PTR(SS_BATTERY_CHARGE),s,"\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff");
              break;
              case(12):
              DisplayMessage(MAC_MSG_PTR(SS_BATTERY_CHARGE),s,"\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff");
              break;
              case(13):
              DisplayMessage(MAC_MSG_PTR(SS_BATTERY_CHARGE),s,"\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff");
              break;
              case(14):
              DisplayMessage(MAC_MSG_PTR(SS_BATTERY_CHARGE),s,"\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff");
              break;
              case(15):
              DisplayMessage(MAC_MSG_PTR(SS_BATTERY_CHARGE),s,"\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff");
              break;
              case(16):
              DisplayMessage(MAC_MSG_PTR(SS_BATTERY_CHARGE),s,"\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff");
              break;
              case(17):
              DisplayMessage(MAC_MSG_PTR(SS_BATTERY_CHARGE),s,"\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff");
              break;
              case(18):
              DisplayMessage(MAC_MSG_PTR(SS_BATTERY_CHARGE),s,"\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff");
              break;
              case(19):
              DisplayMessage(MAC_MSG_PTR(SS_BATTERY_CH

              R Offline
              R Offline
              rtklueh
              wrote on last edited by
              #14

              I would not be surprised if this code actually ran faster than most other schemes. But, for a battery gauge?

              1 Reply Last reply
              0
              • A Andrei Straut

                CIDev wrote:

                Hey, bros, I like ternaries too. :)

                We should make a club. "The Ternary Project" sounds just about right :)

                Full-fledged Java/.NET lover, full-fledged PHP hater. Full-fledged Google/Microsoft lover, full-fledged Apple hater. Full-fledged Skype lover, full-fledged YM hater.

                B Offline
                B Offline
                BillW33
                wrote on last edited by
                #15

                Andrei Straut wrote:

                We should make a club. "The Ternary Project" sounds just about right

                Sounds good, especially since there are 3 of us. ;)

                Just because the code works, it doesn't mean that it is good code.

                A 1 Reply Last reply
                0
                • B BillW33

                  Andrei Straut wrote:

                  We should make a club. "The Ternary Project" sounds just about right

                  Sounds good, especially since there are 3 of us. ;)

                  Just because the code works, it doesn't mean that it is good code.

                  A Offline
                  A Offline
                  Andrei Straut
                  wrote on last edited by
                  #16

                  CIDev wrote:

                  Sounds good, especially since there are 3 of us. ;)

                  Look, we even have a website now. It's just perfect!

                  Full-fledged Java/.NET lover, full-fledged PHP hater. Full-fledged Google/Microsoft lover, full-fledged Apple hater. Full-fledged Skype lover, full-fledged YM hater.

                  B 1 Reply Last reply
                  0
                  • A Andrei Straut

                    CIDev wrote:

                    Sounds good, especially since there are 3 of us. ;)

                    Look, we even have a website now. It's just perfect!

                    Full-fledged Java/.NET lover, full-fledged PHP hater. Full-fledged Google/Microsoft lover, full-fledged Apple hater. Full-fledged Skype lover, full-fledged YM hater.

                    B Offline
                    B Offline
                    BillW33
                    wrote on last edited by
                    #17

                    That link doesn't work for me. But, there is a ternary project on SourceForge[^] :)

                    Just because the code works, it doesn't mean that it is good code.

                    A 1 Reply Last reply
                    0
                    • B BillW33

                      That link doesn't work for me. But, there is a ternary project on SourceForge[^] :)

                      Just because the code works, it doesn't mean that it is good code.

                      A Offline
                      A Offline
                      Andrei Straut
                      wrote on last edited by
                      #18

                      What do you mean? It's working just as it should! :laugh:

                      Full-fledged Java/.NET lover, full-fledged PHP hater. Full-fledged Google/Microsoft lover, full-fledged Apple hater. Full-fledged Skype lover, full-fledged YM hater.

                      B 1 Reply Last reply
                      0
                      • A Andrei Straut

                        What do you mean? It's working just as it should! :laugh:

                        Full-fledged Java/.NET lover, full-fledged PHP hater. Full-fledged Google/Microsoft lover, full-fledged Apple hater. Full-fledged Skype lover, full-fledged YM hater.

                        B Offline
                        B Offline
                        BillW33
                        wrote on last edited by
                        #19

                        :laugh:

                        Just because the code works, it doesn't mean that it is good code.

                        1 Reply Last reply
                        0
                        • A Andrei Straut

                          CIDev wrote:

                          Hey, bros, I like ternaries too. :)

                          We should make a club. "The Ternary Project" sounds just about right :)

                          Full-fledged Java/.NET lover, full-fledged PHP hater. Full-fledged Google/Microsoft lover, full-fledged Apple hater. Full-fledged Skype lover, full-fledged YM hater.

                          L Offline
                          L Offline
                          Lutoslaw
                          wrote on last edited by
                          #20

                          OT: This reminds me Randal's tautology club[^] comic. ;)

                          Greetings - Jacek

                          1 Reply Last reply
                          0
                          • F Fran Porretto

                            Measuring "productivity" by lines of code written per unit time is bad, but I know of a case that's worse: measuring it by the number of faults found and fixed per unit time.

                            I was assigned to a project about twenty years ago that actually used such a metric. The top guy thought it was a clever twist on SLOC metrics. He reasoned that what really matters is whether the program meets its specification and is working properly -- so far, so good -- so lines-of-code-written is an irrelevant metric. But bug fixing, which is, after all, the process by which a faulty program approaches acceptability, struck him as just right!

                            I'd never before seen software engineers deliberately write huge numbers of bugs into their code. Pray God, I never see it again.

                            (This message is programming you in ways you cannot detect. Be afraid.)

                            L Offline
                            L Offline
                            Lutoslaw
                            wrote on last edited by
                            #21

                            My choice: payment per hour + a realistic manhour estimation + a boss who plays fair and understands that things change + trusted, honest employees + a pizza-day at least once a week.

                            Greetings - Jacek

                            1 Reply Last reply
                            0
                            Reply
                            • Reply as topic
                            Log in to reply
                            • Oldest to Newest
                            • Newest to Oldest
                            • Most Votes


                            • Login

                            • Don't have an account? Register

                            • Login or register to search.
                            • First post
                              Last post
                            0
                            • Categories
                            • Recent
                            • Tags
                            • Popular
                            • World
                            • Users
                            • Groups