Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
![](/static/devrant/img/pipeless-devrant-banner-white.png)
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
I commend Kloss' efforts to encourage females to code. I'm a female, and I love software development and would love to help encourage others to code.
Unfortunately, she posted a very bad code example which opens floodgates of others (esp beginners) of using a bad example to be a basis for writing code.
Seems somebody needs to point out to her not all women code like that. -
vince878yCheck if a is more than b AND check if b is less than a?
wat
Return 5 if the numbers are equal?
WAT
Comparing a function that returns the larger of two ints to the legendary fast inverse square root function used to calculate lighting and shading in Quake III Arena?
WAATTT
Stripping the comments off the code to make it seem worse?
Priceless -
I think these examples are actually unintentionally insulting to women. On the left we have the famous fast inverse square root function, it looks like, which is a truly brilliant and classic piece of code. On the right, an implementation of max which contains some redundant logic and a lot of unnecessary comments.
-
nmunro31898yClearly her code is designed to help someone learn, if I read genuine comments that explained what an int or function was I'd be deeply concerned. I mean, I don't actually know who she is or what she does. I just don't think it's fair to take two different bits of code and compare them out of context.
I'd just do this:
let max = (a, b) => a === b ? "Equal" : a > b ? a : b;
But that's just me, dunno if that makes it better or worse, also it's JS and not C, so still not apples to apples!
Related Rants
I don't want to suggest that women are worse programmers but Karlie Kloss is at it again 😕
undefined
coding
programmers
women