201 Matching Annotations
  1. Sep 2024
    1. Modern parallel languages have much easier to use execution models. The thread model was one of the original parallel execution models, which may account for why it has persisted despite being difficult to use.
  2. Jul 2024
    1. It may be a romantic notion and an impossible dream for most, but to the poet, by instead wasting his life reflecting on the world through the medium of poetry, he has gained everything in the production of nothing.

      Link to Odell’s “How to Do Nothing”

  3. Jun 2024
    1. How can I wait for container X before starting Y? This is a common problem and in earlier versions of docker-compose requires the use of additional tools and scripts such as wait-for-it and dockerize. Using the healthcheck parameter the use of these additional tools and scripts is often no longer necessary.
  4. Mar 2024
    1. You can whip up cover letters in no time using ChatGPT! Just paste in your resume text, position title and company name and ask it to write a cover letter for you. It summarizes your skills really well in context of the position and company. Such a time saver. Like everything else AI does lately, it's absurdly good and in Ryan Reynold's words, "mildly terrifying." I have no idea who actually reads cover letters
  5. Jan 2024
    1. Prepare to transition away from Google Sync Google Sync doesn’t support OAuth authentication, 2-factor authentication, or security keys, which leaves your organization’s data less secure.
  6. Nov 2023
    1. // oftentimes once we have a proper e2e test around logging in
      // there is NO more reason to actually use our UI to log in users
      // doing so wastes a huge amount of time, as our entire page has to load
      // all associated resources have to load, we have to wait to fill the
      // form and for the form submission and redirection process
      
    1. // instead of visiting each page and waiting for all // the associated resources to load, we can instead // just issue a simple HTTP request and make an // assertion about the response body cy.request('/admin') .its('body') .should('include', '<h1>Admin</h1>') instead of cy.visit

    1. Autoloading in Rails was based on const_missing up to Rails 5. That callback lacks fundamental information like the nesting or the resolution algorithm being used. Because of that, Rails autoloading was not able to match Ruby's semantics, and that introduced a series of issues. Zeitwerk is based on a different technique and fixed Rails autoloading starting with Rails 6.
    1. ActiveRecord::Base.normalizes declares an attribute normalization. The normalization is applied when the attribute is assigned or updated, and the normalized value will be persisted to the database. The normalization is also applied to the corresponding keyword argument of query methods, allowing records to be queried using unnormalized values.

      Guess I don't need to use mdeering/attribute_normalizer gem anymore...

  7. Aug 2023
    1. I think the problem with after_destroy is that it is triggered before the database commits. This means the change may not yet be seen by other processes querying the database; it also means the change could be rolled back, and never actually commited. Since shrine deletes the attachment in this hook, that would mean it might delete the attachment prematurely, or even delete the attachment when the record never ends up destroyed in the database at all (in case of rollback), which would be bad. For shrine's logic to work as expected here, it really does need to be triggered only after the DB commit in which the model destroy is committed.
    1. I've been wondering if we are too focused on systems and actions that we can do, rather than on ourselves as human beings and what we can be.
      • for: human DOing, Deep Humanity, DH, quote, quote - DH, quote - Deep Humanity, quote - human DOing
      • quote
        • I've been wondering if we are too focused on systems and actions
          • that we can do, rather than on ourselves as human beings and
          • what we can be.
      • comment
        • this is aligned to the Deep Humanity notion of the difference between:
          • human DOing vs
          • human BEing
  8. Jun 2023
    1. I think we have a responsibility not only to ourselves, but also to each other, to our community, not to use Ruby only in the ways that are either implicitly or explicitly promoted to us, but to explore the fringes, and wrestle with new and experimental features and techniques, so that as many different perspectives as possible inform on the question of “is this good or not”.
    2. If you’ll forgive the pun, there are no constants in programming – the opinions that Rails enshrines, even for great benefit, will change, and even the principles of O-O design are only principles, not immutable laws that should be blindly followed for the rest of time. There will be other ways of doing things. Change is inevitable.
    1. By the 1980s the adage had implausibly been reassigned to Benjamin Franklin. The 1986 book “Approaches and Methods in Language Teaching” by Jack C. Richards and Theodore S. Rodgers contained the following passage:[12]1986 (Seventh Printing 1991), Approaches and Methods in Language Teaching: A Description and Analysis by Jack C. Richards and Theodore S. Rodgers, Chapter 7: The Silent Way, Quote Page 100, Cambridge … Continue reading These premises are succinctly represented in the words of Benjamin Franklin: Tell me and I forget, teach me and I remember, involve me and I learn.

      The misattribution of this quote often seen in educational settings likely stems from Richards & Rodgers from 1986.

      See also: - https://hypothes.is/a/cKMkaAZQEe6dq0fkeyNabA - https://hypothes.is/a/YWrJKgZPEe6dy2sJU5KcSw

    2. Several English renderings have been published over the years. The following excerpt is from “Xunzi: The Complete Text” within chapter 8 titled “The Achievements of the Ru”. The translator was Eric L. Hutton, and the publisher was Princeton University Press in 2014. Emphasis added to excerpts:[1]2014 Copyright, Xunzi: The Complete Text, Translated by Eric L. Hutton, Chapter 8: The Achievements of the Ru, Quote Page 64, Princeton University Press, Princeton, New Jersey. (Verified with … Continue reading Not having heard of it is not as good as having heard of it. Having heard of it is not as good as having seen it. Having seen it is not as good as knowing it. Knowing it is not as good as putting it into practice. Learning arrives at putting it into practice and then stops . . .

      The frequent educational quote "Tell me and I forget, teach me and I remember, involve me and I learn.", often misattributed to Benjamin Franklin, is most attributable to 3rd century Confucian philosopher Kunzi (Xun Kuang or 荀子) who wrote:

      Not having heard of it is not as good as having heard of it. Having heard of it is not as good as having seen it. Having seen it is not as good as knowing it. Knowing it is not as good as putting it into practice. Learning arrives at putting it into practice and then stops . . .

      The translation of which appears in Xunzi: The Complete Text, Translated by Eric L. Hutton, Chapter 8: The Achievements of the Ru, Quote Page 64, Princeton University Press, Princeton, New Jersey. 2014.

      Variations of the sentiment and attributions have appeared frequently thereafter.

  9. May 2023
    1. I know this is an old question but I just want to comment here: To any extent email addresses ARE case sensitive, most users would be "very unwise" to actively use an email address that requires capitals. They would soon stop using the address because they'd be missing a lot of their mail. (Unless they have a specific reason to make things difficult, and they expect mail only from specific senders they know.) That's because imperfect humans as well as imperfect software exist, (Surprise!) which will assume all email is lowercase, and for this reason these humans and software will send messages using a "lower cased version" of the address regardless of how it was provided to them. If the recipient is unable to receive such messages, it won't be long before they notice they're missing a lot, and switch to a lowercase-only email address, or get their server set up to be case-insensitive.
  10. Feb 2023
    1. Result of lots of searching on net is that pre-checkout hook in git is not implemented yet. The reason can be: There is no practical use. I do have a case It can be achieved by any other means. Please tell me how? Its too difficult to implement. I don't think this is a valid reason
  11. Dec 2022
  12. Nov 2022
  13. Oct 2022
    1. Elizabeth I’s tutor, Roger Ascham (1515–68), promotedlearning-by-doing in The Scholemaster: ‘Bring not up your children in learningby compulsion and feare,’ he said, ‘but by playing and pleasure.’
  14. Jul 2022
    1. It feels like « removing spring » is one of those unchallenged truths like « always remove Turbolinks » or « never use fixtures ». It also feels like a confirmation bias when it goes wrong.

      "unchallenged truths" is not really accurate. More like unchallenged assumption.

    1. Defects found in peer review are not an acceptable rubric by which to evaluate team members. Reports pulled from peer code reviews should never be used in performance reports. If personal metrics become a basis for compensation or promotion, developers will become hostile toward the process and naturally focus on improving personal metrics rather than writing better overall code.
  15. Jun 2022
    1. For a change of career

      A change of careers only makes sense within a culture where "doing" defines the meaning of the individual, and in which being, as the most sacred expression is not seen

      The human DOing is in reality a form of the human BEing and the human BEing is actually a human INTERbeing and finally, the human INTERbeing is simply an INTERbeCOMing a process, not a thing in spite of being given the name label our whole life much like we give an ever-changing river a name

    1. This touched a nerve this week: “thinking is generally thought of as doing nothing in a production-oriented culture, and doing nothing is hard to do” (Rebecca Solnit, Wanderlust)
  16. May 2022
  17. Apr 2022
  18. Mar 2022
    1. The reason for the new name is that the "dist-upgrade" name was itself extremely confusing for many users: while it was named that because it was something you needed when upgrading between distribution releases, it sounded too much as though it was only for use in that circumstance, whereas in fact it's much more broadly applicable.
  19. Feb 2022
    1. Dispatch a custom event. This differs from Svelte's component event system, because these events require a DOM element as a target, can bubble (and do by default), and are cancelable with event.preventDefault(). All SMUI events are dispatched with this instead of Svelte's createEventDispatcher.
    1. speaks about how each of us can, like her, become a creative genius

      Is this the ultimate form of culturally accepted bragging? How many people discover they can be vaguely "inspiring" instead of delivering substance? Maybe that's what's wrong with the world.

  20. Oct 2021
    1. So if I just forward the cookie header (which contains the access-token), wouldn't that be just what I am not supposed to do. I mean what's the point of using 'HttpOnly' flag if I return the token to the client-side js on every request.
    1. Inflections go the other way around.In classic mode, given a missing constant Rails underscores its name and performs a file lookup. On the other hand, zeitwerk mode checks first the file system, and camelizes file names to know the constant those files are expected to define.While in common names these operations match, if acronyms or custom inflection rules are configured, they may not. For example, by default "HTMLParser".underscore is "html_parser", and "html_parser".camelize is "HtmlParser".
  21. Sep 2021
    1. Saying that web devs used to be fine with relative imports is like saying that human beings used to be fine living without refrigerators. Sure we did. But was it better than it is now? No. No, it wasn't.
    1. Update API usage of the view helpers by changing javascript_packs_with_chunks_tag and stylesheet_packs_with_chunks_tag to javascript_pack_tag and stylesheet_pack_tag. Ensure that your layouts and views will only have at most one call to javascript_pack_tag or stylesheet_pack_tag. You can now pass multiple bundles to these view helper methods.

      Good move. Rather than having 2 different methods, and requiring people to "go out of their way" to "opt in" to using chunks by using the longer-named javascript_packs_with_chunks_tag, they changed it to just use chunks by default, out of the box.

      Now they don't need 2 similar but separate methods that do nearly the same, which makes things simpler and easier to understand (no longer have to stop and ask oneself, which one should I use? what's the difference?).

      You can't get it "wrong" now because there's only one option.

      And by switching that method to use the shorter name, it makes it clearer that that is the usual/common/recommended way to go.

    2. Webpacker used to configure Webpack indirectly, which lead to a complicated secondary configuration process. This was done in order to provide default configurations for the most popular frameworks, but ended up creating more complexity than it cured. So now Webpacker delegates all configuration directly to Webpack's default configuration setup.

      more trouble than it's worth

      • creating more complexity than it cured
    1. This is no different from other popular libraries or frameworks making huge architectural changes (think React 16.8 with hooks or Python 3). The longer you wait to make the switch, the more painful it will be for your project when you finally do. And in the meantime, you’ll be missing out on valuable improvements to a fundamental part of the workflow of every single project you work on.
  22. Aug 2021
    1. “Ultimately, these kind of iframe limitations are the reason why vendors should implement embeddable marketing forms with JavaScript instead of iframes….” – I couldn’t agree more. The trouble is, Pardot’s developers still believe it’s the 1990’s
  23. Jul 2021
    1. So long as the filters are only using GET requests to pull down links, there’s nothing fundamentally wrong with them. It’s a basic (though oft-ignored) tenet of web development that GET requests should be idempotent; that is, they shouldn’t somehow change anything important on the server. That’s what POST is for. A lot of people ignore this for convenience’s sake, but this is just one way that you can get bitten. Anyone remember the Google Web Accelerator that came out a while ago, then promptly disappeared? It’d pre-fetch links on a page to speed up things if you clicked them later on. And if one of those links happened to delete something from a blog, or log you out… well, then you begin to see why GET shouldn’t change things. So yes, the perfect solution to this is a 2-step unsubscribe link: the first step takes to you a page with a form on it, and that form then POSTs something back that finalizes the unsubscribe request.
    2. Two step unsubscribe, where the link in the email goes to a webpage with a prominent “click here to unsubscribe” button is often a good thing for unsubscription. It also gives people an option to not unsubscribe, when they click on the wrong link, or hit “return” with the wrong link focused, in a mail inadvertently, which isn’t that unusual in link-laden emails.
  24. Jun 2021
    1. Giving peers permission to engage in dialogue about race and holding a lofty expectation that they will stay engaged in these conversations throughout the semester or year is the first of the four agreements for courageous conversation. While initially, some participants may be eager to enter into these conversations, our experience indicates that the more personal and thus risky these topics get, the more difficult it is for participants to stay committed and engaged." Singleton and Hays

    1. GitLab is transitioning from controller specs to request specs.
    2. These tests should be isolated as much as possible. For example, model methods that don’t do anything with the database shouldn’t need a DB record. Classes that don’t need database records should use stubs/doubles as much as possible.
    1. A common cause of a large number of created factories is factory cascades, which result when factories create and recreate associations.
    2. :js is particularly important to avoid. This must only be used if the feature test requires JavaScript reactivity in the browser. Using a headless browser is much slower than parsing the HTML response from the app.
    3. Use Factory Doctor to find cases where database persistence is not needed in a given test.
  25. May 2021
    1. They have to ask you the dumb questions, either because their employer demands they do, or sometimes because their computer system doesn't let them get to the next part of the script unless they play ball.
    2. Another will employ smart people who apologise to you profusely for having to go through all the pointless steps, but that's just what they have to do!
    1. CommonJS has served us well for many years, but ESM comes with many benefits, like language-level syntax, browser support, defaults to strict mode, async loading, top-level await, improved static analysis & tree-shaking, and more.
  26. Apr 2021
    1. Lumberjack 1.0 had a concept of a unit of work id that could be used to tie log messages together. This has been replaced by tags. There is still an implementation of Lumberjack.unit_of_work, but it is just a wrapper on the tag implementation.
    1. What you want is not to detect if stdin is a pipe, but if stdin/stdout is a terminal.

      The OP wasn't wrong in exactly the way this comment implies: he didn't just ask how to detect whether stdin is a pipe. The OP actaully asked how to detect whether it is a terminal or a pipe. The only mistake he made, then, was in assuming those were the only two possible alternatives, when in fact there is (apparently) a 3rd one: that stdin is redirected from a file (not sure why the OS would need to treat that any differently from a pipe/stream but apparently it does).

      This omission is answered/corrected more clearly here:

      stdin can be a pipe or redirected from a file. Better to check if it is interactive than to check if it is not.

    2. stdin can be a pipe or redirected from a file. Better to check if it is interactive than to check if it is not.
    1. Factory FunNER is the sequel and a very solid improvement to Factory Fun. It uses hexes instead of squares to allow more creative building, and some subtle improvements to scoring, length, and machine placement rules really improve things.
    1. Now that we’ve gotten newer layout features — again, like grid and flexbox — floats, too, have sort of fallen by the wayside, perhaps either because there are better ways to accomplish what they do
  27. Mar 2021
    1. My preference here is biased by the fact that I spend everyday at work building web components, so Svelte's approach feels very familiar to slots in web components.

      first sighting: That <template>/<slot> is part of HTML standard and the reason Svelte uses similar/same syntax is probably because it was trying to make it match / based on that syntax (as they did with other areas of the syntax, some of it even JS/JSX-like, but more leaning towards HTML-like) so that it's familiar and consistent across platforms.

    2. 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.
    1. One thing that would be useful to this debate an analysis of a language ecosystem where there are only "macropackages" and see if the same function shows up over and over again across packages.
  28. Feb 2021
    1. That’s it. If you have a previous “precompile” array, in your app config, it will continue to work. For continuity sake I recommend moving over those declarations to your manifest.js file so that it will be consistent.
    2. Instead of having this confusing maze of lambdas, regexes, and strings, we could, in theory, introduce a single entry point of configuration for Sprockets to use, and in that file declare all assets we wanted to compile. Well, that’s exactly what the manifest.js file is.
    1. You’re allowed to blame us for a terrible developer experience in Trailblazer 2.0. It’s been quite painful to find out which step caused an exception. However, don’t look back in anger! We’ve spent a lot of time on working out a beautiful way for both tracing and debugging Trailblazer activities in 2.1.
    1. The activity gem is an extraction from Trailblazer 2.0, where we only had operations. Operations expose a linear flow which goes into one direction, only. While this was a massive improvement over messily nested code, we soon decided it’s cool being able to model non-linear flows. This is why activities are the major concept since Trailblazer 2.1.
    1. While Trailblazer offers you abstraction layers for all aspects of Ruby On Rails, it does not missionize you. Wherever you want, you may fall back to the "Rails Way" with fat models, monolithic controllers, global helpers, etc. This is not a bad thing, but allows you to step-wise introduce Trailblazer's encapsulation in your app without having to rewrite it.
    1. Yes, Trailblazer is adding new abstractions and concepts and they are different to the 90s-Ruby, but now, at the latest, it becomes obvious how this improves the developing process. We’re no longer talking in two-dimensional method stack traces or byebug hoops, the language and conception is changing to the actual higher level code flow, to activities sitting in activities structured into smaller step units.
    2. We removed the trailblazer-loader gem just like Apple removed the headphone jack from the iPhone 6. This brings you faster startup and consistency with Rails autoloading.
    1. ActiveInteraction plays nicely with Rails. You can use interactions to handle your business logic instead of models or controllers.
    2. Since we're using an interaction, we don't need strong parameters. The interaction will ignore any inputs that weren't defined by filters. So you can forget about params.require and params.permit because interactions handle that for you.
    1. As of today, you can Wishlist OpenTTD on SteamE. Historically, OpenTTD always had a single home from where we distributed the game. We used to be hosted on SourceForge (you know you are old, if you remember that being a thing :D), and slowly moved towards our own self-created distribution methods. These days, we mostly distribute our game via our website. But times are changing, and so is our hair. Over the last few months, we have silently been working to become a bit more visible in the world. Don’t worry, not for reasons you might think: OpenTTD has as many active users as it had in 2007. But more because we no longer think it is the right approach to only distribute via our own website. This became painfully apparent when we noticed other people post OpenTTD on some stores. They are not always updated with new releases, sometimes even slacking behind a few years. And maybe more important to us: we can not guarantee that the uploaded version is unmodified and is the version as we intended. So, instead of fighting it, why not turn around and join them! Why not release our own, verified, builds on those stores! And this is exactly what we have been working on lately. And when I say “we”, a bit ironic to me, I mean the two developers that are around longest (myself and orudge) ;) A while back orudge added OpenTTD to the Microsoft Store. And today, I am happy to announce we will be on SteamE too! Well, we are on Steam, but we haven’t released anything there yet (sorry that I got your hopes up, just to squash them right after :( ). This is partially because of how Steam works, but also because we know we can bring a better experience for Steam with our upcoming release. That brings me to the most exciting news: if everything goes as planned, we will release OpenTTD 1.11 on Steam on the first of April, 2021! And that is not even an April fools’ joke! You can already Wishlist OpenTTD today .. and till we release on Steam, you can find our game via our website ;)
    1. As of today, you can Wishlist OpenTTD on SteamE. Historically, OpenTTD always had a single home from where we distributed the game. We used to be hosted on SourceForge (you know you are old, if you remember that being a thing :D), and slowly moved towards our own self-created distribution methods. These days, we mostly distribute our game via our website. But times are changing, and so is our hair. Over the last few months, we have silently been working to become a bit more visible in the world. Don’t worry, not for reasons you might think: OpenTTD has as many active users as it had in 2007. But more because we no longer think it is the right approach to only distribute via our own website.
    1. Well, I'm glad they did, because Turbolinks is a much better piece of software than jquery-pjax ever was. It's actively maintained and doesn't require jQuery at all! So we're one step closer to our dream of ditching $.
    2. Now if you think about it, PJAX sounds a lot like Turbolinks. They both use JS to fetch server-rendered HTML and put it into the DOM. They both do caching and manage the forward and back buttons. It's almost as if the Rails team took a technique developed elsewhere and just rebranded it.
  29. Dec 2020
    1. People really don't stress enough the importance of enjoying what you're programming. It aids creativity, makes you a better teammate, and makes it significantly easier to enter a state of flow. It should be considered an important factor in choosing a web development framework (or lack thereof). Kudos!
    1. Find Your Passion, Then Monetize It The
    2. Try a little of everything, and then choose a specialization. Money is not the most important thing. You need to LOVE your activity! But you don't know what you like until you try it.