4,496 Matching Annotations
  1. Mar 2021
    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. But I believe the core philosophy of tiny modules is actually sound and easier to maintain than giant frameworks.
    2. I would much rather have a "cosine" module than a "trigonometry" module because chances are good I only need a small fraction of the utilities provided by the larger trig module.
    3. Small modules are extremely versatile and easy to compose together in an app with any number of other modules that suit your needs.
    4. Second, I don't agree that there are too many small modules. In fact, I wish every common function existed as its own module. Even the maintainers of utility libraries like Underscore and Lodash have realized the benefits of modularity and allowed you to install individual utilities from their library as separate modules. From where I sit that seems like a smart move. Why should I import the entirety of Underscore just to use one function? Instead I'd rather see more "function suites" where a bunch of utilities are all published separately but under a namespace or some kind of common name prefix to make them easier to find. The way Underscore and Lodash have approached this issue is perfect. It gives consumers of their packages options and flexibility while still letting people like Dave import the whole entire library if that's what they really want to do.
    1. this only applies to end products which are actually deployed. For my modules, I try to keep dependency version ranges at defaults, and recommend others do the same. All this pinning and packing is really the responsibility of the last user in the chain, and from experience, you will make their life significantly more difficult if you pin your own module dependencies.
    2. I suspect you aren't seeing much discussion because those who have a reasonable process in place, and do not consider this situation to be as bad as everyone would have you believe, tend not to comment on it as much.
    1. The elimination of what is arguably the biggest monoculture in the history of software development would mean that we, the community, could finally take charge of both languages and run-times, and start to iterate and grow these independently of browser/server platforms, vendors, and organizations, all pulling in different directions, struggling for control of standards, and (perhaps most importantly) freeing the entire community of developers from the group pressure of One Language To Rule Them All.
    2. 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.
    3. 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.
    4. While various shortcomings of the standard run-time library are the obvious, immediate reason for the creation of micro-packages
    5. As to opinions about the shortcomings of the language itself, or the standard run-times, it’s important to realize that every developer has a different background, different experience, different needs, temperament, values, and a slew of other cultural motivations and concerns — individual opinions will always be largely personal and, to some degree, non-technical in nature.
    1. A product’s onceability is, to a certain extent, linked to its usefulness. If it is really useful, we will certainly go to considerable lengths to repair it.
    2. Even if the damned thing would be really helpful in the long run, I can't give it the time and attention needed to make it work again ...  Not right now. And ultimately never.
    3. Onceability can be the result of the exaggerated demand for un-memorable passwords.
    4. I searched for a replacement, but the list of plug-ins had 5000 items and the search function couldn't find anything of the same kind...
    1. <small><cite class='h-cite via'> <span class='p-author h-card'>Jeremy Cherfas</span> in IndieWeb chat (<time class='dt-published'>03/11/2021 14:46:39</time>)</cite></small>

    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.
    2. 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. Normally you should not register a named module, but instead register as an anonymous module: define(function () {}); This allows users of your code to rename your library to a name suitable for their project layout. It also allows them to map your module to a dependency name that is used by other libraries.
      1. Get out the city shapefile and overlay these values.
      2. Get the most current version of the voter registration database.
      3. Determine the number of voters who, according to the Spokane Journal of Business, took part in the 2018 school bond vote, but not the stadium advisory vote. (Geographically, these would be folks who live within SD81, but outside of the city limits.)
    1. ECMAScript is a programming language itself, specified in the document ECMA-262. In other words, ECMA-262 is the specification of the programming language ECMAScript. JavaScript is an implementation of ECMAScript which conforms to the ECMAScript specification. JavaScript implementations can also provide additional features not described in the specification.
    1. I'd suggest there ought to be config to disable source maps specifically, and specifically for either CSS or JS (not alwasy both), without turning off debug mode. As you note, debug mode does all sorts of different things that you might want with or without source maps.
    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. I don't myself understand what's going on, it clearly has something to do with source maps, but may also have to do with other sprockets changes.
    4. But yeah, I'm not sure how you would determine which was the "recommended way" really. I don't see anything in Rails docs saying either way.
    5. But last I have seen comments from DHH, he considered webpack(er) recommended for JS, but Sprockets still the preferred solution for (S)CSS.
    6. I don't really understand what's going on. Clearly source maps have something to do with it -- a source map feature that doesn't handle SCSS very well, apparently.
    7. 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.
    8. I agree about lack of maintenance. It's probably because people use more and more Webpack.
    1. # This behavior can be disabled with: # # environment.unregister_postprocessor 'application/javascript', Sprockets::SafetyColons

      but it appears to no longer be possible in latest version...

    1. we want source maps in production (like DHH)
    2. I totally understand that there may be a majority still considering this a bad practice and thus keeping it disabled by default in production seem ok. But there could at least be an option to enable it for people who want to, no?
    3. After waiting years for sprockets to support this we were very happy to see that sprockets 4 officially added support (thanks ), but then when trying to upgrade we noticed there's actually no way to use it in production... (without brittle hacks mentioned above).
    4. I'd be happy to open a PR for this, but I'm not sure exactly what code needs to change. default_source_map.rb and source_map_utils.rb seem like candidates, but I'd appreciate guidance
    1. The way we do it currently is by calling load from inside of load, via different "pipelines" and processors which is quite elegant and completely impossible to work with.
    2. If I can find some time, maybe I can help pitch in somehow.
    3. I'm kinda stuck at the moment, going around in circles. Everything is really heavily coupled. I would like to get to the point where no load is called from within processors, but i'm not sure if that's possible. Currently the API and the caching strategies are fighting me at every step of the way. I have a branch where i'm hacking through some refactoring, no light at the end of the tunnel yet though :(
    4. Money could be good if it is spent to provide some of the above things. Money on it's own is hard because then it means I would have to spend time book-keeping and managing instead of programming.
    1. it's super hard to test master because i have no idea which gems need to be updated. is there a guide on how to take a rails 4.2 project to master sprockets without everything mysteriously exploding? ill try to make a repro case but its hard to tell where to even start
    1. Opal is a Ruby to JavaScript source-to-source compiler. It comes packed with the Ruby corelib you know and love. It is both fast as a runtime and small in its footprint.
    1. Hyperstack gives you full access to the entire universe of JavaScript libraries and components directly within your Ruby code.Everything you can do in JavaScript is simple to do in Ruby; this includes passing parameters between Ruby and JavaScript and even passing Ruby methods as JavaScript callbacks.There is no need to learn JavaScript, all you need to understand is how to bridge between JS and Ruby.
    1. Better yet, send them a link to this page to help them understand why and how to make an example app:
    2. If you end up finding and fixing a bug in your code, consider re-reading the documentation and seeing if that behavior of the library is unclear. Consider sending a documentation PR.
    3. Before a bug can be fixed, it has to be understood and reproduced. For every issue, a maintainer gets, they have to decipher what was supposed to happen and then spend minutes or hours piecing together their reproduction. Usually, they can’t get it right, so they have to ask for clarification. This back-and-forth process takes lots of energy and wastes everyone’s time. Instead, it’s better to provide an example app from the beginning. At the end of the day, would you rather maintainers spend their time making example apps or fixing issues?
    1. I think that over time the distinction is lost. My math teacher, 35 years ago stated "formulas are used in chemistry, in math we have equations". To this day, the word 'formula' in math seems wrong, but I'd accept it's used commonly.
    2. An equation is any expression with an equals sign, so your example is by definition an equation. Equations appear frequently in mathematics because mathematicians love to use equal signs. A formula is a set of instructions for creating a desired result. Non-mathematical examples include such things as chemical formulas (two H and one O make H2O), or the formula for Coca-Cola (which is just a list of ingredients). You can argue that these examples are not equations, in the sense that hydrogen and oxygen are not "equal" to water, yet you can use them to make water.
    1. We don’t want to invalidate the input if the user removes all text. They may need a moment to think, but the invalidated state sets off an unnecessary alarm.
    1. If you plan on using a gamepad with big picture mode I made a config that works perfectly so check it out.
    2. There are myriads of platformers around, it's an oversaturated market, and just like industrial designer Karim Rashid said about there being no excuse by this point to make an uncomfortable chair, there's no excuse by this point to make a boring patformer.
    1. Alxemes jiy ñów la lekkool di ubbi.

      C'est jeudi prochain la rentrée des classes.

      alxemes -- (Arabic) Thursday.

      jiy -- (?).

      ñów v. -- to come, to arrive.

      la -- can mean a lot of different things depending on context.

      lekkool bi -- (French: l'école) school. 🏫

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

      ubbi v. -- open, to start, begin, inaugurate.

    2. Beykat yi duñu dem tool altine.

      Les cultivateurs ne vont pas au champ le lundi.

      beykat bi -- farmer 👩🏾‍🌾 (from bey -- to farm/cultivate).

      yi -- the (indicates plurality).

      duñu -- do not/no one (?).

      dem v. -- to go, leave, etc.

      tool bi -- field, orchard.

      altine ji -- (Arabic) Monday.

    3. Fibar bi jàngal na taawan bu góor ni ñuy dagge reeni aloom.

      Le guérisseur a appris à son fils aîné comment on coupe les racines du Diospyros.

      fibar -- (fibar bi? the healer? as in feebar / fièvre / fever? -- used as a general term for sickness).

      bi -- the (indicates nearness).

      jàngal v. -- to teach (something to someone), to learn (something from someone) -- compare with jàng (as in janga wolof) and jàngale.

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

      taaw+an (taaw) bi -- first child, eldest. (taawan -- his eldest).

      bu -- the (indicates relativeness).

      góor gi -- man; male.

      ni -- pr. circ. way, defined, distant. How? 'Or' What. function indicator. As.

      ñuy -- they (?).

      dagg+e (dagg) v. -- cut; to cut.

      reen+i (reen) bi -- root, taproot, support.

      aloom gi -- Diospyros mespiliformis, EBENACEA (tree).

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

    4. Dafa ànd ak moroom yi àll ba, fori aloom.

      Il est allé dans la brousse ramasser des fruits de Diospyros avec ses camarades.

      dafa -- he/she.

      ànd v. / ànd bi -- to be together, to go together; copulate; going together, fellowship; placenta.

      ak -- and, with, etc.

      moroom mi -- comrade of the same age group, equal, companion, neighbor.

      yi -- the (plural).

      àll bi -- large expanse of uninhabited land, bush; distant, as opposed to home.

      ba -- the (indicates distance).

      for+i (for) v. -- to pick up.

      aloom bi -- edible fruit of Diospyros mespiliformis (aloom gi for the tree).

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

    5. Séentuwul woon ni dinañu ko alamaan.

      Il ne s'attendait pas à ce qu'on lui inflige une amende.

      "We didn't expect that we would be fined."

      séentu+wul (séentu) v. -- to seek to see from afar 👀, to scrutinize 🧐, to expect.

      woon -- he didn't (?).

      ni -- formats a verb (?)

      dinañu -- we will.

      ko -- her, him, it.

      alamaan v. -- (French: l'amende) give a fine.

      https://www.youtube.com/watch?v=QDv6KW-rpnE

    6. Sama nijaay aj na ñaari yoon.

      Mon oncle a effectué deux fois le pèlerinage à La Mecque.

      sama -- my.

      nijaay ji n. -- maternal uncle; term of reference and address to designate the husband, in conservative circles.

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

      na -- he (?).

      ñaar+i (ñaar) -- twice; two. 2️⃣

      yoon wi n. -- lane, path, track 🛤; law, regulation, legislation; times.

    1. Dave Rupert has a good solution that uses an input's invalid event. Instead of using the :invalid pseudo selector, he adds a CSS class to the input when it becomes invalid. We will extend this approach by removing the CSS class when the element becomes valid again.
    1. Validating forms has notoriously been a painful development experience. Implementing client side validation in a user friendly, developer friendly, and accessible way is hard. Before HTML5 there was no means of implementing validation natively; therefore, developers have resorted to a variety of JavaScript based solutions.
    1. Try before you buy Here's a link to the game on Tabletopia: Judean Hammer on Tabletopia
    1. <small><cite class='h-cite via'> <span class='p-author h-card'>petermolnar</span> in #indieweb 2021-03-08 (<time class='dt-published'>03/08/2021 10:06:29</time>)</cite></small>

    1. If you want to try playing to see how these pieces work in the game, you can playtest it on the Iishogi.org site (https://lishogi.org/).  Last year the Iishogi designer asked me to register the Design SHOGI pieces on their site.  This Iishogi.org is a free to play Shogi website.  I was willing to give them permission to use them.  You are free to play and switch pieces design from the piece variation section.  If you register your ID, then you can play vs the A.I. easily.  You can learn how the Design SHOGI pieces work there.
    1. This is the story of how a bill to save the vote and preserve a semblance of democracy for millions of Americans died at the hands of an intransigent, reactionary minority in the Senate, which used the filibuster to do its dirty work

      The author starts off by personifying "the bill" as something that was supposed to save millions of Americans, but rather was killed by Senators. He immediately provides a brief overview of the claim of his essay before developing his narrative. This way, the audience gets a glimpse of the issue that the author will tackle. Also, by using words such as "intransigent and reactionary", the audience already understands that the author is going to be criticizing the senators for their action.

    1. It is much easier to track what is going on within the activity. Instead of transporting additional state via ctx, you expose the outcome via an additional end event.

      Note: It's only super easy to see what's going on if you have the benefit of a diagram.

    2. This is my absolute favorite feature ever and the official reason for (re-)writing Trailblazer 2.1. It makes me happy every time I use it.
    3. So why the over-complication? What we got now is replicating a chain of && in the former version. This time, however, you will know which condition failed and what went in by using tracing. Look at the trace above - it’s impossible to not understand what was going on.
    4. Hey, that’s is an imaginary complication of our example - please don’t do this with every condition you have in your app.
    1. .The firstparadigm centres on institutional power: ‘Our schools, our government, our businessesand corporations are permeated with the view that neither individual nor group aretrustworthy. There must be power over, power to control. This hierarchal system isinherent in our whole culture’. The second paradigm takes the opposite view: ‘Givena suitable climate, humankind is trustworthy, creative, self-motivated, powerful andconstructive – capable of releasing undreamed-of-potentialities’

      there is an ongoing struggle in many areas of society, in schools, workplaces, religious organisations. the second paradigm doesn't seem to win over the first on a large scale, since significant change in any domain is a frustrating and never-ending process.

    2. importedfrom the business and commercial world.

      who decided this? who decides which measures of success are appropriate?

    3. target driven climate which has the potential to undermine theimportance of ‘relationship

      taking away from the very purpose of the practice

    Tags

    Annotators

  2. Feb 2021
    1. URI::MailTo::EMAIL_REGEXP

      First time I've seen someone create a validator by simply matching against URI::MailTo::EMAIL_REGEXP from std lib. More often you see people copying and pasting some really long regex that they don't understand and is probably not loose enough. It's much better, though, to simply reuse a standard one from a library — by reference, rather than copying and pasting!!

    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. Subprocess will try to match the nested ends’ semantics to the tracks it knows. You may wire custom ends using Output.
    3. 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?

    4. Patching has no implicit, magical side-effects and is strongly encouraged to customize flows for a specific case in a quick and consise way.
    5. However, it can be a PITA if you want to customize one of those deeply nested components and add or remove a certain step, for example.
    6. While you could nest an activity into another manually, the Subprocess macro will come in handy.
    7. The macro automatically wires all of Validate’s ends to the known counter-part tracks.
    8. Since notify sits on the “failure” track and hence is “magnetic to” :failure, find_provider will be connected to it.
    9. This connects the failure output to the previous task, which might create an infinity loop and waste your computing time - it is solely here for demonstrational purposes.
    1. <small><cite class='h-cite via'> <span class='p-author h-card'>Cory Doctorow</span> in Pluralistic: 16 Feb 2021 – Pluralistic: Daily links (<time class='dt-published'>02/25/2021 12:20:24</time>)</cite></small>

      It's interesting to note that there are already two other people who have used Hypothes and their page note functionality to tag this article as to read, one with (to read) and another with (TODO-read).

    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. Sass variables, like all Sass identifiers, treat hyphens and underscores as identical. This means that $font-size and $font_size both refer to the same variable. This is a historical holdover from the very early days of Sass, when it only allowed underscores in identifier names. Once Sass added support for hyphens to match CSS’s syntax, the two were made equivalent to make migration easier.
    1. Keeping bootstrap-sass in sync with upstream changes from Bootstrap used to be an error prone and time consuming manual process. With Bootstrap 3 we have introduced a converter that automates this.
    1. Keep in mind that third party code with references to other files also processed by the asset Pipeline (images, stylesheets, etc.), will need to be rewritten to use helpers like asset_path.
    1. That’s it. If you have a previous “precompile” array, in your app config, it will continue to work. For continuity sake I recommend moving over those declarations to your manifest.js file so that it will be consistent.
    2. That’s pretty gnarly. While the name of the constant LOOSE_APP_ASSETS gives me some idea of what it does, it still takes a second to wrap your mind around. If you were trying to figure out what assets are being precompiled and you did a puts config.assets.precompile that lambda object would be utterly baffling.
    1. found that using only the Pascal-provided control structures, the correct solution was given by only 20% of the subjects, while no subject wrote incorrect code for this problem if allowed to write a return from the middle of a loop.
    2. computers theoretically need only one machine instruction (subtract one number from another and branch if the result is negative)
    1. 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.
    2. we also wrap them in Failure to solve the second problem: spotting potential exceptions is hard
    3. 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.
    4. 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.
    5. Almost everything in python can fail with different types of exceptions: division, function calls, int, str, generators, iterables in for loops, attribute access, key access, even raise something() itself may fail. I am not even covering IO operations here. And checked exceptions won’t be supported in the nearest future.
    6. You still need to have a solid experience to spot these potential problems in a perfectly readable and typed code.
    7. print will never be actually executed. Because 1 / 0 is an impossible operation and ZeroDivisionError will be raised.
    8. 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.
  3. www.kickstarter.com www.kickstarter.com
    1. The author will offer presentation/game sessions on Tabletopia, in French and English. In addition, the game will be freely available for players on Tabletopia as soon as the written rules are available.
    1. This tedium would be unacceptable in an action game, but Windbound is a survival game. In survival games, death is supposed to mean something. Loss of progress represents the stakes; repetition is the barrier of entry.
    1. In other words, once you've used Maybe you cannot hit nil with a missing method. This is remarkable because even &. doesn't save you from omitting || "No state" at the end of the computation. Basically, that's what they call "Type Safety".
    2. It's hard to say why people think so because you certainly don't need to know category theory for using them, just like you don't need it for, say, using functions.
    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. In the short term you may have the stamina to get up earlier, stay later, and out-work the demands you face. But the inverse equation of shrinking resources and increasing demands will eventually catch up to you, and at that point how you involve others sets the ceiling of your leadership impact.
    1. note that TRB source code modifications are not proprietary

      In other words, you can build on this software in your proprietary software but can't change the Trailblazer source unless you're willing to contribute it back.

      loophole: I wonder if this will actually just push people to move their code -- which at the core is/would be a direction modification to the source code - out to a separate module. That's so easy to do with Ruby, so this restriction hardly seems like it would have any effect on encouraging contributions.

    1. The bare bones operation without any Trailblazery is implemented in the trailblazer-operation gem and can be used without our stack.
    2. While Trailblazer offers you abstraction layers for all aspects of Ruby On Rails, it does not missionize you. Wherever you want, you may fall back to the "Rails Way" with fat models, monolithic controllers, global helpers, etc. This is not a bad thing, but allows you to step-wise introduce Trailblazer's encapsulation in your app without having to rewrite it.
    3. Only use what you like.