26 Matching Annotations
  1. Nov 2021
  2. Jul 2021
    1. SvelteKit offers a very elegant solution for this — the load function. The load function can run both on the client and on the server side and in both cases will be executed before the component renders.
    1. You can do this elegantly with throw/catch, like this:
    2. In most languages, there is no clean equivalent for breaking out of a recursive algorithm that uses a recursive function. In Ruby, though, there is!
    1. Bash is a wonderful and terrible language. It can provide extremely elegant solutions to common text processing and system management tasks, but it can also drag you into the depths of convoluted workarounds to accomplish menial jobs.
  3. Apr 2021
  4. Mar 2021
  5. Feb 2021
    1. Adding ends to an activity is a beautiful way to communicate more than two outcomes to the outer world without having to use a state field in the ctx. It also allows wiring those outcomes to different tracks in the container activity.
    1. Monads provide an elegant way of handling errors, exceptions and chaining functions so that the code is much more understandable and has all the error handling, without all the ifs and elses.
    1. It requires an account to update, but the other inputs are optional. If they're missing, it'll ignore those attributes. If they're present, it'll update them.
    1. Universal Links allow you to register a series of domains that are allowed to interact with an installed application. If the application is not installed, the universal link is opened with Safari, allowing you to inform the user of the existence of an application or whatever is necessary.
  6. Nov 2020
  7. Oct 2020
    1. Personally, I rather like the idea of typing into a field, backspacing to undo what you just typed, and having the field (and form) go back to being pristine. Aside from that aesthetic difference, my definition has the practical implication that it lets you know if you need to save the record or not.
    2. And I'm all for not adding a gazillion flags to to an elegant library.
    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. But this is starting to become rather verbose at what could be a much simpler and more elegant solution if only there were another template helper that could do variable assignment.
  8. Jul 2020
  9. Dec 2019
  10. Nov 2019