115 Matching Annotations
  1. Apr 2021
    1. There's nothing to stop you from doing initializer code in a file that lives in app/models. for example class MyClass def self.run_me_when_the_class_is_loaded end end MyClass.run_me_when_the_class_is_loaded MyClass.run_me... will run when the class is loaded .... which is what we want, right? Not sure if its the Rails way.... but its extremely straightforward, and does not depend on the shifting winds of Rails.

      does not depend on the shifting winds of Rails.

    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.
    2. shared_contexts is any setup code that you can use to prepare a test case . This allows you to include test helper methods or prepare for the tests to run.
    1. This approach is preferable to overriding authenticate_user! in your controller because it won't clobber a lot of "behind the scenes" stuff Devise does (such as storing the attempted URL so the user can be redirected after successful sign in).
  2. Mar 2021
  3. Feb 2021
    1. value returned from #execute

      Why not follow Ruby Proc convention of calling it call?

      execute seems like a synonym for call, so given these 2 equivalent options, it seems better to prefer the one more idiomatic in Ruby.

    2. By convention, we call this an outcome
    3. Call .run on your interaction to execute it.

      Why not follow Ruby Proc convention of calling it call?

      run seems like a synonym for call, so given these 2 equivalent options, it seems better to prefer the one more idiomatic in Ruby.

  4. Dec 2020
  5. Nov 2020
    1. The Object.getPrototypeOf() method returns the prototype (i.e. the value of the internal [[Prototype]] property) of the specified object.

      internal: [[Prototype]]

      Other times we see something used to indicate it is internal. In fact, this even supersedes proto__. So why did they use a different naming convention? Did they decide [[ ]] is a better naming convention?

    1. I like to keep the ‘verb’ + ‘noun’ structure when writing button labels — this makes the action more prescriptive, e.g. ‘Save post’, ‘Next step’, etc, as opposed to ‘Save’, ‘Next’
    1. Some of the verbs implemented by systemctl are designed to provide a high-level overview in a human readable format. All that information is available over dbus, and/or journalctl, systemctl show. We could provide that information in json format, but there's a second problem. Information and format of information printed by e.g. systemctl status is not stable. Since the output is not suitable for programmatic consumption anyway, there's no need to provide it in a machine readable format.
    2. Although I agree that -o json should return proper JSON, believe the proper way for external tools like SaltStack etc. to talk to systemd is DBus. See also saltstack/salt#20392 - everything else is more or less just hack-ish and prone to break easily.
  6. Oct 2020
    1. The concept of Convention over Configuration is impossible without sensible default values. The key word here is "sensible". The default values have to make sense for at least 80% (if not more) of all the uses of a library/service/framework.
  7. Sep 2020
    1. The problem I have with this approach to state and prop variables is that the difference between them is very blurry. In React you can clearly see that a prop is an input to component (because of clear function notation), and that state is something internal. In Svelte they are both just variables, with the exception that props use export keyword.

      This is something I've seen before: people noticing that Svelte is missing some kind of naming convention.

      React has use___ convention, for example. Without that, it makes it hard to see the difference between and know just from the name that a function is an (mentioned in the other article I read) action and not a event handler or even component, for example.

    1. If you want this control then wrap them in a DOM node that the parent controls. If you want to pass in values then use props and if you want to pass in values from higher up the tree, the new style RFC may be able to help.
    1. Passing the class prop to the root dom element is already a wide spread practice
    2. It's a convention in Svelte to export { className as class } inspired from docs, but it's certainly not required by the compiler, so I don't think the class:directive can/should be assumed here.
    3. Or if we formally took a stance that the class prop is THE ordained way to pass class attributes, though I don't think this functionality warrants this restriction.
    4. On the one hand, it's an unofficial but widely-used practice to do let classNames=''; export { classNames as class }; in components and then apply that class on the top-level DOM element in the component. On the other hand, there are plenty of components out there that don't use this idiom
    1. There are tools in Svelte that break this expectation to a degree, but they are a bit annoying to use, which makes it an active decision on the part of the developer. The API hints at the way we want you to do things because we feel that this will give the better experience.
    2. Most of the linked issues, as well as this RFC, attempt to solve this problem by relaxing Svelte's CSS scoping rules, providing a better API with which to use global, or by manually passing down classes. We have never found this to be an acceptable solution which is why those issues have been closed. That position has not changed.
    3. The above doesn't work for another unfortunate reason, it's not possible to write export let class = ''; instead CustomComponent because class is a reserved keyword and isn't allowed to be used as a variable name. The workaround would have to be to use some other prop name like maybe cssClass but then there's no "standard" by which all Svelte components can follow and every library will choose a different name which is cumbersome for users, because it creates scenarios like:
  8. Jul 2020
    1. Also, since MS uses Canary/Dev/Beta, Beta has a concrete meaning and using that name to describe Dev would be misleading at best.
    1. A # character always indicates a block opening tag. A / character always indicates a block closing tag. A : character, as in {:else}, indicates a block continuation tag.
    1. Also notice that the component name Nested is capitalised. This convention has been adopted to allow us to differentiate between user-defined components and regular HTML tags.
  9. Jun 2020
    1. Heat and work have signs (positive or negative), and the sign of each depends on whether the system we are considering is gaining or losing energy. In this class, if a process makes the system gain energy, qqq and/or www are positive; if the process makes the system lose energy, qqq and/or www are negative. We can put this information into four formal statements: If heat flows into a system, qqq is positive. If heat flows out of a system, qqq is negative If the surroundings do work on the system, www is positive. If the system does work, www is negative.

      Heat and work have signs (positive or negative), and the sign of each depends on whether the system we are considering is gaining or losing energy. In this class, if a process makes the system gain energy, q and/or w are positive; if the process makes the system lose energy, q and/or w are negative. We can put this information into four formal statements:

      • If heat flows into a system, q is positive.
      • If heat flows out of a system, q is negative
      • If the surroundings do work on the system, w is positive.
      • If the system does work, w is negative.
    1. Discussion along these lines continued after the panel itself, as a few of the attendees convinced me to head out to dinner rather than straight up to bed (thanks for that, it was the first real meal of the day)

      I know that this is supposed to be funny commentary on the chaos on conventions, and I understand, having experienced some of that same craziness during my time at FanimeCon.

      But it's as good of an illustration as any on a negative perception of the furry fandom, the inability of its members to take care of themselves. While this isn't as much a widespread ideal as a minor detail, there's a stereotype around furries as being unwashed, non deodorised, and messy. Take, for example, the idea that people have sex in their fursuits. See this comic involving Grey White, which contain a slight, non-graphic sexual allusion, so click at your own discretion. I'd rather not go into the details, as this research project does not deal with the sexual side of the furry fandom, but I feel as if it is necessary to at least address that specific prevailing concern about the fandom. There is some truth to the above statements, amongst specific members of the furry fandom, and of the science fiction conventions and community which preceded and spawned the "furry fandom" as we know it today. I don't think I need to tell anyone that nerds can smell like shit at times, and it's a concerning pattern. Does this stem from social awkwardness, lack of care, the escapism qualities.

      (I need to come back to this later, as I kind of lost my train of thought)

    1. Is it “syncthing”, “Syncthing” or “SyncThing”?¶ It’s Syncthing, although the command and source repository is spelled syncthing so it may be referred to in that way as well. It’s definitely not SyncThing, even though the abbreviation st is used in some circumstances and file names.
  10. May 2020
    1. To follow conventions of naming across GitLab, and to further move away from the build term and toward job, some CI/CD environment variables were renamed for GitLab 9.0 release.
  11. Apr 2020
    1. If you really want to configure hundreds of ESLint rules individually, you can always use eslint directly with eslint-config-standard to layer your changes on top. standard-eject can help you migrate from standard to eslint and eslint-config-standard.
  12. Mar 2020
    1. 27$/year

      They spell it "27$/year" instead of "$27/year". I love it that they bucked the useless convention of putting $ sign first and did it the way that makes more sense. We've all had that thought, why do we say it "27 dollars" but write it, "dollars 27". It just doesn't make sense.

    1. On rare occasion two or more methods can be very tightly related. In these cases the methods can all go in a single file under the name of the method considered most significant. Usually files for the other methods should still be created that simply require the main file.
  13. Jan 2020
    1. chart the index finger as the 2nd finger, middle finger as the 3rd, ring finger as the 4th, and pinky as the 5th finger
  14. Dec 2019
  15. Nov 2019
    1. The idea is that the additional prefix _ of a Null Component symbolizes that it adds even less to the DOM than an Injector. I picture the name falling through to become just the _, like the unused argument convention in javascript functions: const handleEvent = (_, id) => { console.log(id) } .
  16. Sep 2019
  17. Dec 2017
  18. Jul 2016
    1. And then there’s Donald Trump.

      It was here that in delivery, after the crowd booed at the first mention of the GOP nominee, that Obama ad-libbed one the best lines of the convention: "Don't boo, vote!"

      Given the jeers from "Bernie or Bust" delegates over the first few days of the convention, it was hard not to read the line as a broader rebuke to those who might sit this one out.

    2. or jihadists or homegrown demagogues

      This is a powerful line (read: burn), basically lumping together Trump--the homegrown demogogue--and terrorists.

  19. May 2016
    1. hyp.is

      The shortened URL might look safer with "via." added as in its fully expanded address bar form. To look less like a phishing attempt, to indicate that the second "URL" in the entire link gets included via hyp.is.

  20. Apr 2016
  21. Jan 2016
    1. convention collective nationale Judicial branch: Supreme Court of Appeals or Cour de Cassation, judges are appointed by the president from nominations of the High Council of the Judiciary; Constitutional Council or Conseil Constitutionnel, three members appointed by the president, three members appointed by the president of the National Assembly, and three appointed by the president of the Senate; Council of State or Conseil d'Etat.

  22. Nov 2013
    1. schema

      definition: • (in Kantian philosophy) a conception of what is common to all members of a class; a general or essential type or form.

    2. The venerability, reliability, and utility of truth is something which a person demonstrates for himself from the contrast with the liar, whom no one trusts and everyone excludes.

      The idea that truth exists only in contrast to its opposite, with no fundamental autonomous, self-determining, independent, or sovereign foundation.

    3. Thus, to express it morally, this is the duty to lie according to a fixed convention, to lie with the herd and in a manner binding upon everyone.

      The duty to lie.

    4. He is indifferent toward pure knowledge which has no consequences; toward those truths which are possibly harmful and destructive he is even hostilely inclined.

      Whatever is beyond convention, beyond rhetoric, is generally deemed impertinent as it is of no consequence within the conventional/current paradigm.

    5. If he does this in a selfish and moreover harmful manner, society will cease to trust him and will thereby exclude him.

      social contract: convention

    6. This peace treaty brings in its wake something which appears to be the first step toward acquiring that puzzling truth drive: to wit, that which shall count as "truth" from now on is established.

      Not actual truth, but a contraction of that which is generally accepted as the place of balance between good and evil, right and wrong, etc., yet is in fact, fluid and contextually based, evolving with human/societal values. convention.

  23. Sep 2013
    1. Convention and natur

      convention vs. nature

    2. For the truth is, Socrates, that you, who pretend to be engaged in the pursuit of truth, are appealing now to the popular and vulgar notions of right, which are not natural, but only conventional

      Right and wrong are convention