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

> Nobody buys a motorcycle for the CO2 numbers.

Yeah, they would presumably take public transit or bicycle instead, as long as those options are feasible.


not all commutes look the same, I take the bus, the train and bike as much as possible.

for example this saturday when i wasn't in a hurry and went from Antibes to Nice.

I took a bus(1€), then train (6.8€) then metro(1.7€) for a total of 1 hour 15 minutes and 9.5€ (multiply by 2 for the round trip) it would have been a 20 minute motorcycle ride.


No, it's important context, and attempting to suppress it does everyone a disservice. Without taking these kinds of points of comparison into consideration, one becomes susceptible to https://en.wikipedia.org/wiki/Base_rate_fallacy , and may become convinced about supposed bias where the evidence doesn't support the claim, contradicts it or even shows the opposite.

Another classic example is the discourse around "missing and murdered Indigenous women" in Canadian politics. It was popular enough around a decade ago to be more or less a set phrase. To listen to politicians and wonks discussing the matter, you would imagine that Indigenous men didn't ever get kidnapped or murdered. As a matter of fact, the statistics showed that it happened to them at over twice the rate of the women. (They also showed that it was not an alarmingly high rate compared to other Canadian populations, and that the perpetrators were usually themselves Indigenous — as you'd expect for generally fairly isolated communities.) But you would get silenced in many places (e.g., banned from the Canada subreddit) for pointing to those statistics.


> a hypothesized polymerized form of water

With what chemical structure, even? That should have been the first red flag.


> and part of that humility should involve being cautious about introducing them to our bodies and environment.

What does that look like today, pragmatically speaking?


asking, for all tasks shown to introduce large amounts of microplastics in our bodies and environment, "can we accomplish this task in a way that doesn't introduce microplastics in our bodies and environment"?

For example, using a reusable metal gourd instead of plastic water bottles for the task of 'portable hydration'.

and because this is Hacker News, I'll kindly welcome the comment: 'well actually metal gourds have some toxic substance in the lining that's worse than microplastics' and reply: ok, Cardboard bottles then. Or a gourd made of a sheep's bladder like back in the good ol' days, whatever they used back in the bronze age.


Gourds were made from gourds back in the day. Or possibly ceramic.

So instead of auto-completing bits of LLM-generated code into the codebase, you preprocess it in. I can imagine a lot of devs won't like the ergonomics of that, but I like the idea that you can keep both original .glp and generated source files in version control.

I'd strongly recommend going over the README by hand. What you currently have is redundant and disorganized, and header sizes/depths don't make a lot of sense. The "manual build" instructions should also describe the dependencies that the install script is setting up.


> ijk for indices in loops are actually clearer than random names in nested loops precisely because it is a very common convention and because they occur in a defined order. So you always know that "j" is the second nesting level, for instance. Which relates to the visual layout of the code.

In problem domains that emphasize multidimensional arrays, yes.

More often nowadays I would see `i` and think "an element of some sequence whose name starts with i". (I tend to use `k` and `v` to iterate keys and values of dictionaries, but spell `item` in full. I couldn't tell you why.)


>you have to go back and find the body of the loop

If the loop is long enough that you don't naturally remember how it was introduced, that's the problem. In the given example, the use of `p.Age` is literally on the next line of code after ` for _, p := range people`.

> I've never understood what is gained by using `p` instead of spelling it out as `person`.

Wisdom I received from, IIRC, the Perl documentation decades ago: tightly-scoped names should be shorter and less attention-grabbing than more broadly-scoped ones, because you should really notice when you're using a global, and you don't want to suffer attention fatigue. (I'm sure the exact wording was quite different.)

Also because it's better for information density. As I recall, Larry Wall also had the idea that more commonly used language keywords should be shorter than rare ones. Good code uses the locals much more often than globals, so you shouldn't need to expend the same amount of effort on them. (The limiting case of this is functional programming idioms where you can eliminate the variable name completely, in cases like (Python examples) `lambda x: int(x)` -> `int`, or `(foo(x) for x in xs)` -> `map(foo, xs)`.


> remember how it was introduced

The problem is that many times I have not read the definition to remember. Debugger puts me into a context where I have to figure out what `p` stands for. I go up the call stack and now there's `s` to be deciphered. Worse is the reuse of `p` for person, product, part, etc. in different contexts.

Debugging is not the only problem. Code is read rarely linearly. Many times I browse different uses of a function, or see how a data structure is modified in different contexts. Looking up single letter variables is just a waste of time.


This is a decent reason, but your original comment is dangerously close to a completely strawman argument of "the argument of the func AverageAge(people []Person) should be called peopleToCalculateTheAverageOfTheirAges because what if I forget the method's name or its purpose while I am reading its text?"

Which, now that I think of it, kinda applies to your argument as well. Yeah, the debugger dropped you into the middle of a function you see for the first time in your life. No matter how you dice it or slice it, this means you'll have to study this function; I personally find that going to the function's beginning and skimming it until the breakpoint is the most reliable (and therefore, on average, fastest) method.


I don't deny the trade-off between variable name length and other factors. But, between 1 and 38, I doubt that the optimal length is at 1. Adding 5 more letters doesn't take anything away, IMHO, while increasing comprehensibility significantly.

> Debugger puts me into a context where I have to figure out what `p` stands for.

`p` stands for "the process in question".

I like to think of single-character vars as idea or topic headers that track the single thing I'm currently up to. I'm rarely working with more than one at a time, frequently it's the only variable, and there are contexts where I wouldn't use them at all.

IMHO if you're in a situation where `p` isn't obvious to you, "something has gone wrong".


> Wisdom I received from, IIRC, the Perl documentation decades ago

Perl is a language renowned for being difficult to read and maintain.


Tell us about your concrete experience of development in Perl.

Sorry, what is "CFD" in this context?


When you notice that it's LLM prose, it's terrible, yes.

I have seen some examples of what I thought was very impressive writing that the "author" subsequently confessed was at least heavily AI-assisted. It does take quite a bit of prompting work, apparently. But a few people I've encountered (probably they trend neurodivergent) seem to feel like LLMs have given them a voice, at least in written communication, when they would otherwise struggle to write anything at all (despite adequate skill at English).

At any rate, overall I agree with this piece and it resonates with thoughts I've been having. Although I haven't really feel compelled to elaborate on them at this level. There are too many things I'd like to say about AI to give them this kind of love and attention.


> It's a bit cleaner.

That's pretty much the reason why. Raymond Hettinger explains the philosophy well while discussing the `random` standard library module: https://www.youtube.com/watch?v=Uwuv05aZ6ug

I feel like much of this has been forgotten of late, though. From what I've seen, i's really quite hard to get anything added to the standard library unless you're a core dev who's sufficiently well liked among other core devs, in which case you can pretty much just do it. Everyone else will (understandably) be put through a PhD thesis defense, then asked to try the idea out as a PyPI package first (and somehow also popularize the package), and then if it somehow catches on that way, get declined anyway because it's easy for everyone to just get it from PyPI (see e.g. Requests).

I personally was directed to PyPI once when I was proposing new methods for the builtin `str`. Where the entire point was not to have to import or instantiate anything.


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

Search: