HNHacker News
TopNewBestAskShowJobs

mdellavo

320 karma · joined May 15, 2011

[ my public key: https://keybase.io/mdellavo; ]
submissionscomments
mdellavo··on GitHub Copilot
this is a common approach when you are dealing in rates less than .01 -- you just need to be sure you are rounding correctly
mdellavo··on GitHub Copilot
if you are typing out boilerplate you should look to abstract it away
mdellavo··on GitHub Copilot
It seems incorrect to determine a half a month as 16/31 but ok , for your proposed example:

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

mdellavo··on GitHub Copilot
https://stackoverflow.com/questions/3730019/why-not-use-doub...
mdellavo··on GitHub Copilot
What do you think about this being overall detrimental to code quality as it allows people to just blindly accept completions without really understanding the generated code. Similar to copy-and-paste coding.

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.

mdellavo··on GitHub Copilot
I would say the use of float makes it a nonstarter - even for "quick one-off" scripts. That's a fundamental error in the generated code. It maybe looks correct at a quick glance but it's only introducing subtle errors to find down the line.
mdellavo··on GitHub Copilot
in their own example the copilot aimed for the mountains with float() - thanks but no thanks
mdellavo··on GitHub Copilot
I guess I dont see the point if only 10% of the time it's exactly what you want and the rest of the time you have to go back and touch up the line.

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.

mdellavo··on GitHub Copilot
do you still go over the generated code line by line and touchup in places where it did not do a good job?
mdellavo··on GitHub Copilot
Should I be impressed that the example parse_expenses.py on the home page doesnt include any error handling and uses a float for currency? This seems like it's going to revolutionize copy and paste programming.
mdellavo··on A Docker footgun led to a vandal deleting NewsBlur's MongoDB database
defense in depth is about as basic as it gets, even for generalists
mdellavo··on A Docker footgun led to a vandal deleting NewsBlur's MongoDB database
I don't know why this is being downvoted. Multiple overlapping layers of security would have given newsblur a backup in case of accidental "footguns".

Unauthenticated mongodb instances are a pretty common problem - it's why a "script kiddie" was so successful.

mdellavo··on Pyinfra – automate infrastructure super fast at scale
saltstack, fabric
mdellavo··on GitHub: Increased Error Rates
i cant create a PR, maybe they are in read-only mode
mdellavo··on Ask HN: What are some examples of good database schema designs?
or the systems arent multi-tenant so they end up cloning the schema for each customer
mdellavo··on FUSE for macOS is no longer open source
OSS means allowing "free riders"
mdellavo··on FUSE for macOS is no longer open source
at one point - the spirit of the OSS movement was giving away things for free.
mdellavo··on Alphabet in bid to buy Fitbit
coworker bought pebble preorder - when it arrived he was very underwhelmed and disappointed at what he bought.
mdellavo··on Show HN: Web Based Multipler Roguelike
yeah it is :)

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

mdellavo··on DigitalOcean block storage is down
dee ennn esss
mdellavo··on Ask HN: PostgreSQL or MySQL?
This entirely depends on the domain and data model, and unless you need SQL - mongodb should be a consideration too.
mdellavo··on WeWork parent pulls IPO following pushback: sources
You nailed it, it's absolute parody.

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.

mdellavo··on Building a license plate reader from scratch with deep learning
frictionless toll collection
mdellavo··on What happens to tech workers when their skills become obsolete?
a cs degree is going to require you to cover a lot of math, which is required for cs proper. a bit of an apple and oranges comparison
mdellavo··on TSV Utilities: Command line tools for large, tabular data files
using csv and tools like grep and join is very fast for large datasets
mdellavo··on Ask HN: How do you scale salary for part-time work?
yep - all of the upside none of the downside.
mdellavo··on The Linux kernel's inability to gracefully handle low memory pressure
facebook's solution https://facebookincubator.github.io/oomd/
mdellavo··on Tesla employees say they took shortcuts, worked through harsh conditions
"real" car companies are not without their own scandals

https://en.wikipedia.org/wiki/Firestone_and_Ford_tire_contro...

https://en.wikipedia.org/wiki/Ford_Pinto#Fuel_system_fires,_...

mdellavo··on Apple has pushed a silent Mac update to remove hidden Zoom web server
eng has responsibility here for going forward with this
mdellavo··on For Whom Is the Water Park Fun?
children?
← PreviousPage 2 of 4Next →