generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Re: Do you do this, too?

Previous Thread :: Next Thread 
1waffle1 is not online. 1waffle1
Joined: 16 Oct 2007
Total Posts: 16381
17 Aug 2011 02:02 PM
Is it sad that half the time I spend on programming is on choosing names for variables?
Report Abuse
Oysi is not online. Oysi
Joined: 06 Jul 2009
Total Posts: 9058
17 Aug 2011 02:04 PM
[ Content Deleted ]
Report Abuse
ChaosStar95 is not online. ChaosStar95
Joined: 19 Feb 2009
Total Posts: 5943
17 Aug 2011 02:05 PM
I thought it was just me!
Report Abuse
LPGhatguy is not online. LPGhatguy
Forum Moderator
Joined: 27 Jun 2008
Total Posts: 4725
17 Aug 2011 02:06 PM
Yup.

"Eh, maybe I should call this RegionSet... Nah, nah, how about I abbreviate that to RegionS... no, that's too close to my other variable, Regions... RegionSet it is!"
Report Abuse
jordan4762 is not online. jordan4762
Joined: 08 Sep 2008
Total Posts: 4116
17 Aug 2011 02:06 PM
I just describe whatever Im doing
function plugin_gui_off()
Report Abuse
61352151511 is not online. 61352151511
Joined: 30 Nov 2009
Total Posts: 8094
17 Aug 2011 02:08 PM
Why not just call it what it is supposed to be. Or most the time I use "var" and "var2" if I can't think of a name

~ Mitch ~
Report Abuse
Oysi is not online. Oysi
Joined: 06 Jul 2009
Total Posts: 9058
17 Aug 2011 02:08 PM
[ Content Deleted ]
Report Abuse
AntiBoomz0r is online. AntiBoomz0r
Joined: 02 Oct 2009
Total Posts: 1345
17 Aug 2011 02:11 PM
I dont..
I usually just take few letters and use them as a name for the variable :o
Such as if I make variable for chars Right Shoulder, I would probably use rS (most of time, I leave the first letter small :D)
With the exception of tables. For tables I write the full name :D
Report Abuse
1waffle1 is not online. 1waffle1
Joined: 16 Oct 2007
Total Posts: 16381
17 Aug 2011 02:24 PM
I like to use letters in my for loops, but in pairs, for the first argument, I JUST DON'T KNOW WHAT TO CALL IT AFTER THE SECOND BRANCH.

for _, a in ipairs(table) do
for WHAT!!!, b in ipairs(table) do
end
end
Report Abuse
DanJ555 is not online. DanJ555
Joined: 05 Feb 2011
Total Posts: 36
17 Aug 2011 02:27 PM
Trololol, it's normal.

-El anciano desnudo
Report Abuse
BrainScripter is not online. BrainScripter
Joined: 02 Aug 2011
Total Posts: 187
17 Aug 2011 02:28 PM
I don't have that =P
Report Abuse
Tenal is not online. Tenal
Joined: 15 May 2011
Total Posts: 18684
17 Aug 2011 02:29 PM
[ Content Deleted ]
Report Abuse
myrco919 is not online. myrco919
Joined: 12 Jun 2009
Total Posts: 13241
17 Aug 2011 02:29 PM
[ Content Deleted ]
Report Abuse
swimguy777 is not online. swimguy777
Joined: 30 May 2009
Total Posts: 17092
17 Aug 2011 02:34 PM
If it's something simple that I'm just testing, I'll use easy stuff like 'a' 'b' etc...

It it's something I actually care about I'll use descriptive names.

~~{I'm a dangerous sociopath with a long history of violence}~~
~{I don't understand how you keep forgetting that}~
Report Abuse
Oysi is not online. Oysi
Joined: 06 Jul 2009
Total Posts: 9058
17 Aug 2011 02:34 PM
[ Content Deleted ]
Report Abuse
sncplay42 is not online. sncplay42
Joined: 27 Nov 2008
Total Posts: 11891
17 Aug 2011 03:53 PM
[[I like to use letters in my for loops, but in pairs, for the first argument, I JUST DON'T KNOW WHAT TO CALL IT AFTER THE SECOND BRANCH.

for _, a in ipairs(table) do
for WHAT!!!, b in ipairs(table) do
end
end]]

YOu know you can just call it _ too if you're not using it, right?
Report Abuse
BlueTaslem is not online. BlueTaslem
Joined: 11 May 2008
Total Posts: 11060
17 Aug 2011 04:24 PM
Very few of my declarations are important.
So they don't get much thought.
Generally, I go in order from
a,b,c,d,e,f,g
etc for data
i,o,j,k
for iterators

etc.

Functions get camelCase names that conform to some sort of order with the rest of the program.
Pretty simple.
Report Abuse
ponageman2086 is not online. ponageman2086
Joined: 18 Apr 2009
Total Posts: 219
17 Aug 2011 04:28 PM
Is it bad that mine or random letters? D:

~~ In Soviet Russia, scripts write you. ~~
Report Abuse
JulienDethurens is not online. JulienDethurens
Joined: 11 Jun 2009
Total Posts: 11046
17 Aug 2011 04:28 PM
"I like to use letters in my for loops, but in pairs, for the first argument, I JUST DON'T KNOW WHAT TO CALL IT AFTER THE SECOND BRANCH.

for _, a in ipairs(table) do
for WHAT!!!, b in ipairs(table) do
end
end"

You know you can name both _, as long as you don't need them, right?

_ is often used as a variable to represent a value you don't want; don't need.

Don't be scared of overwriting _. If _ shouldn't be overwritten, then it shouldn't be called _.
Also, I'd suggest using next instead of pairs/ipairs, since next is more efficient, but, hey, that's just me.
Report Abuse
ponageman2086 is not online. ponageman2086
Joined: 18 Apr 2009
Total Posts: 219
17 Aug 2011 04:28 PM
or = are :3

~~ In Soviet Russia, scripts write you. ~~
Report Abuse
NeodAemon is not online. NeodAemon
Joined: 30 Jul 2010
Total Posts: 89
17 Aug 2011 04:37 PM
I usually just add random words put together <3


LOLWUT. LOLHAX.
Report Abuse
NeodAemon is not online. NeodAemon
Joined: 30 Jul 2010
Total Posts: 89
17 Aug 2011 04:51 PM
Y u no reply to my random post? :'c
Report Abuse
popinman322 is not online. popinman322
Joined: 04 Mar 2009
Total Posts: 5184
17 Aug 2011 06:02 PM
Fork
Report Abuse
ArceusInator is not online. ArceusInator
Joined: 10 Oct 2009
Total Posts: 30553
17 Aug 2011 06:06 PM
POPIN

STOP POSTING NOUNS
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image