Bob, Jim and Tim

For everything that's not in any way related to PureBasic. General chat etc...
Killswitch
Enthusiast
Enthusiast
Posts: 731
Joined: Wed Apr 21, 2004 7:12 pm

Bob, Jim and Tim

Post by Killswitch »

I have a really odd habbit of 'naming' my variables. Not in the sense that I give them names that describe what information they hold, but actual people's names. Usually they're three letters long and the most common are 'Bob', 'Jim' and 'Tim'. 'Kim' crops up occasionally - but not as often as the other three. Now this is usually only in very small projects, and 'test' files as otherwise I'd very quickly run out of variable names in a larger project - I was just wondering if anyone else has any quirky coding habits?
~I see one problem with your reasoning: the fact is thats not a chicken~
Kale
PureBasic Expert
PureBasic Expert
Posts: 3000
Joined: Fri Apr 25, 2003 6:03 pm
Location: Lincoln, UK
Contact:

Post by Kale »

In an old job i had developing websites a guy used to use: 'foo' and 'bar' ad 'stuff' alot, used to drive me up the wall! :roll:
--Kale

Image
User avatar
Psychophanta
Always Here
Always Here
Posts: 5153
Joined: Wed Jun 11, 2003 9:33 pm
Location: Anare
Contact:

Post by Psychophanta »

I use to use 2 to 6 characters for variables, because less than 2 is not usually descriptive enough, and more than 6 or 8 is too much text.
But often i miss greek symbols for variables.
Should be good if editor and compiler allow that. :)
http://www.zeitgeistmovie.com

while (world==business) world+=mafia;
Pantcho!!
Enthusiast
Enthusiast
Posts: 538
Joined: Tue Feb 24, 2004 3:43 am
Location: Israel
Contact:

Post by Pantcho!! »

Crap.s
Test.s
ShitX.l
ShitY.l
WorkIt.l
FuckenWork.l

OhYEahh.l
dagcrack
Addict
Addict
Posts: 1868
Joined: Sun Mar 07, 2004 8:47 am
Location: Argentina
Contact:

Post by dagcrack »

Well, similar to pantcho (I think he already knows this heh)..

But yes, usualy very obsene variable names from my side (of course, but of course, for testing: small sources or very little programs that are for my own usage.. else I use descriptive variable names with no obsene contents hehe).

I'd sure get banned if I wrote down a list of this variable names...
But most common is "pija" (its a lexic from "penis" in spanish, very funny, indeed....... that is because my brother used to say "this is a pija, this is pija, this other is pija, its all pija" hence... I used to tell him "heck you love pijas!" and now for some odd reason I often use that as a variable for testing purposes)... They dont come worst than that, do they?


(laughs)...
Anyone with something worst than this?


Also.. would anyone tell me why everyone uses 'l' for 'for' loops.. I find 'm' more addecuate, but this 'l' variable I've seen it since long time ago, whats the deal with 'l' anyway?

I also add some formatting when I define a value in an array
for example:

Image
etc

(and yes I use ; at the end of almost everything, this must be something to do with php or c.. else I might fall into basic's lazyness and whenever I must work in say, php, I might forget about the ; ...).
! Black holes are where God divided by zero !
My little blog!
(Not for the faint hearted!)
Trond
Always Here
Always Here
Posts: 7446
Joined: Mon Sep 22, 2003 6:45 pm
Location: Norway

Post by Trond »

dagcrack wrote:Also.. would anyone tell me why everyone uses 'l' for 'for' loops.. I find 'm' more addecuate, but this 'l' variable I've seen it since long time ago, whats the deal with 'l' anyway?
I stands for iteration.
User avatar
blueznl
PureBasic Expert
PureBasic Expert
Posts: 6166
Joined: Sat May 17, 2003 11:31 am
Contact:

Post by blueznl »

i'm not everyone :-)

always use 'n' for simple loops

but about strange habits... i always use underscores

old_screen_size = whatever

and i tend to (ab)use the word 'old'

if old_screen_size <> screen_size

and similar constructions

i never caught myself using strange or funny variable names... yet :-)
( PB6.00 LTS Win11 x64 Asrock AB350 Pro4 Ryzen 5 3600 32GB GTX1060 6GB)
( The path to enlightenment and the PureBasic Survival Guide right here... )
CodeMonkey
User
User
Posts: 12
Joined: Tue Jul 12, 2005 6:55 pm
Location: United Kingdom

