22 Matching Annotations
  1. Mar 2023
    1. When you call 'foo' in Ruby, what you're actually doing is sending a message to its owner: "please call your method 'foo'". You just can't get a direct hold on functions in Ruby in the way you can in Python; they're slippery and elusive. You can only see them as though shadows on a cave wall; you can only reference them through strings/symbols that happen to be their name. Try and think of every method call 'object.foo(args)' you do in Ruby as the equivalent of this in Python: 'object.getattribute('foo')(args)'.
  2. Mar 2021
    1. Visible spectrum wrapped to join blue and green in an additive mixture of cyan

      the rainbow as a continuous (repeating) circle instead of semicircle

  3. Feb 2021
    1. And a word of warning. If you haven’t come across things like monads before, they might seem really… different. Working with tools like these takes a mind shift. And that can be hard work to start with.
    1. a framework containing the basic assumptions, ways of thinking, and methodology that are commonly accepted by members of a scientific community. such a cognitive framework shared by members of any discipline or group:
    1. class FormsController < ApplicationController class SearchForm < ActiveModel::Form

      I kind of like how they put the form class nested directly inside the controller, although I would probably put it in its own file myself, unless it was quite trivial.

  4. Dec 2020
    1. It's true that Svelte does not allow you to map over children like React, but its slot API and <svelte:component> provide similarly powerful composition. You can pass component constructors as props and instantiate them with <svelte:component>, and use slots and their let bindings for higher order composition. It sounds like you're thinking in virtual DOM idioms instead of Svelte's.
    2. However, Svelte isn't React or Vue or any other framework, the same approach will not always work and given that Svelte has very different constraints and approach that works well in another framework is not suitable with Svelte. Trying to apply approaches use with other frameworks to Svelte will invariably end in frustration.
    1. Each area requires specific learning and thinking in a certain way. Front-end is user centric, back-end is closer to algorithms and parallel programming, databases require thinking in streams of data based on a model (similar to set theory and model checking).
  5. Oct 2020
  6. Sep 2020
    1. I’ve seen some version of this conversation happen more times than I can remember. And someone will always say ‘it’s because you’re too used to thinking in the old way, you just need to start thinking in hooks’.

      But after seeing a lot of really bad hooks code, I’m starting to think it’s not that simple — that there’s something deeper going on.

  7. Apr 2020