6,378 Matching Annotations
  1. Nov 2020
    1. will only apply up the chain

      Should this "up the chain" be "down the chain"?

      In terms of a tree, I think of the caller/consumer/thing that imports this file as "up" and the things that I call/import as "down".

      That is more consistent with a tree, but not a stack trace (or any stack), I suppose, which has most recently called thing at the top ("up"), and the consumer of that at the bottom ("down").

    1. When you do import '../scss/application.scss', you're telling webpack to include application.scss in the build. This does not mean it's going to be compiled into your javascript, only that webpack now compiles and knows how to load this file.

      Not necessarily the case that importing something into a JS file means the thing being imported is also JS.

    Tags

    Annotators

    1. When you’re implementing a bad plan yourself, instead of having a mentor bail you out by fixing it, a few really useful things happen:You learn many more details about why it was a bad idea. If someone else tells you your plan is bad, they’ll probably list the top two or three reasons. By actually following through, you’ll also get to learn reasons 4–1,217.You spend about 100x more time thinking about how you’ll avoid ever making that type of mistake again, i.e., digesting what you’ve learned and integrating it into your overall decision-making.By watching my mistakes and successes play out well or badly over the course of months, I was able to build much more detailed, precise models about what does and doesn’t matter for long-term codebase health. Eventually, that let me make architectural decisions with much more conviction.

      There's a benefit to embarking on a challenge without a more experienced authority to bail you out.

      • You learn many more details about why it's a bad idea.
      • The lessons you learn in terms of how to avoid the mistakes you made stick with you longer

      (I would add that the experience is more visceral, it activates more modalities in your brain, and you remember it much more clearly.)

      These types of experiences result in what the author calls more "detailed, precise models". For me they result in a sort of intuition.

  2. Oct 2020
    1. Retagging the HTML/CSS questions to use html-heading seems the right thing to do. For the other uses, I don't have enough grounding in the geographic area to know whether the direction and bearing are replacements for heading. But the tag information for heading should be created and should firmly point at the other tags — at least until it is expunged.
    1. I really dont need a solution to this problem! I can find many workararounds

      Actually, the answer that was given was a good answer, as it pointed to the problem: It was a reminder that you need to:

      assign to a locally declared variable.

      So I'm not sure the answer was intended to "just" be a solution/workaround, but to help correct or fill in the misunderstanding / forgotten piece of the puzzle to help OP realize why it wasn't working, and realize how reactivity is designed to work (based on assignments).

      It was a very simplified answer, but it was meant to point in the right direction.

      Indeed, it pointed to this main point that was explained in more detail by @rixo later:

      Personally, this also totally aligns with my expectations because in your function fruit can come from anywhere and be anything:

    1. Description: The authors discuss the usage of blogs in political science classrooms at a university level. There are five skills (critical thinking, political awareness, background research, essay writing, and reflection) which are improved through the use of blogging and the article dedicates a segment to each skill. The last section of the article discusses two types of blogging students can attempt: response to news clippings or experiential blogging. The first kind is available to all students and requires learners to find and respond to news articles. The second is more reflective of a current opportunity students might have such as studying abroad or an internship.

      Rating: 7/10

      Reason for the rating: The article gives detailed explanations for the impact blogging has on student achievement. It gives examples of each type of blogging to help the reader fully understand the writers ideas. Yet, the article focuses only on political science students while blogs-- and four out of the five skills mentioned above-- can be applies to the majority of university classes.

    1. Yeah I see what you're saying. In my case, I had a group of classes that relied on each other but they were all part of one conceptual "module" so I made a new file that imports and exposes all of them. In that new file I put the imports in the right order and made sure no code accesses the classes except through the new interface.
    1. Doing so also means adding empty import statements to guarantee correct order of evaluation of modules (in ES modules, evaluation order is determined statically by the order of import declarations, whereas in CommonJS – and environments that simulate CommonJS by shipping a module loader, i.e. Browserify and Webpack – evaluation order is determined at runtime by the order in which require statements are encountered).

      Here: dynamic loading (libraries/functions) meaning: at run time

    2. Specifically, since Root, Rule and AtRule all extend Container, it's essential that Container is evaluated (and therefore, in the context of a Rollup bundle, included) first. In order to do this, input.js (which is the 'gateway' to all the PostCSS stuff) must import root.js, root.js must import rule.js before it imports container.js, and rule.js must import at-rule.js before it imports container.js. Having those imports ensures that container.js doesn't then try to place Root, Rule or AtRule ahead of itself in the bundle.
    1.                                         “Ajax, one of the gods dwelling on Olympus, in a prophet’s shape, tells us both to fight on by the ships. For that man was no prophet Calchas,                                                [70] who reads our omens. It was easy for me, as he went away, to see that from the back                                 80 by the markings on his feet and legs. Besides, it’s easy to recognize the gods.

      Recognition of the gods can be connected to an earlier comment that I made about what form they appear in. Here it seems the "voice" of Poseidon comes from within rather than taking on a physical form. Poseidon chooses to speak through Calchas who can see signs of the gods through birds. Birds are referenced in the paragraph before which is an interesting correlation (between Poseidon and Calchas) as well as a shout out to Calchas and all his bird wisdom.

    1. It seems like a waste of money to hire an actor to play the “algorithm guy” when there are actual algorithm creators being interviewed in the film.

      It does seem like they're trying to normalize themselves and divert from the facts of what they have personally done. Imagine if Adolf Hitler, Joseph Goebbels, Heinrich Himmler, and Hermann Göring were able to do the same? And the state of the art of their propaganda was nothing in comparison.

    1. How are ponyfills better than polyfills? A polyfill is code that adds missing functionality by monkey patching an API. Unfortunately, it usually globally patches built-ins, which affects all code running in the environment. This is especially problematic when a polyfill is not fully spec compliant (which in some cases is impossible), as it could cause very hard to debug bugs and inconsistencies. Or when the spec for a new feature changes and your code depends on behavior that a module somewhere else in the dependency tree polyfills differently. In general, you should not modify API's you don't own.
    1. I'm okay with an overall design that allows people to plugin the parts they need in order to be able to generically support a compile-to-javascript language, but to bake in support for one singular solution because its popular is simply bad engineering.
    2. One of the primary tasks of engineers is to minimize complexity. JSX changes such a fundamental part (syntax and semantics of the language) that the complexity bubbles up to everything it touches. Pretty much every pipeline tool I've had to work with has become far more complex than necessary because of JSX. It affects AST parsers, it affects linters, it affects code coverage, it affects build systems. That tons and tons of additional code that I now need to wade through and mentally parse and ignore whenever I need to debug or want to contribute to a library that adds JSX support.
    3. 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. 

    Tags

    Annotators

    URL

    1. trusktr herman willems • 2 years ago Haha. Maybe React should focus on a template-string syntax and follow standards (and provide options for pre-compiling in Webpack, etc).

      Well anywho, there's other projects now like hyperHTML, lit-html, etc, plus some really fast ones: https://www.stefankrause.ne...

      React seems a little old now (and the new Hooks API is also resource heavy).

      • Share ›  Michael Calkins trusktr • 4 years ago • edited That's a micro optimization. There isn't a big enough difference to matter unless you are building a game or something extraordinarily odd.

      • Share › −  trusktr Michael Calkins • 2 years ago True, it matters if you're re-rendering the template at 60fps (f.e. for animations, or for games). If you're just changing views one time (f.e. a URL route change), then 100ms won't hurt at all.

    1. This is valid javascript! Or harmony or es6 or whatever, but importantly, it's not happening outside the js environment. This also allows us to use our standard tooling: the traceur compiler knows how to turn jsx`<div>Hello</div>`; into the equivalent browser compatible es3, and hence we can use anything the traceur compile accepts!
    1. This is a very dangerous practice as each optimization means making assumptions. If you are compressing an image you make an assumption that some payload can be cut out without seriously affecting the quality, if you are adding a cache to your backend you assume that the API will return same results. A correct assumption allows you to spare resources. A false assumption introduces a bug in your app. That’s why optimizations should be done consciously.
  3. mdxjs.com mdxjs.com
    1. Description: This text describes adult learning theories best used in a workforce training. It describes the environmental factors which lead to success in an adult student (such as a positive atmosphere) as well as techniques like heterogeneous learning groups. It attempts to persuade the reader to address the personal needs of each student while still moving the class towards the trainings goal. As a whole, this article covers the basics of what trainers need to know when teaching adults in a workface setting.

      Rating: 6/10

      Reason for rating: This article is very quick and direct. It discusses each technique, skill, or factor with examples and reasoning for the suggestions. Each suggestion is well-thought out and logical. Yet, the article cites few other texts which discredits it a little. The article was found through JSTOR which only sources peer-reviewed texts.

    1. it also allows for more divergence in how people write there code and where they put their logic, making different svelte codebases potentially even more different due to fewer constraints. This last point is actually something I really value, I read a lot of Svelte code by a lot of different people and broadly speaking things look the same and are in the same places.
    1. I'm suggesting there should be a way to write lifecycle related code that also responds to changing props, like how useEffect works. I think how React handles this could be a good source of inspiration.
    2. 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.
    1. Meanwhile, politicians from the two major political parties have been hammering these companies, albeit for completely different reasons. Some have been complaining about how these platforms have potentially allowed for foreign interference in our elections.3 3. A Conversation with Mark Warner: Russia, Facebook and the Trump Campaign, Radio IQ|WVTF Music (Apr. 6, 2018), https://www.wvtf.org/post/conversation-mark-warner-russia-facebook-and-trump-campaign#stream/0 (statement of Sen. Mark Warner (D-Va.): “I first called out Facebook and some of the social media platforms in December of 2016. For the first six months, the companies just kind of blew off these allegations, but these proved to be true; that Russia used their social media platforms with fake accounts to spread false information, they paid for political advertising on their platforms. Facebook says those tactics are no longer allowed—that they've kicked this firm off their site, but I think they've got a lot of explaining to do.”). Others have complained about how they’ve been used to spread disinformation and propaganda.4 4. Nicholas Confessore & Matthew Rosenberg, Facebook Fallout Ruptures Democrats’ Longtime Alliance with Silicon Valley, N.Y. Times (Nov. 17, 2018), https://www.nytimes.com/2018/11/17/technology/facebook-democrats-congress.html (referencing statement by Sen. Jon Tester (D-Mont.): “Mr. Tester, the departing chief of the Senate Democrats’ campaign arm, looked at social media companies like Facebook and saw propaganda platforms that could cost his party the 2018 elections, according to two congressional aides. If Russian agents mounted a disinformation campaign like the one that had just helped elect Mr. Trump, he told Mr. Schumer, ‘we will lose every seat.’”). Some have charged that the platforms are just too powerful.5 5. Julia Carrie Wong, #Breaking Up Big Tech: Elizabeth Warren Says Facebook Just Proved Her Point, The Guardian (Mar. 11, 2019), https://www.theguardian.com/us-news/2019/mar/11/elizabeth-warren-facebook-ads-break-up-big-tech (statement of Sen. Elizabeth Warren (D-Mass.)) (“Curious why I think FB has too much power? Let's start with their ability to shut down a debate over whether FB has too much power. Thanks for restoring my posts. But I want a social media marketplace that isn't dominated by a single censor. #BreakUpBigTech.”). Others have called attention to inappropriate account and content takedowns,6 6. Jessica Guynn, Ted Cruz Threatens to Regulate Facebook, Google and Twitter Over Charges of Anti-Conservative Bias, USA Today (Apr. 10, 2019), https://www.usatoday.com/story/news/2019/04/10/ted-cruz-threatens-regulate-facebook-twitter-over-alleged-bias/3423095002/ (statement of Sen. Ted Cruz (R-Tex.)) (“What makes the threat of political censorship so problematic is the lack of transparency, the invisibility, the ability for a handful of giant tech companies to decide if a particular speaker is disfavored.”). while some have argued that the attempts to moderate discriminate against certain political viewpoints.

      Most of these problems can all fall under the subheading of the problems that result when social media platforms algorithmically push or accelerate content on their platforms. An individual with an extreme view can publish a piece of vile or disruptive content and because it's inflammatory the silos promote it which provides even more eyeballs and the acceleration becomes a positive feedback loop. As a result the social silo benefits from engagement for advertising purposes, but the community and the commons are irreparably harmed.

      If this one piece were removed, then the commons would be much healthier, fringe ideas and abuse that are abhorrent to most would be removed, and the broader democratic views of the "masses" (good or bad) would prevail. Without the algorithmic push of fringe ideas, that sort of content would be marginalized in the same way we want our inane content like this morning's coffee or today's lunch marginalized.

      To analogize it, we've provided social media machine guns to the most vile and fringe members of our society and the social platforms are helping them drag the rest of us down.

      If all ideas and content were provided the same linear, non-promotion we would all be much better off, and we wouldn't have the need for as much human curation.

    1. I just wrote a long, considered, friendly, and I hope helpful comment here but -- sorry, I have to see the irony in this once again -- your system wouldn't let me say anything longer tahn 1,500 characters. If you want more intelligent conversations, you might want to expand past soundbite.

      In 2008, even before Twitter had become a thing at 180 characters, here's a great reason that people should be posting their commentary on their own blogs.

      This example from 2008 is particularly rich as you'll find examples on this page of Derek Powazek and Jeff Jarvis posting comments with links to much richer content and commentary on their own websites.

      We're a decade+ on and we still haven't managed to improve on this problem. In fact, we may have actually made it worse.

      I'd love to see On the Media revisit this idea. (Of course their site doesn't have comments at all anymore either.)

    1. Conservatives have fought for schools to promote patriotism, highlight the influence of Christianity and celebrate the founding fathers. In a September speech, President Trump warned against a “radical left” that wants to “erase American history, crush religious liberty, indoctrinate our students with left-wing ideology.”

      I can't help but think here about a recent "On The Media" episode A Civilization As Great As Ours which highlighted changes in how history is taught in India. This issue obviously isn't just relegated to populist India.

    1. Put another way, many tools for thought are public goods. They often cost a lot to develop initially, but it’s easy for others to duplicate and improve on them, free riding on the initial investment. While such duplication and improvement is good for our society as a whole, it’s bad for the companies that make that initial investment. And so such tools for thought suffer the fate of many public goods: our society collectively underinvests in them, relative to the benefits they provide
  4. Sep 2020
    1. let:hovering={active}

      It seems like it should be the other way around:

      let:active={hovering}
      

      to make it look like a regular let assignment.

      It's only when you consider what/how let:hovering on its own means/works that it makes a bit more sense that it is the way it is. When it's on its own, it's a little clearer that it's saying to "make use of" an available slot prop having the given name. (Very much like bind, where the LHS is also the name of the prop we're getting the data from.) Obviously we have to identify which prop we're wanting to use/pull data from, so that seems like the most essential/main/only thing the name could be referring to. (Of course, as a shortcut (in this shorthand version), and for consistency, it also names the local variable with the same name, but it wouldn't have to.)

      Another even simpler way to remember / look at it:

      1. Everything on the left hand of an prop/attribute [arg] corresponds to something in the component/element that you're passing the [arg] to. Usually it's a prop that you're passing in, but in this case (and in the case of bind:) it's more like a prop that you're pulling out of that component, and attaching to. Either way, the name on the LHS always corresponds to an export let inside that named component.
      2. Everything on the right side corresponds to a name/variable in the local scope. Usually it passes the value of that variable, but in the case of a let: or bind: it actually "passes the variable by reference" (not the value) and associates that local variable with the LHS (the "remote" side).

      Another example is bind: You're actually binding the RHS to the value of the exported prop named on the LHS, but when you read it (until you get used to it?) it can look like it's saying bind a variable named LHS to the prop on the RHS.

    1. Why do we use bundlers again?Historically, bundlers have been used in order to support CommonJS files in the browser, by concatenating them all into a single file. Bundlers detected usages of require() and module.exports and wrap them all with a lightweight CommonJS runtime. Other benefits were allowing you to serve your app as a single file, rather than having the user download several scripts which can be more time consuming.
    1. Svelte will not offer a generic way to support style customizing via contextual class overrides (as we'd do it in plain HTML). Instead we'll invent something new that is entirely different. If a child component is provided and does not anticipate some contextual usage scenario (style wise) you'd need to copy it or hack around that via :global hacks.
    2. The main rationale for this PR is that, in my hones opinion, Svelte needs a way to support style overrides in an intuitive and close to plain HTML/CSS way. What I regard as intuitive is: Looking at how customizing of styles is being done when applying a typical CSS component framework, and making that possible with Svelte.
    3. Explicit interfaces are preferable, even if it places greater demand on library authors to design both their components and their style interfaces with these things in mind.
    1. The point of the feature is to not rely on the third-party author of the child component to add a prop for every action under the sun. Rather, they could just mark a recipient for actions on the component (assuming there is a viable target element), and then consumers of the library could extend the component using whatever actions they desire.
    2. I think Svelte's approach where it replaces component instances with the component markup is vastly superior to Angular and the other frameworks. It gives the developer more control over what the DOM structure looks like at runtime—which means better performance and fewer CSS headaches, and also allows the developer to create very powerful recursive components.
    1. The more I think about this, the more I think that maybe React already has the right solution to this particular issue, and we're tying ourselves in knots trying to avoid unnecessary re-rendering. Basically, this JSX... <Foo {...a} b={1} {...c} d={2}/> ...translates to this JS: React.createElement(Foo, _extends({}, a, { b: 1 }, c, { d: 2 })); If we did the same thing (i.e. bail out of the optimisation allowed by knowing the attribute names ahead of time), our lives would get a lot simpler, and the performance characteristics would be pretty similar in all but somewhat contrived scenarios, I think. (It'll still be faster than React, anyway!)
    1. The value of dotAll is a Boolean and true if the "s" flag was used; otherwise, false. The "s" flag indicates that the dot special character (".") should additionally match the following line terminator ("newline") characters in a string, which it would not match otherwise: U+000A LINE FEED (LF) ("\n") U+000D CARRIAGE RETURN (CR) ("\r") U+2028 LINE SEPARATOR U+2029 PARAGRAPH SEPARATOR This effectively means the dot will match any character on the Unicode Basic Multilingual Plane (BMP). To allow it to match astral characters, the "u" (unicode) flag should be used. Using both flags in conjunction allows the dot to match any Unicode character, without exceptions.
    1. Your knowledge of her character dates from a day or two since. My knowledge of her character dates from the beginning of her life. State your suspicion of her as strongly as you please–it is impossible that you can offend me by doing so. I am sure, beforehand, that (with all your experience) the circumstances have fatally misled you in this case. Mind! I am in possession of no private information. I am as absolutely shut out of my daughter’s confidence as you are. My one reason for speaking positively, is the reason you have heard already. I know my child.”

      Is it not possible that Rachel read the will, that proposed the diamond be sent away and chopped up into little pieces? Is it not possible that being possessed by the diamond, she decided to protect it? Why have the other characters not noticed this? Am I missing something?

    1. when choosing community building activities that ask students to disclose information about themselves, and especially about how they are feeling, it is important to recognise the risk of unintended harm.

      Most faculty in a teaching setting chooses to do certain activities that can make a student very uncomfortable. In high school my teachers would do "icebreakers" and I would hate them because that meant I would have to talk in front of people and sometimes the topic would be a little too personal.

    1. They might even hate each other; the creature who already lived loathed his own deformity, and might he not conceive a greater abhorrence for it when it came before his eyes in the female form? She also might turn with disgust from him to the superior beauty of man; she might quit him, and he be again alone, exasperated by the fresh provocation of being deserted by one of his own species.

      A lot of misogyny is radiating from these lines. Victor is implying that his female creation might be so ugly that even his male creation will be offended by her existence one he sees her. But on the other hand, what if his creation isn't her type and just abandon's him? It's interesting to see how much thought Victor puts in when it comes to making a female creation...I thought he was trying to create a new species?

    1. Nic Fildes in London and Javier Espinoza in Brussels April 8 2020 Jump to comments section Print this page Be the first to know about every new Coronavirus story Get instant email alerts When the World Health Organization launched a 2007 initiative to eliminate malaria on Zanzibar, it turned to an unusual source to track the spread of the disease between the island and mainland Africa: mobile phones sold by Tanzania’s telecoms groups including Vodafone, the UK mobile operator.Working together with researchers at Southampton university, Vodafone began compiling sets of location data from mobile phones in the areas where cases of the disease had been recorded. Mapping how populations move between locations has proved invaluable in tracking and responding to epidemics. The Zanzibar project has been replicated by academics across the continent to monitor other deadly diseases, including Ebola in west Africa.“Diseases don’t respect national borders,” says Andy Tatem, an epidemiologist at Southampton who has worked with Vodafone in Africa. “Understanding how diseases and pathogens flow through populations using mobile phone data is vital.”
      the best way to track the spread of the pandemic is to use heatmaps built on data of multiple phones which, if overlaid with medical data, can predict how the virus will spread and determine whether government measures are working.