[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y ] [Search | Free Show | Home]

>tfw you spend half your time thinking of good variable and

This is a blue board which means that it's for everybody (Safe For Work content only). If you see any adult content, please report it.

Thread replies: 18
Thread images: 2

File: 1500026440227.jpg (28KB, 402x604px) Image search: [Google]
1500026440227.jpg
28KB, 402x604px
>tfw you spend half your time thinking of good variable and function names

Is there a good rule of thumb I could use?
>>
yeah stop being autistic
>>
> get-verb
select the verb that matches the functions use
> describe the function in as little words as possible

example: for a function that returns an ip address "get-ipaddress", for a function that returns a bool if an ip address exists "test-ifup"
>>
>name test variables nigger
>sometimes forget to delete them after commenting them out
>>
>>61652002
name variables after porn stars you like whacking it to.
>>
>>61652002
I think Apple has a style guide on this, if you really, really like typing.
>>
>>61652152
I only watch amateur stuff.
>>
>>61652121
For what purpose?
>>
File: 1335124477361.jpg (37KB, 627x474px) Image search: [Google]
1335124477361.jpg
37KB, 627x474px
>>61652101
>powershell
>>
>>61652121
This
Something I do something similar printing during debugging.
Usually I use stupid short names like "l_c" or "kk" because I'm lazy and fuck readability.
>>
date +%s%3N
>>
>>61652002
x
xx
xxx
xxxx
xxxxx
xxxxxx
>>
dumb catposter
>>
It doesn't necessarily matter what the function name is if you docblock it well, and for variables I don't understand your problem. Just name them after the information they represent in less than 3 words.
>>
>>61652121
I do this
Cept its not just test variables, i just never publish my code (actually pretty much the reason I don't either)
Although sometimes they're more like actual names and it ends up looking like
while(!isGay) 
doStufff(ass);
>>
>>61653446
This seems like a pretty good approach actually. I did something similar a few years back while working on a new averaging function.
>>
>>61652002
Just do what I do and name them after races/ethnicities that you despise.
Nigger
Kike
Spic
Chink
And so on.
>>
>>61652257
>posting derelle
heh
Thread posts: 18
Thread images: 2


[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y] [Search | Top | Home]

I'm aware that Imgur.com will stop allowing adult images since 15th of May. I'm taking actions to backup as much data as possible.
Read more on this topic here - https://archived.moe/talk/thread/1694/


If you need a post removed click on it's [Report] button and follow the instruction.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com.
If you like this website please support us by donating with Bitcoins at 16mKtbZiwW52BLkibtCr8jUg2KVUMTxVQ5
All trademarks and copyrights on this page are owned by their respective parties.
Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
This is a 4chan archive - all of the content originated from that site.
This means that RandomArchive shows their content, archived.
If you need information for a Poster - contact them.