Gender doesn't matter
-
Few days back I came across following code
if(gender.contains('male'))
{
DoMaleThing();
}
else
{
DoFemaleThing();
}Was not sure whether my colleague was knowing that 'female' option also contains 'male' in it. Had a great laugh with my TL when I showed him this. :laugh:
Do not go where the path may lead. Go instead where there is no path and leave a trail.
-
Few days back I came across following code
if(gender.contains('male'))
{
DoMaleThing();
}
else
{
DoFemaleThing();
}Was not sure whether my colleague was knowing that 'female' option also contains 'male' in it. Had a great laugh with my TL when I showed him this. :laugh:
Do not go where the path may lead. Go instead where there is no path and leave a trail.
Well... Didn't you know it would have been discriminating otherwise ;P
-
Few days back I came across following code
if(gender.contains('male'))
{
DoMaleThing();
}
else
{
DoFemaleThing();
}Was not sure whether my colleague was knowing that 'female' option also contains 'male' in it. Had a great laugh with my TL when I showed him this. :laugh:
Do not go where the path may lead. Go instead where there is no path and leave a trail.
If you put some effort to it you can mess up an enum too.
Wrong is evil and must be defeated. - Jeff Ello[^]
-
Well... Didn't you know it would have been discriminating otherwise ;P
-
Few days back I came across following code
if(gender.contains('male'))
{
DoMaleThing();
}
else
{
DoFemaleThing();
}Was not sure whether my colleague was knowing that 'female' option also contains 'male' in it. Had a great laugh with my TL when I showed him this. :laugh:
Do not go where the path may lead. Go instead where there is no path and leave a trail.
Lost in translation? It would work in most other languages. Also, he could consider: ladies first!
-
Few days back I came across following code
if(gender.contains('male'))
{
DoMaleThing();
}
else
{
DoFemaleThing();
}Was not sure whether my colleague was knowing that 'female' option also contains 'male' in it. Had a great laugh with my TL when I showed him this. :laugh:
Do not go where the path may lead. Go instead where there is no path and leave a trail.
Years ago, I worked on a pension system and one of the calculations was to find the retirement age, the standard function was [converted to C# as I can't remember Prolog]:
int normalRetirementAge()
{
if (isMale())
{
return 65;
}
else
{
return 60;
}
}Now, one client had everyone on their scheme retire at 60 irrespective of sex, the proposed solution by the PFY:
int normalRetirementAge()
{
if (isMale())
{
return 60;
}
else
{
return 60;
}
}:confused:
speramus in juniperus
-
Few days back I came across following code
if(gender.contains('male'))
{
DoMaleThing();
}
else
{
DoFemaleThing();
}Was not sure whether my colleague was knowing that 'female' option also contains 'male' in it. Had a great laugh with my TL when I showed him this. :laugh:
Do not go where the path may lead. Go instead where there is no path and leave a trail.
-
Years ago, I worked on a pension system and one of the calculations was to find the retirement age, the standard function was [converted to C# as I can't remember Prolog]:
int normalRetirementAge()
{
if (isMale())
{
return 65;
}
else
{
return 60;
}
}Now, one client had everyone on their scheme retire at 60 irrespective of sex, the proposed solution by the PFY:
int normalRetirementAge()
{
if (isMale())
{
return 60;
}
else
{
return 60;
}
}:confused:
speramus in juniperus
-
:thumbsup: :) That's funny. Perhaps it's like mailman. Could be either male or female. :)
There are only 10 types of people in the world, those who understand binary and those who don't.
RyanDev wrote:
Perhaps it's like mailman.
which evolved to "letter carrier" (because "mailperson" still sounds like it is referring to "male") like "stewardess" became "flight attendant"