Hacker Newsnew | past | comments | ask | show | jobs | submit | rekahrv's commentslogin

Great book. The interview with Peter Attia on Star Talk was also interesting (and some parts hilarious): https://startalkmedia.com/show/medicine-3-0-extending-human-...


Yes, that's a great point. Some names are generally unclear, but more often, they are unclear in a context. Do you have some "contextual" examples?


The worst was "leading indicator". It was used initially to mean inputs to a machine learning model, but it organically spread to refer to almost any form of data at any point in the ML pipeline.


That's an interesting example. Also, the same pattern has happened to other terms as well: 1. At first, a quite specific meaning. 2. As time goes on, the same term gets used for more & more things.


I agree with those points, both on the positive and negative side. Do you have some examples of vague or misleading names?


Yes, exactly. Thanks for the clarifying question. :-)

Any kind of artifact in code: modules, functions, classes, arguments, variables...


Ones that used to annoy me were in the standard library, in particular the unitest module with camel-case functions (assertEqual and so on), I've seen this justified by it being old and predating the snake-case conventions, but surely assert_equal could have lived alongside the older names. Moot now that I've switched to pytest of course ...


Yeah, anything that contradict s PEP-8 conventions looks unnatural in Python. :-)


“Every six months or so, someone would ask in our meetings, ‘Should we think about general purpose code generation,’ but the answer was always ‘No, it’s too difficult, the current models just can’t do it,’”

Lol


TLDR:

* Falsy values (empty string, empty list) should have the same behavior as None. * Don't use `==` for comparison with None or NaN


Thanks a lot, that's very insightful.

Comparing the launch of Effective XGBoost to Effective Pandas: What do you think: What are the reasons XGBoost had so much more sales in the first days?

* bigger audience? * better topic? * anything else?


Audience size and launch. According to Google trends, Pandas is much bigger than XGBoost.


PDEP-8 suggesting various changes regarding the `inplace` and `copy` arguments: https://github.com/pandas-dev/pandas/pull/51466


Wow, that looks amazing. It's a really comprehensive guide.

> This could have been a paper book but the Rust ecosystem evolves pretty quickly so an online guide that is constantly updated makes a bit more sense.

:-)

My question:

In which scenarios would you recommend to switch to Rust? When does it provide a clear advantage over Python?


With Rust, you won't have to wait for runtime (in Production) to notice an obvious error like wrong types for example, nor do you have to set up 15 external tools to achieve the same toolchain reliability (pytest, mypy, tox, ...), these things are built-in Cargo (Rust package manager).

Of course, Python can be fast enough, and decisions like these are tradeoffs. Still, you'll have to invest a lot of DevOps time in Python to achieve a fraction of the reliability and safety guarantees Rust (and its tooling) provide—a high-level summary of the book's first chapter.


That's insightful.

It seems that a virtual environment created by Poetry looks very similar, except that it doesn't contain an `include` directory. It contains:

* `bin` directory

* `lib/<python-version>/site-packages/` directory

* `pyvenv.cfg`


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: