- Nov 2023
-
github.com github.com
-
// Not recommended: log into the application like a user // by typing into the form and clicking Submit // While this works, it is slow and exercises the login form // and NOT the feature you are trying to test.
-
-
github.com github.com
-
One more example of a simple approach to this that might help a lot too is add a PORO generator. It could be incredibly basic - rails g poro MyClass yields class MyClass end But by doing that and landing the file in the app/models directory, it would make it clear that was the intended location instead of lib.
-
So then they put it into lib only to find that they have to manually require it. Then later realize that this also means they now have to reboot their server any time they change the file (after a painfully long debugging time of "why what aren't my changes working?", because their lib folder classes are now second-class citizens). Then they go down the rabbit hole of adding lib to the autoload paths, which burns them because rake tasks then all get eager loaded in production. Then they inevitably realize anything inside app is autoloaded and make an app/lib per Xavier's advice.
-
I think the symmetry of the naming between lib and app/lib will lead a fresh Rails developer to seek out the answer to “Why are there two lib directories?", and they will become illuminated. And it will prevent them from seeking the answer to “How do I autoload lib?” which will start them on a rough path that leads to me advising them to undo it.
-
- Oct 2023
-
www.thoughtco.com www.thoughtco.com
-
What interests us far more is that these apprentice writers have interesting ideas to convey, and manage to support their arguments well.
only partial match: the most important thing is the information (more than presentation/formatting)
-
- Sep 2023
-
github.com github.com
-
it should provide one task only and do it well
-
-
github.com github.com
-
UNIX philosophy: Do one thing and do it well!
Tags
Annotators
URL
-
- May 2023
-
www.investopedia.com www.investopedia.com
-
There Ain't No Such Thing as a Free Lunch (TANSTAAFL)
-
- Apr 2023
-
stackoverflow.com stackoverflow.com
-
In recent git versions, git restore is supposed to be a "better" way to revert undesired local changes than the overloaded checkout. Great, that sounds reasonable - a nice simple purpose-built tool for a common operation.
-
- Mar 2023
-
-
We now take an opinionated stance on which second factor you should set up first – you'll no longer be asked to choose between SMS or setting up an authenticator app (known as TOTP), and instead see the TOTP setup screen immediately when first setting up 2FA.
-
- Jan 2023
-
-
I've worked with and have helped maintain paranoia for a while. I'm convinced it does the wrong thing for most cases. Paranoia and acts_as_paranoid both attempt to emulate deletes by setting a column and adding a default scope on the model. This requires some ActiveRecord hackery, and leads to some surprising and awkward behaviour.
-
- Dec 2022
-
win-vector.com win-vector.com
-
<small><cite class='h-cite via'>ᔥ <span class='p-author h-card'>John Mount</span> in Good Stationery as a Tool of Thought | MZLabs (<time class='dt-published'>11/30/2022 13:11:31</time>)</cite></small>
Read 2022-12-31
-
-
-
Let’s say the recipient is considering unsubscribing. He or she may be too busy to search through the email to find the unsubscribe link, so he or she just clicks “Report as SPAM” to stop the emails from coming. This is the last thing any marketer wants to see happen. It negatively impacts sender reputation, requiring extra work to improve email deliverability. With the list-unsubscribe header, you will avoid getting into this kind of trouble in the first place.
-
- Nov 2022
-
documentation.mailgun.com documentation.mailgun.com
-
You can access Events through a few interfaces: Webhooks (we POST data to your URL). The Events API (you GET data through the API). The Logs tab of the Control Panel (GUI).
-
-
-
In v3, svelte-preprocess was able to type-check Svelte components. However, giving the specifics of the structure of a Svelte component and how the script and markup contents are related, type-checking was sub-optimal. In v4, your TypeScript code will only be transpiled into JavaScript, with no type-checking whatsoever. We're moving the responsibility of type-checking to tools better fit to handle it, such as svelte-check, for CLI and CI usage, and the VS Code extension, for type-checking while developing.
-
-
developer.twitter.com developer.twitter.com
-
In the guide below, you may see different terms referring to the same thing.
-
-
meta.stackoverflow.com meta.stackoverflow.com
-
They are 100% identical; just different names. From podman-build: “Builds an image using instructions from one or more Containerfiles or Dockerfiles and a specified build context directory. A Containerfile uses the same syntax as a Dockerfile internally. For this document, a file referred to as a Containerfile can be a file named either ‘Containerfile’ or ‘Dockerfile’.”
-
-
gitlab.com gitlab.com
-
Good commit hygiene is considered a best practice. GitLab should encourage and enable these kinds of best practices. This feature currently creates a problem and requires workarounds that remove information, or significant manual work.
-
-
github.com github.com
-
highly recommended that the resulting image be just one concern per container; predominantly this means just one process per container, so there is no need for a full init system
container images: whether to use full init process: implied here: don't need to if only using for single process (which doesn't fork, etc.)
-
-
-
Doing everything PID 1 needs to do and nothing else. Things like reading environment files, changing users, process supervision are out of scope for Tini (there are other, better tools for those)
-
- Sep 2022
-
docs.google.com docs.google.com
-
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.
-
- Aug 2022
-
www.ischool.berkeley.edu www.ischool.berkeley.edu
-
Michael Buckland coined in 1991 the phrase "information as thing" and discussed this concept in relation to evidence.
-
- Jul 2022
-
-
Protagonist Does a Thing formula
https://slate.com/culture/2022/06/book-titles-eleanor-oliphant-women-fiction.html
This article has a nice number of examples of the naming convention: "Protagonist Does a Thing"
I am a bit shocked to see Hypothes.is indicates that there are 31 (private) annotations on this particular page. What is going on here?!
-
- May 2022
-
yt-project.github.io yt-project.github.io
-
particular
in particular ?
-
supports
support or supporting
-
susbtantial
substantial
-
This collection of three classes of fields
hanging sentence
-
researcher
a researcher or researchers
Tags
Annotators
URL
-
- Apr 2022
-
edgeguides.rubyonrails.org edgeguides.rubyonrails.org
-
Making MoneySerializer reloadable would be confusing, because reloading an edited version would have no effect on that class object stored in Active Job.
-
Indeed, if MoneySerializer was reloadable, starting with Rails 7 such initializer would raise a NameError.
-
- Mar 2022
-
sspai.com sspai.com
-
PPW 四分区坐垫
-
- Jan 2022
-
en.wikipedia.org en.wikipedia.org
-
software design on the scale of decades: every detail is intended to promote software longevity and independent evolution. Many of the constraints are directly opposed to short-term efficiency. Unfortunately, people are fairly good at short-term design, and usually awful at long-term design
-
- Oct 2021
-
github.com github.com
-
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.
-
-
theliturgists.com theliturgists.comEvents1
-
THE SUNDAY THING
The Sunday Thing
The love of money is the root of all evil
This week, Michael Gungor asked us to discuss money in our breakout groups.
Money is power
We outsource our power and authority to those who claim to have greater access to capital, because we underestimate and undervalue our own social influence, economic capacity, and political agency. The entreprecariat is designed for learned helplessness (social: individualism), trained incapacities (economic: specialization), and bureaucratic intransigence (political: authoritarianism). https://hypothes.is/a/667dOC0bEeyV6Itx3ySxmw
Indigenous cultures in Canada were disempowered by outlawing the cultural practice of generosity (potlatch) and replacing the practice with centralized power over the medium of exchange: money. Money is a mechanism of disempowerment.
Money is a shared story we tell ourselves about what has value. https://www.npr.org/transcripts/795246685
We translated “ekklesia” as church. It is the deliberative body of the experiment in democracy in Athens, Greece. The people who are figuring out how to live together in the commons. The work of the people. The Liturgists.
The Story of Money
In this hour, On the Media looks at the story of money, from its uncertain origins to its digital reinvention in the form of cryptocurrency.
On the Media: Full Faith & Credit
Squid Game
People were also discussing Squid Game.
Squid Game was on my mind today before the call. “The reality of the history of Canada’s mining industry makes #SquidGame look like child’s play.” https://twitter.com/bauhouse/status/1449726452098682881?s=20
The truth is that all of the gold that was mined out of the Klondike was under Indigenous land. There was no treaty with any of Indigenous peoples in the Yukon.
-
- Sep 2021
-
www.reddit.com www.reddit.com
-
those users apparently can't even be trusted to choose the option to enable it from a pop-up
-
- Aug 2021
-
-
Now consider we want to handle numbers in our known value set: const KNOWN_VALUES = Object.freeze(['a', 'b', 'c', 1, 2, 3]) function isKnownValue(input?: string | number) { return typeof(input) === 'string' && KNOWN_VALUES.includes(input) } Uh oh! This TypeScript compiles without errors, but it's not correct. Where as our original "naive" approach would have worked just fine. Why is that? Where is the breakdown here? It's because TypeScript's type system got in the way of the developer's initial intent. It caused us to change our code from what we intended to what it allowed. It was never the developer's intention to check that input was a string and a known value; the developer simply wanted to check whether input was a known value - but wasn't permitted to do so.
-
- Jul 2021
-
blog.appsignal.com blog.appsignal.com
-
By looking at the code screenshot, you are either opening your mouth in awe or in appall. I feel there is no in-between here.
-
-
forum.artofmemory.com forum.artofmemory.com
-
Bird sound encoding
I was at the bookstore yesterday and ran into two new useful resources that looked interesting in this space.
Specific to birdsong, there was
200 Bird Songs from Around the World by Les Beletsky (Becker & Mayer, 2020, ISBN: 978-0760368831)
Read about and listen to birds from six continents. A beautiful painting illustrates each selection along with concise details about the bird's behavior, environment, and vocalizations. On the built-in digital audio player, hear each bird as it sings or calls in nature with audio of the birds provided by the Macaulay Library at the Cornell Lab of Ornithology.
This could be useful in using the book itself as a memory palace in addition to the fact that the bird calls are built directly into the book for immediate playback while reading/memorizing. There are a few other related books with built in sound in this series as well.
The other broader idea was that of
"A bird a day"
I saw the book A Bird A Day by Dominic Couzens (Batsford, 2021, ISBN: 978-1849945868) to help guide one towards learning about (or in our context maybe memorizing) a bird a day. It had names, photos, and other useful information which one might use to structure a palace to work at in small chunks. I know there are also many other related calendars which might also help one do something like this to build up a daily practice of memorizing data into a palace/journey/songline.
The broader "Thing-a-day" calendar category might also be useful for other topics one might want to memorize as well as to have a structure set up for encouraging spaced repetition.
-
- Jun 2021
-
stackoverflow.com stackoverflow.com
-
Different ways to prepend a line: (echo 'line to prepend';cat file)|sponge file sed -i '1iline to prepend' file # GNU sed -i '' $'1i\\\nline to prepend\n' file # BSD printf %s\\n 0a 'line to prepend' . w|ed -s file perl -pi -e 'print"line to prepend\n"if$.==1' file
-
-
github.com github.com
-
The first argument to shared_context (the shared group name) is superfluous. It feels a bit like "what's this argument for again?" (Note that you could still use it with include_context to include the group manually, but it's a bit odd to mix-and-match the approaches).
-
-
github.com github.com
-
I'm not sure if there's any cost in terms of contributing either, especially when by design git can have any branch as default, and will not hinder your experience when you use something other than master.
git is neutral/unbiased/agnostic about default branch name by design
And that is a good thing
-
-
github.com github.com
-
Once a variable is specified with the use method, access it with EnvSetting.my_var Or you can still use the Hash syntax if you prefer it: EnvSetting["MY_VAR"]
-
- Apr 2021
-
-
Of course you must not use plain-text passwords and place them directly into scripts. You even must not use telnet protocol at all. And avoid ftp, too. I needn’t say why you should use ssh, instead, need I? And you also must not plug your fingers into 220 voltage AC-output. Telnet was chosen for examples as less harmless alternative, because it’s getting rare in real life, but it can show all basic functions of expect-like tools, even abilities to send passwords. BUT, you can use “Expect and Co” to do other things, I just show the direction.
Tags
Annotators
URL
-
-
stackoverflow.com stackoverflow.com
-
Too new to comment on the specific answer
So you think it's better to make people post a new "answer" (as if it were actually a distinct, unrelated answer) instead of just letting them comment on the answer that they actually want to comment on? Yuck.
-
-
boardgamegeek.com boardgamegeek.com
-
The central decision of the game is when to play your houses. And you didn't even really talk about that.
-
-
github.com github.com
-
Scholar@UC: University of Cincinnati's self-submission institutional repository
-
- Mar 2021
-
blog.izs.me blog.izs.me
-
Focus is better than features.
-
-
en.wikipedia.org en.wikipedia.org
-
non-regression testing
That would probably be a better name because you're actually testing/verifying that there hasn't been any regression.
You're testing for the absence of regression. But I guess testing for one also tests for the other, so it probably doesn't matter. (If something is not true you know it is false, etc.)
-
-
www.chevtek.io www.chevtek.io
-
Write modules that do one thing well. Write a new module rather than complicate an old one.
.
-
-
jangawolof.org jangawolof.orgPhrases1
-
Nee na ndëmm amul.
Il dit que la sorcellerie n'existe pas.
nee -- pr. circ. so, demonstratively distant. Cf. nale.
na -- 1. pr. circ. so, defined distant. How? 'Or' What. 2. function indicator. As.
ndëmm gi -- symbolic anthropophagia. 🧙
-
-
afarkas.github.io afarkas.github.ioWebshim1
-
Webshim is also more than a polyfill, it has become a UI component and widget library. Webshim enables a developer to also enhance HTML5 capable browsers with more highly customizable, extensible and flexible UI components and widgets.
And now that it's deprecated (presumably due to no longer needing these polyfills), not only do the polyfills go away (no longer maintained), but also these unrelated "extras" that some of us may have been depending on are now going away with no replacement ...
If those were in a separate package, then there would have been some chance of the "extras" package being updated to work without the base webshims polyfills.
In particular, I was using
$.webshims.addCustomValidityRule
which adds something that you can't do in plain HTML5 (that I can tell), so it isn't a polyfill...
-
-
trailblazer.to trailblazer.to
-
the Activity component is the heart of TRB
-
Hey, that’s is an imaginary complication of our example - please don’t do this with every condition you have in your app.
Tags
- trailblazer-activity
- Trailblazer
- main/key/central/essential/core thing/point/problem/meat
- example: not how you would actually do it (does something wrong/bad/nonideal illustrating but we should overlook it because that's not the one thing the example is trying to illustrate/show us)
- coming up with hypothetical examples
- the Trailblazer way
- artificial example
- extremes
Annotators
URL
-
- Feb 2021
-
trailblazer.to trailblazer.to
-
For branching out a separate path in an activity, use the Path() macro. It’s a convenient, simple way to declare alternative routes
Seems like this would be a very common need: once you switch to a custom failure track, you want it to stay on that track until the end!!!
The problem is that in a Railway, everything automatically has 2 outputs. But we really only need one (which is exactly what Path gives us). And you end up fighting the defaults when there are the automatic 2 outputs, because you have to remember to explicitly/verbosely redirect all of those outputs or they may end up going somewhere you don't want them to go.
The default behavior of everything going to the next defined step is not helpful for doing that, and in fact is quite frustrating because you don't want unrelated steps to accidentally end up on one of the tasks in your custom failure track.
And you can't use
fail
for custom-track steps becase that breaksmagnetic_to
for some reason.I was finding myself very in need of something like this, and was about to write my own DSL, but then I discovered this. I still think it needs a better DSL than this, but at least they provided a way to do this. Much needed.
For this example, I might write something like this:
step :decide_type, Output(Activity::Left, :credit_card) => Track(:with_credit_card) # Create the track, which would automatically create an implicit End with the same id. Track(:with_credit_card) do step :authorize step :charge end
I guess that's not much different than theirs. Main improvement is it avoids ugly need to specify end_id/end_task.
But that wouldn't actually be enough either in this example, because you would actually want to have a failure track there and a path doesn't have one ... so it sounds like Subprocess and a new self-contained ProcessCreditCard Railway would be the best solution for this particular example... Subprocess is the ultimate in flexibility and gives us all the flexibility we need)
But what if you had a path that you needed to direct to from 2 different tasks' outputs?
Example: I came up with this, but it takes a lot of effort to keep my custom path/track hidden/"isolated" and prevent other tasks from automatically/implicitly going into those steps:
class Example::ValidationErrorTrack < Trailblazer::Activity::Railway step :validate_model, Output(:failure) => Track(:validation_error) step :save, Output(:failure) => Track(:validation_error) # Can't use fail here or the magnetic_to won't work and Track(:validation_error) won't work step :log_validation_error, magnetic_to: :validation_error, Output(:success) => End(:validation_error), Output(:failure) => End(:validation_error) end
puts Trailblazer::Developer.render o Reloading... #<Start/:default> {Trailblazer::Activity::Right} => #<Trailblazer::Activity::TaskBuilder::Task user_proc=validate_model> #<Trailblazer::Activity::TaskBuilder::Task user_proc=validate_model> {Trailblazer::Activity::Left} => #<Trailblazer::Activity::TaskBuilder::Task user_proc=log_validation_error> {Trailblazer::Activity::Right} => #<Trailblazer::Activity::TaskBuilder::Task user_proc=save> #<Trailblazer::Activity::TaskBuilder::Task user_proc=save> {Trailblazer::Activity::Left} => #<Trailblazer::Activity::TaskBuilder::Task user_proc=log_validation_error> {Trailblazer::Activity::Right} => #<End/:success> #<Trailblazer::Activity::TaskBuilder::Task user_proc=log_validation_error> {Trailblazer::Activity::Left} => #<End/:validation_error> {Trailblazer::Activity::Right} => #<End/:validation_error> #<End/:success> #<End/:validation_error> #<End/:failure>
Now attempt to do it with Path... Does the Path() have an ID we can reference? Or maybe we just keep a reference to the object and use it directly in 2 different places?
class Example::ValidationErrorTrack::VPathHelper1 < Trailblazer::Activity::Railway validation_error_path = Path(end_id: "End.validation_error", end_task: End(:validation_error)) do step :log_validation_error end step :validate_model, Output(:failure) => validation_error_path step :save, Output(:failure) => validation_error_path end
o=Example::ValidationErrorTrack::VPathHelper1; puts Trailblazer::Developer.render o Reloading... #<Start/:default> {Trailblazer::Activity::Right} => #<Trailblazer::Activity::TaskBuilder::Task user_proc=validate_model> #<Trailblazer::Activity::TaskBuilder::Task user_proc=validate_model> {Trailblazer::Activity::Left} => #<Trailblazer::Activity::TaskBuilder::Task user_proc=log_validation_error> {Trailblazer::Activity::Right} => #<Trailblazer::Activity::TaskBuilder::Task user_proc=save> #<Trailblazer::Activity::TaskBuilder::Task user_proc=log_validation_error> {Trailblazer::Activity::Right} => #<End/:validation_error> #<Trailblazer::Activity::TaskBuilder::Task user_proc=save> {Trailblazer::Activity::Left} => #<Trailblazer::Activity::TaskBuilder::Task user_proc=log_validation_error> {Trailblazer::Activity::Right} => #<End/:success> #<End/:success> #<End/:validation_error> #<End/:failure>
It's just too bad that:
- there's not a Railway helper in case you want multiple outputs, though we could probably create one pretty easily using Path as our template
- we can't "inline" a separate Railway acitivity (Subprocess "nests" it rather than "inlines")
-
step :direct_debit
I don't think we would/should really want to make this the "success" (Right) path and :credit_card be the "failure" (Left) track.
Maybe it's okay to repurpose Left and Right for something other than failure/success ... but only if we can actually change the default semantic of those signals/outputs. Is that possible? Maybe there's a way to override or delete the default outputs?
-
This connects the failure output to the previous task, which might create an infinity loop and waste your computing time - it is solely here for demonstrational purposes.
Tags
- concise
- tip
- flexibility
- useful
- trailblazer-activity
- example: not how you would actually do it (does something wrong/bad/nonideal illustrating but we should overlook it because that's not the one thing the example is trying to illustrate/show us)
- semantics
- I have a question about this
- feels wrong
- example: in order to keep example concise/focused, may not implement all best practices (illustrates one thing only)
- verbose / noisy / too much boilerplate
- powerful
- helper functions
Annotators
URL
-
-
trailblazer.to trailblazer.to
-
Yes, we could and should use Reform or Dry-validation here.
-
In order to invoke, or run
-
A task is often called step.
-
-
www.morozov.is www.morozov.is
-
I want to emphasize that Result is just an alternative name for the Either monad.
-
-
github.com github.com
-
Examples of different ways of defining forms
Wow, that's a lot of different ways.
The inline_form way in particular seems interesting to me, though it's worth noting that that method is just an example, not actually part of this project's code, so it's not really a first-class option like the other options.
-
-
github.com github.com
-
The assert method is used by all the other assertions. It pushes the second parameter to the list of errors if the first parameter evaluates to false or nil.
Seems like these helper functions could be just as easily used in ActiveRecord models. Therefore, they should be in a separate gem, or at least module, that can be used in both these objects and ActiveRecord objects.
-
-
www.infoworld.com www.infoworld.com
-
That's the whole point of an abstraction layer—to isolate your business logic from a subsystem's mechanics
-
-
-
DSLs can be problematic for the user since the user has to manage state (e.g. am I supposed to call valid? first or update_attributes?). This is exactly why the #validate is the only method to change state in Reform.
-
-
www.metacritic.com www.metacritic.com
-
Yes, you do face difficult choices (moral) but you don't care about it. All you care are the reputation bars. So... Let's kill this guy, who cares if he is innocent, but this faction needs it or I'm dead. Sounds great on paper but to be honest... you just sit there and do whatever for these reputation bars. If you won't, then you lose
-
-
www.quora.com www.quora.com
-
So the hard and unsolvable problem becomes: how up-to-date do you really need to be?
-
After considering the value we place, and the tradeoffs we make, when it comes to knowing anything of significance, I think it becomes much easier to understand why cache invalidation is one of the hard problems in computer science
the crux of the problem is: trade-offs
-
-
stackoverflow.com stackoverflow.com
-
You can write the query in this good old way to avoid error
-
Also there is always an option to use SQL: @items .joins(:orders) .where("orders.user_id = ? OR items.available = true", current_user.id)
-
-
github.com github.com
-
but if .or() throws an error then I'm back to the bad old days of using to_sql
-
- Jan 2021
-
www.zdnet.com www.zdnet.com
-
Systemd flies in the face of the Unix philosophy: 'do one thing and do it well,' representing a complex collection of dozens of tightly coupled binaries
-
-
css-tricks.com css-tricks.com
-
overflow-wrap: break-word; makes sure the long string will wrap and not bust out of the container. You might as well use word-wrap as well because as the spec says, they are literally just alternate names for each other. Some browsers support one and not the other.
-
-
css-tricks.com css-tricks.com
-
Making literal grids. Like X columns with Y gap between them homegrown framework stuff. grid-gap is wonderful, as gutters are the main pain point of grid systems.
-
-
www.donielsmith.com www.donielsmith.com
-
Depending on what other component libraries you’ve used, you may be used to handling events by passing callback functions to component properties, or using a special event syntax – Svelte supports both, though one is usually more appropriate than the other depending on your situation. This post explains both ways.
-
-
atomiks.github.io atomiks.github.io
-
"Headless Tippy" refers to Tippy without any of the default element rendering or CSS. This allows you to create your own element from scratch and use Tippy for its logic only.
-
It's a generic abstraction for the logic and styling of elements that pop out from the flow of the document and float next to a reference element, overlaid on top of the UI.
-
-
popper.js.org popper.js.orgTippy.js1
-
Popper has a sole goal: position elements. That's why we call it a "positioning engine" and not a "tooltip library".
-
- Dec 2020
-
github.com github.com
-
Dropped FFmpeg support (focus on primary functions instead)
Tags
Annotators
URL
-
-
github.com github.com
-
Jbuilder gives you a simple DSL for declaring JSON structures that beats manipulating giant hash structures. This is particularly helpful when the generation process is fraught with conditionals and loops.
-
-
github.com github.com
-
I tried leaking session and page data and indeed it's easy. Too easy. So I definitely agree that session data should not be readable from anywhere but the request itself.
-
-
github.com github.com
-
it focuses on compiling non-standard language extensions: JSX, TypeScript, and Flow. Because of this smaller scope, Sucrase can get away with an architecture that is much more performant but less extensible
-
-
www.npmjs.com www.npmjs.com
-
No more waiting around for pull requests to be merged and published. No more forking repos just to fix that one tiny thing preventing your app from working.
This could be both good and bad.
potential downside: If people only fix things locally, then they may be less inclined/likely to actually/also submit a merge request, and therefore it may be less likely that this actually (ever) gets fixed upstream. Which is kind of ironic, considering the stated goal "No more waiting around for pull requests to be merged and published." But if this obviates the need to create a pull request (does it), then this could backfire / work against that goal.
Requiring someone to fork a repo and push up a fix commit -- although a little extra work compared to just fixing locally -- is actually a good thing overall, for the community/ecosystem.
Ah, good, I see they touched on some of these points in the sections:
- Benefits of patching over forking
- When to fork instead
-
-
github.com github.com
-
I don't think this is what really matters at the end, since whatever is the implementation the goal should be to provide a library that people actually like to use.
-
- Nov 2020
-
stackoverflow.com stackoverflow.com
-
delete myObject.regex; // or, delete myObject['regex']; // or, var prop = "regex"; delete myObject[prop];
-
-
stackoverflow.com stackoverflow.com
-
emphasizing that 'this' and 'global object' are two different things not only in Node.js but in JavaScript in general
-
-
github.com github.com
-
There is no rerender, when you call listen, then all scroll events will warn on chrome. See this entry from svelte: breaking the web
Even the author of this library forgot this about Svelte?? :) (Or maybe he didn't and this response misunderstood/falsely assumed that he had.)
-
-
github.com github.com
-
This one gets the SEO, so I hope you're successful @raythurnevoid.
I assume this gets search traffic because people hope/assume that since there's a React "material-ui" that there might already be a "svelte-material-ui" port/adaptation available. So they search for exactly that (like I did). That and being the first to create that something (with that name).
Tags
- getting/attaining wide reach/audience/popularity due to being first to market
- web search for something brings me here
- being the thing that people are looking for and hoping/assuming already exists
- excellent name
- port (adaptation/translation)
- having a name containing a search term that people are looking for
- getting/attaining wide reach/audience/popularity due to being or having a name containing a search term that people are looking for
Annotators
URL
-
-
timdeschryver.dev timdeschryver.dev
-
Svelte makes the pit of success larger because it hides all of this from us at compile time.
-
-
www.kickstarter.com www.kickstarter.com
-
I'm still calling this v1.00 as this is what will be included in the first print run.
There seems to be an artificial pressure and a false assumption that the version that gets printed and included in the box be the "magic number" 1.00.
But I think there is absolutely nothing bad or to be ashamed of to have the version number printed in the rule book be 1.47 or even 2.0. (Or, of course, you could just not print it at all.) It's just being transparent/honest about how many versions/revisions you've made. 
-
-
-
So handling the interop upfront will avoid users writing invalid ES6 and make sure that they write ES6 that loads CommonJS in the right way.
-
-
stackoverflow.com stackoverflow.com
-
Never use x && y || z when y can return a non-zero exit status.
-
-
unix.stackexchange.com unix.stackexchange.com
-
I think what the author intended to do was check if the second argument was a non-empty string (which is not the same thing as checking whether there are more than 1 argument, as the second argument could be passed but be the empty string).
-
-
mywiki.wooledge.org mywiki.wooledge.org
-
However, this construct is not completely equivalent to if ... fi in the general case.
The caveat/mistake here is if you treat it / think that it is equivalent to if a then b else c. That is not the case if b has any chance of failing.
-
Some people try to use && and || as a shortcut syntax for if ... then ... else ... fi, perhaps because they think they are being clever.
-
-
stackoverflow.com stackoverflow.com
-
can you not also use a .babelrc?
-
-
dylanvann.com dylanvann.com
-
const useEffect = (subscribe) => ({ subscribe })
-
-
github.com github.com
-
This is linux. Ouput first, formatting second. systemctl --no-pager -l should be the default.
-
- Oct 2020
-
github.com github.com
-
github.com github.com
-
medium.com medium.com
-
First of all, we solved our problem! As demonstrated here our app is happily running again.
-
The crux of this pattern is to introduce an index.js and internal.js file.
-
-
-
Any software that makes HTTP requests to other sites should make it straightforward to enable the use of a cache.
-
-
-
Furthermore, JSX encourages bad non-dry code. Having seen a lot of JSX over the past few months, its encourages copypasta coding.
-
-
www.python.org www.python.org
-
A style guide is about consistency. Consistency with this style guide is important. Consistency within a project is more important. Consistency within one module or function is the most important.
-
-
developer.mozilla.org developer.mozilla.org
-
An onevent event handler property serves as a placeholder of sorts, to which a single event handler can be assigned. In order to allow multiple handlers to be installed for the same event on a given object, you can call its addEventListener() method, which manages a list of handlers for the given event on the object.
-
-
github.com github.com
-
"The Map is not the territory" —Alfred Korzybski
-
-
en.wikipedia.org en.wikipedia.org
-
-
Alfred Korzybski remarked that "the map is not the territory" and that "the word is not the thing", encapsulating his view that an abstraction derived from something, or a reaction to it, is not the thing itself.
-
The map–territory relation describes the relationship between an object and a representation of that object, as in the relation between a geographical territory and a map of it.
-
"The menu is not the meal."
-
A map is not the territory it represents, but, if correct, it has a similar structure to the territory, which accounts for its usefulness.
-
-
-
An alternative (maybe not good) would be to restrict {@const} to certain blocks like {#each} and {#if}. In both cases, it significantly reduces the "multiple ways to do the same thing" problem and avoids ergonomic and performance overhead of our current situation.
-
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.
Tags
- convention
- idiomatic pattern (in library/framework)
- consistency
- uniformity
- software development: code organization: where does this code belong?
- programming: multiple ways to do the same thing
- idiomatic code style (programming languages)
- strong conventions resulting in code from different code bases/developers looking very similar
Annotators
URL
-
-
github.com github.com
-
Solid supports templating in 3 forms JSX, Tagged Template Literals, and Solid's HyperScript variant.
-
-
-
focuses way too much on the getter/tracking part of the equation which is really the part you want reduce the mental bandwidth on
-
-
en.wikipedia.org en.wikipedia.org
-
React does not attempt to provide a complete "application library". It is designed specifically for building user interfaces[3] and therefore does not include many of the tools some developers might consider necessary to build an application.
-
- Sep 2020
-
medium.com medium.com
-
Rollup also does something very different compared to the other bundlers. It only tries to achieve one simple goal: Bundle ES modules together and optimise the bundle.
-
-
github.com github.com
-
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.
Tags
- workarounds
- component/library author can't consider/know ahead of time all of the ways users may want to use it
- run-time dynamicness/generics vs. having to explicitly list/hard-code all options ahead of time
- maintenance burden to explicitly define/enumerate/hard-code possible options (explicit interface)
- forking to add a desired missing feature/change
- ugly/kludgey
- trying to prevent one bad thing leading to people doing/choosing an even worse option
- forced to fork/copy and paste library code because it didn't provide enough customizability/extensibility / didn't foresee some specific prop/behavior that needed to be overridable/configurable (explicit interface)
- Svelte: how to affect child component styles
Annotators
URL
-
-
github.com github.com
-
The problem with working around the current limitations of Svelte style (:global, svelte:head, external styles or various wild card selectors) is that the API is uglier, bigger, harder to explain AND it loses one of the best features of Svelte IMO - contextual style encapsulation. I can understand that CSS classes are a bit uncontrollable, but this type of blocking will just push developers to work around it and create worse solutions.
-