169 Matching Annotations
  1. Jan 2024
  2. Dec 2023
    1. It has its roots in the Rash (specifically the rash_alt flavor), which is a special Mash, made popular by the hashie gem.
    1. && nil

      first sighting: I don't think I've seen someone write exactly && nil before.

      Apparently to avoid having the return value from errors.add — which should be done solely for its side effect, not to get a return value -- inadvertently being used as a return value for user. It wouldn't make sense to return from user. That should only return a User or nil. And more statically typed languages would allow that to be expressed/enforced from type annotations alone, which would have caught the mistake of returning errors.add if someone had accidentally attempted to return that.

      Having user (and therefore call) return nil is key to the unless @current_user working.

    2. Instead of using private controller methods, simple_command can be used.

      first sighting: simple_command

    1. A personalized button gives users a quick indication of the session status, both on Google's side and on your website, before they click the button. This is especially helpful to end users who visit your website only occasionally. They may forget whether an account has been created or not, and in which way. A personalized button reminds them that Sign In With Google has been used before. Thus, it helps to prevent unnecessary duplicate account creation on your website.

      first sighting: sign-in: problem: forgetting whether an account has been created or not, and in which way

  3. Nov 2023
    1. The default user profile is based on the System for Cross-domain Identity Management: Core Schema (opens new window) and has following standard properties
    1. Copyright (c) 2019–ω

      ω (or any indefinite placeholder) used as an end year for a copyright

  4. Sep 2023
    1. Customer service 24/5 follow the sun

      first sighting: 24/5 and follow the sun

  5. Jul 2023
  6. Jun 2023
    1. It actually depends on if your class is a data class or a behaviour class.

      first time I've come across this idea of data class vs. behavior class

    1. What's the structure of the URL of a shared link?https://chat.openai.com/share/<conversation-ID>

      I've never seen a website document something like this before... especially as part of a FAQ.

      How/why is this information helpful to people?

  7. Apr 2023
    1. If the chicken must come before the egg, where do you put the chicken?

      If the chicken must come before the egg, where do you put the chicken?

    1. If the chicken must come before the egg, where do you put the chicken?

      If the chicken must come before the egg, where do you put the chicken?

  8. Mar 2023
  9. Jan 2023
  10. Nov 2022
  11. Oct 2022
    1. This text has a line which has an ortographical typo in it. Please look at this line of text from the Zen of Python: There should be one-- and preferably only one --obvious way to do it.

      first sighting: ortographical

  12. Sep 2022
    1. The variable a is incremented thanks to the atomic memory primitives function addInt that is concurrent-safe. However, we assign the result to the same variable, which is a not a concurrent-safe write operation. This a careless mistake detected by the atomic analyzer.

      first sighting: concurrent-safe

    1. We do, You doThis tutorial is most effective when you follow along and complete the steps.

      first sighting: "We do, You do"

    1. Rename the existing default branch to the new name (main). The argument -m transfers all commit history to the new branch: git branch -m master main
  13. Aug 2022
  14. Jun 2022
    1. Our development container teams across Microsoft and GitHub continue active development on the new Dev Container Specification, and this iteration had several exciting highlights.
  15. Apr 2022
  16. Mar 2022
  17. Jan 2022
    1. Tauri
    2. Vue+Vuetify was like writing binary by hand instead of using an expressive modern language that abstracts away 99% of plumbing.

      Vuetify

    3. As someone who is a future-ex React developer who uses Svelte in a personal project

      "future-ex"

  18. Nov 2021
    1. Modern browsers that support the File System Access API (Edge and Chrome today) allow web pages to access the local file system (with your permission).
  19. Oct 2021
  20. Sep 2021
    1. first sighting: A Forward link at bottom of an e-mail, which takes you here, which has a link to a preview (which is basically a web version of the e-mail that was sent).

      In some ways, this seems preferable over forwarding the original e-mail that you received using your e-mail client's forward feature. In particular:

      • It doesn't inadvertently include your personalized unsubscribe link, allowing the forwarded-to person to maliciously unsubscribe you without your consent.
  21. Aug 2021
    1. Introduced in the perfectly named “Typescript and validations at runtime boundaries” article @lorefnon, io-ts is an active library that aim to solve the same problem as Spicery:TypeScript compatible runtime type system for IO decoding/encoding

      io-ts

    1. 2021.01.24-2021.08.09

      date/time formats

      I used to use this format, too!

  22. Jul 2021
  23. Jun 2021
  24. May 2021
    1. Here’s a really neat editor for those from Mads Stoumann (which works for circles and ellipses as well):
    2. /* referencing path from an inline SVG */ clip-path: url(#c1);

      first sighting: referencing image by ID in CSS

  25. Apr 2021
    1. one of the oldest problems was the use of Command-line interactive programs in UNIX shell-scripts

      first sighting of this article

    1. fill_in('Foo', with: 'bar', fill_options: { clear: :backspace })

      first sighting: fill_options: { clear: :backspace })

      first sighting: fill_options as an option at all (for fill_in only, I presume)

      I wonder they added at all as a response to this:

      See also: https://hyp.is/ZcXVJJMyEeucgmPXYFP9yg/github.com/teamcapybara/capybara/issues/203

      (which key should have been pressed, backspace, space?)

  26. Mar 2021
    1. reduce(root){@1[@2]||={}}

      first sighting: Ruby 3's new @1 shorthand

    2. data = {}.extend XKeys::Auto # Vs ::Hash, uses arrays for int keys data[:users, 0, :name] # nil data[:users, 0, :name, :raise => true] # KeyError data[:users, :[], :name] = 'Matz' # :[] is next index, 0 in this case # {:users=>[{:name=>"Matz"}]} pick = [:users, 0, :name] data[*pick] # Matz data[:users, 0, :accesses, :else => 0] += 1 # {:users=>[{:name=>"Matz", :accesses=>1}]}
    1. My preference here is biased by the fact that I spend everyday at work building web components, so Svelte's approach feels very familiar to slots in web components.

      first sighting: That <template>/<slot> is part of HTML standard and the reason Svelte uses similar/same syntax is probably because it was trying to make it match / based on that syntax (as they did with other areas of the syntax, some of it even JS/JSX-like, but more leaning towards HTML-like) so that it's familiar and consistent across platforms.

    1. Fires an invalid event at the element

      First time I've seen/heard it said that an event is fired at some target. But it sure makes sense, since it matches how "fire" is used in other senses (like shooting a gun).

    1. var md = require('markdown-it')('commonmark');

      first sighting: require(...)(...)

      How would that work with import? Not as fluidly but...

      import markdownIt from 'markdown-it'
      let md = markdownIt('commonmark')
      
    1. Shogi is a classic game. I know many people who want to play Shogi, but the Kanji on the pieces makes it too hard to master. I have designed this Shogi with icons so anybody can learn it easily.
  27. Feb 2021
    1. URI::MailTo::EMAIL_REGEXP

      First time I've seen someone create a validator by simply matching against URI::MailTo::EMAIL_REGEXP from std lib. More often you see people copying and pasting some really long regex that they don't understand and is probably not loose enough. It's much better, though, to simply reuse a standard one from a library — by reference, rather than copying and pasting!!

    1. Modelling the flow of a program where chunks of code are executed in a certain order, with a successful “happy path” and an “error-out” path is called a Railway. It popped up in functional languages

      first sighting: railway-oriented programming

    1. This is the most popular article “railway oriented programming” on one of the most popular websites of F #.

      I may have seen it before but not really paid attention to it, but this just might be the first time I stopped to look it up.

      Because I saw the code below, didn't recognize the language, and was intrigued.

    1. Some people believed I argued that object orientation is bad simply because extends has problems, as if the two concepts are equivalent. That's certainly not what I thought I said, so let me clarify some meta-issues.

      first sighting: meta-issue 

    1. Launched in 2008, our breakthrough reading app, Reading Eggs, has been used by over 3.4 million users in 169 countries.

      Have Reading Eggs for kids. First time I had learned anything about the company behind it.

      Here: https://hyp.is/G85jmnChEeuRiUMfGc0Brg/github.com/trailblazer/reform

  28. Jan 2021
  29. Dec 2020
    1. Governed under a Temporary Benevolent Dictatorship (TBD)

      first sighting: Temporary Benevolent Dictatorship

    1. My use case is a masonry component that should split up its children into several columns.

      "masonry component"

  30. Nov 2020
    1. But then, I still want to upgrade my dependencies from time to time, in a painless way. I recommend checking Renovate which handles JavaScript and Ruby dependencies auto updating. Use it.
  31. Oct 2020
    1. first sighting: use of superscripts like this

      I like it. Nice and concise and understandable.

      • s¹  critical
      • s²  important
      • s³  nice to have
      • s⁴  low
      • s⁵  inconvenient

      But in other cases, the abbreviation is quite unclear and ambiguity:

      Like, what does "pr" mean in these cases?

      priority? Doubt it.

      • pr¹  chore
      • pr²  docs
      • pr³  feature
      • pr⁴  fix
      • pr⁵  performance
      • pr⁶  refactor
      • pr⁷  style

      Pull Request? Doubt it. But maybe?


      For axes that are quantifiable, like severity, using a number makes sense. But what benefit is there in including a number in these (platform?) labels?:

      • p¹ ⋅ browser
      • p² ⋅ linux
      • p³ ⋅ mac
      • p⁴ ⋅ windows

      I think this would have been better and clearer (in that fewer people would be like huh? and wonder what it means):

      • platform: browser
      • platform: linux
      • platform: mac
      • platform: windows
    1. We could freeze the objects in the model but don't for efficiency. (The benefits of an immutable-equivalent data structure will be documented in vtree or blog post at some point)

      first sighting: "immutable-equivalent data"

  32. Sep 2020
    1. Another problem I ran into was knowing when an element is removed. I had to add a MutationObserver on the current tooltip target so if it gets removed by Svelte while the tooltip is visible (e.g. if a click moves to another route) the tooltip isn't left hanging around on the screen. No mouseleave/mouseout events are dispatched on elements that are removed.

      First sighting: MutationObserver

    1. I think Rich is more interested in pushing for a HTMLx community spec
    2. that feels a lot like directives in Marko: https://markojs.com/docs/syntax/#directives. While Marko did bring some interesting ideas to the table, I find Svelte's approach to be more concise and easier to reason about.