- Mar 2023
-
stackoverflow.com stackoverflow.com
-
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)'.
-
- Mar 2021
-
en.wikipedia.org en.wikipedia.org
-
Visible spectrum wrapped to join blue and green in an additive mixture of cyan
the rainbow as a continuous (repeating) circle instead of semicircle
-
-
www.jackfranklin.co.uk www.jackfranklin.co.uk
-
Svelte is different in that by default most of your code is only going to run once; a console.log('foo') line in a component will only run when that component is first rendered.
Tags
- opinion
- trying to doing things the same way you did in a different library/framework (learning new way of thinking about something / overcoming habits/patterns/paradigms you are accustomed to)
- turning things around / doing it differently
- difference
- reasonable defaults
- Svelte vs. React
- unfortunate defaults
- opinionated
- important point
Annotators
URL
-
-
en.wikipedia.org en.wikipedia.org
-
Two of the predominant types of relationships in knowledge-representation systems are predication and the universally quantified conditional.
-
- Feb 2021
-
jrsinclair.com jrsinclair.com
-
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.
-
-
www.dictionary.com www.dictionary.com
-
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:
-
-
-
In Ruby 3 we now have a “rightward assignment” operator. This flips the script and lets you write an expression before assigning it to a variable. So instead of x = :y, you can write :y => x
-
-
github.com github.com
-
This probably looks a little different than you're used to. Rails commonly handles this with a before_filter that sets the @account instance variable.
-
-
github.com github.com
-
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.
-
-
softwareengineering.stackexchange.com softwareengineering.stackexchange.com
-
My understanding of "programming to an interface" is different than what the question or the other answers suggest. Which is not to say that my understanding is correct, or that the things in the other answers aren't good ideas, just that they're not what I think of when I hear that term.
-
- Dec 2020
-
github.com github.com
-
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.
-
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.
-
-
www.quora.com www.quora.com
-
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).
-
- Oct 2020
-
stackoverflow.com stackoverflow.com
-
Library author here. I'm always fascinated by new ways people can invalidate my assumptions. I mean that in a sincerely positive way, as it results in learning.
Tags
- not considering all use cases
- assumptions
- learning from others
- can't support everything / all cases
- they've thought of everything
- testing/challenging one's assumptions (either validating or invalidating them)
- invalidating one's assumptions
- surprising
- different way of thinking about something
- author of software answering questions in community (support)
- not:
- sincere
Annotators
URL
-
-
-
This is a philosophical issue, I think. People (and presumably form libraries) have different definitions of what "dirty" means. Yours: "The field has ever been edited" Mine: "The value of the field is different from the initial value"
-
-
docs.google.com docs.google.com
-
But it’s really hard to see, because our human brains struggle to think about this Clock function as something for generating discrete snapshots of a clock, instead of representing a persistent thing that changes over time.
-
-
github.com github.com
-
Svelte doesn't re-render, so you need to respond to component mount/dismount and prop changes separately as they are distinct concepts and never tied together, unlike in React.
Tags
- different way of thinking about something
- trying to doing things the same way you did in a different library/framework (learning new way of thinking about something / overcoming habits/patterns/paradigms you are accustomed to)
- UI library: reacting to prop changes
- distinction
- lifecycle callbacks
Annotators
URL
-
-
medium.com medium.com
-
Sometimes, you may be tempted to write that wrapper. Because all your (React or Vue or insert your reactive framework here) instincts tell you so.Resist the temptation. There is a better way. A svelter way. Introducing: the use-directive (a.k.a. “actions”).
-
However, especially when starting out, it’s very easy to fall into the “this is how I did things in my previous framework” trap.
Tags
- trying to doing things the same way you did in a different library/framework (learning new way of thinking about something / overcoming habits/patterns/paradigms you are accustomed to)
- Svelte
- Svelte: action (use:)
- paradigm shift
- getting a fresh perspective
- different way of thinking about something
- overcoming preconceived opinions
Annotators
URL
-
- Sep 2020
-
docs.google.com docs.google.com
-
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.
-
- Apr 2020
-
stackoverflow.com stackoverflow.com
-
I had never considered it that in nearly a decade of using GNU find! Thank you for that! It will definitely change the way I think about -prune from now on.
-
I think this structure is much easier and correlates to the right approach
-