681 Matching Annotations
  1. Oct 2020
    1. Looks like the problem is that debounce defaults to waiting for 0 ms ... which is completely useless!

      It would be (and is) way to easy to omit the 2nd parameter to https://lodash.com/docs/4.17.15#debounce.

      Why is that an optional param with a default value?? It should be required!

      There must be some application where a delay of 0 is useless. https://www.geeksforgeeks.org/lodash-_-debounce-method/ alludes to / implies there may be a use:

      When the wait time is 0 and the leading option is false, then the func call is deferred until to the next tick.

      But I don't know what that use case is. For the use case / application of debouncing user input (where each character of input is delayed by at least 10 ms -- probably > 100 ms -- a delay of 0 seems utterly useless.

    1. Without elegant ways of expressing loops/iterators (like angular does with directives), the primary way to keep JSX readable thus becomes copying and pasting.

      I'm not quite sure I understand this (so until I do, I'm not sure I agree)...

      Why does he think copying and pasting is the only way to make it readable? Like he pointed out, you can extract JSX snippets and use loops within JSX. But maybe he means (his previous point), that people often don't do that. Hmm. 

    1. trusktr herman willems • 2 years ago Haha. Maybe React should focus on a template-string syntax and follow standards (and provide options for pre-compiling in Webpack, etc).

      Well anywho, there's other projects now like hyperHTML, lit-html, etc, plus some really fast ones: https://www.stefankrause.ne...

      React seems a little old now (and the new Hooks API is also resource heavy).

      • Share ›  Michael Calkins trusktr • 4 years ago • edited That's a micro optimization. There isn't a big enough difference to matter unless you are building a game or something extraordinarily odd.

      • Share › −  trusktr Michael Calkins • 2 years ago True, it matters if you're re-rendering the template at 60fps (f.e. for animations, or for games). If you're just changing views one time (f.e. a URL route change), then 100ms won't hurt at all.

  2. Sep 2020
    1. You can see that Rollup mapped browser globals called "React" and "ReactDOM" to variables called "React" and "ReactDOM". The latter are what you imported by writing import React and import ReactDOM. (The variable names don't have to be the same as the browser globals, but it's common.)
    1. The only difference is that they’re named with camelCase like onClick, onFocus, onDragEnter instead of the all-lowercase names from HTML (onclick, onfocus, ondragenter).
  3. Aug 2020
    1. Nguyen, L. H., Drew, D. A., Graham, M. S., Joshi, A. D., Guo, C.-G., Ma, W., Mehta, R. S., Warner, E. T., Sikavi, D. R., Lo, C.-H., Kwon, S., Song, M., Mucci, L. A., Stampfer, M. J., Willett, W. C., Eliassen, A. H., Hart, J. E., Chavarro, J. E., Rich-Edwards, J. W., … Zhang, F. (2020). Risk of COVID-19 among front-line health-care workers and the general community: A prospective cohort study. The Lancet Public Health, 0(0). https://doi.org/10.1016/S2468-2667(20)30164-X

    1. what might be learned from the case. The answer, in part, is that prudent psychiatrists and other therapists will want to be thoughtful about how they arrange follow-up care for patients whom they can no longer see.Sometimes a general suggestion that a patient seek follow-up care will be adequate. However, as the patient's condition warrants, clinicians might choose, in ascending order of time commitment, to provide the patient with the name of a particular practitioner or facility, to contact the facility to ascertain that a clinician is willing to see the patient, to help the patient make an appointment, or, with the patient's permission, to make an appointment on the patient's behalf. In some cases, it may be appropriate to ask for the patient's permission to contact his or her family to indicate a need for follow-up and to encourage the family to make sure that follow-up takes place. But of these approaches, no specific one will always be indicated, and the degree of assistance rendered the patient should be calibrated to his or her individual needs.

      What can be learned from this case?

      • Carefully plan follow up plans with patients (general suggestion about follow up can be enough)
      • Ask patient for family information to help them get involved in the follow up process and help increase compliance.

      Consider:

      • Giving the specific name of a provider to follow up with
      • How to contact the facility,
      • See if who you provided/recommended is avaliable to take the patient
      • Help patient make the appointment or make it on their behalf (with permission)
    1. As a web designer, I hate that "log in" creates a visual space between the words. If you line up "Log In Register" - is that three links or two? This creates a Gestalt problem, meaning you have to really fiddle with spacing to get the word groupings right, without using pipe characters.

      Sure, you can try to solve that problem by using a one-word alternative for any multi-word phrase, but that's not always possible: there isn't always a single word that can be used for every possible phrase you may have.

      Adjusting the letter-spacing and margin between items in your list isn't that hard and would be better in the long run since it gives you a scalable, general solution.

      "Log in" is the only correct way to spell the verb, and the only way to be consistent with 1000s of other phrasal verbs that are spelled with a space in them.

      We don't need nor want an exception to the general rule just for "login" just because so many people have made that mistake.

    1. More information about limitations and exceptions to copyright

      Under more information about limitations and exceptions to copyright add section titled Case Studies: Case studies provide valuable information relating to the state of affairs in various countries, as well as the opposing views when debating copyright issues.

      • South Africa: a case study of politics and the global economics of limitations and exceptions to copyright. The current debate in South Africa regarding proposed amendments to the Copyright Bill allows showcases the different sides of the debate, and how legal frameworks, e.g. the Constitution of the Republic of South Africa also informs decision making.
      1. US Government Threatening To Kill Free Trade With South Africa After Hollywood Complained It Was Adopting American Fair Use Principles, by Mike Masnick, 4 November 2019.
      2. South Africa’s Copyright Amendment Bill – one year on, by Denise Nicholson, 30 March 2020. This work is licensed under a Creative Commons Attribution 4.0 International License.
      3. South Africa’s Copyright Amendment Bill Returned to Parliament for Further Consideration, Mike Palmedo, 22 June 2020. This work is licensed under a Creative Commons Attribution 4.0 International License.
      4. See the light and pass the Copyright Amendment Bill, by Mugwena Maluleke, Tebogo Sithathu, Jack Devnarain, Tusi Fokane, Ben Cashdan and Jace Nair, 24 June 2020. © Mail & Guardian Online.
      5. South African President’s Reservations to Copyright Bill Not Supported by Law, by Sean Flynn, 13 July 2020. This work is licensed under a Creative Commons Attribution 4.0 International License.

      For a comprehensive list of materials relating to the South African Copyright Amendment Bill processes, see Copyright and Related Issues: USTR GSP trade threats re: Bill, list compiled and amended by Denis Nicholson

    1. Havers, F. P., Reed, C., Lim, T., Montgomery, J. M., Klena, J. D., Hall, A. J., Fry, A. M., Cannon, D. L., Chiang, C.-F., Gibbons, A., Krapiunaya, I., Morales-Betoulle, M., Roguski, K., Rasheed, M. A. U., Freeman, B., Lester, S., Mills, L., Carroll, D. S., Owen, S. M., … Thornburg, N. J. (2020). Seroprevalence of Antibodies to SARS-CoV-2 in 10 Sites in the United States, March 23-May 12, 2020. JAMA Internal Medicine. https://doi.org/10.1001/jamainternmed.2020.4130

  4. Jul 2020
    1. Matz, alas, I cannot offer one. You see, Ruby--coding generally--is just a hobby for me. I spend a fair bit of time answering Ruby questions on SO and would have reached for this method on many occasions had it been available. Perhaps readers with development experience (everybody but me?) could reflect on whether this method would have been useful in projects they've worked on.
    1. Also notice that the component name Nested is capitalised. This convention has been adopted to allow us to differentiate between user-defined components and regular HTML tags.
    1. Meyer, B., Torriani, G., Yerly, S., Mazza, L., Calame, A., Arm-Vernez, I., Zimmer, G., Agoritsas, T., Stirnemann, J., Spechbach, H., Guessous, I., Stringhini, S., Pugin, J., Roux-Lombard, P., Fontao, L., Siegrist, C.-A., Eckerle, I., Vuilleumier, N., & Kaiser, L. (2020). Validation of a commercially available SARS-CoV-2 serological immunoassay. Clinical Microbiology and Infection, 0(0). https://doi.org/10.1016/j.cmi.2020.06.024

    1. Varatharaj, A., Thomas, N., Ellul, M. A., Davies, N. W. S., Pollak, T. A., Tenorio, E. L., Sultan, M., Easton, A., Breen, G., Zandi, M., Coles, J. P., Manji, H., Al-Shahi Salman, R., Menon, D. K., Nicholson, T. R., Benjamin, L. A., Carson, A., Smith, C., Turner, M. R., … Plant, G. (2020). Neurological and neuropsychiatric complications of COVID-19 in 153 patients: A UK-wide surveillance study. The Lancet Psychiatry. https://doi.org/10.1016/S2215-0366(20)30287-X

    1. Fontanet, A., Tondeur, L., Madec, Y., Grant, R., Besombes, C., Jolly, N., Pellerin, S. F., Ungeheuer, M.-N., Cailleau, I., Kuhmel, L., Temmam, S., Huon, C., Chen, K.-Y., Crescenzo, B., Munier, S., Demeret, C., Grzelak, L., Staropoli, I., Bruel, T., … Hoen, B. (2020). Cluster of COVID-19 in northern France: A retrospective closed cohort study. MedRxiv, 2020.04.18.20071134. https://doi.org/10.1101/2020.04.18.20071134

  5. Jun 2020
    1. Rosenberg, E. S., Tesoriero, J. M., Rosenthal, E. M., Chung, R., Barranco, M. A., Styer, L. M., Parker, M. M., John Leung, S.-Y., Morne, J. E., Greene, D., Holtgrave, D. R., Hoefer, D., Kumar, J., Udo, T., Hutton, B., & Zucker, H. A. (2020). Cumulative incidence and diagnosis of SARS-CoV-2 infection in New York. Annals of Epidemiology. https://doi.org/10.1016/j.annepidem.2020.06.004