855 Matching Annotations
  1. Oct 2020
    1. As I said above, the intervening time matters in my use case. The value can become invalid after a while, so I want to make sure that it gets checked just before it's submitted.
    2. This is for a time picker. If you're picking times for today, you may pick a time that is 15 minutes from now. It's valid now because it's currently in the future. If you don't touch the form for the next 20 minutes then click submit, the submission should be prevented because your selected time is now 5 minutes in the past.
    1. That is certainly a good use-case. One thing you can do is to require something other than a user-chosen string as a username, something like an email address, which should be unique. Another thing you could do, and I admit this is not user-friendly at all, to let them sign up with that user name, but send the user an email letting them know that the username is already used. It still indicates a valid username, but adds a lot of overhead to the process of enumeration.
    1. you are granting us the right to use your User Content without the obligation to pay royalties to any third party
    2. You or the owner of your User Content still own the copyright in User Content sent to us, but by submitting User Content via the Services, you hereby grant us an unconditional irrevocable, non-exclusive, royalty-free, fully transferable, perpetual worldwide licence to use, modify, adapt, reproduce, make derivative works of, publish and/or transmit, and/or distribute and to authorise other users of the Services and other third-parties to view, access, use, download, modify, adapt, reproduce, make derivative works of, publish and/or transmit your User Content in any format and on any platform, either now known or hereinafter invented.
    1. Wondering how to get field state from multiple fields at once? People coming from Redux-Form might be wondering where the equivalent of Redux Form's Fields component is, as a way to get state from several fields at once. The answer is that it's not included in the library because it's so easy to write one recursively composing Field components together.
    2. Listening for External Changes By wrapping a stateful ExternalModificationDetector component in a Field component, we can listen for changes to a field's value, and by knowing whether or not the field is active, deduce when a field's value changes due to external influences.
    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. Polyfills are great for methods like String.prototype.trim because they allow you to use the methods on String instances.
    1. Not all application state belongs inside your application's component hierarchy. Sometimes, you'll have values that need to be accessed by multiple unrelated components, or by a regular JavaScript module.
    1. By default all content inside template strings is escaped. This is great for strings, but not ideal if you want to insert HTML that's been returned from another function (for example: a markdown renderer). Use nanohtml/raw for to interpolate HTML directly.
    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.

    1. I suppose it all comes down to tooling. It should be easy to author a pattern. A set of implicit (possibly explicit) patterns to author patterns may be useful.
    1. if we create a new branch or scope for some corner cases, we should have full features of a component without creating a new file
    2. This seems crucial, for example for #if inside #each {#each boxes as box} {@const b = box?.a?.b} {#if b} <p>{b}</p> {/if} {/each}
    3. but this RFC addresses a significant pain point I've had with {#each} blocks doing data visualization and graphics.
  2. Sep 2020
    1. 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. But this is only a halfway decent way to clarify that this is an external dependency, because the only way to resolve a peer dependency warning is to install react from npm—there's no way to notify npm that you resolve the dependency to a browser global. So peer dependencies should be avoided in favor of external declarations. Then Rollup will take care of warning about "unresolved dependencies", even if external declarations can't express a particular version range with which your library is compatible like peer dependencies can.

      Interesting. Didn't realize. From my perspective, I usually do install packages via npm, so wouldn't have known about this problem.

      npm and rollup both try to solve this problem but in different ways that apparently conflict? So if a lib author lists peerDependencies then it can cause problems for those getting lib via browser (CDN)? How come so many libs use it then? How come I've never heard of this problem before?

    1. Svelte will not offer a generic way to support style customizing via contextual class overrides (as we'd do it in plain HTML). Instead we'll invent something new that is entirely different. If a child component is provided and does not anticipate some contextual usage scenario (style wise) you'd need to copy it or hack around that via :global hacks.
    2. Explicit interfaces are preferable, even if it places greater demand on library authors to design both their components and their style interfaces with these things in mind.
    3. I think this is being rejected on grounds that are too arbitrary, and detract from what to me are the best things about Svelte -- it's fun and easy to use, and lets you write components in a way that's natural and expressive.
    1. This has already forced me to forgo Svelte Material because I would like to add some actions to their components but I cannot and it does not make sense for them to cater to my specific use-case by baking random stuff into the library used by everyone.
    2. The point of the feature is to not rely on the third-party author of the child component to add a prop for every action under the sun. Rather, they could just mark a recipient for actions on the component (assuming there is a viable target element), and then consumers of the library could extend the component using whatever actions they desire.
    3. They don't need to add a prop for every action. The action itself can be passed in as a prop. <script> export let action; </script> <div use:action>whatever</div> The argument for the action can be another prop or can be part of the same prop.
    1. Your tooltip component will have to wrap your image with a span tag or something, it can’t just add events to its children. And if you are adding multiple actions to it you will have to wrap it multiple times.
      <Concern1> <Concern2> </Concern2> </Concern1>

      vs.

      <img use:concern1 use:concern2>

    2. Lets not extend the framework with yet another syntax
    3. Your LazyLoad image is now inextensible. What if you want to add a class? Perhaps the author of LazyLoad thought of that and sets className onto the <img>. But will the author consider everything? Perhaps if we get {...state} attributes.
    4. I totally get not wanting to extend the syntax. I tried doing these things and in practice it was not easy or pretty. Actions provide a much cleaner and easier way to accomplish a certain set of functionality that would be much more difficult without it.
    1. Why not just do something like this?
    2. I'm still confused about the need for this, so at the expense of continuing to be that obnoxious kid at the playground, I'm going to stick my neck out again.
    3. Devil's advocate: I'm not convinced the functionalities you list can't already be done within the JS of the component. Example: autofocus can simply be done w/ a method or oncreate.
    4. I have created an action for form validation and its really working well
    5. I'm just pushing on the "is this really a good idea" front
    6. Drag and drop might be done better with hooks than components.
    7. This can and should be done with other components, IMHO.
    8. I'm a lot softer on this feature now - I'm starting to believe that every single use case that you would use a hook for, you could/should use a component for.
    1. A function that takes the value from the input and name of the field and converts the value into the value you want stored as this field's value in the form. Common usecases include converting strings into Numbers or parsing localized dates into actual javascript Date objects.
    1. Your solution is a very basic. The case above is more complex because using your solution you can't manipulate with fetched data outside of template and even outside {#await / } tag. So, if you need a read-only solution it's good but otherwise, it won't help you.
    1. The code is short and simple, if you have specific needs you will probably be better off writing something custom for your application.
  3. Aug 2020
    1. The hype is something common in our industry. Remember NoSQL? Or when everyone went crazy over microservices? Or the AI / Machine learning burst? The list goes on and on. People get excited about new and breakthrough technologies and ideas.
    2. The idea of having to learn something new is good, and I agree with that, but how often should you do that? Looking at the world of JavaScript, a new idea, blog post, library, framework, and whatnot pops up very often. Things become trending, and people quickly try to adopt that. I’m not saying you should not adopt new things and consider different approaches to a solution, not at all! I am trying to propose the idea of doing that less often.
    1. I don't doubt that we will soon treat the process of logging in as a figurative point of entry, meaning that log into will make full conceptual sense (cf you don't physically delve into a problem or pile into an argument, yet both are correct grammatically because they are semantically [i.e. figuratively])
    1. New information that would be useful toward the future usage or troubleshooting of GitLab should not be written directly in a forum or other messaging system, but added to a docs MR and then referenced, as described above.
    2. When you encounter new information not available in GitLab’s documentation (for example, when working on a support case or testing a feature), your first step should be to create a merge request (MR) to add this information to the docs. You can then share the MR in order to communicate this information.
    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

  4. Jul 2020
    1. The controller informs customers that they havethe possibility to withdraw consent. To do this, they could contact a call centre on business daysbetween 8am and 5pm, free of charge. The controller in this example doesnotcomply with article 7(3)of the GDPR. Withdrawing consent in this case requires a telephone call during business hours, this ismore burdensome than the one mouse-click needed for giving consent through the online ticketvendor, which is open 24/7.
    2. As mentioned earlier in these guidelines, it is very important that controllers assess the purposes forwhich data is actually processed and the lawful grounds on which it is based prior to collecting thedata. Often companies need personal data for several purposes, and the processing is based on morethan one lawful basis, e.g. customer data may be based on contract and consent. Hence, a withdrawalof consent does not mean a controller must erase data that are processed for a purpose that is basedon the performance of the contract with the data subject. Controllers should therefore be clear fromthe outset about which purpose applies to each element of data and which lawful basis is being reliedupon.
    3. Also,mechanisms for data subjects to withdraw their consent easily must be available and informationabout how to withdraw consent must be provided.
    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. Most of Algol's "special" characters (⊂, ≡, ␣, ×, ÷, ≤, ≥, ≠, ¬, ⊃, ≡, ∨, ∧, →, ↓, ↑, ⌊, ⌈, ⎩, ⎧, ⊥, ⏨, ¢, ○ and □) can be found on the IBM 2741 keyboard with the APL "golf-ball" print head inserted; these became available in the mid-1960s while ALGOL 68 was being drafted. These characters are also part of the Unicode standard and most of them are available in several popular fonts.
  5. idioms.thefreedictionary.com idioms.thefreedictionary.com
    1. By extension, a situation in which problems continue to arise faster than one is able to solve or cope with them, resulting in piecemeal, incomplete, or temporary results.
  6. Jun 2020
    1. According to our understanding of the inconsistencies, the feature was likely trying to support too many edge cases. All caching strategies have weaknesses and eventually break down if the usage is not properly scoped.
    1. State management is also easier. Instead of importing hooks and using setters, you just define a property within the script tags. You then change the value by re-assigning it (not mutating the original value).
    2. But it’s impossible to argue with the value binding. You don’t have to worry about defining the value property and an onChange event for an input box in Svelte, bind:value does it all
    3. As an engineer, it’s important to explore different technologies. It’s important to identify the tools available to tackle problems. And it’s important to expand your horizons because then you can look cool on your CV.
  7. May 2020
    1. You want to execute SSH commands from the build environment to a remote server You want to rsync files from the build environment to a remote server If anything of the above rings a bell, then you most likely need an SSH key.
    1. What I think we're lacking is proper tooling, or at least the knowledge of it. I don't know what most people use to write Git commits, but concepts like interactive staging, rebasing, squashing, and fixup commits are very daunting with Git on the CLI, unless you know really well what you're doing. We should do a better job at learning people how to use tools like Git Tower (to give just one example) to rewrite Git history, and to produce nice Git commits.
    1. they are processed by a natural person in the course of a purely personal or household activity. Practically speaking, the only relevant exception is the latter: for instance, if you collect your friends’ personal data for your own personal phone-book you’re not bound to the GDPR.
    1. What's terrible and dangerous is a faceless organization deciding to arbitrarily and silently control what I can and can not do with my browser on my computer. Orwell is screaming in his grave right now. This is no different than Mozilla deciding I don't get to visit Tulsi Gabbard's webpage because they don't like her politics, or I don't get to order car parts off amazon because they don't like hyundai, or I don't get to download mods for minecraft, or talk to certain people on facebook.
    2. They don't have to host the extension on their website, but it's absolutely and utterly unacceptable for them to interfere with me choosing to come to github and install it.
    3. I appreciate the vigilance, but it would be even better to actually publish a technical reasoning for why do you folks believe Firefox is above the device owner, and the root user, and why there should be no possibility through any means and configuration protections to enable users to run their own code in the release version of Firefox.
    1. Apparently Firefox does have translation built-in, it's just not enabled due to lack of usage agreement / API keys. https://hg.mozilla.org/mozilla-central/rev/a3eb8e502006
    2. Thank you for letting me know about this move by Google. Definitely something to watch. While I agree with Google's position from an end user experience perspective, it unfortunately puts Firefox at a further disadvantage since Mozilla does not have its own language translation initiatives.
  8. Apr 2020
    1. Less than 1% of users in the world have Javascript turned off. So honestly, it's not worth anyones time accommodating for such a small audience when a large majority of websites rely on Javascript. Been developing websites for a very long time now, and 100% of my sites use Javascript and rely on it heavily. If users have Javascript turned off, that's their own problem and choice, not mine. They'll be unable to visit or use at least 90% of websites online with it turned off.
    1. I don't think this is a common enough use case to warrant this change (which would need documentation and tests if it were to be accepted). Overall, the goal has been to simplify the validators, and prune out edge cases. This use case can be easily accomplished by just using a method instead.
    1. There is a forum for discussing CommonMark; you should use it instead of github issues for questions and possibly open-ended discussions. Use the github issue tracker only for simple, clear, actionable issues.
    1. This is a comic book about intellectual property law and the public domain: https://law.duke.edu/cspd/comics/digital/.

      A well-designed graphic novel/comic book with a narrative that dives into intellectual property and IP law. An excellent introduction to copyright, illustrating use-cases throughout. Thought-provoking and entertaining reading on fair use and public domain.

    1. no need to learn a new framework it's just Ruby's syntax + new methods and actually that's one of the reasons Google invented a simple and stupid language called Golang instead of a magical one to prevent developers from doing magic and just shipping features instead of playing with DSLs.
    1. This isn’t the first time Kerckhoffs’ Principle has come up. I specifically discussed it when talking about creating good, strong Master Passwords, when I said that we should use a system for coming up with Master Passwords that doesn’t lose its strength if the attacker knows the system that we used
    2. Kerckhoffs’ Principle states that you should assume that your adversary knows as much about the system you use as you do. This is why – despite what I may have said on April Fools Day last year – security experts are skeptical of security systems that hide the details of how they operate. They are particularly skeptical of systems that derive their security from keeping the details of how they work secret. I could go on at great length about why openness about the system improves security. Indeed, my first draft of this article did go on at great length.
    1. Now, if we think of the tasks that we perform throughout the day as consuming separate "bands" of time, then the term makes perfect sense. Being "out of bandwidth" would indicate that you do not have enough unallocated "bands of time" in your day to complete the task. Using the term bandwidth to describe time maps more closely (in my opinion) to the original definition, than the current definition describing data capacity does.
    2. I may be living in a bubble, but my impression is that don't understand that figurative use of bandwidth are way out of the loop.
    1. Well, as a home user, I also belong to an investment club with 10 members. I also have a medium size family who I like to send photo's to, and my son is on a soccer team. all those have greater than 5 people on the list. sooooooooo..... once again, the people with valid use of the internet have to 'deal' with those that abuse it.
    1. How does HIBP handle "plus aliasing" in email addresses? Some people choose to create accounts using a pattern known as "plus aliasing" in their email addresses. This allows them to express their email address with an additional piece of data in the alias, usually reflecting the site they've signed up to such as test+netflix@example.com or test+amazon@example.com. There is presently a UserVoice suggestion requesting support of this pattern in HIBP. However, as explained in that suggestion, usage of plus aliasing is extremely rare, appearing in approximately only 0.03% of addresses loaded into HIBP. Vote for the suggestion and follow its progress if this feature is important to you.
    1. minitest doesn't reinvent anything that ruby already provides, like: classes, modules, inheritance, methods. This means you only have to learn ruby to use minitest and all of your regular OO practices like extract-method refactorings still apply.
  9. Mar 2020
    1. We long ago admitted that we’re poor at scheduling, so we have roosters; sundials; calendars; clocks; sand timers; and those restaurant staff who question my integrity, interrupting me with a phone call under the premise of “confirming” that I’ll stick to my word regarding my reservation.
    2. A closely-related failing to scheduling is our failure to remember, so humans are very willing to save information on their computers for later.
    1. Robots are currently suffering extreme discrimination due to a few false assumptions, mainly that they’re distinctly separate actors from humans. My point of view is that robots and humans often need to behave in the same way, so it’s a fruitless and pointless endeavour to try distinguishing them.
    2. As technology improves, humans keep integrating these extra abilities into our cyborg selves
    1. Don't be discouraged when you get feedback about a method that isn't all sunshine and roses. Facets has been around long enough now that it needs to maintain a certain degree of quality control, and that means serious discernment about what goes into the library. That includes having in depth discussions the merits of methods, even about the best name for a method --even if the functionality has been accepted the name may not.

      about: merits

  10. Feb 2020
    1. Use the simplest and most boring solution for a problem, and remember that “boring” should not be conflated with “bad” or “technical debt.” The speed of innovation for our organization and product is constrained by the total complexity we have added so far, so every little reduction in complexity helps. Don’t pick an interesting technology just to make your work more fun; using established, popular tech will ensure a more stable and more familiar experience for you and other contributors.
    1. The coat is a use value that satisfies a particular want

      Marx: "Yesterday I pawned a coat dating back to my Liverpool days in order to buy writing paper" (Karl Marx and Frederick Engels, Collected Works, vol. 38 [1852-55]: 221).

      On the significance of Marx's coat, see Peter Stallybrass, “Marx’s Coat,” in Border Fetishisms: Material Objects in Unstable Spaces, ed. Patricia Spyer (New York: Routledge, 1998): 183–207. [PDF].

    2. Section 1. The Two Factors of a Commodity, Use-Value and Value

      Marx's analysis of a capitalist system begins by postulating that it's fundamentally composed of units called commodities.

      In the capitalist system commodities have two features.

      1. They are produced

      2. They are produced by capitalists

      Capitalists produce commodities by employing workers to produce them.

      In this section, Marx begins his analysis of the first feature of the capitalist system (viz. that it is commodity producing). Workers and capitalists will not appear in Marx's analysis for several more chapters.

    3. A commodity, such as iron, corn, or a diamond, is therefore, so far as it is a material thing, a use value, something useful

      What commodities are thought to be useful for or not is irrelevant to Marx at this very early stage of his analysis, even from a moral point of view. Diamonds satisfy a need in some societies at specific times and places the same as corn or iron.

  11. Jan 2020
    1. The fair use doctrine was created to allow the use of copyrighted works for criticism and commentary, parody, news reporting, research and scholarship, and classroom instruction.

      Definition

      • criticism
      • commentary
      • parody
      • news reporting
      • research and scholarship
      • classroom instruction
  12. Dec 2019
  13. www.kickstarter.com www.kickstarter.com
    1. when you choose your character, you choose to be aboveboard or underhanded. That is brilliant! ... It creates a much more wide-open and inviting experience.

  14. Nov 2019
    1. Since an uncontrolled component keeps the source of truth in the DOM, it is sometimes easier to integrate React and non-React code when using uncontrolled components.

      A good example for when to use uncontrolled components

  15. Oct 2019
    1. However, if more control is needed, you can pass any of these pieces of state as a prop (as indicated above) and that state becomes controlled. As soon as this.props[statePropKey] !== undefined, internally, downshift will determine its state based on your prop's value rather than its own internal state.
    2. refKey: if you're rendering a composite component, that component will need to accept a prop which it forwards to the root DOM element. Commonly, folks call this innerRef. So you'd call: getRootProps({refKey: 'innerRef'}) and your composite component would forward like: <div ref={props.innerRef} />
  16. Aug 2019
    1. For every question you might have, please create a discussion thread, not a single comment. This makes it a bit easier to see and reply to the question, instead of questions and answers getting mixed together:
    1. But what about useState? it used whenever we have some variable that whenever it changes, we want to re-render our component and show some new contents.
    1. Is it because package authors only consider the use case of installing their package from npm and not the case of installing it from a git repo?
    1. What I UseThe following is a selection of my tools that I use for my professional work.
    1. http://librarycopyright.net/resources/fairuse/index.php

      This tool was helpful for further exploration of Fair Use concepts in Unit 2, but felt too subjective for my liking. I prefer this Fair Use Checklist created by Kenneth D. Crews, the author who wrote the book Copyright Law for Librarians and Educators. I reference this book often and like his straightforward “check the box” to visually show whether use is in favor or opposing fair use.

    1. Designers can group related fields into sections. If your form has more than six questions, group related questions into logical sections. Don’t forget to provide a good amount of white space between sections to distinguish them visually.Generally, if your form has more than six questions, it’s better to group related questions into logical sections. Put things together that make sense together. (Large preview)
  17. Jun 2019
  18. Apr 2019
    1. The consensus reception holds that the visual composition of the structures lack a unified voice due to the heavy handedness of the individual star-architects who were commissioned to design its various structures.Most critics write from the lens of art criticism and therefor focus on the aesthetics of structures as though they were sculptures in a museum. For decades, critics from this tradition have failed to understand or assimilate the principles of urban design that make cities vibrant and walkable.

      This struck me as very interesting, as it frames the article as a rejection of accepted criticism of many respected voices in the field. Instead, the author conducts a potential use study of the space for future users, from the perspective of walkability. It is written not for other scholars of the field but for a general audience, New Yorkers in particular.

  19. Mar 2019
    1. For this factor... It is more likely to be fair use if... It is less likely to be fair use if...

      Pay close attention to the criteria for Fair Use (check out the evaluation tool at the bottom)