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. The Lounge
  3. Best Programming Advice Ever.

Best Programming Advice Ever.

Scheduled Pinned Locked Moved The Lounge
phpcomtoolsquestion
36 Posts 22 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 Philip Laureano

    Clickety[^] :)

    Do you know...LinFu?

    D Offline
    D Offline
    Dalek Dave
    wrote on last edited by
    #3

    that has been the advice since I was a sysop in the early 80's!

    ------------------------------------ "The greatest tragedy in mankind's entire history may be the hijacking of morality by religion" Arthur C Clarke

    Brian C HartB 1 Reply Last reply
    0
    • P Philip Laureano

      Clickety[^] :)

      Do you know...LinFu?

      J Offline
      J Offline
      John M Drescher
      wrote on last edited by
      #4

      That's really in VC6?

      John

      L 1 Reply Last reply
      0
      • D Dalek Dave

        that has been the advice since I was a sysop in the early 80's!

        ------------------------------------ "The greatest tragedy in mankind's entire history may be the hijacking of morality by religion" Arthur C Clarke

        Brian C HartB Offline
        Brian C HartB Offline
        Brian C Hart
        wrote on last edited by
        #5

        Yeah right like anybody does that LOL I have seen some doozies in my time. My favorite is one-letter variable names! Like

        StringArray a = new StringArray();

        Sincerely Yours, Brian Hart

        N 1 Reply Last reply
        0
        • J John M Drescher

          That's really in VC6?

          John

          L Offline
          L Offline
          Leslie Sanford
          wrote on last edited by
          #6

          John M. Drescher wrote:

          That's really in VC6?

          Heh, that was my first reaction, too.

          M 1 Reply Last reply
          0
          • L Leslie Sanford

            John M. Drescher wrote:

            That's really in VC6?

            Heh, that was my first reaction, too.

            M Offline
            M Offline
            Michael Schubert
            wrote on last edited by
            #7

            He added this to the "msdev.tip" file which is a plain text file. :-D

            P 1 Reply Last reply
            0
            • M Michael Schubert

              He added this to the "msdev.tip" file which is a plain text file. :-D

              P Offline
              P Offline
              PIEBALDconsult
              wrote on last edited by
              #8

              Oooh, you can do that?

              1 Reply Last reply
              0
              • P Philip Laureano

                Clickety[^] :)

                Do you know...LinFu?

                R Offline
                R Offline
                Rei Miyasaka
                wrote on last edited by
                #9

                Actually the person maintaining my code is me -- a serial killer that knows where I live.

                1 Reply Last reply
                0
                • P Philip Laureano

                  Clickety[^] :)

                  Do you know...LinFu?

                  F Offline
                  F Offline
                  frankie01000100
                  wrote on last edited by
                  #10

                  IList newList = new List(); //I eat serial killers for breakfast newList.Add("word"); //You think you can take me? Think again a*shole

                  1 Reply Last reply
                  0
                  • Brian C HartB Brian C Hart

                    Yeah right like anybody does that LOL I have seen some doozies in my time. My favorite is one-letter variable names! Like

                    StringArray a = new StringArray();

                    Sincerely Yours, Brian Hart

                    N Offline
                    N Offline
                    Naruki 0
                    wrote on last edited by
                    #11

                    ... in the right circumstances. Pretty much being that the variable is in a very short scope and is basically a tmp variable, where the name is not important.

                    Don't let my name fool you. That's my job.

                    Brian C HartB D J 3 Replies Last reply
                    0
                    • C Colin Angus Mackay

                      It is scary the number of people that don't take that advice.

                      * Developer Day Scotland 2 - Free community conference * The Blog of Colin Angus Mackay


                      Vogon Building and Loan advise that your planet is at risk if you do not keep up repayments on any mortgage secured upon it. Please remember that the force of gravity can go up as well as down.

                      N Offline
                      N Offline
                      Naruki 0
                      wrote on last edited by
                      #12

                      We need to start scaring those people instead. Step 1: find out where they live Step 2: make them aware of that Step 3: ??? Step 4: Profit!

                      Don't let my name fool you. That's my job.

                      1 Reply Last reply
                      0
                      • P Philip Laureano

                        Clickety[^] :)

                        Do you know...LinFu?

                        S Offline
                        S Offline
                        Schmuli
                        wrote on last edited by
                        #13

                        The tip appears in the wrong place. It should be in the Visual Basic editor (at least, as well).

                        1 Reply Last reply
                        0
                        • N Naruki 0

                          ... in the right circumstances. Pretty much being that the variable is in a very short scope and is basically a tmp variable, where the name is not important.

                          Don't let my name fool you. That's my job.

                          Brian C HartB Offline
                          Brian C HartB Offline
                          Brian C Hart
                          wrote on last edited by
                          #14

                          That point is irrelevant. I am talking about seeing this in high performance scientfic codes where a single function can be thousands of lines long. Makes the code fairly hard to understand if all the tmp variables happen to be one letter, trust me.

                          Sincerely Yours, Brian Hart

                          K N D S 4 Replies Last reply
                          0
                          • Brian C HartB Brian C Hart

                            That point is irrelevant. I am talking about seeing this in high performance scientfic codes where a single function can be thousands of lines long. Makes the code fairly hard to understand if all the tmp variables happen to be one letter, trust me.

                            Sincerely Yours, Brian Hart

                            K Offline
                            K Offline
                            KungFuCoder
                            wrote on last edited by
                            #15

                            I just settle for calling them tmpStr tmpInt etc so I know. Tend not to use them at all unless I have to

                            N D 2 Replies Last reply
                            0
                            • Brian C HartB Brian C Hart

                              That point is irrelevant. I am talking about seeing this in high performance scientfic codes where a single function can be thousands of lines long. Makes the code fairly hard to understand if all the tmp variables happen to be one letter, trust me.

                              Sincerely Yours, Brian Hart

                              N Offline
                              N Offline
                              Naruki 0
                              wrote on last edited by
                              #16

                              That point is irrelevant. Typical phud, discrediting anything that disagrees. Heh. :) The point was absolutely relevant since you did not specify any conditions. In your new revision, I certainly agree - in fact, my original point already acknowledged that and more. I was just pointing out that your absolute statement was, with even a single counter-example, therefore absolutely wrong. As a programmer you gotta be careful with those corner cases.

                              Don't let my name fool you. That's my job.

                              1 Reply Last reply
                              0
                              • K KungFuCoder

                                I just settle for calling them tmpStr tmpInt etc so I know. Tend not to use them at all unless I have to

                                N Offline
                                N Offline
                                Naruki 0
                                wrote on last edited by
                                #17

                                My first thought was putting that in context with the idea of a 1000+ line function and thinking: well that's just gonna piss him off all over again. Might as well just call it thisVariableHasMoreThan1Letter or singleLetterVariablesSuck. But as a response to my point it does make sense. I do that, too, in most such situations. But not all.

                                1 Reply Last reply
                                0
                                • P Philip Laureano

                                  Clickety[^] :)

                                  Do you know...LinFu?

                                  C Offline
                                  C Offline
                                  clearbrian1
                                  wrote on last edited by
                                  #18

                                  Just do what apple do. Create a platform...IPOD/IPHONE They only change 3 things every 6 months..(Email forwarding (cmon we all know that took a day to write))..have a big macworld announcement and the starving clients will praise you forever. :) 6 bugs /year...think thats a programmers best average? :)

                                  G 1 Reply Last reply
                                  0
                                  • N Naruki 0

                                    ... in the right circumstances. Pretty much being that the variable is in a very short scope and is basically a tmp variable, where the name is not important.

                                    Don't let my name fool you. That's my job.

                                    D Offline
                                    D Offline
                                    Dave Parker
                                    wrote on last edited by
                                    #19

                                    At the place where I used to work the guy who was there before me made *every* variable a global (this is in VB6) and would start with the name AAA and work his way upwards :-s

                                    D 1 Reply Last reply
                                    0
                                    • D Dave Parker

                                      At the place where I used to work the guy who was there before me made *every* variable a global (this is in VB6) and would start with the name AAA and work his way upwards :-s

                                      D Offline
                                      D Offline
                                      destynova
                                      wrote on last edited by
                                      #20

                                      Dave Parker wrote:

                                      At the place where I used to work the guy who was there before me made *every* variable a global (this is in VB6) and would start with the name AAA and work his way upwards :-s

                                      Now that's a master coder.

                                      N 1 Reply Last reply
                                      0
                                      • K KungFuCoder

                                        I just settle for calling them tmpStr tmpInt etc so I know. Tend not to use them at all unless I have to

                                        D Offline
                                        D Offline
                                        destynova
                                        wrote on last edited by
                                        #21

                                        KungFuCoder wrote:

                                        I just settle for calling them tmpStr tmpInt etc so I know.

                                        It's better than nothing I suppose, unless you're using a statically typed language, in which case it's completely useless (e.g. "int tmpInt" is redundant and a waste of brain/finger time).

                                        N 1 Reply Last reply
                                        0
                                        • Brian C HartB Brian C Hart

                                          That point is irrelevant. I am talking about seeing this in high performance scientfic codes where a single function can be thousands of lines long. Makes the code fairly hard to understand if all the tmp variables happen to be one letter, trust me.

                                          Sincerely Yours, Brian Hart

                                          D Offline
                                          D Offline
                                          destynova
                                          wrote on last edited by
                                          #22

                                          Brian Hart wrote:

                                          That point is irrelevant. I am talking about seeing this in high performance scientfic codes where a single function can be thousands of lines long. Makes the code fairly hard to understand if all the tmp variables happen to be one letter, trust me.

                                          I'll tell you what makes the code fairly hard to understand: having a single function which is thousands of lines long. This is idiotic and completely unnecessary - we've had procedures and functions and other abstractions since before colour TV, and their main use is to prevent thousand line functions from ever existing. IMO, tiny variable names are okay if you have quite short functions, which you really should anyway.

                                          T 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