- Sep 2024
-
www.mikeperham.com www.mikeperham.com
-
For years developers have followed the same arcane dozen steps to create a long-lived daemon process on Unix-based systems. These steps were state of the art in 2000 but they are no longer best practice today.
-
-
en.wikipedia.org en.wikipedia.org
-
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.
-
- Jun 2024
-
github.com github.com
-
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.
-
-
www.howtogeek.com www.howtogeek.com
-
Bind mounting your host's daemon socket is safer, more flexible, and just as feature-complete as starting a dind container.
-
- Jan 2024
-
support.google.com support.google.com
-
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.
-
- Nov 2023
-
-
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.
-
-
edgeguides.rubyonrails.org edgeguides.rubyonrails.org
-
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...
-
- Jun 2023
-
interblah.net interblah.net
-
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”.
-
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.
-
- Nov 2022
-
meta.stackoverflow.com meta.stackoverflow.com
-
Yes, it was right, but nowadays Dockerfiles are not specific to Docker. Dockerfiles also work with Buildah & Podman (and there might be other ones in the future) and they have generalized the naming: “Containerfile.”
-
- Apr 2022
-
edgeguides.rubyonrails.org edgeguides.rubyonrails.org
-
All known use cases of require_dependency have been eliminated with Zeitwerk. You should grep the project and delete them.
-
-
-
Rails 7.0 will aim to give you a default setup based on import maps, and leave the Webpacker approach as an optional alternative.
-
- Mar 2022
-
askubuntu.com askubuntu.com
-
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.
-
- Feb 2022
-
-
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.
-
- Oct 2021
-
developer.mozilla.org developer.mozilla.org
-
Object.hasOwn() is recommended over hasOwnProperty(), in browsers where it is supported.
-
- Sep 2021
-
-
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.
-
-
-
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.
-
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
Tags
- too complicated
- changed their mind/opinion
- modern javascript development is complicated
- newer/better ways of doing things
- more trouble than it's worth
- doing more harm than good
- improvement
- constant evolution/improvement of software/practices/solutions
- too hard/complicated/non-trivial
- complicated
- fewer options: pros: don't have ask which one should I use? what's the difference?
- Why can't this be easier/simpler? Why does it have to be so hard/complicated?
- removing features to simplify implementation
- removing feature that is more trouble than it's worth (not worth the effort to continue to maintain / fix bugs caused by keeping it)
- make it hard to get wrong/incorrect
Annotators
URL
-
-
spin.atomicobject.com spin.atomicobject.com
-
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.
-
-
stackoverflow.com stackoverflow.com
-
target="_blank" which opens the anchor in a new window(which has been redirected to tabs by browser settings usually)
new window => new tab
-
- Aug 2021
-
developer.mozilla.org developer.mozilla.org
-
This attribute is considered a legacy attribute and redefined as allow="fullscreen".
-
-
stackoverflow.com stackoverflow.com
-
This will obviate the need for a helper function of any kind.
-
-
developer.mozilla.org developer.mozilla.org
-
However instead of using array.length for latter items; e.g. array[array.length-1] for the last item, you can call array.at(-1)
-
-
www.ruby-lang.org www.ruby-lang.org
-
you can use the new delegation syntax (...) that is introduced in Ruby 2.7. def foo(...) target(...) end
-
- Jun 2021
-
docs.gitlab.com docs.gitlab.com
-
GitLab is transitioning from controller specs to request specs.
-
-
stackoverflow.com stackoverflow.com
-
If you don't need to support IE9 or lower, you can use flexbox freely, and don't need to use floated layouts.
-
- May 2021
-
blog.sindresorhus.com blog.sindresorhus.com
-
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.
-
-
github.com github.com
- Apr 2021
-
github.com github.com
-
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.
-
-
stackoverflow.com stackoverflow.com
-
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.
-
stdin can be a pipe or redirected from a file. Better to check if it is interactive than to check if it is not.
-
-
stackoverflow.com stackoverflow.com
-
unbuffer works with piping to less. That may be an easier syntax than what you've got.
-
-
www.kickstarter.com www.kickstarter.com
-
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.
-
-
unix.stackexchange.com unix.stackexchange.com
-
For path names with newlines it is better to quote each pathname.
-
But we can use a two characters delimiter: / (space slash) That pair of characters could only exist at the beginning of a new (absolute) path:
-
-
css-tricks.com css-tricks.com
-
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
-
- Mar 2021
-
trailblazer.to trailblazer.to
-
Most “legacy” operations don’t have this output, yet. However, the Model() macro now supports this terminus.
-
-
github.com github.comd3/d31
-
D3 now passes events directly to listeners, replacing the d3.event global and bringing D3 inline with vanilla JavaScript and most other frameworks.
-
- Feb 2021
-
www.schneems.com www.schneems.com
-
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.
-
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.
-
-
stackoverflow.com stackoverflow.com
-
en.wikipedia.org en.wikipedia.org
-
Each of the programming language generations aims to provide a higher level of abstraction of the internal computer hardware details, making the language more programmer-friendly, powerful, and versatile.
-
-
trailblazer.to trailblazer.to
-
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.
-
-
trailblazer.to trailblazer.to
-
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.
-
-
github.com github.com
-
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.
Tags
- Trailblazer
- making changes / switching/migrating gradually/incrementally/step-wise/iteratively
- leaving the details of implementation/integration up to you
- abstractions
- newer/better ways of doing things
- focus on concepts/design/structure instead of specific/concrete technology/implementation
- freedom of user to override specific decision of an authority/vendor (software)
- focus on what it should do, not on how it should do it (implementation details; software design)
- rails: the Rails way
- allowing developer/user to pick and choose which pieces to use (allowing use with competing libraries; not being too opinionated; not forcing recommended way on you)
Annotators
URL
-
-
trailblazer.to trailblazer.to
-
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.
-
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.
-
-
github.com github.com
-
ActiveInteraction plays nicely with Rails. You can use interactions to handle your business logic instead of models or controllers.
-
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.
-
-
www.openttd.org www.openttd.org
-
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 ;)
-
-
www.openttd.org www.openttd.org
-
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.
-
-
www.honeybadger.io www.honeybadger.io
-
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 $.
-
-
jakearchibald.com jakearchibald.com
-
Flexbox and grid play well together, and are a huge step forward from the float & table hacks they replace.
-
- Dec 2020
-
developer.mozilla.org developer.mozilla.org
-
The Web Storage API provides mechanisms by which browsers can store key/value pairs, in a much more intuitive fashion than using cookies.
-
- Nov 2020
-
stackoverflow.com stackoverflow.com
-
For future reference, webpack 2 removed everything but modules as a way to resolve paths. This means root will not work.
-
-
gist.github.com gist.github.com
-
There was a major refactoring in the resolver (https://github.com/webpack/enhanced-resolve). This means the resolving option were changed too. Mostly simplification and changes that make it more unlikely to configure it incorrectly.
Linked from: https://stackoverflow.com/a/36574982/47185
-
-
stackoverflow.com stackoverflow.com
-
{#key} was introduced in Svelte v3.28, before that you needed to use a keyed {#each} block with only one item When the key changes, svelte removes the component and adds a new one, therefor triggering the transition.
-
-
imfeld.dev imfeld.dev
-
Svelte's advantage here is that it indicates the need for an update at the place where the associated data is updated, instead of at each place the data is used. Then each template expression of reactive statement is able to check very quickly if it needs to rerender or not.
-
Svelte slots are much easier to use and reason about than Angular transclude, especially in cases where you don't want an extra wrapper element around the slot content.
-
-
github.com github.com
-
If your Svelte components contain <style> tags, by default the compiler will add JavaScript that injects those styles into the page when the component is rendered. That's not ideal, because it adds weight to your JavaScript, prevents styles from being fetched in parallel with your code, and can even cause CSP violations. A better option is to extract the CSS into a separate file. Using the emitCss option as shown below would cause a virtual CSS file to be emitted for each Svelte component. The resulting file is then imported by the component, thus following the standard Webpack compilation flow.
-
-
-
overmind is basically foreman but done "well"
-
- Oct 2020
-
rob-blackbourn.medium.com rob-blackbourn.medium.com
-
Much better API than using openssl CLI directly (yuck).
-
-
security.stackexchange.com security.stackexchange.com
-
As of OpenSSL 1.1.1, providing subjectAltName directly on command line becomes much easier, with the introduction of the -addext flag to openssl req
-
-
docs.gitlab.com docs.gitlab.com
-
Instead of this, you can use a File type variable.
-
Previously, a common pattern was to read the value of a CI variable, save it in a file, and then use that file in your script:
-
-
docs.docker.com docs.docker.com
-
there are superior ways to share environment variables
-
-
dylanvann.com dylanvann.com
-
The Svelte compiler does the dependency tracking work for us, so there’s no dependency array like in React.
-
-
reactjs.org reactjs.org
-
Note how we have to duplicate the code between these two lifecycle methods in class. This is because in many cases we want to perform the same side effect regardless of whether the component just mounted, or if it has been updated. Conceptually, we want it to happen after every render — but React class components don’t have a method like this. We could extract a separate method but we would still have to call it in two places.
-
- Sep 2020
-
github.com github.com
-
But what we should ask is "can we do better than the others".
-
- Aug 2020
-
pragmaticpineapple.com pragmaticpineapple.com
-
For example, to search for text occurrences, I used ack-grep. Later on, I found that there is a faster approach using ag. Then, there is an even faster alternative called ripgrep.
-
- Jun 2020
-
medium.com medium.com
-
As an engineer, it’s important to explore different technologies. It’s important to identify the tools available to tackle problems. And it’s important to expand your horizons because then you can look cool on your CV.
-
- Mar 2020
-
github.com github.com
-
Q. Why does Rubinius not support frozen and tainted? A. Rubinius has better features; frozen and tainted are considered harmful. To elaborate... Both frozen and tainted depend on strewing checks throughout the source code. As a classic weak-link system, only one of those checks needs to be misplaced for the guarantees offered by either to fail. Since the number of checks is high, and as new code is written new checks need to be considered, the features inherently constitute unbounded complexity and unbounded risk.
-
- Dec 2019
-
unix.stackexchange.com unix.stackexchange.com
-
Just for the record newer versions of ssh support the -W option, you can do something like ProxyCommand ssh -W %h:%p gateway instead of depending on nc
-