43 Matching Annotations
  1. Nov 2022
    1. Post.in_order_of(:type, %w[Draft Published Archived]).order(:created_at).pluck(:name) which generates SELECT posts.name FROM posts ORDER BY CASE posts.type WHEN 'Draft' THEN 1 WHEN 'Published' THEN 2 WHEN 'Archived' THEN 3 ELSE 4 END ASC, posts.created_at ASC
  2. Oct 2022
    1. The most important thing about research is to know when to stop.How does one recognize the moment? When I was eighteen orthereabouts, my mother told me that when out with a young man Ishould always leave a half-hour before I wanted to. Although I wasnot sure how this might be accomplished, I recognized the advice assound, and exactly the same rule applies to research. One must stopbefore one has finished; otherwise, one will never stop and neverfinish.

      Barbara Tuchman analogized stopping one's research to going out on a date: one should leave off a half-hour before you really want to.

      Liink to: This sounds suspiciously like advice about when to start writing, but slightly in reverse: https://hypothes.is/a/WeoX9DUOEe2-HxsJf2P8vw

      One might also liken these processes to the idea of divergence and convergence as described by Tiago Forte and others.

  3. Sep 2022
    1. I took along my son, who had never had any fresh water up his nose and who had seen lily pads only from train windows. On the journey over to the lake I began to wonder what it would be like. I wondered how time would have marred this unique, this holy spot--the coves and streams, the hills that the sun set behind, the camps and the paths behind the camps. I was sure that the tarred road would have found it out and I wondered in what other ways it would be desolated. It is strange how much you can remember about places like that once you allow your mind to return into the grooves which lead back. You remember one thing, and that suddenly reminds you of another thing. I guess I remembered clearest of all the early mornings, when the lake was cool and motionless, remembered how the bedroom smelled of the lumber it was made of and of the wet woods whose scent entered through the screen. The partitions in the camp were thin and did not extend clear to the top of the rooms, and as I was always the first up I would dress softly so as not to wake the others, and sneak out into the sweet outdoors and start out in the canoe, keeping close along the shore in the long shadows of the pines. I remembered being very careful never to rub my paddle against the gunwale for fear of disturbing the stillness of the cathedral.

  4. Mar 2022
    1. agree to a regular meeting schedule
    2. there should be almost no need for long study sessions.

      Ties into studying certain sections per day.

    3. Make flash cards to review in downtimes,
    4. Challenge yourself to come up with some really tough open-ended questions.
    5. Studying begins after each class or assignment
  5. Jan 2022
  6. Jun 2021
    1. "In Colormute, Pollock(2004) makes specific suggestions for addressing the fear of talking about race: “In all conversations about race, I think, educators should be prepared to do three things:ask provocative questions, navigate predictable debates,and talkmore about talking”(p. 221, italics in original)"

    1. Only test the happy path, but make sure to add a test case for any regression that couldn’t have been caught at lower levels with better tests (for example, if a regression is found, regression tests should be added at the lowest level possible).
    2. These tests should only be used when: the functionality/component being tested is small the internal state of the objects/database needs to be tested it cannot be tested at a lower level
  7. Apr 2021
    1. If you’re installing new sod, you may use a light roller to make sure the pieces come into close contact with soil for the roots to grow and take hold.
    2. There are times when you may need to flatten a bumpy lawn. For example, a golf course or a cricket pitch may be rolled to attain a smooth, level surface for playing. This is when a lawn roller may be needed.
    1. To make sure that participants couldn’t learn and predict where text field alternatives might show up during the test, we randomized the order in which we presented those text fields.
  8. Mar 2021
    1. We don’t want to invalidate the input if the user removes all text. They may need a moment to think, but the invalidated state sets off an unnecessary alarm.
  9. Feb 2021
  10. Jan 2021
  11. Dec 2020
  12. Nov 2020
    1. Prettier’s printWidth option does not work the same way. It is not the hard upper allowed line length limit. It is a way to say to Prettier roughly how long you’d like lines to be. Prettier will make both shorter and longer lines, but generally strive to meet the specified printWidth. Remember, computers are dumb. You need to explicitly tell them what to do, while humans can make their own (implicit) judgements, for example on when to break a line. In other words, don’t try to use printWidth as if it was ESLint’s max-len – they’re not the same. max-len just says what the maximum allowed line length is, but not what the generally preferred length is – which is what printWidth specifies.
  13. Oct 2020
    1. By default all content inside template strings is escaped. This is great for strings, but not ideal if you want to insert HTML that's been returned from another function (for example: a markdown renderer). Use nanohtml/raw for to interpolate HTML directly.
  14. Sep 2020
  15. Aug 2020
    1. Triggers error messages to render after a field is touched, and blurred (focused out of), this is useful for text fields which might start out erronous but end up valid in the end (i.e. email, or zipcode). In these cases you don't want to rush to show the user a validation error message when they haven't had a chance to finish their entry.
    2. Triggers error messages to show up as soon as a value of a field changes. Useful for when the user needs instant feedback from the form validation (i.e. password creation rules, non-text based inputs like select, or switches etc.)
  16. May 2020
    1. These two are in my opinion the most problematic — the basically go against each other. Typically, I try to work in increments over a feature and commit when I reach whatever techinical milestone I want to "checkpoint" at. It can also be out of the need to expose some idea or architecture and push it.
  17. Mar 2020
  18. Feb 2020
  19. Nov 2019
    1. Since an uncontrolled component keeps the source of truth in the DOM, it is sometimes easier to integrate React and non-React code when using uncontrolled components.

      A good example for when to use uncontrolled components

  20. Aug 2019
    1. But what about useState? it used whenever we have some variable that whenever it changes, we want to re-render our component and show some new contents.
  21. Oct 2016
    1. He passed the stages of his age and youth Entering the whirlpool.

      The brain/human trying to make sense of his life before it's too late. This is the time when people decide to take stock of their lives and really take account of themselves. Death is a great motivator!