Insearching for inspiration and parallels, I kept coming back to chemistry. The thought is that all matter (whether solid, liquid, gas, simple, complex, etc) is comprised of atoms. Those atomic units bond together to form molecules, which in turn combine into more complex organisms to ultimately create all matter in our universe.
Things start getting more interesting and tangible when we start combining atoms together. Molecules are groups of atoms bonded together and are the smallest fundamental units of a compound. These molecules take on their own properties and serve as the backbone of our design systems.
Molecules give us some building blocks to work with, and we can now combine them together to form organisms. Organisms are groups of molecules joined together to form a relatively complex, distinct section of an interface.
Templates are very concrete and provide context to all these relatively abstract molecules and organisms. Templates are also where clients start seeing the final design in place. In my experience working with this methodology, templates begin their life as HTML wireframes, but over time increase fidelity to ultimately become the final deliverable. Bearded Studio in Pittsburgh follow a similar process, where designs start grayscale and layout-less but slowly increase fidelity until the final design is in place.
Pages are also the place to test variations in templates. For example, you might want to articulate what a headline containing 40 characters looks like, but also demonstrate what 340 characters looks like. What does it look like when a user has one item in their shopping cart versus 10 items with a discount code applied? Again, these specific instances influence how we loop back through and construct our system.
Atomic design provides a clear methodology for crafting design systems. Clients and team members are able to better appreciate the concept of design systems by actually seeing the steps laid out in front of them.
The second and far more challenging was working on a massive CMS overhaul at the ABC. We not only locked down all content as components but these content components were maintained in the DOM, further freeing up the the front end design to appear bespoke when they were all nicely packaged up to fit specific templates.
Again it facilitates a scalable and portable approach that can easily include mobile versions of content. Makes its so easy to discuss with the developers that this project is, for example, made of of page types (templates) 1, 2 and 4, and they already have the code in place, knowing exactly what component are associated with which page types
Agree with some other comments about it not being a new idea, but certainly a new perspective and with your examples of real world scenarios I can see this certainly helping my junior devs and even clients get their heads around the concept.
My understanding: My understanding is that atomic operation means it executes fully with no interruption? Ie, it is a blocking operation with no scope of interruption?
Pretty much, yes. "Atom" comes from greek "atomos" = "uncuttable", and has been used in the sense "indivisible smallest unit" for a very long time (till physicists found that, in fact, there are smaller things than atoms). In concurrent programming, it means that there will be no context switch during it - nothing can affect the execution of atomic command.
An example: a web poll, open-ended questions, but we want to sum up how many people give the same answer. You have a database table where you insert answers and counts of that answer. The code is straightforward:
"Ham and eggs" only jumped by 1 even though 2 people voted for it! This is clearly not what we wanted. If only there was an atomic operation "increment if it exists or make a new record"... for brevity, let's call it "upsert" (for "update or insert")
Note that "atomic" is contextual: in this case, the upsert operation only needs to be atomic with respect to operations on the answers table in the database; the computer can be free to do other things as long as they don't affect (or are affected by) the result of what upsert is trying to do.
A non-atomic trivial solution would have Alice send her coins to Bob, and then have Bob send other coins to Alice - but Bob has the option of going back on his end of the bargain and simply not following through with the protocol, ending up with both sets of coins.
Here is one description of an algorithm that solves this problem, credit goes to TierNolan for this specific description (the algorithm was described in other terms by other people including Mike Hearn above).
The previously mentioned approach can be used directly to trade between bitcoin-derived chains without special support on the side of protocol. The obvious disadvantage is nLockTime - if counterparty does not go through the trade, our funds are locked and cannot used in another trade for the duration of timeout. Additionally, it depends on transaction replacement which may, or may not be considered standard under current bitcoin protocol rules.
Another proposal of cross-chain p2ptrade is to use specialized altchain with properties for efficient operation of p2ptrade from bitcoin chain. Additionally, we use only single standard bitcoin transaction which looks exactly the same as normal payment (no nlocktime, no multisig, no special script).
A closely-related concept to atomic swaps is used trading bitcoins in a payment channel for bitcoins in a different payment channel, which is how routed payment channels function in Lightning Network.
Atomic swap protocols which exchange two different currencies can introduce an optionality. Optionality has value in a financial context which is expressed by options pricing[1]. There have been attempts to design atomic swaps protocol which minimize this unintended optionality[2]. The point about optionality has been used to argue that Lightning Network can only ever be a single-asset network, it cannot involve atomic swaps between currencies along a payment route because the option-buyer has an incentive to intentionally slow down the payment[3].
This module defines atomic versions of a select number of primitivetypes, including AtomicBool, AtomicIsize, AtomicUsize,AtomicI8, AtomicU16, etc.Atomic types present operations that, when used correctly, synchronizeupdates between threads.
Atomic variables are safe to share between threads (they implement Sync)but they do not themselves provide the mechanism for sharing and follow thethreading model of Rust.The most common way to share an atomic variable is to put it into an Arc (anatomically-reference-counted shared pointer).
Since C++ does not support mixing atomic and non-atomic accesses, or non-synchronizeddifferent-sized accesses to the same data, Rust does not support those operations either.Note that both of those restrictions only apply if the accesses are non-synchronized.
In general, all atomic accesses on read-only memory are Undefined Behavior. For instance, attemptingto do a compare_exchange that will definitely fail (making it conceptually a read-onlyoperation) can still cause a segmentation fault if the underlying memory page is mapped read-only. Sinceatomic loads might be implemented using compare-exchange operations, even a load can faulton read-only memory.
Atomics loads that are larger than this limit as well as atomic loads with ordering otherthan Relaxed, as well as all atomic loads on targets not listed in the table, might still beread-only under certain conditions, but that is not a stable guarantee and should not be reliedupon.
The atomic weights are available for elements 1 through 118 and isotopic compositions or abundances are given when appropriate. The atomic weights data were published by J. Meija et al in Atomic Weights of the Elements 2013, and the isotopic compositions data were published by M. Berglund and M.E. Wieser in Isotopic Compositions of the Elements 2009. The relative atomic masses of the isotopes data were published by M. Wang, G. Audi, A.H. Wapstra, F.G. Kondev, M. MacCormick, X. Xu1, and B. Pfeiffer in The AME2012 Atomic Mass Evaluation.
For an ordinary atom which contains protons, neutrons and electrons, the sum of the atomic number Z and the neutron number N gives the atom's atomic mass number A. Since protons and neutrons have approximately the same mass (and the mass of the electrons is negligible for many purposes) and the mass defect of the nucleon binding is always small compared to the nucleon mass, the atomic mass of any atom, when expressed in daltons (making a quantity called the "relative isotopic mass"), is within 1% of the whole number A.
Atoms with the same atomic number but different neutron numbers, and hence different mass numbers, are known as isotopes. A little more than three-quarters of naturally occurring elements exist as a mixture of isotopes (see monoisotopic elements), and the average isotopic mass of an isotopic mixture for an element (called the relative atomic mass) in a defined environment on Earth determines the element's standard atomic weight. Historically, it was these atomic weights of elements (in comparison to hydrogen) that were the quantities measurable by chemists in the 19th century.
Dmitri Mendeleev said that he arranged his first periodic tables (first published on March 6, 1869) in order of atomic weight ("Atomgewicht").[1] However, in consideration of the elements' observed chemical properties, he changed the order slightly and placed tellurium (atomic weight 127.6) ahead of iodine (atomic weight 126.9).[1][2] This placement is consistent with the modern practice of ordering the elements by proton number, Z, but that number was not known or suspected at the time.
A simple numbering based on periodic table position was never entirely satisfactory. In addition to the case of iodine and tellurium, several other pairs of elements (such as argon and potassium, cobalt and nickel) were later shown to have nearly identical or reversed atomic weights, thus requiring their placement in the periodic table to be determined by their chemical properties. However the gradual identification of more and more chemically similar lanthanide elements, whose atomic number was not obvious, led to inconsistency and uncertainty in the periodic numbering of elements at least from lutetium (element 71) onward (hafnium was not known at this time).
3a8082e126