1,255 Matching Annotations
  1. Oct 2021
  2. Sep 2021
    1. you're guilty of making the same mistake as people who used to say that templates and styles and JavaScript should be in separate files

      At last, another one realizing that they ha dbeen structuring MVC web-apps counter-intuitively for decades.

    1. This is what I call a leaky abstraction. TCP attempts to provide a complete abstraction of an underlying unreliable network, but sometimes, the network leaks through the abstraction and you feel the things that the abstraction can’t quite protect you from. This is but one example of what I’ve dubbed the Law of Leaky Abstractions:
    1. I don’t even minify page assets

      Good. Don't. The number of people who think this is a virtue is frightening. The rationale is usually not well-reasoned and whatever values they pretend to hold can almost always be shown to be hollow.

    1. At the same time, details about programming language semantics are quite precise and when articles like this get things sort of wrong, it just leads to more confusion.
    1. This post is about all the major disadvantages of Julia. Some of it will just be rants about things I particularly don't like - hopefully they will be informative, too.

      It seems like Julia is not just about pros:

      • Compile time latency
      • Large memory consumption
      • Julia can't easily integrate into other languages
      • Weak static analysis
      • The core language is unstable
      • The ecosystem is immature
      • The type system works poorly
          • You can't extend existing types with data
          • Abstract interfaces are unenforced and undiscoverable
          • Subtyping is an all-or-nothing thing
      • The iterator protocol is weird and too hard to use
      • Functional programming primitives are not well designed
      • Misc gripes (no Path type and no Option type)
  3. Aug 2021
    1. I really hope they keep breaking it. Being the lead on a library for several years, most of the forced refactors were pretty straight forward and in almost every case made our code either more sound or easier to be consumed. Now I work on a runtime that embeds TypeScript and 3.5.1 has broken some code, thought it took me all of about 15 minutes to make the changes to adopt it, and in every case, it broke because we were being a bit loose with the types. While it didn't find any bugs, it made the code more "safe".

      I really hope they keep breaking it.

    1. Changing every built-in function to accept anys would also "break" no one, but that doesn't make it a good idea. Part of TypeScript's value proposition is to catch errors; failing to catch an error is a reduction in that value and is something we have to weigh carefully against "Well maybe I meant that" cases.
    1. Aside to global and local scope there is also something one could call a “block” scope. This is not an “official” type of scope, but it does exist. Block scope was introduced to JavaScript as a part of the ES6 specification. It was introduced along with two new types of variables let and const.
    1. Rubyists don't call these things annotations. One of the things I like doing is to find common techniques that cross languages, for me this is a common technique and 'annotation' seems like a good generic word for it. I don't know if Rubyists will agree.
    1. Languages may provide annotations in ways that don't reflect the syntax of the language
    2. When writing about programming, I prefer to use 'annotation' as the general term. Although .NET was first, the word 'attribute' is just too widely used for different things.
    3. An annotation on a program element (commonly a class, method, or field) is a piece of meta-data added to that program element which can be used to embellish that element with extra code.
    1. Isolation ensures that concurrent execution of transactions leaves the database in the same state that would have been obtained if the transactions were executed sequentially
    1. We can also define these properties for data types that we do not control, for example providing a custom way of hashing a data type implemented by someone else
    1. However, there is a definite trade off in these three snippets. The first one is overly specific but is understandable to any Scala programmer. The last one is beautiful and elegant if you understand the necessary concepts but incomprehensible otherwise.
    2. ZIO ecosystem libraries generally do not directly expose any functional abstractions but still expose a highly compositional interface because their design is based on algebraic properties like this. Users don't have to learn about these abstractions unless they want to, they just get to benefit from better library design.
    1. Open source is not a good business model.If you want to make money do literally anything else: try to sell software, do consulting, build a SAAS and charge monthly for it, rob a bank.

      Open-source software is not money friendly

    2. The only way for one person to even attempt cross-platform app is to use a UI abstraction layer like Qt, WxWidgets or Gtk.The problem is that Gtk is ugly, Qt is extremely bloated and WxWidgets barely works.

      Why releasing cross-platform apps can make them ugly

  4. Jul 2021
    1. The visual and spacing differences between proportional and monospaced fonts

      Proportional vs Monospaced fonts:

    1. https://blog.jonudell.net/2021/07/21/a-virtuous-cycle-for-analytics/

      Some basic data patterns and questions occur in almost any business setting and having a toolset to handle them efficiently for both the end users and the programmers is an incredibly important function.

      Too often I see businesses that don't own their own data or their contracting out the programming portion (or both).

    1. I try and act like a scientist. If I have a hypothesis about how this code is supposed to work, I test that hypothesis by changing the code, and seeing if it breaks in the way I expect. When I discover that my hypothesis is flawed, I might detour from the tutorial and do some research on Google. Or I might add it to a list of "things to explore later", if the rabbit hole seems to go too deep.

      Soudns like shotgun debugging is not the worst method to learn programming

    2. Things never go smoothly when it comes to software development. Inevitably, we'll hit a rough patch where the code doesn't do what we expect.This can either lead to a downward spiral—one full of frustration and self-doubt and impostor syndrome—or it can be seen as a fantastic learning opportunity. Nothing helps you learn faster than an inscrutable error message, if you have the right mindset.Honestly, we learn so much more from struggling and failing than we do from effortless success. With a growth mindset, the struggle might not be fun exactly, but it feels productive, like a good workout.

      Cultivating a growth mindset while learning programming

    3. I had a concrete goal, something I really wanted, I was able to push through the frustration and continue making progress. If I had been learning this stuff just for fun, or because I thought it would look good on my résumé, I would have probably given up pretty quickly.

      To truly learn something, it is good to have the concrete GOAL, otherwise you might not push yourself as hard

    1. Multiple inheritance is one of the object oriented feature where a class or a sub class can inherit features from more than one parent class or super class.
    2. Interface is collection of methods of abstract type (having empty body). It’s similar to Abstract class. Interface is blueprint of class. Interface specify what class must do and not how to.

      A class which implements interface should define each and every method in the class. Interface is used to implement multiple inheritance in java (represent IS-A relationship).

    1. [Huh? Pass-by-reference ALWAYS requires passing a reference by value. That's how it works. The question is whether the referenced object is a COPY of the caller's object, or an ALIAS for the user's value. Most modern languages pass by reference for non-primitive types.]

      This person is confused, though it's obvious and understandable to those who've been down the road before how it happens. Most mainstream languages that are taught to be "pass by reference" are actually of the "pass by reference value" sort. Lack of exposure to languages that actually implement pass by reference is the culprit. Of course if your experience is limited to C, C++, Java, and others that use the "pass by reference value" approach, then you'll come away thinking that "pass by reference value" is what "pass by reference" means and this is what any and every language "ALWAYS requires" when setting out to implement "pass by reference"—you just don't have the appropriate frame of reference to see how it could be otherwise.

    1. The world could benefit from a curated set of bookmarklets in the style of Smalltalk ("doIt", "printIt", etc buttons) that you can place in your bookmarks bar (or copy into a bookmarks document and open in it in your browser), where the purpose would be to allow you to:

      1. access a new scratch area (about:blank) for experimentation
      2. make it editable, or make any given element on a page editable
      3. let you evaluate any code written into the scratch space

      scratch.js aims for something something similar, and though laudable it falls short of what I actually crave (and what I imagine would be be most beneficial/appreciated by the public).

    1. The keyword data tells us this is an inductive definition, that is, that we are defining a new datatype with constructors

      Inductive, since multiple constructors are generalized to a type. And as seen in this example, data types can also facilitate mathematical induction.

  5. www.dreamsongs.com www.dreamsongs.com
    1. The primary feature for easy maintenance is locality: Locality is that characteristic of source code that enables a programmer to understand that source by looking at only a small portion of it.
    1. It’s fun but when would we ever use things like this in actual code?When it’s well tested, commented, documented, and becomes an understood idiom of your code base.We focus so much on black magic and avoiding it that we rarely have a chance to enjoy any of the benefits. When used responsibly and when necessary, it gives a lot of power and expressiveness.
  6. Jun 2021
    1. In case writing to tmpfile fails for some reason, use && mv ... instead of ; mv ... -- that will keep $file from being overwritten with "bad" content.
    1. Different ways to prepend a line: (echo 'line to prepend';cat file)|sponge file sed -i '1iline to prepend' file # GNU sed -i '' $'1i\\\nline to prepend\n' file # BSD printf %s\\n 0a 'line to prepend' . w|ed -s file perl -pi -e 'print"line to prepend\n"if$.==1' file
    1. Same feature in TypeScript¶ It's worth mentioning that other languages have a shortcut for assignment var assignment directly from constructor parameters. So it seems especially painful that Ruby, despite being so beautifully elegant and succinct in other areas, still has no such shortcut for this. One of those other languages (CoffeeScript) is dead now, but TypeScript remains very much alive and allows you to write this (REPL): class Foo { constructor(public a:number, public b:number, private c:number) { } } instead of this boilerplate: class Foo { constructor(a, b, c) { this.a = a; this.b = b; this.c = c; } } (The public/private access modifiers actually disappear in the transpiled JavaScript code because it's only the TypeScript compiler that enforces those access modifiers, and it does so at compile time rather than at run time.) Further reading: https://www.typescriptlang.org/docs/handbook/2/classes.html#parameter-properties https://basarat.gitbook.io/typescript/future-javascript/classes#define-using-constructor https://kendaleiv.com/typescript-constructor-assignment-public-and-private-keywords/ I actually wouldn't mind being able to use public/private modifiers on instance var parameters in Ruby, too, but if we did, I would suggest making that be an additional optional shortcut (for defining accessor methods for those instance vars) that builds on top of the instance var assignment parameter syntax described here. (See more detailed proposal in #__.) Accessors are more of a secondary concern to me: we can already define accessors pretty succinctly with attr_accessor and friends. The bigger pain point that I'm much more interested in having a succinct shortcut for is instance var assignment in constructors. initialize(@a, @b, @c) syntax¶ jsc (Justin Collins) wrote in #note-12: jjyr (Jinyang Jiang) wrote: I am surprised this syntax has been repeatedly requested and rejected since 7 years ago. ... As someone who has been writing Ruby for over 10 years, this syntax is exactly that I would like. I grow really tired of writing def initialize(a, b, c) @a = a @b = b @c = c end This would be perfect: def initialize(@a, @b, @c) end I'm a little bit sad Matz is against this syntax, as it seems so natural to me. Me too!! I've been writing Ruby for over 15 years, and this syntax seems like the most obvious, simple, natural, clear, unsurprising, and Ruby-like. I believe it would be readily understood by any Rubyist without any explanation required. Even if you saw it for the first time, I can't think of any way you could miss or misinterpret its meaning: since @a is in the same position as a local variable a would normally be, it seems abundantly clear that instead of assigning to a local variable, we're just assigning to the variable @a instead and of course you can reference the @a variable in the constructor body, too, exactly the same as you could with a local variable a passed as an argument. A workaround pattern¶ In the meantime, I've taken to defining my constructor and list of public accessors (if any) like this: attr_reader \ :a, :b def new( a, b) @a, @b = a, b end ... which is still horrendously boilerplatey and ugly, and probably most of you will hate — but by lining up the duplicated symbols into a table of columns, I like that I can at least more easily see the ugly duplication and cross-check that I've spelled them all correctly and handled them all consistently. :shrug: Please??¶ Almost every time I write a new class in Ruby, I wish for this feature and wonder if we'll ever get it. Can we please?
    1. When defining accessors in Ruby, there can be a tension between brevity (which we all love) and best practice.
    2. Yeah, "virtual attribute" seems like dated terminology to me, so conceptually just a method.
    3. I see a 'virtual attribute' as something we're forced to implement when using frameworks, ORMs and the like. Something that lets us inject our code into the path of whatever metaprogramming has been put in place for us. In a simple PORO like this, I don't see how it has meaning; it's just a method. :)

      Hmm, good point. Maybe so. Though I think I'm fine with calling it a virtual property here too. :shrug:

    4. has_sauce is a "virtual attribute", a characteristic of the model that's dependent on the underlying toppings attribute.
    5. in languages (like JavaScript and Java) where external objects do have direct access to instance vars
    6. Setting an instance variable by going through a setter is good practice, and using two access modifiers is the way to accomplish that for a read-only instance variable
    1. “We want to be an example of what a modern, fast web app can do,” he says. “And we want to blow a few minds while we’re at it.”

      No app as and end product, really speeds up the releasing cycle, avoids the the review process both in app store and google play store, Moreover, the apple tax and upfornt developer membership cost which is 100$ / year.

  7. basarat.gitbook.io basarat.gitbook.io
    1. Having a member in a class and initializing it like below:class Foo { x: number; constructor(x:number) { this.x = x; }}is such a common pattern that TypeScript provides a shorthand where you can prefix the member with an access modifier and it is automatically declared on the class and copied from the constructor. So the previous example can be re-written as (notice public x:number):class Foo { constructor(public x:number) { }}
    1. Then, people from programming communities (mainly front-end) realized that CoffeeScript is out of date and is starting to lag behind the ever-evolving Javascript environment. As of today, January 2020, CoffeeScript is completely dead on the market (though the GitHub repository is still kind of alive).
    1. Programmers should be encouraged to understand what is correct, why it is correct, and then propagate.

      new tag?:

      • understand why it is correct
    2. I don't think it is too clever. I think it solves the problem idiomatically. I.e., it uses reduce, which is exactly correct. Programmers should be encouraged to understand what is correct, why it is correct, and then propagate. For a trivial operation like average, true, one doesn't need to be "clever". But by understanding what "reduce" is for a trivial case, one can then start applying it to much more complex problems. upvote.
    3. Thanks, this was just what I was looking for! This is a perfect appropriate use of instance_eval. I do not understand the nay-sayers. If you already have your array in a variable, then sure, a.reduce(:+) / a.size.to_f is pretty reasonable. But if you want to "in line" find the mean of an array literal or an array that is returned from a function/expression — without duplicating the entire expression ([0,4,8].reduce(:+) / [0,4,8].length.to_f, for example, is abhorrent) or being required to assign to a local, then instance_eval option is a beautiful, elegant, idiomatic solution!!
  8. May 2021
    1. Adapters are required to make Request globally available if it isn't already part of the target platform. It's part of the (currently undocumented) contract — see e.g. adapter-node
    1. After suggestions from comments below, I read A Philosophy of Software Design (2018) by John Ousterhout and found it to be a much more positive experience. I would be happy to recommend it over Clean Code.

      The author recommends A Philosophy of Software Design over Clean Code

    1. What I did have going for me was what might be considered hacker sensibilities - lack of fear of computers in general, and in trying unknown things. A love of exploring, learning by experimenting, putting stuff together on the fly.

      Well described concept of hacker sensibilities

    1. Method 1: We can grab the PDF Versions of Google’s TotT episodes or create our own posters that are more relevant to the company and put them in places where both developers and testers can’t be ignored.Method 2 : We can initiate something called ‘Tip of the day’ Mailing System from Quality Engineering Department.

      Ways to implement Google's Testing on the Toilet concept

    2. They started to write flyers about everything from dependency injection to code coverage and then regularly plaster the bathrooms in all over Google with each episode, almost 500 stalls worldwide.

      Testing on the Toilet (TotT) concept

    3. Dogfooding → Internal adoption of software that is not yet released. The phrase “eating your own dogfood” is meant to convey the idea that if you make a product to sell to someone else, you should be willing to use it yourself to find out if it is any good.

      Dogfooding testing method at Google

    1. It's Faster

      Makefile is also faster than package.json script

    2. It's even more discoverable if your shell has smart tab completion: for example, on my current project, if you enter the aws/ directory and type make<TAB>, you'll see a list that includes things like docker-login, deploy-dev and destroy-sandbox.

      If your shell has smart TAB completion, you can easily discover relevant make commands

    3. Variables. Multiple lines. No more escaped quotation marks. Comments.

      What are Makefile's advantages over package.json scripts

    1. you want to pass a function as an argument to higher-order functions

      Functional programming - passing functions as arguments, as opposed to data objects.

  9. Apr 2021
    1. This project will be great for instruction and portable reproducible science

      This is what I'm aiming for with triplescripts.org. Initially, I'm mostly focused on the reproducibility the build process for software. In principle, it can encompass all kinds of use, and I actually want it to, but for practical reasons I'm trying to go for manageable sized bites instead of very large ones.

    1. To prevent race conditions and deadlocks, we highly recommend that each of the communication channels is serviced on a separate thread that maintains its own client buffer state and messaging queue inside your application. Servicing all of the pseudoconsole activities on the same thread may result in a deadlock where one of the communications buffers is filled and waiting for your action while you attempt to dispatch a blocking request on another channel.
    1. I wish to define methods within the class they belong to. Using class << self demonstrates that approach clearly — we are defining methods within the actual singleton class scope.
    2. When we usedef self.method, though, we are defining a method across scopes: we are present in the regular class scope, but we use Ruby’s ability to define methods upon specific instances from anywhere; self within a class definition is the Class instance we are working on (i.e. the class itself). Therefore, usingdef self.method is a leap to another scope, and this feels wrong to me.
  10. Mar 2021
    1. The distinction in computer programming between classes and objects is related, though in this context, "class" sometimes refers to a set of objects (with class-level attribute or operations) rather than a description of an object in the set, as "type" would.
    1. Title: "goal the use case is trying to satisfy"[23]:101 Main Success Scenario: numbered list of steps[23]:101 Step: "a simple statement of the interaction between the actor and a system"[23]:101 Extensions: separately numbered lists, one per Extension[23]:101 Extension: "a condition that results in different interactions from .. the main success scenario". An extension from main step 3 is numbered 3a, etc.

      Not sure why I find this example so interesting.

      Probably because it is a human-readable outline that uses machine-readable (programming language source code) constructs, namely loops/iteration.

      The format in which this is written in, then, is itself a kind of (high-level, human-oriented) programming language.

      Example:

      • numbered list of steps [introduces/names the loop/iterator/enumeration being done]
        • Step: "a simple statement of the interaction between the actor and a system" [defines the inner part of the loop that gets "executed" once per iteration]
    1. Put another way, it’s become clear to me over time that the problems with data races and memory safety arise when you have both aliasing and mutability. The functional approach to solving this problem is to remove mutability. Rust’s approach would be to remove aliasing. This gives us a story to tell and helps to set us apart. A note on terminology: I think we should refer to aliasing as sharing. In the past, we’ve avoided this because of its multithreaded connotations. However, if/when we implement the data parallelism plans I have proposed, then this connotation is not at all inappropriate. In fact, given the close relationship between memory safety and data races, I actually want to promote this connotation.
    1. There are currently three implementations of the ActivePapers concept: the Python edition, the JVM edition, and the Pharo edition

      There is only one reasonable approach, and it's not even mentioned as an option here: the browser edition. (I.e., written to target the ubiquitous WHATWG/W3C hypertext system.)

    1. “There is very little incentive for Microsoft to make a significant change to features that are used extremely widely by the rest of the massive community of Excel users.”

      Microsoft did the right thing here. Most users are not geneticists and they rely on automatic date conversion.

    1. JavaScript needs to fly from its comfy nest, and learn to survive on its own, on equal terms with other languages and run-times. It’s time to grow up, kid.
    2. If JavaScript were detached from the client and server platforms, the pressure of being a monoculture would be lifted — the next iteration of the JavaScript language or run-time would no longer have to please every developer in the world, but instead could focus on pleasing a much smaller audience of developers who love JavaScript and thrive with it, while enabling others to move to alternative languages or run-times.
    3. For instance, those who prefer classical inheritance may enjoy the addition of the class keyword, while others may reject it as conflicting with the idea of a prototypical inheritance model.
    1. To the consternation of some users, 3.x employed Unicode variable names such as λ, φ, τ and π for a concise representation of mathematical operations. A downside of this approach was that a SyntaxError would occur if you loaded the non-minified D3 using ISO-8859-1 instead of UTF-8. 3.x also used Unicode string literals, such as the SI-prefix µ for 1e-6. 4.0 uses only ASCII variable names and ASCII string literals (see rollup-plugin-ascii), avoiding encoding problems.
    1. multi-dimensional erector set that we're going forever

      "A multi-dimensional erector set that will go on forever..."

      No, unfortunately not forever.

    1. In production, you will never trigger one specific callback or a particular validation, only. Your application will run all code required to create a Song object, for instance. In Trailblazer, this means running the Song::Create operation, and testing that very operation with all its side-effects.
    2. There’s no need to test controllers, models, service objects, etc. in isolation
    3. Internally, it creates and returns a fresh, subclassed activity (via patching) whilst replacing the step for given :id. Be advised that this does not change the original activity class.
    1. Using ::delegates works exactly like the Forwardable module in Ruby, with one bonus: It creates the accessors in a module, allowing you to override and call super in a user module or class.
  11. Feb 2021
    1. In order to customize the latter one and add another step tidy_storage, you’d normally have to subclass all three activities and override steps.
    2. The DSL will, per default, wrap every task with the Binary interface, meaning returning true will result in Activity::Right, and false in Activity::Left.
    3. Note that you can return either a boolean value or a [signal subclass] in order to dictate the direction of flow.
    4. a method that doesn’t have access to variables outside its scope
    1. Each step receives the return value of its predecessor. The return value decides about what next step is called.
    2. In order to invoke, or run
    3. the ability to “error out” when something goes wrong
    4. Six lines of code create an executable object that, when invoked, will run your code in the order as visible in our diagram, plus the ability to “error out” when something goes wrong.
    5. While you could program this little piece of logic and flow yourself using a bunch of Ruby methods along with a considerable amount of ifs and elses, and maybe elsif, if you’re feeling fancy, a Trailblazer activity provides you a simple API for creating such flow without having to write and maintain any control code. It is an abstraction.
    6. Modelling the flow of a program where chunks of code are executed in a certain order, with a successful “happy path” and an “error-out” path is called a Railway. It popped up in functional languages

      first sighting: railway-oriented programming

    7. provide interfaces so you don’t have to think about them

      Question to myself: Is not having to think about it actually a good goal to have? Is it at odds with making intentional/well-considered decisions?  Obviously there are still many of interesting decisions to make even when using a framework that provides conventions and standardization and makes some decisions for you...

    1. Let’s start with the same number dividing example, which returns 0 when the error happens. Maybe instead we can indicate that the result was not successful without any explicit numerical value?
    2. 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.
    3. You can use container values, that wraps actual success or error value into a thin wrapper with utility methods to work with this value. That’s exactly why we have created @dry-python/returns project. So you can make your functions return something meaningful, typed, and safe.
    4. Exceptions are just like notorious goto statements that torn the fabric of our programs.
    1. The latter are important examples which usually also exist in "purely" functional programming languages.

      How can they exist and it still be considered pure??

      I guess that's not quite the same / as bad as saying something had side effects in a purely functional programming context, right?

    1. It reminds us that rather than asking an object for data and acting on that data, we should instead tell an object what to do.
    1. In functional programming, a monad is an abstraction that allows structuring programs generically
    2. Whatever language or default programming paradigm a developer uses, following the monad pattern brings many of the benefits of purely functional programming.
    3. To emphasize how Just acts on the underlying value by wrapping it, it can be redefined as a function too, called eta for now
    4. This is done to avoid confusion by differentiating between cases where a variable carries a defined value and those where it does not.
    5. Research beginning in the late 1980s and early 1990s established that monads could bring seemingly disparate computer-science problems under a unified, functional model.
    1. So every program starts in the IO monad. From here you can get any input you need, call into relatively "pure" code with the inputs, and then output the result in some way. The reverse does not work. You cannot call into IO code from pure code like you can call into a Maybe function from pure code.
    1. It turns out that, given a set of constraints defining a particular problem, deriving an efficient algorithm to solve it is a very difficult problem in itself. This crucial step cannot yet be automated and still requires the insight of a human programmer.
    1. Purely functional programming may also be defined by forbidding state changes and mutable data.
    2. purely functional programming usually designates a programming paradigm—a style of building the structure and elements of computer programs—that treats all computation as the evaluation of mathematical functions.
    3. Purely functional data structures are persistent. Persistency is required for functional programming; without it, the same computation could return different results.
    1. This is a useful approach to error handling, but please don’t take it to extremes! See my post on “Against Railway-Oriented Programming”.
    1. This is the most popular article “railway oriented programming” on one of the most popular websites of F #.

      I may have seen it before but not really paid attention to it, but this just might be the first time I stopped to look it up.

      Because I saw the code below, didn't recognize the language, and was intrigued.

    1. which entails computer programming (process of writing and maintaining the source code), but also encompasses a planned and structured process from the conception of the desired software to its final manifestation
    1. One of the main reasons to work with components is re-usability and portability, but also a delegation of responsibilities. Adding a component should be as easy as simply adding the component without having to know the inner workings (or markup) of this component. A consumer should only be aware of the properties, methods and events of a component. In order to style a child component one has to be aware of the markup as well, which violates this 'delegation of responsibility'-principle.
    1. Using a terminus to indicate a certain outcome - in turn - allows for much stronger interfaces across nested activities and less guessing! For example, in the new endpoint gem, the not_found terminus is then wired to a special “404 track” that handles the case of “model not found”. The beautiful thing here is: there is no guessing by inspecting ctx[:model] or the like - the not_found end has only one meaning!
    2. A major improvement here is the ability to maintain more than two explicit termini. In 2.0, you had the success and the failure termini (or “ends” as we used to call them). Now, additional ends such as not_found can be leveraged to communicate a non-binary outcome of your activity or operation.
    1. The Quest for Truth

      The quest for Truth is everywhere and not limited to the economic topics linked here. This is just a topic that started a thought process where I had access to a convenient tool (Hypothesis) to bookmark my thoughts and research.

      Primary thought is: The Quest for Truth. Subcategories would provide a structured topic for the thought. In this case the subcategory would be: US Economy, Inflation

      The TRUTH is a concept comprised of inconsistencies and targets that frequently move.

      Targets (data, methods, people, time, semantics, agenda, demographic, motive, means, media, money, status) hold a position in time long enough to fulfill a purpose or agenda. Sometimes they don't consciously change, but history over time shines light and opens cracks in original narrative that leads to new truth's, real or imagined.

      Verifying and validating certain Truth is very difficult. Why is That?
    1. Examples of different ways of defining forms

      Wow, that's a lot of different ways.

      The inline_form way in particular seems interesting to me, though it's worth noting that that method is just an example, not actually part of this project's code, so it's not really a first-class option like the other options.

    1. I think a better, more immediately understandable name for this concept would be command object, because it lets you pass around commands (or a list of commands) as objects.

      That's the only thing you really need to know abut this pattern. The rest seems like boring implementation details that aren't that important, and that naturally follow from the primary definition above.

    2. The central ideas of this design pattern closely mirror the semantics of first-class functions and higher-order functions in functional programming languages. Specifically, the invoker object is a higher-order function of which the command object is a first-class argument.
    1. In programming language design, a first-class citizen (also type, object, entity, or value) in a given programming language is an entity which supports all the operations generally available to other entities. These operations typically include being passed as an argument, returned from a function, modified, and assigned to a variable.
    1. In object-oriented programming, information hiding (by way of nesting of types) reduces software development risk by shifting the code's dependency on an uncertain implementation (design decision) onto a well-defined interface. Clients of the interface perform operations purely through it so if the implementation changes, the clients do not have to change.
    1. The more important point comes from a program design perspective. Here, "programming to an interface" means focusing your design on what the code is doing, not how it does it. This is a vital distinction that pushes your design towards correctness and flexibility.
    2. My understanding of "programming to an interface" is different than what the question or the other answers suggest. Which is not to say that my understanding is correct, or that the things in the other answers aren't good ideas, just that they're not what I think of when I hear that term.
    3. Programming to an interface means that when you are presented with some programming interface (be it a class library, a set of functions, a network protocol or anything else) that you keep to using only things guaranteed by the interface. You may have knowledge about the underlying implementation (you may have written it), but you should not ever use that knowledge.
    4. The problem with this is that it creates a strong coupling between your code and the implementation, exactly what the interface was supposed to prevent.
    5. If the program was important enough, Microsoft might actually go ahead and add some hack to their implementation so the the program would continue to work, but the cost of that is increased complexity (with all the ensuing problems) of the Windows code. It also makes life extra-hard for the Wine people, because they try to implement the WinAPI as well, but they can only refer to the documentation for how to do this, which leads to many programs not working as they should because they (accidentally or intentionally) rely on some implementation detail.