Old age shows its mark...
-
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
-
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).
For general strings I kind of like S T F U. :laugh: No offence intended, merely humor.
-
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!
-
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
It's funny how we pick up these habits along the way, going from one language to the next. I immediately knew you had programmed in Fortran at some point.
-
Not just FORTRAN. We used i, j, and k for loop vars in all my C and C++ classes, too.
If you think 'goto' is evil, try writing an Assembly program without JMP.
As I said earlier: The Lounge[^]
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!
-
As I said earlier: The Lounge[^]
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!
-
Pardon the repetition. I don't always read every other comment before adding my own. TL;DR syndrome.
If you think 'goto' is evil, try writing an Assembly program without JMP.
No problem: I thought of copy'n'paste but couldn't be arsed! :laugh:
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 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
I used the same conventions, I started with Basic and Pascal, then Delphi and VB
-
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
I do the same. FORTRAN habits still live on!
CQ de W5ALT
Walt Fair, Jr., P. E. Comport Computing Specializing in Technical Engineering Software
-
No problem: I thought of copy'n'paste but couldn't be arsed! :laugh:
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!
-
It's funny how we pick up these habits along the way, going from one language to the next. I immediately knew you had programmed in Fortran at some point.
-
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
Yeah, I spent Jan1 to Jan25 in the hospital due to an infection that left me too weak to stand up. Hopefully, I got all of the drama out of the way for the rest of the year.
CQ de W5ALT
Walt Fair, Jr., P. E. Comport Computing Specializing in Technical Engineering Software
-
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
-
They shouldn't have to figure it out. We aren't coding on punch cards where short variable names help programmer efficiency. Also, for most projects, triply-nested loops are a code smell and the method should be refactored.
JohnnyCee
-
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
stoneyowl2 wrote:
Then I thought: "Who cares? They do the job" :laugh:
My thought when someone claims that there is something 'wrong' with that is that the problems we are having with customers being down, failure to even deliver requirements that are relevant to users, a continuing problem with delivered bugs into production, etc, etc.... ...have absolutely nothing to do with what variable I use in a for loop. And micro managing coding styles just demonstrates that the proponent of such has spent zero time studying the actual impacts to process quality. Often (maybe always) the same ones that think the newest technology is going to solve all those problems also (even as they are only 10% in to implementing the last technology solution that would have solved all of them.) Myself I also use 'r' for the return variable.
-
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
For those unaware... In maths and physics (along with others I suppose) i, j, k are standard vector spaces. Just sayin...