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. Old age shows its mark...

Old age shows its mark...

Scheduled Pinned Locked Moved The Lounge
designhelpquestioncareer
47 Posts 31 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.
  • S Offline
    S Offline
    stoneyowl2
    wrote on last edited by
    #1

    Okay, I was writing some code and noticed that I was using 'i','j', and 'k' for looping indices - it shook me that I still retained that habit. :doh: Then I thought: "Who cares? They do the job" :laugh:

    A human being should be able to change a diaper, plan an invasion, butcher a hog, navigate a ship, design a building, write a sonnet, balance accounts, build a wall, set a bone, comfort the dying, take orders, give orders, cooperate, act alone, solve equations, analyze a new problem, pitch manure, program a computer, cook a tasty meal, fight efficiently, die gallantly. Specialization is for insects! - Lazarus Long

    Z OriginalGriffO M J Kornfeld Eliyahu PeterK 20 Replies Last reply
    0
    • S stoneyowl2

      Okay, I was writing some code and noticed that I was using 'i','j', and 'k' for looping indices - it shook me that I still retained that habit. :doh: Then I thought: "Who cares? They do the job" :laugh:

      A human being should be able to change a diaper, plan an invasion, butcher a hog, navigate a ship, design a building, write a sonnet, balance accounts, build a wall, set a bone, comfort the dying, take orders, give orders, cooperate, act alone, solve equations, analyze a new problem, pitch manure, program a computer, cook a tasty meal, fight efficiently, die gallantly. Specialization is for insects! - Lazarus Long

      Z Offline
      Z Offline
      ZurdoDev
      wrote on last edited by
      #2

      stoneyowl2 wrote:

      Who cares?

      The next guy to look at the code after you. And that includes you in 2 weeks. :-D

      Everyone is born right handed. Only the strongest overcome it. Fight for left-handed rights and hand equality.

      S 1 Reply Last reply
      0
      • S stoneyowl2

        Okay, I was writing some code and noticed that I was using 'i','j', and 'k' for looping indices - it shook me that I still retained that habit. :doh: Then I thought: "Who cares? They do the job" :laugh:

        A human being should be able to change a diaper, plan an invasion, butcher a hog, navigate a ship, design a building, write a sonnet, balance accounts, build a wall, set a bone, comfort the dying, take orders, give orders, cooperate, act alone, solve equations, analyze a new problem, pitch manure, program a computer, cook a tasty meal, fight efficiently, die gallantly. Specialization is for insects! - Lazarus Long

        OriginalGriffO Offline
        OriginalGriffO Offline
        OriginalGriff
        wrote on last edited by
        #3

        Old FORTRAN habits die hard ... I do the same, but at least I have to declare them these days. Old FORTRAN programmers never die, they RETURN to caller

        Sent from my Amstrad PC 1640 Never throw anything away, Griff Bad command or file name. Bad, bad command! Sit! Stay! Staaaay... AntiTwitter: @DalekDave is now a follower!

        "I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
        "Common sense is so rare these days, it should be classified as a super power" - Random T-shirt

        S B K T 4 Replies Last reply
        0
        • OriginalGriffO OriginalGriff

          Old FORTRAN habits die hard ... I do the same, but at least I have to declare them these days. Old FORTRAN programmers never die, they RETURN to caller

          Sent from my Amstrad PC 1640 Never throw anything away, Griff Bad command or file name. Bad, bad command! Sit! Stay! Staaaay... AntiTwitter: @DalekDave is now a follower!

          S Offline
          S Offline
          stoneyowl2
          wrote on last edited by
          #4

          True, true. But at least it is faster than typing 'rowndx' or (Deity forbid!) 'elementIndex'

          A human being should be able to change a diaper, plan an invasion, butcher a hog, navigate a ship, design a building, write a sonnet, balance accounts, build a wall, set a bone, comfort the dying, take orders, give orders, cooperate, act alone, solve equations, analyze a new problem, pitch manure, program a computer, cook a tasty meal, fight efficiently, die gallantly. Specialization is for insects! - Lazarus Long

          1 Reply Last reply
          0
          • Z ZurdoDev

            stoneyowl2 wrote:

            Who cares?

            The next guy to look at the code after you. And that includes you in 2 weeks. :-D

            Everyone is born right handed. Only the strongest overcome it. Fight for left-handed rights and hand equality.

            S Offline
            S Offline
            stoneyowl2
            wrote on last edited by
            #5

            If the next guy (or me) can't figure out what the 'i', or 'j' or 'k' is used for, then the need to get a different job (or take a FORTRAN course!).

            A human being should be able to change a diaper, plan an invasion, butcher a hog, navigate a ship, design a building, write a sonnet, balance accounts, build a wall, set a bone, comfort the dying, take orders, give orders, cooperate, act alone, solve equations, analyze a new problem, pitch manure, program a computer, cook a tasty meal, fight efficiently, die gallantly. Specialization is for insects! - Lazarus Long

            S J C 3 Replies Last reply
            0
            • S stoneyowl2

              Okay, I was writing some code and noticed that I was using 'i','j', and 'k' for looping indices - it shook me that I still retained that habit. :doh: Then I thought: "Who cares? They do the job" :laugh:

              A human being should be able to change a diaper, plan an invasion, butcher a hog, navigate a ship, design a building, write a sonnet, balance accounts, build a wall, set a bone, comfort the dying, take orders, give orders, cooperate, act alone, solve equations, analyze a new problem, pitch manure, program a computer, cook a tasty meal, fight efficiently, die gallantly. Specialization is for insects! - Lazarus Long

              M Offline
              M Offline
              Mycroft Holmes
              wrote on last edited by
              #6

              I have never touched Fortran or Cobol and I use the same conventions, I have no idea where I picked it up from as I learnt to code on a commodore 64 and then from a SuperBase manual.

              Never underestimate the power of human stupidity - RAH I'm old. I know stuff - JSOP

              D M 2 Replies Last reply
              0
              • S stoneyowl2

                Okay, I was writing some code and noticed that I was using 'i','j', and 'k' for looping indices - it shook me that I still retained that habit. :doh: Then I thought: "Who cares? They do the job" :laugh:

                A human being should be able to change a diaper, plan an invasion, butcher a hog, navigate a ship, design a building, write a sonnet, balance accounts, build a wall, set a bone, comfort the dying, take orders, give orders, cooperate, act alone, solve equations, analyze a new problem, pitch manure, program a computer, cook a tasty meal, fight efficiently, die gallantly. Specialization is for insects! - Lazarus Long

                J Offline
                J Offline
                j snooze
                wrote on last edited by
                #7

                this style works for me. Its hip like texting acronyms now. You could use i d k instead or f y i. My personal favorite was back when I used VB Dim g as string... It made my programming style quite revealing.

                M 1 Reply Last reply
                0
                • S stoneyowl2

                  Okay, I was writing some code and noticed that I was using 'i','j', and 'k' for looping indices - it shook me that I still retained that habit. :doh: Then I thought: "Who cares? They do the job" :laugh:

                  A human being should be able to change a diaper, plan an invasion, butcher a hog, navigate a ship, design a building, write a sonnet, balance accounts, build a wall, set a bone, comfort the dying, take orders, give orders, cooperate, act alone, solve equations, analyze a new problem, pitch manure, program a computer, cook a tasty meal, fight efficiently, die gallantly. Specialization is for insects! - Lazarus Long

                  Kornfeld Eliyahu PeterK Offline
                  Kornfeld Eliyahu PeterK Offline
                  Kornfeld Eliyahu Peter
                  wrote on last edited by
                  #8

                  Are you telling that there is an other way to do loops? (To be honest I never did FORTRAN, but the i,j,k variable names came down to me via C while learning)

                  "The greatest enemy of knowledge is not ignorance, it is the illusion of knowledge". Stephen Hawking, 1942- 2018

                  "It never ceases to amaze me that a spacecraft launched in 1977 can be fixed remotely from Earth." ― Brian Cox

                  1 Reply Last reply
                  0
                  • S stoneyowl2

                    Okay, I was writing some code and noticed that I was using 'i','j', and 'k' for looping indices - it shook me that I still retained that habit. :doh: Then I thought: "Who cares? They do the job" :laugh:

                    A human being should be able to change a diaper, plan an invasion, butcher a hog, navigate a ship, design a building, write a sonnet, balance accounts, build a wall, set a bone, comfort the dying, take orders, give orders, cooperate, act alone, solve equations, analyze a new problem, pitch manure, program a computer, cook a tasty meal, fight efficiently, die gallantly. Specialization is for insects! - Lazarus Long

                    C Offline
                    C Offline
                    CPallini
                    wrote on last edited by
                    #9

                    A while ago [^]. I never coded in FORTRAN. I suppose it comes (like FORTRAN) from mathematics.

                    1 Reply Last reply
                    0
                    • S stoneyowl2

                      Okay, I was writing some code and noticed that I was using 'i','j', and 'k' for looping indices - it shook me that I still retained that habit. :doh: Then I thought: "Who cares? They do the job" :laugh:

                      A human being should be able to change a diaper, plan an invasion, butcher a hog, navigate a ship, design a building, write a sonnet, balance accounts, build a wall, set a bone, comfort the dying, take orders, give orders, cooperate, act alone, solve equations, analyze a new problem, pitch manure, program a computer, cook a tasty meal, fight efficiently, die gallantly. Specialization is for insects! - Lazarus Long

                      K Offline
                      K Offline
                      kmoorevs
                      wrote on last edited by
                      #10

                      Consistency is a blessing. :thumbsup: I have my own names for common things that go back almost 20 years...they are in finger memory and great for copy/pasting. You could reasonably argue that the names a programmer uses for common items become a fingerprint of sorts. I get the Fortran background of 'i','j', and 'k' but have always disliked single character variable names since we're now (since the '80s) allowed to be a bit more descriptive...so I use a lot of 2 letter names instead! :laugh: Like you said though, whatever works! :) BTW, where UI items are concerned, it irritates me to see developers who are content with Textbox1, Textbox2, etc. X|

                      "Go forth into the source" - Neal Morse

                      B 1 Reply Last reply
                      0
                      • S stoneyowl2

                        Okay, I was writing some code and noticed that I was using 'i','j', and 'k' for looping indices - it shook me that I still retained that habit. :doh: Then I thought: "Who cares? They do the job" :laugh:

                        A human being should be able to change a diaper, plan an invasion, butcher a hog, navigate a ship, design a building, write a sonnet, balance accounts, build a wall, set a bone, comfort the dying, take orders, give orders, cooperate, act alone, solve equations, analyze a new problem, pitch manure, program a computer, cook a tasty meal, fight efficiently, die gallantly. Specialization is for insects! - Lazarus Long

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

                        I also used i,j,k for indices, why does it bother you? Although someone ask me, once, to use more descriptive name, so I indulged him and refactor my indice to "variableIndiceForArrayIndexFrom0ToListCount" which, granted, is much more descriptive and easy to read! :laugh:

                        A new .NET Serializer All in one Menu-Ribbon Bar Taking over the world since 1371!

                        1 Reply Last reply
                        0
                        • S stoneyowl2

                          Okay, I was writing some code and noticed that I was using 'i','j', and 'k' for looping indices - it shook me that I still retained that habit. :doh: Then I thought: "Who cares? They do the job" :laugh:

                          A human being should be able to change a diaper, plan an invasion, butcher a hog, navigate a ship, design a building, write a sonnet, balance accounts, build a wall, set a bone, comfort the dying, take orders, give orders, cooperate, act alone, solve equations, analyze a new problem, pitch manure, program a computer, cook a tasty meal, fight efficiently, die gallantly. Specialization is for insects! - Lazarus Long

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

                          well another memory muscle reason for many... before FORTRAN many learned BASIC (back in the day when a school would have 2 or 3 TRS-80 or similar computers, the first version (Model I with 4k RAM) only had single char variables A..Z. Later the Model II (with the massive 16k) allowed 2 letters AA..ZZ. anyhoo it was actually in the Programming Guide (probably inspired from FORTRAN) that suggested I, J, K, L... for "general" integers (in particular FOR loops), (also ref: I for iterator) S, T, U for general strings. "Important" variables used A, B, C (effectively the global variables) suggested sticking to single letters for compatibility with Model I. Some versions of FORTRAN also had that 2 letter limit. "That way you could better determine what any variable was for/about." mock it if you will, but given the naming limitations of the time at least some were already invested enough to come up with some common coding styles. - Nowadays i, j as iterators/offsets even makes appearances in mathematics, - when you see "for (i = 0; ..." you already know the intent (unless you or the programmer are idiot(s), and that's even if it's someone else's code. -- and inasmuch almost makes it better to keep using i, j ... unless you're some sort of purist 'style wanker' who says 'the code may be misunderstood' ..... (and let's face it: such comments are nearly always a reflection of the lack of abilities of the idiot quoting them).

                          C 1 Reply Last reply
                          0
                          • S stoneyowl2

                            Okay, I was writing some code and noticed that I was using 'i','j', and 'k' for looping indices - it shook me that I still retained that habit. :doh: Then I thought: "Who cares? They do the job" :laugh:

                            A human being should be able to change a diaper, plan an invasion, butcher a hog, navigate a ship, design a building, write a sonnet, balance accounts, build a wall, set a bone, comfort the dying, take orders, give orders, cooperate, act alone, solve equations, analyze a new problem, pitch manure, program a computer, cook a tasty meal, fight efficiently, die gallantly. Specialization is for insects! - Lazarus Long

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

                            But of course. The shorter the scope, the shorter the name. The longer the scope, the longer the name. Waaayyy back in a Pascal class I took in the mid-80s (on a PDP-11), for one assignment I chose to use the number of syllables of nonsense words to indicate the usage of the variables. Try typing "tafimadiddle" many times on a VT-100 (no cut/paste).

                            1 Reply Last reply
                            0
                            • S stoneyowl2

                              Okay, I was writing some code and noticed that I was using 'i','j', and 'k' for looping indices - it shook me that I still retained that habit. :doh: Then I thought: "Who cares? They do the job" :laugh:

                              A human being should be able to change a diaper, plan an invasion, butcher a hog, navigate a ship, design a building, write a sonnet, balance accounts, build a wall, set a bone, comfort the dying, take orders, give orders, cooperate, act alone, solve equations, analyze a new problem, pitch manure, program a computer, cook a tasty meal, fight efficiently, die gallantly. Specialization is for insects! - Lazarus Long

                              V Offline
                              V Offline
                              V 0
                              wrote on last edited by
                              #14

                              Never thought of it as a bad thing. I mostly use i,j,k,... as indexers for many reasons. Granted I never use them for anything else, except in full words :-\

                              V.

                              1 Reply Last reply
                              0
                              • S stoneyowl2

                                Okay, I was writing some code and noticed that I was using 'i','j', and 'k' for looping indices - it shook me that I still retained that habit. :doh: Then I thought: "Who cares? They do the job" :laugh:

                                A human being should be able to change a diaper, plan an invasion, butcher a hog, navigate a ship, design a building, write a sonnet, balance accounts, build a wall, set a bone, comfort the dying, take orders, give orders, cooperate, act alone, solve equations, analyze a new problem, pitch manure, program a computer, cook a tasty meal, fight efficiently, die gallantly. Specialization is for insects! - Lazarus Long

                                M Offline
                                M Offline
                                Marco Bertschi
                                wrote on last edited by
                                #15

                                Though being rather young I do have the same habit. Guess I've picked that one up when taking my first C class 9 years ago (that is longer than it actually feels), and I just stuck with it, though I'm not using it as often in C#, where most of the stuff is Linq (x => x) it is there - Or I just use foreach.

                                I only have a signature in order to let @DalekDave follow my posts.

                                1 Reply Last reply
                                0
                                • K kmoorevs

                                  Consistency is a blessing. :thumbsup: I have my own names for common things that go back almost 20 years...they are in finger memory and great for copy/pasting. You could reasonably argue that the names a programmer uses for common items become a fingerprint of sorts. I get the Fortran background of 'i','j', and 'k' but have always disliked single character variable names since we're now (since the '80s) allowed to be a bit more descriptive...so I use a lot of 2 letter names instead! :laugh: Like you said though, whatever works! :) BTW, where UI items are concerned, it irritates me to see developers who are content with Textbox1, Textbox2, etc. X|

                                  "Go forth into the source" - Neal Morse

                                  B Offline
                                  B Offline
                                  Brady Kelly
                                  wrote on last edited by
                                  #16

                                  Developers who are content with Textbox1, Textbox2 irk the crap out of me, never mind merely irritate.

                                  "'Do what thou wilt...' is to bid Stars to shine, Vines to bear grapes, Water to seek its level; man is the only being in Nature that has striven to set himself at odds with himself." —Aleister Crowley

                                  1 Reply Last reply
                                  0
                                  • S stoneyowl2

                                    Okay, I was writing some code and noticed that I was using 'i','j', and 'k' for looping indices - it shook me that I still retained that habit. :doh: Then I thought: "Who cares? They do the job" :laugh:

                                    A human being should be able to change a diaper, plan an invasion, butcher a hog, navigate a ship, design a building, write a sonnet, balance accounts, build a wall, set a bone, comfort the dying, take orders, give orders, cooperate, act alone, solve equations, analyze a new problem, pitch manure, program a computer, cook a tasty meal, fight efficiently, die gallantly. Specialization is for insects! - Lazarus Long

                                    R Offline
                                    R Offline
                                    Retired2017
                                    wrote on last edited by
                                    #17

                                    Good for you! we all know that the compiler is MUCH slower to parse loopIndex than a simple i :)

                                    1 Reply Last reply
                                    0
                                    • M Mycroft Holmes

                                      I have never touched Fortran or Cobol and I use the same conventions, I have no idea where I picked it up from as I learnt to code on a commodore 64 and then from a SuperBase manual.

                                      Never underestimate the power of human stupidity - RAH I'm old. I know stuff - JSOP

                                      D Offline
                                      D Offline
                                      DerekT P
                                      wrote on last edited by
                                      #18

                                      Some early BASIC versions allowed up to 26 numeric variables; i through m (?) were integers, everything else floating point. It's a reflection of the generosity of 26 variables that in practice most of us only ever needed i, j, k as integers; we really were spoiled for choice.

                                      K 1 Reply Last reply
                                      0
                                      • S stoneyowl2

                                        Okay, I was writing some code and noticed that I was using 'i','j', and 'k' for looping indices - it shook me that I still retained that habit. :doh: Then I thought: "Who cares? They do the job" :laugh:

                                        A human being should be able to change a diaper, plan an invasion, butcher a hog, navigate a ship, design a building, write a sonnet, balance accounts, build a wall, set a bone, comfort the dying, take orders, give orders, cooperate, act alone, solve equations, analyze a new problem, pitch manure, program a computer, cook a tasty meal, fight efficiently, die gallantly. Specialization is for insects! - Lazarus Long

                                        K Offline
                                        K Offline
                                        kalberts
                                        wrote on last edited by
                                        #19

                                        Mathematicians used i, j and k as indexes long before Babbage's Analythical Machine. It did not come with Fortran. When I was a student, the professors insisted on long, descriptive names in our programming hand-ins. I looked over the shoulder of one of my classmates: His integer variables where named I01, I02,... float variables F01, F02... I shook my head: Prof xxx will explode into small pices when he sees that code! My classmate smiled back: Oh no, of course I make a global subsistute of I01 with NumberOfFruitBaskets, I02 with NumberOfApplesPerBasket, F01 with AverageWeightPerApple and so on, but I can't be bothered with typing those long names when I develop the program! (He was the brightest kid in class, and certainly had the mental capacity to keep the asossication between F01 and the average apple weight.) In my current job, one group revising our coding standards suggested that code lines were restricted to at most 72 characters (they were serious about that!). My project asked for an exception, as we had rules for the naming of cross-module #define constants that in some cases lead to identifiers exceeding the 72 char limit. ... I think that is going a little bit too far in the other direction.

                                        M 1 Reply Last reply
                                        0
                                        • OriginalGriffO OriginalGriff

                                          Old FORTRAN habits die hard ... I do the same, but at least I have to declare them these days. Old FORTRAN programmers never die, they RETURN to caller

                                          Sent from my Amstrad PC 1640 Never throw anything away, Griff Bad command or file name. Bad, bad command! Sit! Stay! Staaaay... AntiTwitter: @DalekDave is now a follower!

                                          B Offline
                                          B Offline
                                          BryanFazekas
                                          wrote on last edited by
                                          #20

                                          Single letter loop counters is not just FORTRAN -- C as well.

                                          OriginalGriffO 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