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. Well verified code

Well verified code

Scheduled Pinned Locked Moved The Weird and The Wonderful
11 Posts 8 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.
  • P Offline
    P Offline
    Paulo Zemek
    wrote on last edited by
    #1

    Not only the code uses hardcoded "enums" and uses everything as strings, it also does very "useful" IFs.

    if(cboTipoIncentivo.SelectedValue == "414")
    dtIncentivo = oIncentivo.ConsultaCreditoIncentivo("", txtN_Processo.Text, sIdf_Pessoa, cboTipoIncentivo.SelectedValue);
    else
    dtIncentivo = oIncentivo.ConsultaCreditoIncentivo("", txtN_Processo.Text, sIdf_Pessoa, cboTipoIncentivo.SelectedValue);

    L S V J 4 Replies Last reply
    0
    • P Paulo Zemek

      Not only the code uses hardcoded "enums" and uses everything as strings, it also does very "useful" IFs.

      if(cboTipoIncentivo.SelectedValue == "414")
      dtIncentivo = oIncentivo.ConsultaCreditoIncentivo("", txtN_Processo.Text, sIdf_Pessoa, cboTipoIncentivo.SelectedValue);
      else
      dtIncentivo = oIncentivo.ConsultaCreditoIncentivo("", txtN_Processo.Text, sIdf_Pessoa, cboTipoIncentivo.SelectedValue);

      L Offline
      L Offline
      Luc Pattyn
      wrote on last edited by
      #2

      Looks like a breakpoint construction to me. I would consider using such things myself assuming you can't break on an empty code block. :)

      Luc Pattyn [Forum Guidelines] [My Articles]


      The quality and detail of your question reflects on the effectiveness of the help you are likely to get. Show formatted code inside PRE tags, and give clear symptoms when describing a problem.


      L S 2 Replies Last reply
      0
      • P Paulo Zemek

        Not only the code uses hardcoded "enums" and uses everything as strings, it also does very "useful" IFs.

        if(cboTipoIncentivo.SelectedValue == "414")
        dtIncentivo = oIncentivo.ConsultaCreditoIncentivo("", txtN_Processo.Text, sIdf_Pessoa, cboTipoIncentivo.SelectedValue);
        else
        dtIncentivo = oIncentivo.ConsultaCreditoIncentivo("", txtN_Processo.Text, sIdf_Pessoa, cboTipoIncentivo.SelectedValue);

        S Offline
        S Offline
        Super Lloyd
        wrote on last edited by
        #3

        A switch would have been more fun! ;-)

        A train station is where the train stops. A bus station is where the bus stops. On my desk, I have a work station.... _________________________________________________________ My programs never have bugs, they just develop random features.

        0 1 Reply Last reply
        0
        • L Luc Pattyn

          Looks like a breakpoint construction to me. I would consider using such things myself assuming you can't break on an empty code block. :)

          Luc Pattyn [Forum Guidelines] [My Articles]


          The quality and detail of your question reflects on the effectiveness of the help you are likely to get. Show formatted code inside PRE tags, and give clear symptoms when describing a problem.


          L Offline
          L Offline
          leppie
          wrote on last edited by
          #4

          Luc Pattyn wrote:

          I would consider using such things myself assuming you can't break on an empty code block.

          ; // all you need :)

          xacc.ide
          IronScheme - 1.0 beta 3 - out now!
          ((lambda (x) `((lambda (x) ,x) ',x)) '`((lambda (x) ,x) ',x))

          1 Reply Last reply
          0
          • S Super Lloyd

            A switch would have been more fun! ;-)

            A train station is where the train stops. A bus station is where the bus stops. On my desk, I have a work station.... _________________________________________________________ My programs never have bugs, they just develop random features.

            0 Offline
            0 Offline
            0x3c0
            wrote on last edited by
            #5

            Even more fun: inheritance. And delegates :)

            Between the idea And the reality Between the motion And the act Falls the Shadow

            S 1 Reply Last reply
            0
            • 0 0x3c0

              Even more fun: inheritance. And delegates :)

              Between the idea And the reality Between the motion And the act Falls the Shadow

              S Offline
              S Offline
              Super Lloyd
              wrote on last edited by
              #6

              Haha, why make simple when we can make it complicated!? Challenge: write a 12193 lines long C# program which convert any value to the integer value 1 (or 0). Bonus point: all method should be called, through different path, for any values!

              A train station is where the train stops. A bus station is where the bus stops. On my desk, I have a work station.... _________________________________________________________ My programs never have bugs, they just develop random features.

              1 Reply Last reply
              0
              • L Luc Pattyn

                Looks like a breakpoint construction to me. I would consider using such things myself assuming you can't break on an empty code block. :)

                Luc Pattyn [Forum Guidelines] [My Articles]


                The quality and detail of your question reflects on the effectiveness of the help you are likely to get. Show formatted code inside PRE tags, and give clear symptoms when describing a problem.


                S Offline
                S Offline
                Super Lloyd
                wrote on last edited by
                #7

                Right click on the breakpoint's red ball => Condition. Here you go! ;-) Admittedly it does slow down the program a bit...

                A train station is where the train stops. A bus station is where the bus stops. On my desk, I have a work station.... _________________________________________________________ My programs never have bugs, they just develop random features.

                L L 2 Replies Last reply
                0
                • P Paulo Zemek

                  Not only the code uses hardcoded "enums" and uses everything as strings, it also does very "useful" IFs.

                  if(cboTipoIncentivo.SelectedValue == "414")
                  dtIncentivo = oIncentivo.ConsultaCreditoIncentivo("", txtN_Processo.Text, sIdf_Pessoa, cboTipoIncentivo.SelectedValue);
                  else
                  dtIncentivo = oIncentivo.ConsultaCreditoIncentivo("", txtN_Processo.Text, sIdf_Pessoa, cboTipoIncentivo.SelectedValue);

                  V Offline
                  V Offline
                  Viral Upadhyay
                  wrote on last edited by
                  #8

                  Looks developer is in hurry to finish code or he/she missing some work to do in condition. :^)

                  Viral My Site Tips & Tracks

                  1 Reply Last reply
                  0
                  • P Paulo Zemek

                    Not only the code uses hardcoded "enums" and uses everything as strings, it also does very "useful" IFs.

                    if(cboTipoIncentivo.SelectedValue == "414")
                    dtIncentivo = oIncentivo.ConsultaCreditoIncentivo("", txtN_Processo.Text, sIdf_Pessoa, cboTipoIncentivo.SelectedValue);
                    else
                    dtIncentivo = oIncentivo.ConsultaCreditoIncentivo("", txtN_Processo.Text, sIdf_Pessoa, cboTipoIncentivo.SelectedValue);

                    J Offline
                    J Offline
                    Jeremy Tierman
                    wrote on last edited by
                    #9

                    My favorite...

                    if(5 == 5)
                    do something...
                    else
                    do the same thing...

                    1 Reply Last reply
                    0
                    • S Super Lloyd

                      Right click on the breakpoint's red ball => Condition. Here you go! ;-) Admittedly it does slow down the program a bit...

                      A train station is where the train stops. A bus station is where the bus stops. On my desk, I have a work station.... _________________________________________________________ My programs never have bugs, they just develop random features.

                      L Offline
                      L Offline
                      Luc Pattyn
                      wrote on last edited by
                      #10

                      Thanks. I'll give it a try sometime next week. :)

                      Luc Pattyn [Forum Guidelines] [My Articles]


                      The quality and detail of your question reflects on the effectiveness of the help you are likely to get. Show formatted code inside PRE tags, and give clear symptoms when describing a problem.


                      1 Reply Last reply
                      0
                      • S Super Lloyd

                        Right click on the breakpoint's red ball => Condition. Here you go! ;-) Admittedly it does slow down the program a bit...

                        A train station is where the train stops. A bus station is where the bus stops. On my desk, I have a work station.... _________________________________________________________ My programs never have bugs, they just develop random features.

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

                        Super Lloyd wrote:

                        Admittedly it does slow down the program a bit

                        Yup. Don't even try to use it in a loop...

                        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