983 Matching Annotations
  1. Jun 2021
    1. Test we react correctly to any events emitted from child components:
    2. Test any directive that defines if/how child component is rendered (for example, v-if and v-for).
    1. When mocking is deemed profitable:
    2. targeting what the user actually sees
    3. The most important guideline to give is the following: Write clean unit tests if there is actual value in testing a complex piece of logic in isolation to prevent it from breaking in the future Otherwise, try to write your specs as close to the user’s flow as possible
    4. It’s better to test a component in the way the user interacts with it: checking the rendered template.
    1. We need to be really careful about what's 'same origin' because the server has no idea what host/path the various cookies are associated with. It just has a list of cookies that the browser had determined to be relevant for this SSR'd page, and not for any other subrequests.
  2. May 2021
    1. If you're already an admin for the zone in question, then the proper way to get that information is to log on to the DNS server or DNS control console and read it right from there. If you're not an admin for the zone, you're not supposed to have that information. Note that the person you are talking to on the phone is almost certainly not a DNS zone admin, so they also should not have that information. If they somehow did have it, they definitely shouldn't give it out over the phone. This is for your protection.
    2. DNS zone information is sensitive. Many years ago it was possible for anyone to query a DNS server and literally get back all the records at once, but that was a security issue. Now you have to be an admin for the zone to get that info.
    3. However I appreciate that price and functionality often dictates who we deal with.
    1. As the token is unique and unpredictable, it also enforces proper sequence of events (e.g. screen 1, then 2, then 3) which raises usability problem (e.g. user opens multiple tabs). It can be relaxed by using per session CSRF token instead of per request CSRF token.
    1. what is ozonation?

      what is ozonation. Ozone gas perfect disinfectant and this is used to purify water. Unlike chlorine gas, which leaves harmful residual chlorine gas in the treated water, ozone leaves no harmful residual gases. Any unreacted ozone decomposes to oxygen gas.

    1. Building an app with all the modern best practices — code-splitting, offline support, server-rendered views with client-side hydration — is fiendishly complicated. SvelteKit does all the boring stuff for you so that you can get on with the creative part.
    1. I miss the thriving blogging culture of circa 1999-2012. People blogged before and after those dates, but that was a period where blogging really had an outsized voice in shaping political and cultural conversation.

      Maybe it's the fact that there's more thoughts, ideas, and actual conversation in longer form media? Too much has moved to social media which really immediately implies small, bite-sized bits of information---a short note, a photo, a star or a heart.

    1. orchitis

      Orchitis of orchiditis is een ontsteking van de testes. Orchitis wordt veelal veroorzaakt door SOA's als chlamydia en gonorroe. Bij het doormaken van de bof door jongens vanaf de puberteit is orchitis een veel geziene complicatie.

    1. Negative values are mostly unsupported in html email. So is CSS position. For webmail at least, this is so that your email doesn't render outside of the desired window. Imagine Gmail with your CSS or email affecting the interface - they've limited the CSS you can use specifically to prevent this.
  3. Apr 2021
    1. There is a similar feature in the standard library Logger class, but the implementation here is safe to use with multiple processes writing to the same log file.
    1. This is definitely not the place to report bugs related to sass, rails, or sprockets. Each project has it's own issue tracker (not on SO)
    1. can you remove the not a bug label considering that PaperTrail is creating this empty versions even when :updated_at is an ignored attribute?
    1. We are are continuing our commitment to creating our games that are free and widely accessible anyone that is curious by making our game files available under Creative Commons license BY–NC–SA 4.0. That means we will continue offering a full, free print-and-play kit for Pax Pamir, and later this campaign, John Company! Anyone can use, remix, and share the game, so long as they do not use it for commercial purposes. 
    1. It has two very different meanings, that you would have to distinguish by context. One meaning is just expressing that we have limitations. If you don't know something, that's just tough, you don't know it and you have to live with that. You don't have information if you don't have that information. The other meaning is that not only are there gaps in our knowledge, but often we don't even know what the gaps in our knowledge are. I don't know how to speak Finnish. That's a gap in my knowledge that I know about. I know that I don't know how to speak Finnish. But there are gaps in my knowledge that I'm not even aware of. That's where you can say "You don't know what you don't know" meaning that you don't even know what knowledge you are missing.

      I had this thought too.

    1. How is a pseudoconsole different from a pseudoterminal ?

      I'm guessing that's just a Microsoftism to make it easier to search/find things that are specifically about Microsoft's flavor of pseudoterminal.

      I see they don't use the word "pseudoterminal" at all, but they do mention

      ConPTY, or the Windows PTY

      where PTY is another synonym/name for pseudoterminal. So I think we're safe in saying that this is talking about a pseudoterminal.

    1. Of course you must not use plain-text passwords and place them directly into scripts. You even must not use telnet protocol at all. And avoid ftp, too. I needn’t say why you should use ssh, instead, need I? And you also must not plug your fingers into 220 voltage AC-output. Telnet was chosen for examples as less harmless alternative, because it’s getting rare in real life, but it can show all basic functions of expect-like tools, even abilities to send passwords. BUT, you can use “Expect and Co” to do other things, I just show the direction.
    1. In many computing contexts, "TTY" has become the name for any text terminal, such as an external console device, a user dialing into the system on a modem on a serial port device, a printing or graphical computer terminal on a computer's serial port or the RS-232 port on a USB-to-RS-232 converter attached to a computer's USB port, or even a terminal emulator application in the window system using a pseudoterminal device.

      It's still confusing, but this at least helps/tries to clarify.

    1. TTY is right there in the name, but this article makes no attempt to clarify what exactly the relationship between a pseudoterminal and a TTY. I feel like a whole paragraph about the relation to TTY would be warranted, including a link to TTY article, of course, which does link [back] to and explain some of the relation to pseudoterminal:

      In many computing contexts, "TTY" has become the name for any text terminal, such as an external console device, a user dialing into the system on a modem on a serial port device, a printing or graphical computer terminal on a computer's serial port or the RS-232 port on a USB-to-RS-232 converter attached to a computer's USB port, or even a terminal emulator application in the window system using a pseudoterminal device.

    1. Although echo "$@" prints the arguments with spaces in between, that's due to echo: it prints its arguments with spaces as separators.

      due to echo adding the spaces, not due to the spaces already being present

      Tag: not so much:

      whose responsibility is it? but more: what handles this / where does it come from? (how exactly should I word it?)

    1. COPYRIGHT Rsync was originally written by Andrew Tridgell and is currently maintained by Wayne Davison. It has been improved by many developers from around the world. Rsync may be used, modified and redistributed only under the terms of the GNU General Public License, found in the file COPYING in this distribution, or at the Free Software Foundation.

      Only answered:

      • who maintains
      • what the license is
    1. Not really sure who the audience is... the puzzles are a bit too difficult for kids but won't tax adults very much at all--some bare bones hidden object, match-3 and peg hopping.
    1. Academy Games has always prided itself in the quality of its rules. Most of our rules are taught in stages, allowing you to start playing as soon as possible without needing to read everything. We are very careful about the order we teach rules and rely heavily on graphics and pictures to facilitate understanding. We also include a large number of detailed picture examples, often with 3D renders, that help you understand the context of the rules.
  4. Mar 2021
    1. Your validation functions should also treat undefined and '' as the same. This is not too difficult since both undefined and '' are falsy in javascript. So a "required" validation rule would just be error = value ? undefined : 'Required'.
    1. Both Prof Wu and Ms Truong cited the 1875 Page Act, one of the earliest pieces of federal law restricting immigration to the US. On paper, the legislation barred the entry of any woman from China, Japan "or any Oriental country" for "lewd and immoral purposes", including prostitution.In reality, the law blocked virtually all immigration from Asian women, who were collectively presumed to be sex workers or prostitutes.This racist and sexist stereotype that they "were bringing their immorality to the US", Ms Truong explains, has lingered.

      le bruh moment.

    1. It consists of two relations; the first one being exemplified in "An X is a Y" (simple hyponymy) while the second relation is "An X is a kind/type of Y". The second relation is said to be more discriminating and can be classified more specifically under the concept of taxonomy.

      So I think what this saying, rather indirectly (from the other direction), if I'm understanding correctly, is that the relationships that can be inferred from looking at a taxonomy are ambiguous, because a taxonomy includes 2 kinds of relationships, but encodes them in the same way (conflates them together as if they were both hyponyms--er, well, this is saying that the are both kinds of hyponyms):

      • "An X is a Y" (simple hyponymy)
      • "An X is a kind/type of Y".

      Actually, I may have read it wrong / misunderstood it... While it's not ruling out that simple hyponymy may sometimes be used in a taxonomy, it is be saying that the "second relation" is "more specifically under the concept of taxonomy" ... which is not really clear, but seems to mean that it is more appropriate / better for use as a criterion in a taxonomy.


      Okay, so define "simple hyponymy" and name the other kind of hyponymy that is referenced here.

    2. The hierarchical structure of semantic fields can be mostly seen in hyponymy.

      Good explanation about semantic fields.

      I assume the same or an even stronger statement can be made about semantic classes (which to me are like more clear-cut, distinct semantic fields), then? 

    1. Taxonomies are often represented as is-a hierarchies where each level is more specific (in mathematical language "a subset of") the level above it. For example, a basic biology taxonomy would have concepts such as mammal, which is a subset of animal, and dogs and cats, which are subsets of mammal. This kind of taxonomy is called an is-a model because the specific objects are considered as instances of a concept. For example, Fido is-an instance of the concept dog and Fluffy is-a cat.
    2. In the simple biology example, dog is a hypernym and Fido is one of its hyponyms. A word can be both a hyponym and a hypernym. For example, dog is a hyponym of mammal and also a hypernym of Fido.

      I wish they hadn't used tokens/objects in this example. Wouldn't it be just as clear or clearer if they had stuck to only comparing types/classes?

      It may be okay to mix them like that in some contexts, but in other cases it seems like this would be suffering from ignoring/conflating/[better word?] the Type–token distinction.

      Does linguistics just not make the https://en.wikipedia.org/wiki/Type%E2%80%93token_distinction ?

      This statement seems to reinforce that idea:

      words that are examples of categories are hyponyms

      because an example of a category/class/type could be either a sub-class or an instance of that category/class/type, right?

    1. As to why both is_a? and kind_of? exist: I suppose it's part of Ruby's design philosophy. Python would say there should only be one way to do something; Ruby often has synonymous methods so you can use the one that sounds better. It's a matter of preference.
    1. definitely less rough to work with than Devise
    2. With all this “monetization” happening around Trailblazer, we will also make sure that all free and paid parts of the project grow adult and maintan an LTS - or long-term support - status. Those are good news to all you users out there having been scared to use gems of this project, not knowing whether or not they’re being maintained, breaking code in the future or making your developers addicted to and then cutting off the supply chain. Trailblazer 2.1 onwards is LTS, and the last 1 ½ years of collaboration have proven that.
    1. Third configurable block to run.

      I like how they identify in the description which order things run in: 1st, 2nd, 3rd, and last.

      Though, it would be more readable to have a list of them, in chronological order, rather than having them listed in alphabetical order.

    2. Last configurable block to run. Called after frameworks initialize.
    1. Very often in these monorepos, packages are so incredibly specific in functionality, the question then becomes why even have a separate package at all if it’s tightly coupled? Can you use these packages independently or are they tied to specific versions of other packages in the monorepo? It’ll probably be easier to remove the mask and just work as a monolith.
    1. So the question becomes how many tests are enough?
    2. I am a big advocate of having a complete test base and even erring on the side of caution when it comes to quality engineering and software validation but that is not what we’re talking about here. What we’re talking about here are the tests that we write when we’re doing test-first development and I’m proposing that writing those tests from the perspective of specifying the behaviors that we want to create is a highly valuable way of writing tests because it drives us to think at the right level of abstraction for creating behavioral tests and that allow us the freedom to refactor our code without breaking it.
    1. much software requires continuous changes to meet new requirements and correct bugs, and re-engineering software each time a change is made is rarely practical.
    1. Microlibraries are easier to understand, develop and test. They make it easier for new people to get involved and contribute. They reduce the distinction between a “core module” and a “plugin”, and increase the pace of development in D3 features.
    1. I don't understand why this isn't being considered a bigger deal by maintainrs/the community. Don't most Rails developers use SCSS? It's included by default in a new Rails app. Along with sprockets 4. I am mystified how anyone is managing to debug CSS in Rails at all these days, that this issue is being ignored makes sprockets seem like abandonware to me, or makes me wonder if nobody else is using sprockets 4, or what!
    2. Meh... as I said earlier, I think using Webpack is the recommended way now. Another issue is there is no way to generate source maps in production.
    3. But maybe few are still using sprockets at all, for JS or (S)CSS anymore? Hard to say.
    4. Is there a PR to... something? sassc-rails? That would make the patch not necessary? (I don't know if there's any good way to monkey-patch that in, I think you have to fork? So some change seems required...) Should the defaults be different somehow? This is very difficult to figure out.
    5. I am not sure this whole ecosystem currently has much maintainers unfortunately. :( Pick your reaction
    6. Is there a PR to... something? sassc-rails?
    7. I agree about lack of maintenance. It's probably because people use more and more Webpack.
    1. What is the point of avoiding the semicolon in concat_javascript_sources

      For how detailed and insightful his analysis was -- which didn't elaborate or even touch on his not understanding the reason for adding the semicolon -- it sure appeared like he knew what it was for. Otherwise, the whole issue would/should have been about how he didn't understand that, not on how to keep adding the semicolon but do so in a faster way!

      Then again, this comment from 3 months afterwards, indicates he may not think they are even necessary: https://github.com/rails/sprockets/issues/388#issuecomment-252417741

      Anyway, just in case he really didn't know, the comment shortly below partly answers the question:

      Since the common problem with concatenating JavaScript files is the lack of semicolons, automatically adding one (that, like Sam said, will then be removed by the minifier if it's unnecessary) seems on the surface to be a perfectly fine speed optimization.

      This also alludes to the problem: https://github.com/rails/sprockets/issues/388#issuecomment-257312994

      But the explicit answer/explanation to this question still remains unspoken: because if you don't add them between concatenated files -- as I discovered just to day -- you will run into this error:

         (intermediate value)(...) is not a function
             at something.source.js:1
      

      , apparently because when it concatenated those 2 files together, it tried to evaluate it as:

         ({
           // other.js
         })()
         (function() {
           // something.js
         })();
      

      It makes sense that a ; is needed.

    1. Nee na ndëmm amul.

      Il dit que la sorcellerie n'existe pas.

      nee -- pr. circ. so, demonstratively distant. Cf. nale.

      na -- 1. pr. circ. so, defined distant. How? 'Or' What. 2. function indicator. As.

      ndëmm gi -- symbolic anthropophagia. 🧙

      am+ul (am) v. -- to exist, to have.

    2. Fexeel ba kër gi bañ ñàkk alkol.

      Veille à ce qu'il ne manque pas d'alcool à la maison.

      fexe+el (fexe) v. -- search/seek by all means.

      ba -- the (?).

      kër gi -- house; family.

      gi -- the (indicates nearness).

      bañ v. -- refuse, resist, refuse to; to hate; verb marking the negation in subordinate clauses.

      ñàkk v. / ñàkk bi -- vaccinate / vaccine (not sure exactly how this fits in the sentence if it's even the right translation -- perhaps it has to do with surgical alcohol rather than drinking alcohol).

      alkol ji -- (French) surgical alcohol. (I'm certain this is also used for the type of alcohol you drink -- but sangara is probably the most used term).

      https://www.youtube.com/watch?v=SsUjvAItysA

    3. Ci taatu guy googu la jigéeni Ajoor yi di jaaye sanqal.

      C'est sous ce baobab que les femmes originaires du Kayor vendent de la semoule de mil.

      ci -- close; at @, in, on, inside, to.

      taat+u (taat) wi -- base, bottom, foundation, buttocks.

      guy gi -- baobab. 🌴

      googu -- that (closeness).

      la -- (?).

      jigéen+i (jigéen) bi ji -- sister versus brother; woman as opposed to man. 👩🏽

      ajoor bi -- person from Kayor.

      yi -- the (plural).

      di -- be; mark of the imperfective affirmative not inactual.

      jaay+e (jaay) v. -- sell.

      sanqal si -- millet semolina. 🌾

    4. Sëriñ boobu aj na daaw, doomam a ko wuutu léegi.

      Ce marabout est décédé l'an dernier, c'est son fils qui le remplace maintenant.

      sëriñ bi -- marabout.

      boobu -- this.

      aj (Arabic: Hajj) v. -- make the pilgrimage to Mecca. 🕋; deceased ☠️ (for a religious personality).

      na -- he (?).

      daaw n. -- last year. 🗓

      doom+am (doom) ji -- child by descent 👶🏽; doll🪆; to have a child.

    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. Run the complete unit with a certain input set, and test the side-effects. This differs to the Rails Way™ testing style, where smaller units of code, such as a specific validation or a callback, are tested in complete isolation. While that might look tempting and clean, it will create a test environment that is not identical to what happens in production.
  5. Feb 2021
    1. Do you have collaborators who could have generated keys and sold them on their own? DIG's Steam keys and other stores' Steam keys must have some source, after all. Keys don't generate themselves, and only your accounts should be able to request them.This particular game was in Bunch Keys Indie Wizardry Bundle. I assume you had a proper contract for that. Maybe DIG or an intermediary bought 50-200 copies of it?
    2. It isn't stealing because you or an associate must have generated and given them the keys in some way or another?Ideally you would ask a DIG bundle buyer to show you their key for your game, so you can figure out what key request batch it came from, and then you can scratch your head and wonder who you gave those keys to and what journey they took afterwards.
    1. For branching out a separate path in an activity, use the Path() macro. It’s a convenient, simple way to declare alternative routes

      Seems like this would be a very common need: once you switch to a custom failure track, you want it to stay on that track until the end!!!

      The problem is that in a Railway, everything automatically has 2 outputs. But we really only need one (which is exactly what Path gives us). And you end up fighting the defaults when there are the automatic 2 outputs, because you have to remember to explicitly/verbosely redirect all of those outputs or they may end up going somewhere you don't want them to go.

      The default behavior of everything going to the next defined step is not helpful for doing that, and in fact is quite frustrating because you don't want unrelated steps to accidentally end up on one of the tasks in your custom failure track.

      And you can't use fail for custom-track steps becase that breaks magnetic_to for some reason.

      I was finding myself very in need of something like this, and was about to write my own DSL, but then I discovered this. I still think it needs a better DSL than this, but at least they provided a way to do this. Much needed.

      For this example, I might write something like this:

      step :decide_type, Output(Activity::Left, :credit_card) => Track(:with_credit_card)
      
      # Create the track, which would automatically create an implicit End with the same id.
      Track(:with_credit_card) do
          step :authorize
          step :charge
      end
      

      I guess that's not much different than theirs. Main improvement is it avoids ugly need to specify end_id/end_task.

      But that wouldn't actually be enough either in this example, because you would actually want to have a failure track there and a path doesn't have one ... so it sounds like Subprocess and a new self-contained ProcessCreditCard Railway would be the best solution for this particular example... Subprocess is the ultimate in flexibility and gives us all the flexibility we need)


      But what if you had a path that you needed to direct to from 2 different tasks' outputs?

      Example: I came up with this, but it takes a lot of effort to keep my custom path/track hidden/"isolated" and prevent other tasks from automatically/implicitly going into those steps:

      class Example::ValidationErrorTrack < Trailblazer::Activity::Railway
        step :validate_model, Output(:failure) => Track(:validation_error)
        step :save,           Output(:failure) => Track(:validation_error)
      
        # Can't use fail here or the magnetic_to won't work and  Track(:validation_error) won't work
        step :log_validation_error, magnetic_to: :validation_error,
          Output(:success) => End(:validation_error), 
          Output(:failure) => End(:validation_error) 
      end
      
      puts Trailblazer::Developer.render o
      Reloading...
      
      #<Start/:default>
       {Trailblazer::Activity::Right} => #<Trailblazer::Activity::TaskBuilder::Task user_proc=validate_model>
      #<Trailblazer::Activity::TaskBuilder::Task user_proc=validate_model>
       {Trailblazer::Activity::Left} => #<Trailblazer::Activity::TaskBuilder::Task user_proc=log_validation_error>
       {Trailblazer::Activity::Right} => #<Trailblazer::Activity::TaskBuilder::Task user_proc=save>
      #<Trailblazer::Activity::TaskBuilder::Task user_proc=save>
       {Trailblazer::Activity::Left} => #<Trailblazer::Activity::TaskBuilder::Task user_proc=log_validation_error>
       {Trailblazer::Activity::Right} => #<End/:success>
      #<Trailblazer::Activity::TaskBuilder::Task user_proc=log_validation_error>
       {Trailblazer::Activity::Left} => #<End/:validation_error>
       {Trailblazer::Activity::Right} => #<End/:validation_error>
      #<End/:success>
      
      #<End/:validation_error>
      
      #<End/:failure>
      

      Now attempt to do it with Path... Does the Path() have an ID we can reference? Or maybe we just keep a reference to the object and use it directly in 2 different places?

      class Example::ValidationErrorTrack::VPathHelper1 < Trailblazer::Activity::Railway
         validation_error_path = Path(end_id: "End.validation_error", end_task: End(:validation_error)) do
          step :log_validation_error
        end
        step :validate_model, Output(:failure) => validation_error_path
        step :save,           Output(:failure) => validation_error_path
      end
      
      o=Example::ValidationErrorTrack::VPathHelper1; puts Trailblazer::Developer.render o
      Reloading...
      
      #<Start/:default>
       {Trailblazer::Activity::Right} => #<Trailblazer::Activity::TaskBuilder::Task user_proc=validate_model>
      #<Trailblazer::Activity::TaskBuilder::Task user_proc=validate_model>
       {Trailblazer::Activity::Left} => #<Trailblazer::Activity::TaskBuilder::Task user_proc=log_validation_error>
       {Trailblazer::Activity::Right} => #<Trailblazer::Activity::TaskBuilder::Task user_proc=save>
      #<Trailblazer::Activity::TaskBuilder::Task user_proc=log_validation_error>
       {Trailblazer::Activity::Right} => #<End/:validation_error>
      #<Trailblazer::Activity::TaskBuilder::Task user_proc=save>
       {Trailblazer::Activity::Left} => #<Trailblazer::Activity::TaskBuilder::Task user_proc=log_validation_error>
       {Trailblazer::Activity::Right} => #<End/:success>
      #<End/:success>
      
      #<End/:validation_error>
      
      #<End/:failure>
      

      It's just too bad that:

      • there's not a Railway helper in case you want multiple outputs, though we could probably create one pretty easily using Path as our template
      • we can't "inline" a separate Railway acitivity (Subprocess "nests" it rather than "inlines")
    2. step :direct_debit

      I don't think we would/should really want to make this the "success" (Right) path and :credit_card be the "failure" (Left) track.

      Maybe it's okay to repurpose Left and Right for something other than failure/success ... but only if we can actually change the default semantic of those signals/outputs. Is that possible? Maybe there's a way to override or delete the default outputs?

    1. The sole purpose to add Dev::Trace::Inspector module is to make custom inspection possible and efficient while tracing. For example, ActiveRecord::Relation#inspect makes additional queries to fetch top 10 records and generate the output everytime. To avoid this, Inspector will not call inspect method when it finds such objects (deeply nested anywhere). Instead, it’ll call AR::Relation#to_sql to get plain SQL query which doesn’t make additional queries and is better to understand in tracing output.
    1. Personally, I'm starting to think that the feature where it automatically adds xray.js to the document is more trouble than it's worth. I propose that we remove that automatic feature and just make it part of the install instructions that you need to add this line to your template/layout: <%= javascript_include_tag 'xray', nonce: true if Rails.env.development? %>
    1. As we know, naming is hard.
    2. For example, what if your site has a customer interface and an “admin” interface? If the two have totally different designs and features, then it might be considerable overhead to ship the entirety of the admin interface to every customer on the regular site.
    3. Before we get into what the manifest.js does, let’s look at what it is replacing.
    1. we also wrap them in Failure to solve the second problem: spotting potential exceptions is hard
    2. Not all cases can be covered and easily restored. And sometimes when we will reuse this function for different use-cases we will find out that it requires different restore logic.
    3. But why do we return 0? Why not 1? Why not None? And while None in most cases is as bad (or even worse) than the exceptions, turns out we should heavily rely on business logic and use-cases of this function.
    4. So, the sad conclusion is: all problems must be resolved individually depending on a specific usage context. There’s no silver bullet to resolve all ZeroDivisionErrors once and for all. And again, I am not even covering complex IO flows with retry policies and expotential timeouts.
    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. If you ask my former students, they will tell you that as a teacher, my goal is to do nothing. I dream of the day when I can sit at my desk, feet propped up, reading a book, while the classroom bursts with activity and learning around me.
    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. stolen love from the child and infant and made it the exclusive property of the adolescent and adult

      Love is not exclusive to adults and adolescents as there are many types of love. I do not believe it has been stolen but added to love in general.

    1. compose(Add, x: x, y: 3)

      How is this better than simply:

      Add.run(x: x, y: 3)
      

      ?

      I guess if we did that we would also have to remember to handle merging errors from that outcome into self...

    2. If ActiveModel deals with your nouns, then ActiveInteraction handles your verbs.

      It's a good analogy, but I think it's misleading/confusing/unclear/incorrect, because parts of ActiveInteraction are ActiveModel, so I guess ActiveInteraction deals with your nouns too?

    3. Why is all this interaction code better? Two reasons: One, you can reuse the FindAccount interaction in other places, like your API controller or a Resque task. And two, if you want to change how accounts are found, you only have to change one place.

      Pretty weak arguments though...

      1. We could just as easily used a plain object or module to extract this for easy reuse and having it in only one place (avoiding duplication).
    4. For this one we'll define a helper method to handle raising the correct errors. We have to do this because calling .run! would raise an ActiveInteraction::InvalidInteractionError instead of an ActiveRecord::RecordNotFound. That means Rails would render a 500 instead of a 404.

      True, but why couldn't it handle this for us?

    1. Microsoft has the advantage of exclusively serving Yahoo search traffic, powering several digital assistant voice searches, and the ability to target searchers with LinkedIn profile data such as company, job function, and industry.

      I also was curious when reading this about how relevant Microsoft ads are nowadays. I feel like everything these days is focused on Google or Google centered. When I use Safari on my iPhone, it takes me to Google search results. I don't think I have ever used Bing and I haven't used Yahoo in probably 10+ years. Is it beneficial for companies to still put effort into Microsoft? Or could this be a case by case thing depending on the size of the company. I feel like it wouldn't be very cost effective for a small business to put money into Microsoft ads since the majority of users use Google.

    1. Set your models free from the accepts_nested_attributes_for helper. Action Form provides an object-oriented approach to represent your forms by building a form object, rather than relying on Active Record internals for doing this.

      It seems that the primary/only goal/purpose was to provide a better alternative to ActiveRecord's accepts_nested_attributes_for.

      Unfortunately, this appears to be abandoned.

    1. This column and last month's article are about design. Design, by nature, is a series of trade-offs. Every choice has a good and bad side, and you make your choice in the context of overall criteria defined by necessity. Good and bad are not absolutes, however. A good decision in one context might be bad in another.
    2. Stating that some language feature or common programming idiom (like accessors) has problems is not the same thing as saying you should never use them under any circumstances.
    3. And just because a feature or idiom is commonly used does not mean you should use it either.
    1. Say you have software to keep track of your grocery list. In the 80's, this software would work against a command line and some flat files on floppy disk. Then you got a UI. Then you maybe put the list in the database. Later on it maybe moved to the cloud or mobile phones or facebook integration. If you designed your code specifically around the implementation (floppy disks and command lines) you would be ill-prepared for changes. If you designed your code around the interface (manipulating a grocery list) then the implementation is free to change.
    1. Rather than implement features you might need, you implement only the features you definitely need, but in a way that accommodates change. If you don't have this flexibility, parallel development simply isn't possible.
    2. At the core of parallel development, however, is the notion of flexibility. You have to write your code in such a way that you can incorporate newly discovered requirements into the existing code as painlessly as possible.
    1. with ActiveForm-Rails, validations is the responsability of the form and not of the models. There is no need to synchronize errors from the form to the models and vice versa.

      But if you intend to save to a model after the form validates, then you can't escape the models' validations:

      either you check that the models pass their own validations ahead of time (like I want to do, and I think @mattheworiordan was wanting to do), or you have to accept that one of the following outcomes is possible/inevitable if the models' own validations fail:

      1. if you use object.save then it may silently fail to save
      2. if you use object.save then it will fail to save and raise an error

      Are either of those outcomes acceptable to you? To me, they seem not to be. Hence we must also check for / handle the models' validations. Hence we need a way to aggregate errors from both the form object (context-specific validations) and from the models (unconditional/invariant validations that should always be checked by the model), and present them to the user.

      What do you guys find to be the best way to accomplish that?

      I am interested to know what best practices you use / still use today after all these years. I keep finding myself running into this same problem/need, which is how I ended up looking for what the current options are for form objects today...

    2. DSLs can be problematic for the user since the user has to manage state (e.g. am I supposed to call valid? first or update_attributes?). This is exactly why the #validate is the only method to change state in Reform.
    3. The reason Reform does updating attributes and validation in the same step is because I wanna reduce public methods. This is to save users from having to remember state.

      I see what he means, but what would you call this (tag)? "have to remember state"? maybe "have to remember" is close enough

      Or maybe order is important / do things in the right order is all we need to describe the problem/need.

    1. Unlike naming children, coding involves naming things on a daily basis. When you write code, naming things isn’t just hard, it’s a relentless demand for creativity. Fortunately, programmers are creative people.
    2. If we renamed things more often, then it probably wouldn’t be so hard to name them in the first place.
    3. We also find it hard to agree on what good names and bad names look like, which makes it hard to know when renaming improves a name.
    4. This is funny because it’s unexpected. Cache invalidation sounds like a hard thing, while naming sounds more straightforward. The joke works because it violates our expectation that hard things should be technical. It’s also funny because it’s true.
    5. Naming is communication
    6. ‘Programs are meant to be read by humans and only incidentally for computers to execute.’
    7. Naming matters for both idealogical and practical reasons.
    8. Naming is just one part of the micro-design activity that we call programming. If design weren’t hard, we wouldn’t find good design so satisfying.
    9. Anyone who has ever tried to name a child knows that naming is hard. Naming things in code is harder. It’s bad enough that you have to commit to a name that someone isn’t going to like. You also have to be able to live with it.