115 Matching Annotations
  1. Oct 2023
  2. Sep 2023
    1. Recent work has revealed several new and significant aspects of the dynamics of theory change. First, statistical information, information about the probabilistic contingencies between events, plays a particularly important role in theory-formation both in science and in childhood. In the last fifteen years we’ve discovered the power of early statistical learning.

      The data of the past is congruent with the current psychological trends that face the education system of today. Developmentalists have charted how children construct and revise intuitive theories. In turn, a variety of theories have developed because of the greater use of statistical information that supports probabilistic contingencies that help to better inform us of causal models and their distinctive cognitive functions. These studies investigate the physical, psychological, and social domains. In the case of intuitive psychology, or "theory of mind," developmentalism has traced a progression from an early understanding of emotion and action to an understanding of intentions and simple aspects of perception, to an understanding of knowledge vs. ignorance, and finally to a representational and then an interpretive theory of mind.

      The mechanisms by which life evolved—from chemical beginnings to cognizing human beings—are central to understanding the psychological basis of learning. We are the product of an evolutionary process and it is the mechanisms inherent in this process that offer the most probable explanations to how we think and learn.

      Bada, & Olusegun, S. (2015). Constructivism Learning Theory : A Paradigm for Teaching and Learning.

  3. Aug 2023
    1. The question is also not about error handling and if the file write fails, exiting with a stack trace is reasonable default behavior because there's not much you can do to recover from that.
  4. Jun 2023
    1. Making a property writable adds an order of magnitude in complexity. In the real world it's definitely not realistic for every class to be immutable, but if most of your classes are, it's remarkably easier to write bug-free code. I had that revelation once and I hope to help others have it.
  5. Apr 2023
    1. In recent git versions, git restore is supposed to be a "better" way to revert undesired local changes than the overloaded checkout. Great, that sounds reasonable - a nice simple purpose-built tool for a common operation.
  6. Nov 2022
    1. This occurs for the child processes, where the entry is still needed to allow the parent process to read its child's exit status: once the exit status is read via the wait system call, the zombie's entry is removed from the process table and it is said to be "reaped".
    1. If you want a queueing system that uses X, use a queuing system that uses X! Sidekiq's mantra is simple and efficient. Redis is both. Abstracting data storage is neither.
  7. Sep 2022
    1. This means that when considering the "unevaluatedProperties": false in the root schema, "wheels" has not been evaluated, so unevaluatedProperties applies to it, and therefore validation fails because the false subschema fails by definition against any instance.
  8. Aug 2022
  9. Apr 2022
    1. Think the mere existence of a file is effectively like writing a require call for them, which is executed on demand (autoload) or upfront (eager load).
    1. the C standard — because that would be tremendously complicated, and tremendously hard to use

      "the C standard [... is] tremendously complicated, and tremendously hard to use [...] full of wrinkles and [...] complex rules"

  10. Mar 2022
  11. Jan 2022
    1. FORBIDDEN: Status code (403) indicating the server understood the request but refused to fulfill it. User/agent known by the server but has insufficient credentials. Repeating request will not work, unless credentials changed, which is very unlikely in a short time span.
    2. There's a problem with 401 Unauthorized, the HTTP status code for authentication errors. And that’s just it: it’s for authentication, not authorization. Receiving a 401 response is the server telling you, “you aren’t authenticated–either not authenticated at all or authenticated incorrectly–but please reauthenticate and try again.” To help you out, it will always include a WWW-Authenticate header that describes how to authenticate.
    3. So, for authorization I use the 403 Forbidden response. It’s permanent, it’s tied to my application logic, and it’s a more concrete response than a 401. Receiving a 403 response is the server telling you, “I’m sorry. I know who you are–I believe who you say you are–but you just don’t have permission to access this resource. Maybe if you ask the system administrator nicely, you’ll get permission. But please don’t bother me again until your predicament changes.”
    4. UNAUTHORIZED: Status code (401) indicating that the request requires authentication, usually this means user needs to be logged-in (session). User/agent unknown by the server. Can repeat with other credentials. NOTE: This is confusing as this should have been named 'unauthenticated' instead of 'unauthorized'.
    5. +----------------------- | RESOURCE EXISTS ? (if private it is often checked AFTER auth check) +----------------------- | | NO | v YES v +----------------------- 404 | IS LOGGED-IN ? (authenticated, aka user session) or +----------------------- 401 | | 403 NO | | YES 3xx v v 401 +----------------------- (404 no reveal) | CAN ACCESS RESOURCE ? (permission, authorized, ...) or +----------------------- redirect | | to login NO | | YES | | v v 403 OK 200, redirect, ... (or 404: no reveal) (or 404: resource does not exist if private) (or 3xx: redirection)
    1. When you initially logon with OAuth2, you will be redirect to Google’s sign-in page,. Once you have signed in, Google issues you a special OAuth2 token which is saved in Thunderbird and can be seen in the same place as passwords. So when you next logon to gmail, it is using that unique OAuth ID instead of password.
  12. Nov 2021
    1. In your Svelte component, you can then use your store with the special $ prefix syntax, to access the value of the store ('cause the temperature variable is a reference to the store itself, it's just a mean to our end, the result we need is the value):
    2. Stores are essentially some kind of simplified streams (or Observable as they're called in ES), that is they represent a value over time.
    3. Stores are the idiomatic Svelte way when you need to import "reactivity" from your normal JS sources.
  13. Sep 2021
    1. Airtable evolves with you and your team, so you can build a solution with increasing sophistication and capability.
  14. Aug 2021
    1. function strictIsDog<T extends Dog extends T ? unknown : never>( // like <T super Dog> candidate: Dog | T // if Dog extends T then Dog | T is T ): candidate is Dog { // compiler recognizes that Dog | T can narrow to T return "bark" in candidate; } if (strictIsDog(animal)) {} // okay if (strictIsDog(dog)) {} // okay if (strictIsDog(mixed)) {} // okay if (strictIsDog(cat)) {} // error! // ~~~ <-- Cat is not assignable to Dog
  15. May 2021
    1. Every time filter-repo is run, files are created in the .git/filter-repo/ directory. These files overwritten unconditionally on every run.
    1. That image only contains 200 pixels horizontally, but the browser stretches it to 400px wide or even farther!Luckily, you’ll see there’s an easy “fix” there at the end: our old good friend the width attribute!<img src="example.gif", srcset="example.gif 200w" sizes="(min-width: 400px) 400px, 100vw" width="200" /* <=== TA-DA! */ class="logo">As long as you can specify the width attribute so it reflects the true maximum size of your largest image, you won’t run into this problem of having sizes make your image wider than it naturally should go.
  16. Apr 2021
    1. It's simple really ... put tests into a shared example that you want multiple things to conform to. Put code into a shared context that you need to include in multiple tests.
    1. Everything about this game is as simple as possible, down to the three main leads, their conversations, and even the plot—it may sound super exciting to go on an expedition under the ruins of a temple to find some ancient advanced machinery; but in reality, the whole thing is like a longer Saturday morning cartoon episode.
    1. # +devise_for+ is meant to play nicely with other routes methods. For example, # by calling +devise_for+ inside a namespace, it automatically nests your devise # controllers: # # namespace :publisher do # devise_for :account # end
  17. Mar 2021
    1. Intuitively, a subcategory of C is a category obtained from C by "removing" some of its objects and arrows.
  18. Feb 2021
    1. Output() in combination with Path() allow very simple modelling for alternive routes.
    1. A Monad wraps a value or a computation with a particular context. A monad must define both a means of wrapping normal values in the context, and a way of combining computations within the context.
    1. Writing the uniqueness validations yourself is easy so I felt it was better to leave this up to the developer
    2. I've been over the use case for form objects in this post on moving away from fat models but wanted to go into more detail on how and why I use them here. I really believe in the utility of these objects; their ability to abstract and isolate logic in a simple and effective manner is unmatched, IMO.
    1. All those names of things - topology, complex analysis, and differential geometry - might not sound like much to you now, but you'll soon learn that they're really just describing the shapes of things in our Universe, and the way those shapes change in time and space are explained by things like calculus and chaos theory.
  19. Jan 2021
  20. Dec 2020
    1. page is a { host, path, params, query } object where host is the URL's host, path is its pathname, params is derived from path and the route filename, and query is an object of values in the query string.

      I like that we don't have to manually parse params/query out of the full request URI. It provides the data that you are most likely to need, in an readily/easily-usable form.

  21. Nov 2020
    1. For example, your application should work offline, but it doesn’t mean that you must set-up a background queue or store your data in a persistent storage – a offline message (e.g. “You’re offline, check your network status.”) is enough.
    1. So let's say we pull down evil/foo which is FROM ubuntu followed by RUN apt-get update except with a small surprise included in the image. Subsequent builds using those same commands will be compromised.
    1. However, this coalescing was very complicated, both in the specification and implementations, due to the dynamism of computed property names for accessors. Coalescing was a big source of overhead (e.g., in terms of code size) in polyfill implementations of "Stage 2" decorators.
    1. This is Sass based, and therefore doesn't require Svelte components

      Just because we could make Svelte wrapper components for each Material typography [thing], doesn't mean we should.

      Compare:

      • material-ui [react] did make wrapper components for typography.

        • But why did they? Is there a technical reason why they couldn't just do what svelte-material-ui did (as in, something technical that Svelte empowers/allows?), or did they just not consider it?
      • svelte-material-ui did not.

        • And they were probably wise to not do so. Just reuse the existing work from the Material team so that there's less work for you to keep in sync and less chance of divergence.
  22. Oct 2020
    1. for (var member in myObject) delete myObject[member]; ...would seem to be pretty effective in cleaning the object in one line of code

      But checking hasOwnProperty is probably better/safer idea:

      for (var prop in obj) { if (obj.hasOwnProperty(prop)) { delete obj[prop]; } }
      
    1. I don't want Svelte to go out of its way to try to catch all these edge cases. It would require lots of fragile heuristics in the compiler. I want a solid compiler I can trust, not something magic but often out of service. I want it the simplest possible.
    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.
    2. A store is simply an object with a subscribe method that allows interested parties to be notified whenever the store value changes. In App.svelte, count is a store, and we're setting count_value in the count.subscribe callback.
    1. Just like elements can have children... <div> <p>I'm a child of the div</p> </div>...so can components. Before a component can accept children, though, it needs to know where to put them. We do this with the <slot> element.
    1. Snarkdown exports a single function, which parses a string of Markdown and returns a String of HTML. Couldn't be simpler.
    1. We get a boilerplate-free API where shared state has the same simple get/set interface as React local state (yet can be encapsulated with reducers etc. if needed).
    1. However, if you want to create a backend API that is meant to be consumed only by your frontend, then you don't need REST nor GraphQL — RPC, such as Wildcard, is enough.
  23. Sep 2020
  24. Jul 2020
    1. "AOO is not, and isn't designed to be, the 'super coolest open source office suite with all the latest bells and whistles,'" Jagielski continued. "Our research shows that a 'basic,' functional office suite, which is streamlined with a 'simple' and uncluttered, uncomplicated UI, serves an incredible under-represented community.
    1. A simplified pricing and packaging (PnP) strategy serves customers in the optimal way per the industry best practice. More SKUs lead to a more complex PnP model as a company scales, which eventually causes huge confusion to customers.
    1. And you see the problem, concerns are so simple that they do not deserve a full guide. Concerns are mixins, if you are a Ruby programmer, you already know what a mixin is and their use case to modularize APIs.
  25. May 2020
  26. www.kickstarter.com www.kickstarter.com
    1. whose personal data you collect and process as “controller” (that is the word that GDPR uses for whoever determines the purposes and means of the processing of personal data).
  27. Apr 2020
    1. The extra “space” from vertical navigation might encourage some designers to go overboard and clutter the navigation menu; as with top, horizontal navigation, stick to only the top four or five links within the site.
    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. Markdown provides shorthand for the most common features of HTML. One of its best features is that you can always fallback to the full syntax for HTML. This includes doing things that aren't included in markdown. Personally, I like that markdown is concise and includes very little fluff. It makes it easier to learn the whole set of shorthand. This is particularly important if you expect someone else to read your code later.

      One of its best features is that you can always [fall back[ to the full syntax for HTML.

      See rebuttal below.

    1. Invert the exit code of a process. Make 0 into 1 and everything else into a 0. An alternative to ! some-command syntax present in some shells.
    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.
    1. Don't use it! Writing simple assertions (and Minitest way of transforming them to expectations) is almost always a better idea anyway. Work with your favourite library authors to start with assertions and add matchers for convenience and not the other way around. Keep it simple.
  28. Mar 2020
    1. First-party cookies are the lifeblood of every website, enabling businesses to remember key pieces of information about users and to collect analytics data. Third-party cookies are the bread and butter of AdTech, allowing publishers to monetize their websites, and brands to run advertising and marketing campaigns.
    1. I discuss the flaws of this in regards to spreadsheets in Spreadsheets Are Sabotaging Your Business. In brief, when people inevitably started using the more complex formulas available, they unknowingly broke the fundamental design concept of paper spreadsheets: that humans can understand what’s happening between the cells.
  29. Dec 2019
    1. You're not going to find many checkboxes, drop-downs, reminders, or date pickers here.

      Thankfully, some clients like https://github.com/QTodoTxt/QTodoTxt2 do have nice features like autocomplete, and date pickers.

  30. Feb 2019
  31. Dec 2018
  32. Oct 2018
  33. Apr 2017
  34. Jan 2016
    1. quickly realized something counterintuitive: Often, it’s the simplest uses of technology that get students to talk, write and create

      This is really interesting. I think this is an important finding because as teachers begin to blend and personalize instruction, keeping it simple will allow for more teachers to engage because it doesn't appear to be daunting and super-sophisticated (and scary).