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. Offered with no comment

Offered with no comment

Scheduled Pinned Locked Moved The Weird and The Wonderful
9 Posts 7 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.
  • L Offline
    L Offline
    Lost User
    wrote on last edited by
    #1

    public static int TenSeconds = 10;

    F B T N R 5 Replies Last reply
    0
    • L Lost User

      public static int TenSeconds = 10;

      F Offline
      F Offline
      Freak30
      wrote on last edited by
      #2

      Maybe it is used as a symbolic constant in various places and the author wanted to be able to change it in just one place. However, in this case the variable name is not the best choice and it should of course be const.

      The good thing about pessimism is, that you are always either right or pleasently surprised.

      L 1 Reply Last reply
      0
      • F Freak30

        Maybe it is used as a symbolic constant in various places and the author wanted to be able to change it in just one place. However, in this case the variable name is not the best choice and it should of course be const.

        The good thing about pessimism is, that you are always either right or pleasently surprised.

        L Offline
        L Offline
        Lost User
        wrote on last edited by
        #3

        it is used in exactly one place. And the uselessness of it is EXACTLY the naming of it.

        1 Reply Last reply
        0
        • L Lost User

          public static int TenSeconds = 10;

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

          Coding standards 1 common sense 0 (this is almost certainly because of a 'no magic numbers' code rule)

          1 Reply Last reply
          0
          • L Lost User

            public static int TenSeconds = 10;

            T Offline
            T Offline
            Tim Carmichael
            wrote on last edited by
            #5

            But... that is not a variant of BASIC.. how can bad code be written in a non-BASIC language? Did we experience a shift to an alternate universe?

            L 1 Reply Last reply
            0
            • T Tim Carmichael

              But... that is not a variant of BASIC.. how can bad code be written in a non-BASIC language? Did we experience a shift to an alternate universe?

              L Offline
              L Offline
              Lost User
              wrote on last edited by
              #6

              Tim Carmichael wrote:

              how can bad code be written in a non-BASIC language?

              You evidently haven't worked the same places I have ;) worst code I ever saw was in COBOL!

              P 1 Reply Last reply
              0
              • L Lost User

                Tim Carmichael wrote:

                how can bad code be written in a non-BASIC language?

                You evidently haven't worked the same places I have ;) worst code I ever saw was in COBOL!

                P Offline
                P Offline
                Patrycja88
                wrote on last edited by
                #7

                Interesting is that presnted maybe use pozycjonowanie

                1 Reply Last reply
                0
                • L Lost User

                  public static int TenSeconds = 10;

                  N Offline
                  N Offline
                  NormDroid
                  wrote on last edited by
                  #8

                  Seems fair but should be declared as const.

                  Web | News | LinkedIn

                  1 Reply Last reply
                  0
                  • L Lost User

                    public static int TenSeconds = 10;

                    R Offline
                    R Offline
                    Rahul Rajat Singh
                    wrote on last edited by
                    #9

                    I think the developer believed in "Self Documented Code". It would have been much better if was something like:

                    public static int TenSeconds = 20;

                    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