Post by CodeMonkey »

I was doing some later night programming with a mate once and he started to spell 'customers' as 'custard', the name sort of stuck by the end of the night had:

bowls_of_custard
spoons_of_custard
and all sorts of other names based on this custard theme

Needless to say the code was unreadable the next day but it strangely worked and is probably still in use to this day :cry:
dagcrack
Addict
Addict
Posts: 1868
Joined: Sun Mar 07, 2004 8:47 am
Location: Argentina
Contact:

Post by dagcrack »

Heheheh
Iterations, makes sense.. However its stupid
Like those using 'FP' variable name for file pointers... pisses me off.
Cant you hold in your brain whats that variable holding ?? jeez. at least give it a more reasonable name, defining which file pointer is it.

Bah, I shouldnt care about them..

Now that I remember, I did had "pija" as an array name in a commercial project which did ship like that (laughs).. No one ever noticed of course. (How professional can you be? :lol: ).
! Black holes are where God divided by zero !
My little blog!
(Not for the faint hearted!)
PB
PureBasic Expert
PureBasic Expert
Posts: 7581
Joined: Fri Apr 25, 2003 5:24 pm

Post by PB »

> I use to use 2 to 6 characters for variables

I used to use just 2 chars for variables because that's how it was back in
the VIC-20 and C-64 days. :) Nowadays though I use either full descriptive
words (eg. "admin" if the user has admin rights on the PC) or acronyms for
longer stuff (eg. "sww" to indicate whether the app starts with Windows).
I compile using 5.31 (x86) on Win 7 Ultimate (64-bit).
"PureBasic won't be object oriented, period" - Fred.
Killswitch
Enthusiast
Enthusiast
Posts: 731
Joined: Wed Apr 21, 2004 7:12 pm

Post by Killswitch »

I use 't' for loops.

Edit:

Well I started off with DarkBasic, and in the documentation for 'For Next' loops they used a 't'. It's just stuck.
Last edited by Killswitch on Tue Nov 01, 2005 8:31 pm, edited 1 time in total.
~I see one problem with your reasoning: the fact is thats not a chicken~
dagcrack
Addict
Addict
Posts: 1868
Joined: Sun Mar 07, 2004 8:47 am
Location: Argentina
Contact:

Post by dagcrack »

And the reason?
To me M is closer than anything else.. comfyness!
It's because of my way of typing.. believe it or not I type faster with my method than with other conventional methods..

I can tell you that the M here is kind of losing the ink in this keyboard :p
So I might use it a lot I guess.. mhh loops, nice and tastey.
! Black holes are where God divided by zero !
My little blog!
(Not for the faint hearted!)
User avatar
Psychophanta
Always Here
Always Here
Posts: 5153
Joined: Wed Jun 11, 2003 9:33 pm
Location: Anare
Contact:

Post by Psychophanta »

Killswitch wrote:I use 't' for loops.
Me too :shock:
I learned my first basic with AppleII basic, and since then i usually use 't' for the For-Next loop.

BTW: is this thread offtopic?. May be General discussion, or hybrid :P
http://www.zeitgeistmovie.com

while (world==business) world+=mafia;
Pantcho!!
Enthusiast
Enthusiast
Posts: 538
Joined: Tue Feb 24, 2004 3:43 am
Location: Israel
Contact:

Post by Pantcho!! »

me too! i had books on basic programming on Apple // computer!

it rocked!

i had this stupid robot to display with ascii

hehehe

and for loops i allway use "For x = ..."
always.
Post Reply