32 Matching Annotations
  1. Nov 2022
    1. scale: 3 means 3 of those digits come after the decimal point (surely it should be the other way round, scale for how big the number is and precision for its decimal places?):
  2. May 2022
    1. Some people have expressed surprise end even doubt that it could be faster to read the files twice than reading them just once. Perhaps I didn't manage to explain very clearly what I was doing. I am talking about cache pre-loading, in order to have the files in disk cache when later accessing them in a way that would be slow to do on the physical disk drive. Here is a web page where I have tried to explain more in detail, with pictures, C code and measurements.
  3. Aug 2021
  4. Jun 2021
  5. May 2021
    1. That image only contains 200 pixels horizontally, but the browser stretches it to 400px wide or even farther!Luckily, you’ll see there’s an easy “fix” there at the end: our old good friend the width attribute!<img src="example.gif", srcset="example.gif 200w" sizes="(min-width: 400px) 400px, 100vw" width="200" /* <=== TA-DA! */ class="logo">As long as you can specify the width attribute so it reflects the true maximum size of your largest image, you won’t run into this problem of having sizes make your image wider than it naturally should go.
  6. Feb 2021
    1. Filters

      Might be helpful / more intuitive to think of filters as... inputs/attributes

      Defining the filters defines which inputs are allowed and which type they are required to be.

  7. Jan 2021
    1. The solution is min-width: 0; on the flex child Or min-width some actual value. Without this, the flex child containing the other text elements won’t narrow past the “implied width” of those text elements.
    1. It seems like this should be one of the easiest things to understand in CSS. If you want a block-level element to fill any remaining space inside of its parent, then it’s simple — just add width: 100% in your CSS declaration for that element, and your problem is solved. Not so fast. It’s not quite that easy. I’m sure CSS developers of all skill levels have attempted something similar to what I’ve just described, with bizarre results ultimately leading to head scratching and shruggingly resorting to experimenting with absolute widths until we find just the right fit. This is just one of those things in CSS that seems easy to understand (and really, it should be), but it’s sometimes not — because of the way that percentages work in CSS.
    1. min-width: 0;

      Wouldn't expect the solution to "width grows too wide" to be to assign a (seemingly meaningless, since how could it be less than 0) a minimum width of 0.

      I would have expected to solve this by applying a max-width to the problem element or one of its ancestors.

  8. Dec 2020
    1. Now that I got a clearer picture, I still don't understand why that error message (cannot bind to variable declared with let:) is there, in the sense that for me it would make a lot of sense to both bind (which connects bidirectionally the App#item variable with the Component#item variable) and also let (which connects the slot#item variable with the Component#item variable, allowing data to flow from slot to Component, and thus to the top-level App via the bind syntax.
  9. Sep 2020
    1. Personally for me, this is incredibly hard to read. Regex everywhere, nested objects with different rules and configurations that are very intuitive, multiple loaders that resolve backwards, built in loaders having obscure issues that require using third party loaders in between, separation of plugins and loaders, and so on.
    2. In my opinion, because Webpack was one of the first bundlers, is heavily packed with features, and has to support swathes of legacy code and legacy module systems, it can make configuring Webpack cumbersome and challenging to use. Over the years, I’ve written package managers, compilers, and bundlers, and I still find configuring Webpack to be messy and unintuitive.
    1. Now I know what you're thinking, "this is an atrocity, what a horrible mess!" and you're right, it's kind of ugly. In fact it's just about impossible to think this is a good idea the first time you see it — you have to actually try it.
    1. yup.object.default({ number: 5 }); // object will be cloned every time a default is needed yup.object.default(() => ({ number: 5 })); // this is cheaper

      Cloning an object is considered expensive?? Why?

    2. yup.object.default({ number: 5 }); // object will be cloned every time a default is needed yup.object.default(() => ({ number: 5 })); // this is cheaper

      Cloning an object is considered expensive?? Why?

    3. yup.object.default({ number: 5 }); // object will be cloned every time a default is needed yup.object.default(() => ({ number: 5 })); // this is cheaper

      Cloning an object is considered expensive?? Why?

    4. yup.object.default({ number: 5 }); // object will be cloned every time a default is needed yup.object.default(() => ({ number: 5 })); // this is cheaper

      Cloning an object is considered expensive?? Why?

    5. yup.object.default({ number: 5 }); // object will be cloned every time a default is needed yup.object.default(() => ({ number: 5 })); // this is cheaper

      Cloning an object is considered expensive?? Why?

    6. yup.object.default({ number: 5 }); // object will be cloned every time a default is needed yup.object.default(() => ({ number: 5 })); // this is cheaper

      Cloning an object is considered expensive?? Why?

    7. yup.object.default({ number: 5 }); // object will be cloned every time a default is needed yup.object.default(() => ({ number: 5 })); // this is cheaper

      Cloning an object is considered expensive?? Why?

    8. yup.object.default({ number: 5 }); // object will be cloned every time a default is needed yup.object.default(() => ({ number: 5 })); // this is cheaper

      Cloning an object is considered expensive?? Why?

  10. May 2020
    1. Click + Add Filter. Select Apply existing Filter.

      I wouldn't expect to find "Apply existing Filter" under the same button as for creating a new filter.

    1. P ⇒ Q

      It may be confusing for a newcomer (or on first read-through) that the variable/predicate/condition that represents the "necessary condition" in this statement P ⇒ Q is the Q.

      One might be forgiven for incorrectly assuming that the P represents the necessary condition. That is because most of the time when one states a statement/relation/implication/etc. about a subject, the sentence/statement begins with the subject. For example, if we're explaining about a "less than" relationship, and we give x < y as an example, one would correctly assume that x is the subject here and x is the thing that is less than.

      So it may be a bit surprising to a newcomer (on first read-through) that the subject of this section — the necessary condition — is represented by the Q and not be the P.

      (Made even more confusing by the fact that the very same implication P ⇒ Q is also used to express the opposite sufficiency relationship in the very next section. I would argue that Q ⇒ P should have been used instead in exactly one of these sections to make it clearer that the subject is different and/or the relation is different, depending how you look at it.)

      Is there any reason we couldn't rewrite this to express the logical relation between P and Q with the subject first? If we let P be the subject (that is, "necessary condition" that we're illustrating/explaining), could we not rewrite this as P ⇐ Q?

      In fact, that is exactly how this relation was expressed below, in https://en.wikipedia.org/wiki/Necessity_and_sufficiency#Simultaneous_necessity_and_sufficiency !:

      that P is necessary for Q, P ⇐ Q, and that P is sufficient for Q, P ⇒ Q

    1. If you’re a controller based outside of the EU, you’re transferring personal data outside of the EU each time you collect data of users based within the EU. Please make sure you do so according to one of the legal bases for transfer.

      Here they equate collection of personal data with transfer of personal data. But this is not very intuitive: I usually think of collection of data and transfer of data as rather different activities. It would be if we collected the data on a server in EU and then transferred all that data (via some internal process) to a server in US.

      But I guess when you collect the data over the Internet from a user in a different country, the data is technically being transferred directly to your server in the US. But who is doing the transfer? I would argue that it is not me who is transferring it; it is the user who transmitted/sent the data to my app. I'm collecting it from them, but not transferring it. Collecting seems like more of a passive activity, while transfer seems like a more active activity (maybe not if it's all automated).

      So if these terms are equivalent, then they should replace all instances of "transfer" with "collect". That would make it much clearer and harder to mistakenly assume this doesn't apply to oneself. Or if there is a nuanced difference between the two activities, then the differences should be explained, such as examples of when collection may occur without transfer occurring.

  11. Apr 2020
    1. the body of law derived from judicial decisions of courts and similar tribunals.[1][2][3][4][5][6] The defining characteristic of “common law” is that it arises as precedent.

      The way "common law" sounds and is used, I would have thought it meant law that is common (in common between) many countries, laws that can be found on the books in all of these many places. (Kind of like commonwealth.)

      But, although it is common to many countries, that is not its defining characteristic. Its defining characteristic is actually something quite different.

      Since the term is so far removed from what it actually means, I would even go so far as to say it is a mild euphemism.

      Much better names for this exist: judicial precedent or judge-made law are the clearest options. But even "case law" is a better term.

  12. Mar 2020
    1. The <meta name="robots" content="noindex" /> tag or directive applies to search engine crawlers. To block non-search crawlers, such as AdsBot-Google, you might need to add directives targeted to the specific crawler
    1. For the noindex directive to be effective, the page must not be blocked by a robots.txt file. If the page is blocked by a robots.txt file, the crawler will never see the noindex directive, and the page can still appear in search results, for example if other pages link to it.