10,000 Matching Annotations
  1. Sep 2024
    1. I've been a UK resident for over 70 years, have two degrees from a very well known university, and find both zeros and zeroes quite acceptable as the plural form. So our perceptions are different. Do we toss a coin, or see who can shout the louder? ... Dictionaries are less open to subjective bias than individuals because of the averaging effect of carefully controlled large surveys (and acceptability is usage driven). It's good to realise that personal preferences may not be the best basis for judging correctness.
    2. Note that dictionaries document the (current, at the time of going to press) usage of language, they aren't authoritative. 'Correct' is what is in common usage and largely understood to be correct, even if that contradicts a dictionary (in which case the dictionary is probably out-of-date).
    1. Looks well-written, but probably not needed in a Rails project, which already has ActiveSupport for dealing with duration and periods

    2. This functionality is used by LSync for performing backup rotation (i.e. deleting old backups).

      Looks like LSync was renamed to synco https://github.com/ioquatix/synco

    1. seems to auto-add this header: header['List-Unsubscribe'] = "<#{Caffeinate::UrlHelpers.caffeinate_subscribe_url(mailing.subscription)}>"

    2. :
    3. after_commit on: :create do OnboardingDripper.subscribe!(self) end
    4. drip engine for managing, creating, and performing scheduled messages sequences
    5. What's wrong with this?
    6. You're checking state in a mailer
    7. It's going to be so fun to scale when you finally want to add more unsubscribe links for different types of sequences
    8. If you have anything like this is your codebase, you need Caffeinate:
    9. Is this thing dead? No! Not at all! There's not a lot of activity here because it's stable and working!
    1. Unfortunately, each of these systems is highly complex and can inflict all kinds of damage on data, much of the damage undetectable to humans.
    2. Fingerprint is a general purpose data integrity tool that uses cryptographic hashes to detect changes in files and directory trees. The fingerprint command scans a directory tree and generates a fingerprint file containing the names and cryptographic hashes of the files in the tree. This snapshot can be later used to generate a list of files that have been created, deleted or modified. If so much as a single bit in the file data has changed, Fingerprint will detect it.
    3. In cases where I've been concerned about the migration of data (e.g. copying my entire home directory from one system to another), I've used fingerprint to generate a transcript on the source machine, and then run it on the destination machine, to reassure me that the data was copied correctly and completely.
    1. Designed for both content-based websites and applications. Does not depend on a database.
    2. Utopia is a website generation framework which provides a robust set of tools to build highly complex dynamic websites. It uses the filesystem heavily for content and provides functions for interacting with files and directories as structure representing the website.
    1. The terminology is used a little loosely
    2. \begingroup This conflates general-purpose hash functions as used in e.g. data structures, which do indeed just aim to create 'buckets' of things, with cryptographic hash functions, whose aim it is to not allow finding any two documents with the same hash value.
    3. hash digest returns an alphanumeric message which is the digest. that is incorrect, this alphanumeric message is a representation of the digest. The digest itself is a string of bits with a fixed length
    1. My long term vision for Falcon is to make a web application platform which trivializes server deployment. Ideally, a web application can fully describe all its components: HTTP servers, databases, periodic jobs, background jobs, remote management, etc. Currently, it is not uncommon for all these facets to be handled independently in platform specific ways. This can make it difficult to set up new instances as well as make changes to underlying infrastructure. I hope Falcon can address some of these issues in a platform agnostic way.
    2. As web development is something I'm passionate about, having a server like Falcon is empowering.
    1. In practice, forks and threads are at odds with each other. If you try to fork while there are active threads, you will very likely run into bugs. Even if you didn't create the thread, some other library might have, so it can be very tricky in practice.
    1. Multithreading is a widespread programming and execution model that allows multiple threads to exist within the context of one process. These threads share the process's resources, but are able to execute independently.
    1. mailer

      Should this be mailing ?

    2. 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.
    3. 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.