Hacker News new | past | comments | ask | show | jobs | submit | unwind's comments login

I agree, but I have to point out that if you're gonna be like that, then you should be explicit about your final

    return 0;

The C standard (since C99) says that `main()` has an implicit `return 0`, you don't need to write it explicitly.

I would (coming from a C background) guess that `allocPrint()` owes its name from the C standard library function(s) `as(n)printf()`[1]. At least that would make sense, the naming is modernized by being made longer, to gain clarity.

[1]: https://man7.org/linux/man-pages/man3/asprintf.3.html


*suffix.

A prefix goes before something.


Indeed. Thanks for the correction; I edited the original message

Please don't use if:s to assign boolean literals, just do it:

    const trump_tariff = priceIncrease > 1.0
also saves you from not initializing the variable in the default/other case. :)

This was just someone showing you what the "Amazon programmer" was doing, and hence a deep cut reference to the likelihood of it being poor quality code :)

If you really wanted to look like Amazon codex you would write Java :)

I see I missed an opportunity to make it even funnier.

    const
I feel you may underestimate how often they change.

not to mention the mix of snake_case & camelCase

In the original code, trump_tariff is a sticky value. If that’s intended/not intended, the above introduces/fixes a bug.

If statements are great because they are highly readable.

But, again, he was in the UK buying US stamps, so that the FSF could mail their answer back to him from the US. I don't think UK post offices supply all the world's stamps, buying that online from individuals who have them for sale makes some kind of sense, doesn't it?

I guess the a more "digital native" way would have been to first check if the USPS supports some kind of downloadable/printable stamping method, like QR codes or pre-bought labels (which, according to come early comment, they do).


Yes host and device are the standard USB system design [1] terms.

[1]: https://en.m.wikipedia.org/wiki/USB#System_design


TIL that "baby's breath" (gypsophila paniculata) [1] is the name of a decorative flower, common in larger arrangements as a backdrop.

[1]: https://en.wikipedia.org/wiki/Gypsophila_paniculata

EDIT: Fixed typo in the latin.


Ah, this [1] meaning of tillering (bending wood to form a bow), not this [2] (production of side shoots in grasses). The joys of new words.

[1]: https://www.howtomakealongbow.co.uk/part-5-tillering

[2]: https://en.wikipedia.org/wiki/Tiller_(botany)


As I recall tillering is more about the shaping of the bow to achieve an optimal bend and force delivery on release.

It's an iterative process of bending and shaping, bending again, and wood removal in stages.


This [1] seems to be a Quora post featuring such images. Very cool, didn't know that!

[1]: https://www.quora.com/Did-the-Typhoon-class-of-submarine-rea...


We also have "the moped ring" [1], an 800-gram gold+silver necklace from 500 AD that some kid clipped a piece off to fix their moped. :)

This is on display at the Historical Museum in Stockholm, which has a fancy vault-like "Gold room" [2] showing off lots of found treasures. Recommended.

[1]: https://historiska.se/upptack-historien/artikel/ostra-hoby-h...

[2]: https://historiska.se/utstallningar/the-gold-room/


Join us for AI Startup School this June 16-17 in San Francisco!

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

Search: