- Nov 2024
-
www.youtube.com www.youtube.com
-
once you realize that the world isn't what you think it is it's very easy to grab onto something else and grab onto some kind of weird conspiracy well that's the thing you've been describing thus far as well sorry to in just say but like the openness requires structure
for - quote conspiracy theories - lizard people - first stage of initiation - if reality isn't as it appears, it's easy to latch onto something else - John Churchill
-
- Oct 2024
-
Local file Local file
-
whoever it may be, if he does his workwelly then that work will look very easy.
-
- Sep 2024
-
www.mikeperham.com www.mikeperham.com
-
This makes developing a modern daemon much easier. The init config file is what you use to configure logging, run as a user, and many other things you previous did in code. You tweak a few init config settings; your code focuses less on housekeeping and more on functionality.
-
-
en.wikipedia.org en.wikipedia.org
-
The resolution is related to the precision with which the measurement is made, but they are not the same thing. A sensor's accuracy may be considerably worse than its resolution.
-
- Jan 2024
-
www.bounteous.com www.bounteous.com
-
We’re focusing on classification and taxonomy (which still trips me up on occasion and I live in this space all the time)
-
-
www.smtp2go.com www.smtp2go.com
-
4) Don’t make people log in to unsubscribe.Your subscriber is already overwhelmed by his inbox. He probably spends about 28% of his workday just managing email, according to a McKinsey Global Institute report. So don’t make it any harder by forcing him to log into an account he probably doesn’t remember creating before he can unsubscribe.
-
- Dec 2023
-
-
Compared with simple clients, modern clients are generally much easier to use and more Ruby-like
-
- Nov 2023
-
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.
-
-
-
In API design, exceptional use cases may justify exceptional support. You design for the common case, and let the edge case be edge. In this case, I believe lib deserves ad-hoc API that allows users to do exactly that in one shot:
-
- Sep 2023
-
-
The host itself does not handle the actual FQDN. That is handled by the DNS. FQDN (Fully Qualified Domain Name) is handled by DNS translating names into IP addresses. Using the /etc/hosts file, you are essentially overriding the DNS server.
-
-
github.com github.com
-
Note that the mere presence of this header causes premailer to be skipped, i.e., even setting skip_premailer: false will cause premailer to be skipped. The reason for that is that the skip_premailer is a simple header and the value is transformed into a string, causing 'false' to become truthy.
They should fix this!
lib/premailer/rails/hook.rb
def skip_premailer_header_present? message.header[:skip_premailer] end
-
- Jun 2023
-
www.typescriptlang.org www.typescriptlang.org
-
The main thing to note here is that in the derived class, we need to be careful to repeat the protected modifier if this exposure isn’t intentional.
-
-
easystarallstars.bandcamp.com easystarallstars.bandcamp.com
- 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.
-
- Feb 2023
-
Local file Local file
-
“I only dowhat is easy. I only write when I immediately know how to do it. If Ifalter for a moment, I put the matter aside and do something else.”(Luhmann et al., 1987, 154f.)[4]
By "easy" here, I think he also includes the ideas of fun, interesting, pleasurable, and (Csikszentmihalyi's) flow.
-
- Dec 2022
-
support.google.com support.google.com
-
Here are some recommended unsubscribe methods: Include a prominent link in the message that takes recipients to a page for unsubscribing. Let recipients review the individual mailing lists they’re subscribed to. Let them unsubscribe from lists individually, or all lists at once. Automatically unsubscribe recipients who have multiple bounced messages. Periodically send a confirmation message to recipients to make sure they still want to get your messages.
-
Let recipients easily unsubscribe Always give recipients a way to unsubscribe from your messages. Make unsubscribing easy. Letting people opt out of your messages can improve message open rates, click-through rates, and sending efficiency.
-
Make sure recipients can easily subscribe
-
-
www.rfc-editor.org www.rfc-editor.org
-
Many mail systems allow recipients to report mail as spam or junk, and mail streams from senders whose mail is often reported as junk tend to have poor deliverability. Hence, the mailers want to make it as easy as possible for recipients to unsubscribe; if an unsubscription process is too difficult, the recipient's alternative is to report mail from the sender as junk until the mail no longer appears in the recipient's inbox.
-
-
-
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
-
www.ruby-forum.com www.ruby-forum.com
-
I have been doing different things w/ Ruby for a couple of years now and the only bad thing I can say about it is that it makes programming in other languages feel awfully burdensome. = )
-
-
engineering.appfolio.com engineering.appfolio.com
-
Benoit Daloze of TruffleRuby points out that this is all much easier to read if you define your Ruby internals in Ruby, like they do. He's not wrong.
-
-
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
-
Try to make the Dockerfile easy to understand/read.
-
-
stackoverflow.com stackoverflow.com
-
Then don’t use the phrase “replacement character”, because a) it’s not a character at all, and b) it’s specifically not the character with the Unicode name REPLACEMENT CHARACTER, and c) people easily get confused with issues like this.
-
- Oct 2022
-
webkit.org webkit.org
-
Note: Safari is not WebKit. Safari bugs should be reported to Apple.
-
-
-
Note: For keyword parameters, use @param, not @option.
I sure was looking for @option (knowing already about @param) and assuming/expecting that (if it exists) it would totally be the right thing to use for documenting keyword parameters. So I was quite surprised to see this much-needed warning (for me and others like me who came here expecting/assuming the same thing).
-
- Sep 2022
-
www.syndicatetheory.com www.syndicatetheory.com
-
Do yourself and your peers a favor, write code with them in mind.
-
-
metalblueberry.github.io metalblueberry.github.io
-
Also, the chances of breaking something are really high, because not even you remember how the code actually works.
-
-
github.com github.com
-
PRs will introduce various mechanisms step by step. Some of these have issues already. A possible breakdown could be: Annotation collection using instance values (links also does this) Defining annotations to which multiple keywords contribute (this is new, see Need more details of annotation collection #530) Defining subschema and keyword processing results to include annotations Processing sequence for keywords that dynamically rely on the results of static keywords The actual definition of unevaluatedProperties An example of unevaluatedProperties
-
- Jun 2022
-
easy-leech.to easy-leech.to
-
- Apr 2022
-
lunduke.substack.com lunduke.substack.com
-
the C standard — because that would be tremendously complicated, and tremendously hard to use
"the C standard [... is] tremendously complicated, and tremendously hard to use [...] full of wrinkles and [...] complex rules"
-
-
gobookmart.com gobookmart.com
-
The easiest and simplest way to get out of a reading slump or to get into reading in the first place is to begin small. Novellas offer (almost) the sumptuousness and holisticness of novels. But they also don’t strain the mind too much because they are quick reads. Here are 10 short and easy to read books that will help beginners start reading. This list of novellas and short novels that are easy to slip into, not just because of their length but also because of the style of writing itself.
-
- 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
-
www.postgresql.org www.postgresql.org
-
Although COALESCE, GREATEST, and LEAST are syntactically similar to functions, they are not ordinary functions
-
-
www.yld.io www.yld.io
-
For example, did you known React has nothing to do with reactive programming?
-
- Jan 2022
-
stackoverflow.com stackoverflow.com
-
test2 being marked async does wrap your return value in a new promise:
-
-
thecodebarbarian.com thecodebarbarian.com
-
Seems easy, right? How about the below code, what will it print? new Promise((_, reject) => reject(new Error('woops'))). catch(error => { console.log('caught', err.message); }); It'll print out an unhandled rejection warning. Notice that err is not defined!
-
-
flaviabastos.ca flaviabastos.ca
-
Next, let’s say that your ticket is correct (so you made through security just fine!) and the gate number in your ticket says “Gate 24” but you walk to Gate 27. The attendant cannot authorize you to go through that gate because it’s not the right gate for your ticket.
They have these mixed up! (Which is understandable, because 401 is misnamed "Unauthorized but should be named "Unauthenticated")
Checking if authenticated (which, if it fails the check, should return 401 for authentication error) comes first,
and then checking if authorized (which, if it fails the check, should return 403 for authorization error)
-
In other words, an “incorrect ticket” is similar to messing up your credentials: wrong username and/or password and you receive back a 403 Forbidden. Using the correct credentials but trying to access a resource that is not allowed for those credentials returns you a 401 Unauthorized.
They have these mixed up! (Which is understandable, because 401 is misnamed "Unauthorized but should be named "Unauthenticated")
Checking if authenticated (which, if it fails the check, should return 401 for authentication error) comes first,
and then checking if authorized (which, if it fails the check, should return 403 for authorization error)
See for example https://www.loggly.com/blog/http-status-code-diagram/
-
You can also think that 403 happens before 401, despite the natural number order: you will not receive a 401 until you resolve a 403.
They have these mixed up! (Which is understandable, because 401 is misnamed "Unauthorized but should be named "Unauthenticated")
Checking if authenticated (which, if it fails the check, should return 401 for authentication error) comes first,
and then checking if authorized (which, if it fails the check, should return 403 for authorization error)
See for example https://www.loggly.com/blog/http-status-code-diagram/
-
These two sound pretty similar to me. And to make things even more confusing, 403 “Forbidden” says that the server refuses to “authorize” the request but it’s code 401 that is called “Unauthorized”. 😵
-
-
stackoverflow.com stackoverflow.com
-
There's a problem with 401 Unauthorized, the HTTP status code for authentication errors. And that’s just it: it’s for authentication, not authorization. Receiving a 401 response is the server telling you, “you aren’t authenticated–either not authenticated at all or authenticated incorrectly–but please reauthenticate and try again.” To help you out, it will always include a WWW-Authenticate header that describes how to authenticate.
-
So, for authorization I use the 403 Forbidden response. It’s permanent, it’s tied to my application logic, and it’s a more concrete response than a 401. Receiving a 403 response is the server telling you, “I’m sorry. I know who you are–I believe who you say you are–but you just don’t have permission to access this resource. Maybe if you ask the system administrator nicely, you’ll get permission. But please don’t bother me again until your predicament changes.”
-
I would expect that 401 to be named "Unauthenticated" and 403 to be named "Unauthorized". It is very confusing that 401, which has to do with Authentication,
-
-
www.typescriptlang.org www.typescriptlang.org
-
It’s important to understand that an implements clause is only a check that the class can be treated as the interface type. It doesn’t change the type of the class or its methods at all. A common source of error is to assume that an implements clause will change the class type - it doesn’t!
-
-
kit.svelte.dev kit.svelte.dev
-
Code that is per-component instance should go into a second <script> tag.
But this seems to conflict with https://hyp.is/NO4vMmzVEeylBfOiPbtB2w/kit.svelte.dev/docs
The load function is reactive, and will re-run when its parameters change, but only if they are used in the function.
which seems to imply that load is not just run once for the component statically, but rather, since it can be reactive to:
url, params, fetch, session and stuff
may be sufficiently like a per-instance callback, that it could be used instead of onMount?
-
- Dec 2021
-
www.youtube.com www.youtube.com
-
Easy Star All-Stars
Tags
Annotators
URL
-
-
dba.stackexchange.com dba.stackexchange.com
-
.pgpass does not define a default database. It only provides the passwords for a combination of hostname, database and username.
-
- Nov 2021
-
drive.google.com drive.google.com
-
easy access to digi-tools.
easy access to digi-tools.
-
- Oct 2021
-
programmingwithmosh.com programmingwithmosh.com
-
Therefore, following the reasoning we’ve developed above, it seems obvious that strings are objects as well. Right?
-
- Sep 2021
-
breakingfreemediation.com breakingfreemediation.com
-
Sanitary Tee and Wye are parts of the drain vent system. If you are doing plumbing works, you may have to use them in some sort. However, they look almost similar, and this confuses a lot of people. Especially to choose the one that best fits your drain system.
-
-
www.dynare.org www.dynare.orgDynare1
-
Ease of Use Write your model almost as you would on paper and Dynare will take care of the rest!
-
-
github.com github.com
-
Notice that the plugin is placed in the resolve.plugins section of the configuration. tsconfig-paths-webpack-plugin is a resolve plugin and should only be placed in this part of the configuration. Don't confuse this with the plugins array at the root of the webpack configuration object.
-
-
stackoverflow.com stackoverflow.com
-
The important part I have come to notice is <script type="module"></script> make sure you add that otherwise you will get that error.
-
I still don't understand the difference between a script and a module
-
-
stackoverflow.com stackoverflow.com
-
The question is similar but its in a Rails context. The solutions would answer my question, but I'm almost certain that he could probably leverage Arel to solve his problem. The question I posted was designed purely as a Ruby question so that it was easier to search for. You might want to suggest an edit of the title of his question because it didn't show up when I searched for a solution to my problem.
-
- Aug 2021
-
css-tricks.com css-tricks.com
-
I always had to set the height of them literally almost 50% taller than the content itself to accommodate for the innards growing when the form was submitted with errors (the error messaging expanded the height). If I didn’t, the submit button would get cut off making the form un-submittable.
-
-
stackoverflow.com stackoverflow.com
-
Good catch, @Hokascha. The project claims support for cross-domain iframes, but reading the docs reveals that it does still require server access to the embedded domain.
-
-
stackoverflow.com stackoverflow.com
-
It might be worth moving the latest updates to the top of this answer. I had to go through the whole thing to get to the best answer, flexbox.
-
-
-
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.
-
-
softwareengineering.stackexchange.com softwareengineering.stackexchange.com
-
For better understanding of something that is complicated, just make it more simplier. In this example, just split the word into atoms, like these: Update - UP_DATE - make it up to date; Upgrade - UP_GRADE - move it to the upper (or next) grade (or level).
-
- Jul 2021
-
blog.appsignal.com blog.appsignal.com
-
This works nicely wherever we show authors, but after we deploy to production, the folks from other parts of the world won’t get notified anymore about their songs. Mistakes like these are easy to make when using concerns.
-
-
stackoverflow.com stackoverflow.com
-
was due to a form that was submitted (ALWAYS SET THAT TYPE-PROPERTY ON YOUR BUTTONS!) after my onclick-event fired, but before my request had any chance to be completed.
-
-
test-prof.evilmartians.io test-prof.evilmartians.ioTestProf2
-
That's it! Just replace let! with let_it_be. That's equal to the before_all approach but requires less refactoring.
-
That technique works pretty good but requires us to use instance variables and define everything at once. Thus it's not easy to refactor existing tests which use let/let! instead.
-
-
developer.mozilla.org developer.mozilla.org
-
(Not a Boolean attribute!)
-
- Jun 2021
-
stackoverflow.com stackoverflow.com
-
Note that & is a line terminator like ; (write command& not command&;).
-
-
stackoverflow.com stackoverflow.com
-
I've seen (and fixed) Ruby code that needed to be refactored for the client objects to use the accessor rather than the underlying mechanism, even though instance variables aren't directly visible. The underlying mechanism isn't always an instance variable - it can be delegations to or manipulations of a class you're hiding behind a facade, or a session store with a particular format, or all kinds. And it can change. 'Self-encapsulation' can help if you need to swap a technology, a library, an object specification, etc.
-
Also, Sandi Metz mentions this in POODR. As I recall, she also advocates wrapping bare instance variables in methods, even when they're only used internally. It helps avoid mad refactoring later.
-
But sure, go ahead and enforce self-encapsulation if you like; it makes it easier to do memoization or whatever later on.
-
-
stackoverflow.com stackoverflow.com
-
That's not exactly Symbol#to_proc conversion — it's part of the inject interface, mentioned in the documentation. The to_proc operator is &
-
-
www.migrationencounters.org www.migrationencounters.org
-
I've never felt challenged by any of my teachers. All their curriculums I've laughed at. I run circles around my teachers and most of them hated me because I'd finish my work and I'm pretty sure they hated me. I remember this lady. What was her name? I don't remember her name, but she was redheaded with glasses. She fucking hated me, man, because I'd laugh at pretty much all her work. I'd finish it in seconds and she'd get so frustrated with me because she's like, "Ugh. What am I supposed to do with you?"
Time in the US, School, Teachers
Tags
Annotators
URL
-
- May 2021
-
syslog.ravelin.com syslog.ravelin.com
-
Seamless transitions; changes made to the old repositories after they were migrated must be imported to the new monorepository.
-
-
stackoverflow.com stackoverflow.com
-
You may want to try putting the one-liner (everything in the single quotes) in an actual script, with a bash shebang line. I think filter-branch is probably trying to run this in sh, not bash.
-
-
github.com github.com
-
--tag-rename '':'my-module-' (the single quotes are unnecessary, but make it clearer to a human that we are replacing the empty string as a prefix with my-module-)
-
- Apr 2021
-
unix.stackexchange.com unix.stackexchange.com
-
I just wanted to point out that the syntax is not supported by the POSIX standard and thus won't universally work in /bin/sh scripts (many people erroneously use bash syntax in /bin/sh scripts)
-
-
en.wikipedia.org en.wikipedia.org
-
The use of U+212B 'Angstrom sign', which was encoded due to round-trip mapping compatibility with an East-Asian character encoding, is discouraged, and the preferred representation is U+00C5 'capital letter A with ring above', which has the same glyph.
Is there a difference in semantic meaning between the two? And if so, what is it? 
-
-
stackoverflow.com stackoverflow.com
-
If anything it thwarts separation of concerns to a degree.
-
-
en.wikipedia.org en.wikipedia.org
-
In many computing contexts, "TTY" has become the name for any text terminal, such as an external console device, a user dialing into the system on a modem on a serial port device, a printing or graphical computer terminal on a computer's serial port or the RS-232 port on a USB-to-RS-232 converter attached to a computer's USB port, or even a terminal emulator application in the window system using a pseudoterminal device.
It's still confusing, but this at least helps/tries to clarify.
-
-
linusakesson.net linusakesson.net
-
A "tty" neither has anything to do with rendering text.
-
-
en.wikipedia.org en.wikipedia.org
-
The terminal emulator process must also handle terminal control commands, e.g., for resizing the screen.
Tags
Annotators
URL
-
-
unix.stackexchange.com unix.stackexchange.com
-
2 out of 3 people in my household do not find it easy to understand. Maybe that is is not representative, but keep in mind that something you yourself understand (or in this case think you understand) always seems easy.
-
Notice the use of Enter key after backslash in the sed command.
-
Although echo "$@" prints the arguments with spaces in between, that's due to echo: it prints its arguments with spaces as separators.
due to echo adding the spaces, not due to the spaces already being present
Tag: not so much:
whose responsibility is it? but more: what handles this / where does it come from? (how exactly should I word it?)
Tags
- hard to understand
- easy to miss / not notice (attention)
- from different perspective/point of view
- important distinction
- easy to falsely assume
- just because _; doesn't mean _
- representative sample
- annotation meta: may need new tag
- whose responsibility is it?
- not
- important point
- easy to understand
Annotators
URL
-
-
careerfoundry.com careerfoundry.com
-
Many designers strive to create products that are so easy to navigate, their users can flow through them at first glance. To design something with this level of intuitiveness, it’s imperative designers understand affordances—what they are and how to use them.
-
-
medium.com medium.com
-
However, some users didn’t know that they could interact with and click on the text field. It looked like an empty box. The line affordance under the old text fields was not clear to some users. The line was confused with a divider.
-
The label and input were confused with body text, especially in dense compositions.
-
-
code.visualstudio.com code.visualstudio.com
-
We are continuing an overhaul of our default startup editor in order to provide relevant extension-contributed tips and walkthroughs, intended to make both core VS Code features and extension contributions more approachable to new users.
-
- Mar 2021
-
final-form.org final-form.org
-
If you are doing a regular expression check, your function should handle undefined as a potential value.
-
-
www.jackfranklin.co.uk www.jackfranklin.co.uk
-
but I like that Svelte comes with a good CSS story out the box.
comes with a good CSS story out the box
-
Svelte looks pretty similar, but has two small changes that personally make the Svelte code easier to read, in my opinion:
-
-
en.wikipedia.org en.wikipedia.org
-
Not to be confused with tree (graph theory), a specific type of mathematical object.
Confusing: https://en.wikipedia.org/wiki/Tree_(data_structure) says
Not to be confused with tree (graph theory) "Tree (graph theory)"), a specific type of mathematical object. but https://en.wikipedia.org/wiki/Tree_(graph_theory) redirects to https://en.wikipedia.org/wiki/Tree_structure and https://en.wikipedia.org/wiki/Tree_structure is in category Trees (data structures) So is one a subtype/hyponym of the other ... or what?? How are they related? Skimming the articles a bit, esp. the first paragraph which clearly states as much ( :) ), I believe the answer is: a tree (data structure) is an implementation (in a programming language) of / or a "type that simulates" a hierarchical tree structure. a tree (data structure) is the computer science analogue/dual to tree structure in mathematics
-
Not to be confused with trie, a specific type of tree data structure. Not to be confused with tree (graph theory), a specific type of mathematical object.
-
-
en.wikipedia.org en.wikipedia.org
-
The is-a relationship may also be contrasted with the instance-of relationship between objects (instances) and types (classes): see Type–token distinction.
-
-
www.chevtek.io www.chevtek.io
-
But I believe the core philosophy of tiny modules is actually sound and easier to maintain than giant frameworks.
-
-
tobeagile.com tobeagile.com
-
The number one problem that I see developers have when practicing test-first development that impedes them from refactoring their code is that they over-specify behavior in their tests. This leads developers to write more tests than are needed, which can become a burden when refactoring code.
-
-
github.com github.com
-
Unfortunately, given how widely used concat_javascript_sources is, this required changing a lot of tests. It would be nice if we could remove some of the duplication in these tests (so that similar changes would not require updating this many tests), but that can come in another PR.
-
-
github.com github.com
-
but I still have no idea if I'm writing this new file correctly.
-
-
faastruby.io faastruby.io
-
What happens to my functions? I encourage you to migrate your workloads to OpenFaaS.
-
-
math.stackexchange.com math.stackexchange.com
-
An equation is any expression with an equals sign, so your example is by definition an equation. Equations appear frequently in mathematics because mathematicians love to use equal signs. A formula is a set of instructions for creating a desired result. Non-mathematical examples include such things as chemical formulas (two H and one O make H2O), or the formula for Coca-Cola (which is just a list of ingredients). You can argue that these examples are not equations, in the sense that hydrogen and oxygen are not "equal" to water, yet you can use them to make water.
-
-
css-tricks.com css-tricks.com
-
You’d think :empty would be it, but it’s not. That’s for matching things like <p></p>… container elements with nothing inside them. Inputs are no-content elements already.
-
-
trailblazer.to trailblazer.to
-
It is much easier to track what is going on within the activity. Instead of transporting additional state via ctx, you expose the outcome via an additional end event.
Note: It's only super easy to see what's going on if you have the benefit of a diagram.
-
So why the over-complication? What we got now is replicating a chain of && in the former version. This time, however, you will know which condition failed and what went in by using tracing. Look at the trace above - it’s impossible to not understand what was going on.
-
-
trailblazer.to trailblazer.to
-
We have fully documented the migration path to 2.1 while upgrading several complex apps. It worked.
-
- Feb 2021
-
sass-lang.com sass-lang.com
-
Sass variables, like all Sass identifiers, treat hyphens and underscores as identical. This means that $font-size and $font_size both refer to the same variable. This is a historical holdover from the very early days of Sass, when it only allowed underscores in identifier names. Once Sass added support for hyphens to match CSS’s syntax, the two were made equivalent to make migration easier.
-
-
sobolevn.me sobolevn.me
-
Now you can easily spot them! The rule is: if you see a Result it means that this function can throw an exception. And you even know its type in advance.
-
we also wrap them in Failure to solve the second problem: spotting potential exceptions is hard
-
Almost everything in python can fail with different types of exceptions: division, function calls, int, str, generators, iterables in for loops, attribute access, key access, even raise something() itself may fail. I am not even covering IO operations here. And checked exceptions won’t be supported in the nearest future.
-
You still need to have a solid experience to spot these potential problems in a perfectly readable and typed code.
-
print will never be actually executed. Because 1 / 0 is an impossible operation and ZeroDivisionError will be raised.
Tags
- easy to miss / not notice (attention)
- rule of thumb
- difficult/hard problem
- easy to see/notice
- the benefit of experience
- monad: Either
- error/exception handling
- railway-oriented programming
- error/exception handling: spotting potential exceptions is hard
- anticipating what could go wrong / error/exception cases
- can't think of everything
- type checking
- type annotations
Annotators
URL
-
-
github.com github.com
-
For this one we'll define a helper method to handle raising the correct errors. We have to do this because calling .run! would raise an ActiveInteraction::InvalidInteractionError instead of an ActiveRecord::RecordNotFound. That means Rails would render a 500 instead of a 404.
True, but why couldn't it handle this for us?
-
-
github.com github.com
-
The main realization came when I figured out that the main_model was just another association. This means we can move a lot of logic to just that class and reason about it a lot better.
-
-
-
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.
-
-
-
Writing the uniqueness validations yourself is easy so I felt it was better to leave this up to the developer
-
-
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
-
-
stackoverflow.com stackoverflow.com
-
If you teach your users to trust that URL bar is supposed to not change when they click links (e.g. your site uses a big iframe with all the actual content), then the users will not notice anything in the future either in case of actual security vulnerability.
-
- Jan 2021
-
blog.linuxmint.com blog.linuxmint.com
-
We informed and documented. We made it easy for you to understand the problem and also to take action if you disagreed. I hope you didn’t read https://linuxmint-user-guide.readthedocs.io/en/latest/snap.html#how-to-install-the-snap-store-in-linux-mint-20. I can’t understand how it could be simpler.
-
Is it harder to enable it in Mint than it is to disable it in Ubuntu? Not at all. Is how to enable it better documented in Mint than how to disable it in Ubuntu? Absolutely: https://linuxmint-user-guide.readthedocs.io/en/latest/snap.html.
Tags
Annotators
URL
-
-
-
If components gain the slot attribute, then it would be possible to implement the proposed behavior of <svelte:fragment /> by creating a component that has a default slot with out any wrappers. However, I think it's still a good idea to add <svelte:fragment /> so everyone who encounters this common use case doesn't have to come up with their own slightly different solutions.
-
-
developer.mozilla.org developer.mozilla.org
-
While it is easy to imagine that all iterators could be expressed as arrays, this is not true. Arrays must be allocated in their entirety, but iterators are consumed only as necessary. Because of this, iterators can express sequences of unlimited size, such as the range of integers between 0 and Infinity.
-
-
github.com github.com
-
I've reproduced, in a very simple way, what I would like it to do: https://svelte.dev/repl/2b0b7837e3ba44b5aba8d7e774094bb4?version=3.19.1
This is the same URL as the original example given in issue description.
I'm guessing what happened is they started with that one, made some changes, and then I think they must have forgot to save their modified REPL (which would have generated a new, unique URL).
-
-
-
I wanted to use GitHub Gists which are a wonderfully low friction way of sharing code
-
-
stackoverflow.com stackoverflow.com
-
It should be as simple to use as in the days of jQuery's tooltips.
-
-
atomiks.github.io atomiks.github.io
-
This is a dynamic value because of hybrid devices which can use a mix of mouse and touch input.
-
-
-
It’s fairly common to assume that there is an onHover event handler in React, especially when you consider the naming conventions of the other event handlers, such as onClick, onSubmit, and onDrag.Why wouldn’t there be an onHover event in React?
-
-
stackoverflow.com stackoverflow.com
-
“JSONP is JSON with extra code” would be too easy for the real world. No, you gotta have little discrepancies. What’s the fun in programming if everything just works? Turns out JSON is not a subset of JavaScript. If all you do is take a JSON object and wrap it in a function call, one day you will be bitten by strange syntax errors, like I was today.
-
-
discourse.ubuntu.com discourse.ubuntu.com
-
Users want work be done. Not struggling about how allowing access to removable medias or such a file on another partition… Not breaking their habits or workflows each time a snap replaces a deb.
-
- Dec 2020
-
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.
-
-
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
-
# fix a bug in one of your dependencies vim node_modules/some-package/brokenFile.js # run patch-package to create a .patch file npx patch-package some-package
I love how directly this allows you to make the change -- directly on the source file itself -- and then patch-package does the actual work of generating a patch from it. Brilliant.
-
-
github.com github.com
-
Can we just forward/bubble all events emitted by the underlying input element?
-
-
github.com github.com
-
Also agree that <svelte:slot> is perhaps a little confusing since it replaces the slot attribute rather than the slot element, so <svelte:fragment> would make more sense
-
-
github.com github.com
-
Just to reiterate the discussion on the RFC, there was a suggestion that we change <svelte:slot slot="foo"> to <svelte:fragment slot="foo">, since it's the counterpart to a <slot> rather than an equivalent to it
-
-
stackoverflow.com stackoverflow.com
-
I changed if (value) { to if (typeof value !== "undefined") { as it was skipping some keys
-
Be careful when returning an object literal in the arrow function shortcut syntax like this. Don't forget the additional parens around the object literal!
-
-
github.com github.com
-
Got a bit sidetracked into refactoring the Element visitor code, so haven't actually started on the event handler stuff per se, but that'll come soon. Element stuff is starting to feel a bit more logical and easier to follow.
-
-
blog.kotlin-academy.com blog.kotlin-academy.com
-
Event listener and event handler are two terms that cause confusion.
-
-
stackoverflow.com stackoverflow.com
-
The most basic difference is the association Listener is associated with Event Source (Ex: key board) Handler is associated with an Event (Ex: keydown)
-
-
developer.mozilla.org developer.mozilla.orgChrome1
-
In a browser, the chrome is any visible aspect of a browser aside from the webpages themselves (e.g., toolbars, menu bar, tabs). This is not to be confused with the Google Chrome browser.
-
-
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
-
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.)
-
-
timdeschryver.dev timdeschryver.dev
-
Svelte makes the pit of success larger because it hides all of this from us at compile time.
-
-
-
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.
-
-
github.com github.com
-
To bundle this in your own code, use a Sass processor (not a Sass Svelte preprocessor, but a Sass processor)
-
-
final-form.org final-form.org
-
if the value given in value is contained in the array that is the value for the field for the form
distinction:
- the value given in
value
prop ofField
- the value for the field for the form (formState.values[field_name])
- the value given in
-
-
stackoverflow.com stackoverflow.com
-
I think you meant a different set of arguments to Object.assign ? should be Object.assign({}, api.headers, headers) because you don't want to keep adding custom headers into hash of common api.headers. right?
-
-
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.
-
-
-
When you email me, please include a minimal bash script that demonstrates the problem in the body of the email (not as an attachment). Also very clearly state what the desired output or effect should be, and what error or failure you are getting instead. You are much more likely to get a response if your script isn't some giant monster with obtuse identifiers that I would have to spend all afternoon parsing.
-
You could decide to trust yourself and your teammates to always remember this special case. You can all freely use short-circuiting, but simply don't allow a short-circuit expression to be on the last line of a script, for anything actually deployed. This may work 100% reliably for you and your team, but I don't believe that is the case for myself and many other developers. Of course, some kind of linter or commit hook might help.
-
-
github.com github.com
-
It might seem too obvious but I've been struggling long time with this until I got that you need to include the base image too
Thanks for the tip
-
the "trick" is to pass to --cache-from the image you are rebuilding (and have it pulled already) and ALSO the image that it uses as base in the FROM.
Tags
Annotators
URL
-
-
imfeld.dev imfeld.dev
-
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
-
Dart is substantially easier to learn than Ruby
-
- Oct 2020
-
hub.docker.com hub.docker.com
-
www.basefactor.com www.basefactor.com
-
If you want to implement a form with a superb User Experience, you have to take care of many variables:
-
Managing Form State (holding field information, check if a control has been touched, if the user has clicked the submit button, who owns the current focus...) can be tedious and prone to errors. We can get help from React Final Form to handle these challenges for us.
Tags
- a lot of things to consider
- difficult/hard problem
- user experience
- can't keep entire system in your mind at once (software development) (scope too large)
- tedious
- too hard/difficult/much work to expect end-developers to write from scratch (need library to do it for them)
- form design
- easy to get wrong
Annotators
URL
-
-
stackoverflow.com stackoverflow.com
-
The only tricky part is that the error will come back as meta.submitError, so you need to check for both when displaying your error.
-
-
english.stackexchange.com english.stackexchange.com
-
In the context of software engineering, I've always used "dependent" and "dependee".
-
-
-
But it sounds like the library could use some way to setTouched()
-
-
medium.com medium.com
-
In a large code base, this will result in moving imports randomly around until stuff just happens to work. Which is often only temporary, as a small refactoring or change in import statements in the future can subtly adjust the module loading order, reintroducing the problem.
-
-
-
Any software that makes HTTP requests to other sites should make it straightforward to enable the use of a cache.
-
-
svelte.dev svelte.dev
-
A simple rule of thumb: the name of the updated variable must appear on the left hand side of the assignment. For example this... const foo = obj.foo; foo.bar = 'baz';...won't update references to obj.foo.bar, unless you follow it up with obj = obj.
-
-
final-form.org final-form.org
-
Wondering how to get field state from multiple fields at once? People coming from Redux-Form might be wondering where the equivalent of Redux Form's Fields component is, as a way to get state from several fields at once. The answer is that it's not included in the library because it's so easy to write one recursively composing Field components together.
-
-
en.wikipedia.org en.wikipedia.org
-
One of the significant differences between the two is that a call to a partially applied function returns the result right away, not another function down the currying chain; this distinction can be illustrated clearly for functions whose arity is greater than two.
-
-
stackoverflow.com stackoverflow.com
-
Looks like the problem is that debounce defaults to waiting for 0 ms ... which is completely useless!
It would be (and is) way to easy to omit the 2nd parameter to https://lodash.com/docs/4.17.15#debounce.
Why is that an optional param with a default value?? It should be required!
There must be some application where a delay of 0 is useless. https://www.geeksforgeeks.org/lodash-_-debounce-method/ alludes to / implies there may be a use:
When the wait time is 0 and the leading option is false, then the func call is deferred until to the next tick.
But I don't know what that use case is. For the use case / application of debouncing user input (where each character of input is delayed by at least 10 ms -- probably > 100 ms -- a delay of 0 seems utterly useless.
-
It looks like you accidentally passed resolve() (immediately invoking the function) directly to setTimeout rather than passing a function to invoke it. So it was being resolved immediately instead of after a 1000 ms delay as intended.
I guess this is the "immediately invoked function" problem.
Not to be confused with: immediately invoked function expression. (Since it is a regular named function and not a function expression.)
-
You should not create a new debounce function on every render with: return new Promise(resolve => { debounce(() => resolve(this.getIsNameUnique(name)), 2000); }); Instead you should just wrap your whole function isNameUnique with the debounce (see my sandbox). By creating a new debounce function on every hit, it cannot 'remember' that is was called or that is will be called again. This will prevent the debouncing.
-
-
stackoverflow.com stackoverflow.com
-
_.debounce creates a function that debounces the function that's passed into it. What your s.search function is doing is calling _.debounce all over again every time s.search is called. This creates a whole new function every time, so there's nothing to debounce.
-
I run s.search() by typing into an input box, and if I type gibberish very quickly, the console prints out "making search request" on every key press, so many times per second -- indicating that it hasn't been debounced at all.
-
they're not invoking the function that _.debounce returns
-
-
github.com github.com
-
Also, if you don't put that implementation of URLSearchParams in the global scope you're not using it as a polyfill but a ponyfill, and those are meant for your code, not for external dependencies.
first sighting: ponyfill
-
-
humanwhocodes.com humanwhocodes.com
-
Maintainable code is code that you don’t need to modify when the browser changes.
-
-
-
Furthermore, JSX encourages bad non-dry code. Having seen a lot of JSX over the past few months, its encourages copypasta coding.
-
hyperscript is much simpler to refactor and DRY up your code than with JSX, because, being vanilla javascript, its easier to work with variable assignment, loops and conditionals.
Tags
- JSX
- making it easy for later refactoring
- template language vs. reusing existing language constructs
- making it easy to do the right thing
- making it easy to do the wrong thing
- copy and paste programming
- reuse existing language constructs
- hyperscript
- duplication
- javascript
- copy and paste
- comparison with:
- template language: bad: by not reusing existing language constructs; forced to reinvent equivalents which are inferior and unfamiliar
- making it too easy to do the wrong thing
- it's just _
- encourages the wrong thing
Annotators
URL
-
-
leiss.ca leiss.ca
-
Good risk management is inherently simple; adding too many complexities increases the likelihood of overlooking the obvious.
-
-
www.agileconnection.com www.agileconnection.com
-
One of the inherent dangers of any form of iterative development is confusing iteration with oscillation.
-
-
-
I suppose it all comes down to tooling. It should be easy to author a pattern. A set of implicit (possibly explicit) patterns to author patterns may be useful.
Tags
Annotators
URL
-
-
dylanvann.com dylanvann.com
-
To fix our Svelte version you might think we could use beforeUpdate or afterUpdate, but these lifecycle functions are related to the DOM being updated, not to prop updates. We only want to rerun our fetching when the album prop is changed.
-
When using React hooks there is no concept of onMount because the idea of only running some code on mount leads to writing non-resilient components, components that do one thing when they mount, and then don’t take prop changes into account.
Tags
- the natural assumption
- confusing for newcomers
- easy mistake to make
- surprising
- Svelte for someone coming from React
- lifecycle callbacks
- easy to forget
- false assumptions
- easy to confuse (mix up)
- UI library: reacting to prop changes
- component design: resilient components
- easy to get wrong
Annotators
URL
-
-
github.com github.com
-
Svelte right now has a lot of opportunities to have component state become out of sync with props.
-
-
-
Templates are prone to unnoticed runtime errors, are hard to test, and are not easy to restructure or decompose.
-
In contrast, Javascript-made templates can be organised into components with nicely decomposed and DRY code that is more reusable and testable.
-
-
final-form.org final-form.org
-
Note that if you are calling reset() and not specify new initial values, you must call it with no arguments. Be careful to avoid things like promise.catch(reset) or onChange={form.reset} in React, as they will get arguments passed to them and reinitialize your form.
-
- Sep 2020
-
final-form.org final-form.org
-
Keep in mind that the values in meta are dependent on you having subscribed to them with the subscription prop.
-
-
www.javascriptjanuary.com www.javascriptjanuary.com
-
The problem I have with this approach to state and prop variables is that the difference between them is very blurry. In React you can clearly see that a prop is an input to component (because of clear function notation), and that state is something internal. In Svelte they are both just variables, with the exception that props use export keyword.
This is something I've seen before: people noticing that Svelte is missing some kind of naming convention.
React has use___ convention, for example. Without that, it makes it hard to see the difference between and know just from the name that a function is an (mentioned in the other article I read) action and not a event handler or even component, for example.
-
-
stackoverflow.com stackoverflow.com
-
Note that Array.entries() returns an iterator, which is what allows it to work in the for-of loop; don't confuse this with Object.entries(), which returns an array of key-value pairs.
-
-
kidspiritonline.com kidspiritonline.com
-
Knowing what is expected allows a person using assistive technology to prepare a conversation starter.
interesting method of planning ahead and showing how most easy conversation is predictable
-
-
github.com github.com
-
When a component reaches such a size that this becomes a problem, the obvious course of action is to refactor it into multiple components. But the refactoring is complex for the same reason: extracting the styles that relate to a particular piece of markup is an error-prone manual process, where the relevant styles may be interleaved with irrelevant ones.
-
-
github.com github.com
-
(At the point at which it does make sense to turn this into a separate Tooltip.svelte component, the extraction is a completely mechanical process that could even be automated by tooling.)
-
-
github.com github.com
-
It would also reduce friction for new users, who would no longer have to learn a new syntax for each new framework.
-