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

What is the correct way to store sex in a program /g/? Gender

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: 80
Thread images: 8

File: drakelovehate.jpg (25KB, 600x450px) Image search: [Google]
drakelovehate.jpg
25KB, 600x450px
What is the correct way to store sex in a program /g/?

Gender string?
is male, is female Booleans?
0 for female 1 for male?

What do YOU use?
>>
boolean if size/speed is an issue, a string if it's not, it also gives you the ability to store other values such as "not specified" or something
>>
youll have to refactor after the sjw's come after you, so you might as well save yourself the trouble and just make it a 64-bit integer now
>>
create a table Gender and make your Person table or w/e reference it
allow the FK GenderID to be Null (because there are genderless people)
the number of rows in dbo.Gender could be limitless, because there are many genders today
>>
False or 0 for female, since it alliterates and 0 is a hole.
True or 1 for male since 1 looks like a stick
>>
Use a color choice: tint is male/female, brightness is sex/sexless, saturation it's man/woman
>>
Floating point between 0 (female) and 1 (full male)
Let user choose by typing or by using a slider
>>
>>60982644
There is genderless
>>
>>60982509
You'll need a BigInteger.
>>
>>60982688
Not really
>>
File: 1483354043222.png (522KB, 990x838px) Image search: [Google]
1483354043222.png
522KB, 990x838px
>>60982575
only correct answer
>>
A four dimensional array of floats so customers can fine tune their genre
>>
boolean Y;
>>
Use an enum

enum sex {FEMALE, MALE};
>>
>>60982714
If I take off that bit will you die?
>>
>>60982782
It would be extremely shiftful .
>>
>>60982550
audibly chuckled
>>
File: 1493259494807.jpg (69KB, 760x840px) Image search: [Google]
1493259494807.jpg
69KB, 760x840px
>>60982509
according to SJW's today, we're around ulong ulong genders
>>
>>60982509
High order Categories
>>
>>60982550
Better make it unsigned too.
>>
Foreign key to a table of strings, or failing that, an enum
>>
>>60982509
Gender string, let people specify male or female or other. Else, use an enum.
>>
>>60982546
>Not specified
>>>/lgtb/
>>
>>60982509
Turing machine
>>
Floating point, since gender is fluid
>>
File: 1496613190378s.jpg (5KB, 249x245px) Image search: [Google]
1496613190378s.jpg
5KB, 249x245px
>>60982950
>>
>>60982509
sex: strings male, female, other
gender: just don't ask it only leads to debates

simple as that
>>
>>60982941
>forcing users to provide you with personal data so you can sell it to (((them)))

I'm not going to use your datamining botnet.
>>
C++11 Enum class with as many entries as the derivative of (1 + 1)x
>>
Akschually we decided to simply cut gender/sex from out database. Research your use case and see if it's really needed. We made the software for a rental car company last month and decided to simply not have a gender/sex field for costumers, it was necessary.
>>
Don't give the option for gender, only sex.
Male, Female, Decline to State
>>
Why do you need to record gender?
>>
>>60982714
for (you) {
}
>>
File: 1 gender.jpg (60KB, 720x894px) Image search: [Google]
1 gender.jpg
60KB, 720x894px
>>
>>60982509
HashMap. Boolean is binary, and gender isn't binary ;^)
>>
>>60982976
There are 2 sexes.

There are 2 genders. Wanting to be special isn't an excuse to change biology
>>
>>60984081
gender has nothing to do with sex though. it's why i can call an object, word or trait male or female. its a social construct by definition.
unless you just wanna be edgy
>>
>>60984140
>Muh social construct

Nice b8
>>
>>60984140
>Gender is a social construct

Found the Mozilla/GitHub diversity hire
>>
Might as well not bother storing it. What use does your program have for that?
>>
>>60984081
>look mom i posted it again
>>
>>60984081
2 sexes yes

