10,000 Matching Annotations
  1. Sep 2024
    1. :
    2. after_commit on: :create do OnboardingDripper.subscribe!(self) end
    3. drip engine for managing, creating, and performing scheduled messages sequences
    4. What's wrong with this?
    5. You're checking state in a mailer
    6. It's going to be so fun to scale when you finally want to add more unsubscribe links for different types of sequences
    7. If you have anything like this is your codebase, you need Caffeinate:
    8. Is this thing dead? No! Not at all! There's not a lot of activity here because it's stable and working!
    1. This looks at Caffeinate::Mailing records where send_at has past, skipped_at is nil, and the associated Caffeinate::CampaignSubscription is has empty ended_at and unsubscribed_at values.
    2. AbandonedCartDripper
    1. For example, if you are Netflix and have a Subscription and a WatchHistory object. If a user does not finish watching a video, you may want to remind them that they can finish watching it. If their subscription lapses, you may want to also remind them in a separate campaign.
    2. It has two relations that are similar, but different: subscriber, and user. The concept here is that a User may have many objects that are relevant to warrant their own Campaign. For this reason, we include this as a default. For example, if you are Netflix and have a Subscription and a WatchHistory object. If a user does not finish watching a video, you may want to remind them that they can finish watching it. If their subscription lapses, you may want to also remind them in a separate campaign. So, you'd have separate Caffeinate::CampaignSubscription objects where the subscriber is the relevant Subscription object or the WatchHistory object, and the user is the User.
    1. the terms allowance and tolerance are used inaccurately and are improperly interchanged
    1. Updated
    2. Sure, it is not needed, we can always write things in a different way. As a matter of fact, with such an argument, hardly any improvement should be accepted.
    3. In practice when people use ||, they do mean ?? (whatever its spelling). It just so happens that most of the time, it does what you want, because you happen to not be dealing with Booleans. But the semantics you mean to express is not about "truthness", but about "nilness". And occasionally you get bitten because false does exist, and behaves differently.
    4. Here's example code which works around the lack of a ??= operator in the wild:
    1. In comparison, Perl/Python/Javascript, which also have the latter property, have other false-like values (0 and empty string), which make || differ from a null-coalescing operator in many more cases (numbers and strings being two of the most frequently used data types). This is what led Perl/Python/Javascript to add a separate operator while Ruby hasn't.
    2. Examples by languages
    1. the first operand evaluated to a value likened to logically false, in other words, a falsy value
    2. f that operand evaluates to a value likened to logically true (according to a language-dependent convention, in other words, a truthy value)
    1. Decimals are commonly used to approximate real numbers. By increasing the number of digits after the decimal separator, one can make the approximation errors as small as one wants, when one has a method for computing the new digits.
    1. For example, the bathroom scale may convert a measured extension of a spring into an estimate of the measurand, the mass of the person on the scale. The particular relationship between extension and mass is determined by the calibration of the scale.

      imperfect / not exact / not directly measured

    1. 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.
    1. with stating it as the implied uncertainty (to prevent readers from recognizing it as the measurement uncertainty)
    2. Round half to even, which rounds to the nearest even number. With this method, 1.25 is rounded down to 1.2. If this method applies to 1.35, then it is rounded up to 1.4. This is the method preferred by many scientific disciplines, because, for example, it avoids skewing the average value of a long list of values upwards.
    3. For example, if the length of a road is reported as 45600 m without information about the reporting or measurement resolution, then it is not clear if the road length is precisely measured as 45600 m or if it is a rough estimate.
    1. That right there almost works. It'd be incredible if it did because I love the way that reads.
    2. The snag is that when the top-level match grabs the published_at value and applies it to the be_within(...), it is working with a string representation of the timestamp. We first need to parse that into a date object and there is no affordance for that here.
    3. RSpec gives us the tools to make custom matchers so that we can preserve all the expressiveness while adding specialized or even domain-specific matchers.
    1. If you'd like another method to do the waiting for you, e.g. Kernel.select, you can use Timers::Group#wait_interval to obtain the amount of time to wait. When a timeout is encountered, you can fire all pending timers with Timers::Group#fire

      This is another way of achieving concurrency (progress made while waiting for other things) besides wrapping the timer's sleep in a separate thread like https://github.com/rubyworks/facets/blob/main/lib/standard/facets/timer.rb does.

    2. You can also schedule a block to run immediately and periodically with Timers::Group#now_and_every
    1. The Starfish and the Spider: The Unstoppable Power of Leaderless Organizations Ori Brafman, Rod A. Beckstrom How do you build teams and organizations that are sustainable over time? How can you be the most adaptable? Forget everything you know about leadership and organization, be completely transformed. A must for anyone wanting results.
    1. A concurrent system is one where a computation can advance without waiting for all other computations to complete.
    1. Envfile

      Like the concept but don't like how you have to have a separate Envfile. (Maybe you don't and can use it directly?)

    2. # booleans # simple: providing any value for ENV['FORCE_SSL'] means `true`: force_ssl = !!ENV['FORCE_SSL'] # more advanced: # only when we provide 'true' will `force_ssl` become true. force_ssl = ('true' == ENV['FORCE_SSL'])
    3. variable :FORCE_SSL, :boolean, default: '1'
    1. You can define a coercion to some type via definition
    2. fiels :tags, Array, of: String
    3. But nothing of them supports all features I need for:
    4. I've explored these projects: Reform Mutations Interactor dry-rb
    5. But you're able to remove (usually inherited) fields by: class ChildForm < ParentForm remove_field :field_from_parent end
    6. Fields and nested forms are filling in order of their definition. But sometimes you want to change this order, for example, if you have a nested forms in ancestors which depends on data in children forms. For such cases you can use :depends_on option, which accepts fields and nested forms names as Symbol or Array of symbols. They will be filled (and initialized) before dependent.
    7. And if I need for simple service object without validation? You can use Formalism::Action, a parent of Formalism::Form.
    1. Looks really nice. May switch to this from Memoist. This alt is much more configurable.

    2. memoize :call, condition: -> { environment == 'production' }
    3. Such gems like Memoist override methods. So, if you want to memoize a method in a child class with the same named memoized method in a parent class — you have to use something like awkward identifier: argument. This gem allows you to just memoize methods when you want to.
    4. It's a fork of Memery gem. Original Memery uses prepend Module.new with memoized methods, not touching original ones. This approach has advantages, but also has problems, see discussion here: tycooon#1
    1. mount IndexController do # all methods will be mounted automatically, it's just an example of refinement get '/hello', :hello_world end
    1. It looks like bucket just returns a start time for the given period. - For a :day period, takes the starting time and goes to the beginning of the day - etc.

    1. you may want to implement a fan-out or map-reduce.
    2. Unless you need fan-out, map-reduce style concurrency, you can actually use a slightly more efficient Kernel#Sync execution model.
    3. When should I use Async? ¶ You should use Async when you desire explicit concurrency in your program. That means you want to run multiple tasks at the same time, and you want to be able to wait for the results of those tasks.
    1. Modern parallel languages have much easier to use execution models. The thread model was one of the original parallel execution models, which may account for why it has persisted despite being difficult to use.
    2. The complication comes from the fact that the execution model does not have any means for the execution of "give up ownership of the lock" to have any influence over which execution of "gain ownership of the lock" in some other timeline (thread) follows. Very often, only certain handoffs give valid results. Thus, the programmer must think of all possible combinations of one thread giving up a lock and another thread getting it next, and make sure their code only allows valid combinations.
    3. a common synchronization construct is the lock
    4. The execution model is the definition of the behavior, so all implementations, whether in-order or out-of-order or interpreted or JIT'd etc.. must all give the exact same result, and that result is defined by the execution model.
  2. Aug 2024
    1. A change in the minor component signifies a non-breaking change, and that the consumer can safely use the new version without breaking, although the consumer might need to be updated to use its new functionality. For example, adding a non-mandatory feature column with a default value to the model is a minor bump, because when a value for the added column is not passed, inference still works.
    2. Using semantic versioning facilitates model deployment, by communicating which if a new version can be deployed without changes to the application:
    1. When a user asks Claude to generate content like code snippets, text documents, or website designs, these Artifacts appear in a dedicated window alongside their conversation. This creates a dynamic workspace where they can see, edit, and build upon Claude’s creations in real-time, seamlessly integrating AI-generated content into their projects and workflows.
    1. The architecture covers both easy unsubscribe options, mailto and URL. This is because not all mailbox providers support the List-Unsubscribe-Post header.
    2. Offering an easy unsubscribe method allows recipients to indicate which type of email they would like to receive and not receive based on topic or category.

      Not necessarily. Simply providing an easy unsubscribe method does not in itself give you that (by default, I would think the unsubscribe would unsubscribe the entire account from future e-mails.)

      Only if you program in the support for topic/category-based preferences and provide in the header the URL to a page that only subscribes from that one category....

      Oh, I see. If one keeps reading, it seems to be implied that AWS provides some of that support. For example:

      The unsubscribe email address and URL contain the recipient’s email address and email subject parameters, which are encrypted using AWS Key Management Service. These parameters are used later on to identify and unsubscribe the recipient from a specific topic.

    3. Amazon SES unsubscribe method: The Amazon SES subscription management feature, which provides subscription management via the List-Unsubscribe header and ListManagementOptions footer links.
    4. Unsubscribe method header: A hyperlink that is rendered by the mailbox provider based on the List-Unsubscribe email header. Recipients can use this link to unsubscribe from that sender.
    5. Unsubscribe method footer: An unsubscribe link in the email footer, which redirects recipients to a landing page, where they can unsubscribe or edit their communication preferences.
    6. Custom-built unsubscribe method: A custom-built unsubscribe link in the email footer and manually added List-Unsubscribe header.
    1. This is the most simulative version of a controller. It will try and mimic real user behaviour. It's the recommended version to use when the goal of the load-test is finding out how many concurrently active users the target instance supports.
    1. I'm often asked to describe the “advantages” of free software. But the word “advantages” is too weak when it comes to freedom. Life without freedom is oppression, and that applies to computing as well as every other activity in our lives.
    1. A proprietary program puts its developer or owner in a position of power over its users. This power is in itself an injustice.
    2. Of course, the developer usually does not do this out of malice, but rather to profit more at the users' expense. That does not make it any less nasty or more legitimate.
    3. Power corrupts; the proprietary program's developer is tempted to design the program to mistreat its users.
    4. Yielding to that temptation has become ever more frequent; nowadays it is standard practice. Modern proprietary software is typically an opportunity to be tricked, harmed, bullied or swindled.
    5. Software designed to function in a way that mistreats the user is called malware.
    6. Microsoft is using malware tactics to get users to switch to their web browser, Microsoft Edge, and their search engine, Microsoft Bing. When users launch the Google Chrome browser Microsoft injects a pop up advertisement in the corner of the screen advising users to switch to Bing. Microsoft also imported users Chrome browsing data without their knowledge or consent.
    1. The commercial license prohibits reverse engineering and tampering with our license key mechanism unlocking paid features so that we can run a compliant and fair commercial business.
    1. ELECT DISTINCT ON (customer) id, customer, total FROM purchases ORDER BY customer, total DESC, id;
    2. The perfect index for the above query would be a multi-column index spanning all three columns in matching sequence and with matching sort order:
    1. WITH recursive temp (n, fact) AS ( SELECT 0, 1 -- Initial Subquery UNION ALL SELECT n+1, (n+1)*fact FROM temp WHERE n < 9 -- Recursive Subquery ) SELECT * FROM temp;
    1. Monopoly is not played on a cartesian plane. It's played on a directed circular graph. Therefore, it is inappropriate to use the Euclidean distance metric to compare the distances between places on the board. We must instead use minimum path lengths. Example: If we used Euclidean distance, then you would have to agree that the distance between, say, Go and Jail is equal to the distance between the Short Line and the Pennsylvania Railroad. Clearly, this is not the intention. In your example, the "nearest railroad" would be the railroad square having the shortest path from wherever you stand. With the game board representing a directed graph, there are no "backwards" paths. Thus, the distance from the pink Chance square to the Reading railroad is not 2. It's 38.
    1. This seems to be more than just a thin wrapper like https://github.com/rainerschuster/final-form-material-ui was. I kind of prefer the simplicity of focus of final-form-material-ui.

      This appears to be attempting to do too much. Though if it gives you exactly what you want, great.

  3. Jul 2024
    1. Does this mean they are held back until their LC "unlocks" P1 for them? (i.e. They're not able to proceed on their own. They have to ask permission. Which I generally try to avoid and prefer to empower people to proceed.)

    1. it really depends on how the organization's legal counsel interprets the laws and how risk-averse they are. Some organizations might say only Germany requires double opt-in, while others also include Austria and Switzerland. Some organizations might say the US operates under "everyone is opted in until they opt out" while others might say everyone needs to opt in, regardless of country.

      .

    1. It’s also worth pointing out that an unfriendly unsubscribe experience is also a major driver of spam complaints. Half of U.S. consumers say they’ve reported a brand’s emails as spam because they couldn’t easily opt out, according to our Adapting to Consumers’ New Definition of Spam report. So putting up opt-out barriers not only jeopardizes your legal compliance but can also hurt your deliverability as well.
    2. ensure you’re following unsubscribe best practices:Don’t charge a fee.Don’t require any other information beyond an email address.Don’t require subscribers to log in.Don’t ask subscribers to visit more than one page to submit their request.
    1. Keep a clear record of how you obtained consent from your current subscribers When, how, and why (what for) you obtained their data – timestamp, wording, source.
    1. I've just experienced the same issue with confirmation links being executed in a sent email before the user has received them and invalidating the link. I got around the issue by modifying the page the URL links to. I've added a Confirm button on the page which the user has to click to confirm their email and this works nicely.
    2. I've seen the same issue. The links in emails opened in outlook seem to be crawled immediately by the 'BingPreview' bot.
    1. If the link you are trying to send is just some kind of harmless confirmation link (e.g. subscribe/unsubscribe from a newsletter), then at least use a form inside the web page to do the actual confirmation through a POST request (possibly also using a CSRF token), otherwise you will unequivocally end up with false positives.
    1. "this is a bug of the mail provider" Seriously, Drupal community bring less and less value. Unfollow this issue, but I perhaps time for me to delete my D.O. account. It's a critical issue that can lead to the impossibility for user to log-in. In the real world, nobody care if Microsft server "should" act differently.
    2. Drupal use a HTTP GET to change data witch is not how HTTP protocol is supposed to be work. A HTTP POST request should be used to change an account from blocked to active. It's a bug and a ugly one.
    1. Especially users working with Microsoft Office 365 and therefore Outlook noticed very often that login is not possible. Upon closer analysis, it was found that the MS/Bing crawlers are particularly persistent and repeatedly call the reset links, regardless of server configuration or the like. For this reason, a text field was implemented in the backend via the Drupal State API, in which selected user agents (always one per line) can be entered. These are checked by 'Shy One Time', in case of a hit a redirect to the LogIn form with a 302 status code occurs, the reset link is not invalidated.
    1. Another suggestion some senders are trying is to set up a “stealth” link, that human readers won’t see or click on but that parsing software might. Clicks on that link are a sign that the click was not done by the recipient.
    2. Confirmations are a little more difficult, as senders really do want to keep the transaction as low friction as possible. Adding a confirm button may result in people abandoning the confirmation process.
    3. This behaviour may affect one-click unsubscribe links. If clicking the link in an email automatically processes the unsubscribe, then Barracuda may unsubscribe users without their knowledge.
    4. This behaviour may affect opt-in confirmation links.
    1. I’ve implemented a form on the landings page that auto-submits (on DOMContentLoaded) and posts the token to the next page. Passwordless login is now working for my client despite their mail scanner.
    2. In June 2021 I can confirm Microsoft seem to be running a product that completes client side activities, like automatically submitting a form. I guess they are running a headless browser to do the scanning.

      That's unfortunate. Can't use auto-submit form to protect from such behavior then.

    3. Really appreciatie your suggestion. We hesitated between this solution and the one where the landing page auto-redirects/posts to the next page. I think both are good solutions. Yours a bit more secure. The other less clicks and less friction for the user.
    1. If you want to be (relatively) sure that any action is triggered only by a (specific) human user, then use URLs in emails or other kind of messages over the internet only to lead them to a website where they confirm an action to be taken via a form, using method=POST
    2. Links (GETs) aren't supposed to "do" anything, only a POST is. For example, your "unsubscribe me" link in your email should not directly unsubscribe th subscriber. It should "GET" a page the subscriber can then post from.
    1. The purpose of distinguishing between safe and unsafe methods is to allow automated retrieval processes (spiders) and cache performance optimization (pre-fetching) to work without fear of causing harm.
    2. Request methods are considered "safe" if their defined semantics are essentially read-only; i.e., the client does not request, and does not expect, any state change on the origin server as a result of applying a safe method to a target resource.
    3. For example, most servers append request information to access log files at the completion of every response, regardless of the method, and that is considered safe even though the log storage might become full and cause the server to fail. Likewise, a safe request initiated by selecting an advertisement on the Web will often have the side effect of charging an advertising account.
    1. For some reason, Microsoft decided to use the MS Word HTML rendering engine in Outlook 2007 to 2013 (desktop version) – this was even worse than the IE5/IE6 rendering engine which I believe was used in Outlook 2000, 2002 and 2003! As most large corporate businesses force their staff to use a version of desktop Outlook that hasn’t been updated in years, email is stuck in this hell of being held back in worse-than-IE6 web.
    1. We want users to unsubscribe to messages they don’t want; we don’t want them to mark them as spam and hurt the reputation of the sender. We have seen by implementing this unsubscribe affordance in the UI that spam marks go down and in some cases are being reduced by 30 to 40%.
    1. Some have likened anyone being able to issue a verifiable credential being like a shop clerk deciding if they should accept an out-of-state license as proof of age when purchasing alcohol.

      I don't understand. Shouldn't it be comparing to a verifier deciding if it should trust an issuer?

    1. It is now possible (but not easy) for anyone who is determined enough to create a xanadoc, and send it to others, who may open and use it.  (Note that the World Wide Web was available for several years before the Mosaic editor made it easy for the public.)

      fair enough...

    1. Transclusion facilitates modular design (using the "single source of truth" model, whether in data, code, or content): a resource is stored once and distributed for reuse in multiple documents. Updates or corrections to a resource are then reflected in any referencing documents.
    1. However, with verifiable credentials in a Solid Pod, the university issues some information stating that a student completed a course and cryptography signs that information. This is a verifiable credential. They then pass that credential to the student who stores it in their Solid Personal Online Datastore (Pod). When the student wants to apply for a job, all they need to do is grant access to the credential so the company can read it. The company can confirm that the credential isn’t faked because its cryptographically signed by the university.
    1. If all human data were structured in one massive knowledge-graph (a global knowledge graph), we could unlock this potential. Fortunately, Solid is that knowledge graph.
    2. Today, data is abundant, but for the most part, unusable. Seventy percent of a data scientist’s job is just cleansing data. The modern software architecture encourages data to be hoarded only accessible through proprietary APIs. And, even with proprietary APIs the market for data integrations is expected to grow to a trillion dollars by the end of the decade. When humanity is spending the GDP of Indonesia just so that the data in System X can work with the data in System Y, the field of software engineering has failed us. So much data - data that could be used by new startups and nonprofits that couldn’t exist today - goes unused because it’s so difficult to access.
    1. This is classic Rails Magic - a clever side effect that guarantees the token in the session cookie will always match the token on the page, because rendering the token to the page can't happen without inserting that same token into the cookie.
  4. Jun 2024
    1. I'd agree that much of the time 'not prefer' is a perfectly adequate way of conveying the same sense as 'disprefer' (just as 'not agree' will for most purposes convey the same sense as 'disagree', and 'not like' the same sense as 'dislike'). However, they aren't strictly equivalent; I might neither prefer nor disprefer Coke to Pepsi, but rather be neutral between them. Possibly the purpose for which 'disprefer' is most useful is cancelling implications – 'I don't prefer it – though I don't disprefer it either'.
    2. It's an interesting position and had me rethinking things a bit, but the way I look at it, the actions themselves are negative; it's their boundary conditions which are different. Take for instance embark/disembark. In pseudo-mathematical terms, I would tend to think they increment or decrement one's embarkedness, with an upper boundary of 1 (aboard), and a lower boundary of 0 (ashore). The non-existence of values >1 (super-aboard) or <0 (anti-aboard) shouldn't affect the relative polarity of the actions themselves. I think. Looking through the rest of the list, there's a variety of different boundary conditions. Prove/disprove would range from 1 to -1 (1=proven, 0=asserted but untested, -1=proven false), entangle/disentangle seems to range from 0 to infinity (because you can always be a little more entangled, can't you?), and please/displease is perhaps wholly unbounded (if we imagine that humanity has an infinite capacity for both suffering and joy).
    3. her first remark upon embarking would no doubt be "on a scale from one to on a boat, we're on a boat!
    4. snowcloning
    5. It was enclosed in scare quotes, a sort of acknowledgment that the author knew it was non-standard, but was too apt for the purpose to resist. I remember reading it and trying to think of the “real” word that would be employed there, but could not find a satisfactory alternative. Since then, I’ve found myself unable to resist using the word when appropriate, due to its utility!

      "too apt for the purpose to resist" :kiss:

    6. I'm surprised no one has mentioned disambiguate in this context. It sounds horrible and outlandish on first hearing, has a reasonably transparent meaning (which may shed some light on the semantics of dis-), and seems to be used almost exclusively by linguists.
    7. I am disinterested and uninterested in this debate.
    8. If you disprove something, you haven't necessarily proved the opposite. If you disprove something, you have indeed proved its negation. If you disapprove of an action, you do indeed approve of not doing that action (so, disapproving X is approving not-X).
    9. (That is, when you disprefer that George be elected, you prefer the negation, that George not be elected, rather than just you do not prefer that George be elected, which is compatible with indifference.)
    10. Who says it's not a word? Not a word, simply because lexicographers have not recognized it? When a lexicographer recognizes it, it has already been in use! Even Mr. Fiske says it is a word, although he obviously disprefers it.

      by the time a lexicographer recognizes it, it has already been in use

    11. I believe it is possible to disprefer something while either 1. not disliking it, or 2. liking it but not intensely enough to be the preference. As in, "I like tart apples, but I sometimes disprefer them as an ingredient on a green salad." It doesn't and hasn't, meant I would refuse to eat a salad with this ingredient included, but there are times when my preference would have been to have a salad without them.
    12. idiolect
    1. The linguistic phenomenon of "a multi-use, customizable, instantly recognizable, time-worn, quoted or misquoted phrase or sentence that can be used in an entirely open array of different variants" was originally described by linguist Geoffrey K. Pullum in 2003.[2] Pullum later described snowclones as "some-assembly-required adaptable cliché frames for lazy journalists".[1]
    1. At the entry for irregardless, we provide a paragraph in which we note that the use of the word is still met with considerable objection, and we even go so far as to advise the reader to use regardless instead—which is about as close as we get to offering a usage prescription in our dictionaries.
    1. Lexicography is the practice of creating books, computer programs, or databases that reflect lexicographical work and are intended for public use.