[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]

Society changing code

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: 10
Thread images: 1

File: d.jpg (23KB, 464x286px) Image search: [Google]
d.jpg
23KB, 464x286px
Before 2016:
if(sex=="M")
gender = "man";
else gender = "woman";


After 2016:
switch(sex) {
case 1: title = "man";
break;
case 2: title = "woman";
break;
case 3: title = "demikinsexunidimension genderless-genderfluid dragon";
break;
case 4: title = "Male to female to male to female transgender transpecies genderqueer agender";
break;
.
.
.
case 38182182831: title = "dog-kin";
break;
}
>>
Just store the gender as a string or just don't ask at all because if it's nothing for legal purposes then why the fuck do you even need to know
>>
>>57514473
>implying there are a finite amount of genders
o_O
>>
>>57514501
I can't. I am at my job and we have a list of clients stored in SQL with their genders and I was coding this:

 If fp_rs_resultado.Item("sexo_rep") = "M" Then
WordDoc.Variables("sexo").Value = "varĂ³n"
Else
WordDoc.Variables("sexo").Value = "mujer"
End If


And it got me thinking about how I could know that if the person is not male then I could assume they are a woman, but in the future I will not. I will have to change this code to a switch statement with a billion cases.

And the database stores the genders as single characters, maybe for practical reasons and then from that our applications transform to male,female,man,woman, etc. depending on context. This is for a legal contract.
>>
>>57514536
>I will have to change this code to a switch statement with a billion cases.
Holy shit pajeet this is why we have hash tables.
>>
>>57514536
>Programming in anything but English
>>
>>57514598
>Holy shit pajeet this is why we have hash tables.

Sure, I guess. Sorry for not optimizing a problem I don't already have and I am just joking about.

Fuck, autism speaks.

>>57514619
This for spanish speaking clients. It is in particular creating a word document meant to be read by spanish speakers.
>>
>>57514473
enum gender_identity {
SEX_MALE,
SEX_OTHER
};


You can't go wrong, op.
>>
>>57514473
sex = gender
>>
simply ebin
Thread posts: 10
Thread images: 1


[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.