but psychology is one wacky ass thing and peoples brains will do whatever the fuck regardless of what is normal so its not very far out that someone is some 3rd gender no matter how retarded it sounds
>>
0 and 1, allow Null for people who doesn't want to give that info to your botnet
>>
>>60984389
null isn't a very good option here
would probably be better to use an enum with male, female, and unspecified.
>>
if you ever have to encode gender in a protocol it should be no less than a null-terminated utf-8 string and any interpreters of it should be required by standard to interact with it only by a pointer/index that can fulfill 2^128 possible characters.
>>
>>60984233
>Mental disorders are genders
Does that mean downies are a species?
>>
>>60982715
What about undisclosed?
>>
>>60982550
kek
>>
File: drakelovehate.jpg (37KB, 600x450px) Image search: [Google]
drakelovehate.jpg
37KB, 600x450px
>>
I'll use whatever will provide me the largest revenue when considering the spectrum of acceptability of my audience combined with the spectrum of revenue potential of my audience
>>
File: 1497763467058.jpg (30KB, 600x494px) Image search: [Google]
1497763467058.jpg
30KB, 600x494px
>>60985296
>>
>>60985936
ROFL


Stupid Christian, Hell isn't even real. Time to step into the 21st century, gramps.
>>
>>60982550
>youll have to refactor after the sjw's come after you, so you might as well save yourself the trouble and just make it a 64-bit integer now
top jej
>>
>>60985465
enum gender {
male,
female
};
>>
>>60982509
ADTs ofc

type sex =
| Male
| Female
>>
enum gender {male, female, attack_helicopter}
>>
>>60982941
There's a difference between unspecified and other
>>
>>60982546

Use an enum then you fucktard
>>
>>60982509
int numberOfHoles;
>>
>>60982509
An enum, you retard.
enum class Gender {
Male,
NotMale,
};


Alternatively, if you're an SJW, use a Vec3.
>>
>>60983705
this isn't java
>>
Test
>>
Enum with options male and female

for complex interactions make a gender class
>>
If you want absolute performance than store your small data as binary integers and use bitwise operation.

1 byte of information is potentially 8 different values.
0110-1001
Each of those can be a yes/no data or an arbitrary value. 0 for male and 1 for female.

Or the first 4 digits, which makes a total of 15 different values, can be used for a level or chapter indicator while the next 2 values, making 3 different values, can be a checkpoint, and the last 2 characters can be 3 more values.

I explained it autistically. But you get the drift. Wouldn't use this if your parsing game is weak though. Sometimes it's better to just have extra variables than to run a parsing method with 50 switches or if statements.

Nobody really is limited to 256kb of ram anymore ayylmao
>>
>>60986497
What are the axes in 3D gender-space?
>>
File: changing the face of coding.jpg (119KB, 1024x595px) Image search: [Google]
changing the face of coding.jpg
119KB, 1024x595px
Listen up you CISHET WHITE MALE bigots!
The JS community is here to show you how to be more inclusive with your gender options

https://www.youtube.com/watch?v=luppEiB4Peg
>>
>>60986503
literally kill yourself for that joke
>>
I store gender as a quaternion
>>
>>60986930
thanks for the epic coding tip bro
>>
>>60982509
void *
>>
>>60982550
Include me in the screencap senpai
>>
Why do you care? Why do you even store that?
Bool or enum for no value is enough, if you need to use pronouns.
>>
>>60982509
Floating point decimal
>>
The only proper way to store gender is with a single bit. Any program that uses an array and variable size is SJW trash
>>
>>60986404

This.
>>
>>60986942

>X, X, Z.
>No Y-Axis. It's evil and oppressive.
>>
>>60982550
>more genders than humans who ever lived

Sounds about right.
>>
>>60982550
i keked my good man
>>
>>60982550
>64 bit
Uhh you need to check your privilege, you should be using at least __m128s
>>
>>60982509
struct Vec3 {
double x;
double y;
double z;
};
Thread posts: 80
Thread images: 8


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