320 karma · joined May 15, 2011
>>> from decimal import Decimal
>>> Decimal(1000) * Decimal(16) / Decimal(31)
Decimal('516.1290322580645161290322581')
>>> 1000 * 16 / 31
516.1290322580645
The point is using Decimal allows control over precision and rounding rather than accepting ad-hoc approximations of a float.https://docs.python.org/3/library/decimal.html
If it were me, I wouldn't go around bragging about how much money my software manages while being willfully ignorant of the fundamentals.
The first example parse_expenses.py uses a float for currency - that seems to be a pretty big error that's being overlooked along with other minor issues around no error handling.
I would say the quality of the generated code in parse_expenses.py is not very high, certainly not for the banner example.
EDIT - I just noticed Github reordered the examples on copilot.github.com in order to bury the issues with parse_expenses.py for now. I guess I got my answer.
Does it train a programmer for accepting less than ideal code because it was suggested? Similar to how some programmers blindly copy code from StackOverflow without modification.
Seems like there is a potential downside that's being ignored.
Unauthenticated mongodb instances are a pretty common problem - it's why a "script kiddie" was so successful.
im not a frontend person so i was just trying to get up and running as fast as possible. this has been on and off, nights and weekends for ~10-11 months
The graffiti in the Broad St. NYC location is cringe inducing.
On more than one occasion I've witnessed people omit that their office is based out of a we work location. Just too embarrassing to be associated with them.
https://en.wikipedia.org/wiki/Firestone_and_Ford_tire_contro...
https://en.wikipedia.org/wiki/Ford_Pinto#Fuel_system_fires,_...