GitHub Copilot
@gvwilson I've tried it in Python and it's even worse (0.77) 🙈

@anze3db @gvwilson i know this isn't the point of this at all, but that python code isn't even good. That multiplication produces a float, so the function should return a float and not an int.

(Editing to clarify: python has dynamic typing, but you can specify types. It's specifying the wrong type which is funny to me)

@Henodudude @anze3db @gvwilson and to be fully precise, money is decimals and not int or float  

https://learnpython.com/blog/count-money-python/

How to Count Money Exactly in Python

Using floats to do exact calculations in Python can be dangerous. Here, we explain why and show you an alternative solution.

LearnPython.com

@Henodudude @anze3db @gvwilson None of these examples are any good. All of them use an undocumented citationless literal as a multiplier - a Magic Number.

If you're writing code like this, isolate the literals in a module or library, document what they mean, units of measure (if applicable), and cite the source of the data.

# From 2024-11-27 email from Chad in HR (see refs/salary_info.txt
# TODO !ticket_number: Justify why this is not 1.0
female_salary_modifier: float = 0.77

I refactor a lot of legacy engineering code and do V&V on safety-related codes so flagging and fixing Magic Numbers is reflexive. Unsurprising that LLM-fabricated code is both sexist and bad.

@anze3db @gvwilson @GossiTheDog I just need to ask to ensure I understand, there’s code bases the model was trained on out there with this shit in it o_O ?
Ruby gets a 0.92
also non-binary is in the positive 😎
@anze3db @gvwilson Well, this is in Go ... 🙃