776 Matching Annotations
  1. Oct 2021
  2. Sep 2021
    1. Democracy Collaborative contributes another framework

      Dëmocracy Collaborative framework - Measure and interpret impact on community - esp in area of low-income households. : Indicators: equity, econ dev, new biz, affordable housing, arts and culture, financial security of families, education of youth, better health and safety.

    2. action agenda’

      Action Agenda os Initiative for a Competitive Inner City - university as driver of economic prosperity for urban areas... with a socio-economic benfit (7 roles identified: Institution roles Economic roles Physical roles Public purpose Roles.

    3. The settlement house movement offers a prime example

    Tags

    Annotators

    1. The neighborhood outside of the PAS is characterized by continued decline—median household incomes fell by 30% between 1990 and 2010 and its poverty rate exceeded the city’s, as well as the PAS area’s, by approximately 10% in 2010. The overall trends for University City, discussed previously, mask the observed socioeconomic divergence between the areas inside and outside of the catchment zone. In fact, it appears that the PAS area served as the bright spot in University City during the WPI years, while the remainder of the neighborhood experienced continued eco-nomic decline.Housing tre

      PAS catchment better. Outside in decline.

    2. wealth front, Philadelphia’s poverty rate steadily increased

      more poverty study black declined pop with influx of asia and small flight of whites. Home values doubled while occupancy increased.

      But inside the PAS catchment area, whites increase, blacks decreased and asians doubled. More rental, less vacancy... Less owner occupied. - signs of gentrification. Lower poverty.

    3. For example, the Ohio State University emphasized increased beautification and public safety initiatives, homeownership incen-tive programs, and mixed-use development projects to catalyze new private investment. The University of Cincinnati spurred revitalization by providing funds to and serving on the boards of five neighborhood community develop-ment corporations (CDCs), one for each of its adjacent neighborhoods. This strategy moves the institution into a partnership role with the neighborhood, rather than a leadership role. Several other books, articles, and reports empha-size other approaches universities are taking as urban property owners and real estate developers, economic engines, neighborhood partners, and civic leaders (e.g., Bunnell and Lawson 2006; Guinan, McKinley, and Yi 2013; Martin, Smith, and Phillips 2005; Maurrasse 2001; Mayfield and Lucas 2000; Perry, Wiewel, and Menendez 2009; Sungu-Eryilmaz 2009)

      Various case studies and their weaknesses.

    Tags

    Annotators

    1. Under the rubric of business incentives, we include bothtax instruments—property tax abatements, tax incrementfinancing, sales tax exemptions and credits, and corporateincome tax exemptions and credits for investment or jobs—and non-tax incentives such as business grants, loans,and loan guarantees. In all cases, the firm, not the workeror work seeker, is the initial recipient of the incentive

      Examples of types of incentive included in their definition.

    Tags

    Annotators

    1. y. In the Santa Barbara antigrowth movements, for example, much support is provided by professionals from research and electronics firms, as well as branch managers of small "high-technology" corporation

      Example of where anti-growth worked and evidence

    2. s the claim that growth "makes jo
    3. ocalities grow in population not simply as a function of migration but also because of the fecundity of the existing population. Some means are obvi- ously needed to provide jobs and housing to accommodate such growth- either in the immediate area or at some distant lo

      birth rates create growth. creating environmentla and budgetary stresses.

    4. s, growth benefits only a small proportion of local residents. Growth almost always brings with it the obvious problems of increased air and water pollution, traffic congestion, and overtaxing of natural a

      Growth has costs the affect many but benefit few.

    5. 49).4 In- creased utility and government costs caused by new development should be borne (and they usually are-see, e.g., Ann Arbor City Planning De- partment [1972]) by the public at large, rather than by those responsible for the "excess" demand on the urban infrast

      The public pays for these costs of extending land use.

    6. es; decisions made by private corporations also have major impac

      Private entities also seek to maximize use. And use gvt. as a tool to maximize use of land by reducing costs (through incentives).

    7. g way: an at- tempt is made to use government to gain those resources which will enhance the growth potential of the area unit in ques

      Gvts are interested in land use that enhances growth potential.

    Tags

    Annotators

    1. leader of a community project, sponsored by a voluntary society, on a c

      Community-based research

    2. Dampness and mould growth were also a feature of some houses on the Whiteway and Twerton council

      dampness of homes in council estates in Bath. research for community advocacy. Collective action example.

    3. s. This study originated from the desire of tenants to obtain reliable data which they could use for their cause. They did not carry out the study but they were consulted so that its form would serve their needs. They subsequently made use of the findings to argue their case both to the media and to the local authori

      The study had benefit for the communities.

    4. Damp ho

      Damp rental homes creating health issues in Scotland.

    5. Brighton where the SSD had created o

      Brighton social services patch teams.

    1. config: path.resolve(__dirname, '../config'), vue: 'vue/dist/vue.js', src: path.resolve(__dirname, '../src'), store: path.resolve(__dirname, '../src/store'), assets: path.resolve(__dirname, '../src/assets'), components: path.resolve(__dirname, '../src/components'), '@': path.resolve(__dirname, '../src'),
    2. alias: { _self: path.join(__dirname, 'src/web'), _shared: path.join(__dirname, 'src/shared'), _components: path.join(__dirname, 'src/web/components'), _helpers: path.join(__dirname, 'src/web/helpers'), _layers: path.join(__dirname, 'src/web/layers'), _mutations: path.join(__dirname, 'src/web/mutations'), _routes: path.join(__dirname, 'src/web/routes') }
    3. alias: { '@components': path.join(srcDir, 'components'), '@modules': path.join(srcDir, 'modules'), '@store': path.join(srcDir, 'store') }
    4. alias: { '@shared': path.dirname(require.resolve('app')), '~': path.join(fs.realpathSync(process.cwd()), 'app'), },
    5. In this example, @shared is the package, ~ is the project. I wouldn't do it this way in the future, but I know this configuration works.
    1. alias: { Library: path.resolve(__dirname, "root/library/"), Single: path.resolve(__dirname, "root/test.js"), },
    2. alias: { Single$: path.resolve(__dirname, "root/test.js"), },
    1. Analytics modules that run in the background, monitor user interaction, and send the data to a server.
    2. Many jQuery plugins attach themselves to the global jQuery object.
    3. A polyfill for example, might not do anything, because it finds that the feature that it enables is already supported by the browser.
    1. Some would argue that the phrase ''survival of the fittest'' is tautological, in that the fittest are defined as those that survive to reproduce.
    1. One good use for /dev/tty is if you're trying to call an editor in a pipeline (e.g., with xargs). Since the standard input of xargs is some list of files rather than your terminal, just doing, e.g., | xargs emacs will screw up your terminal. Instead you can use | xargs sh -c 'emacs "$@" </dev/tty' emacs to connect the editor to your terminal even though the input of xargs is coming from elsewhere.
  3. Aug 2021
    1. Some details of my example were originally poorly chosen i.e. the example was constructed in a way that developer would probably have done a null check rather than a typeof comparison. I've addressed that now. My apologies to anyone who read this before-hand and thought the example seemed a bit too "fabricated".
    1. Using a flag to disable prettier for a line, the next line or until I activate it again (ESLint like syntax). // prettier-disable border: { sep: "║", topLeft: "╔", topMid: "╦", top: "═", topRight: "╗", midLeft: "╠", midMid: "╬", mid: "═", midRight: "╣", botLeft: "╚", botMid: "╩", bot: "═", botRight: "╝" }, // prettier-enable
    1. Here is one of the most confusing cases: def foo(x, **kwargs) p [x, kwargs] end def bar(x=1, **kwargs) p [x, kwargs] end foo({}) #=> [{}, {}] bar({}) #=> [1, {}] bar({}, **{}) #=> expected: [{}, {}], actual: [1, {}]
    2. If you extend a method to accept keyword arguments, the method may have incompatibility as follows: # If a method accepts rest argument and no `**nil` def foo(*args) p args end # Passing keywords are converted to a Hash object (even in Ruby 3.0) foo(k: 1) #=> [{:k=>1}] # If the method is extended to accept a keyword def foo(*args, mode: false) p args end # The existing call may break foo(k: 1) #=> ArgumentError: unknown keyword k
    1. Ronald Reagan also kept a similar system that apparently very few people knew about until he died. In his system, he used 3×5 notecards and kept them in a photo binder by theme. These note cards–which were mostly filled with quotes–have actually been turned into a book edited by the historian Douglas Brinkley. These were not only responsible for many of his speeches as president, but before office Reagan delivered hundreds of talks as part of his role at General Electric. There are about 50 years of practical wisdom in these cards. Far more than anything I’ve assembled–whatever you think of the guy. I highly recommend at least looking at it.

      Ronald Reagan kept a commonplace in the form of index cards which he kept in a photo binder and categorized according to theme. Douglas Brinkley edited them into the book The Notes: Ronald Reagan's Private Collection of Stories and Wisdom.

  4. Jun 2021
    1. SELECT base.nr, multiples.multiple FROM (SELECT generate_series(1,10) AS nr) base, LATERAL ( SELECT multiples.multiple FROM ( SELECT generate_series(1,10) AS b_nr, base.nr * 2 AS multiple ) multiples WHERE multiples.b_nr = base.nr ) multiples;
    1. Critical to the acceptance of the position of the script subtag was the inclusion of information in the registry to make clear the need to avoid script subtags except where they add useful distinguishing information. Thus, the registry entry for the language subtag "en" (English) has a field called "Suppress-Script" indicating that the script subtag "Latn" should be avoided with that language, since virtually all English documents use the Latin script.
      • not worth saying
      • not necessary to say/write
      • useless information

      Suppress-Script

    2. Language Range ... matches ... does not match de de, de-CH, de-AT, de-DE, de-1901, de-AT-1901 en, fr-CH
    1. SELECT * FROM ( -- build virtual table of all hours between -- a date range SELECT start_ts, start_ts + interval '1 hour' AS end_ts FROM generate_series( '2017-03-01'::date, '2017-03-03'::timestamp - interval '1 hour', interval '1 hour' ) AS t(start_ts) ) AS cal LEFT JOIN ( -- build virtual table of uptimes SELECT * FROM ( VALUES ('2017-03-01 01:15:00-06'::timestamp, '2017-03-01 02:15:00-06'::timestamp), ('2017-03-01 08:00:00-06', '2017-03-01 20:00:00-06'), ('2017-03-02 19:00:00-06', null) ) AS t(start_ts, end_ts) ) AS uptime ON cal.end_ts > uptime.start_ts AND cal.start_ts <= coalesce(uptime.end_ts, current_timestamp)
    1. export function get(req, res) { if (req.headers.authorization) { res.writeHead(200); res.end(JSON.stringify({ message: req.headers.authorization })); } else { res.writeHead(200); res.end(JSON.stringify({ message: 'unauthorized' })); } }
  5. May 2021
    1. Your brain is a leaky bucket. If you're dedicated to filling it with knowledge, you should be equally dedicated to sealing the leak. Here's how.

      way better for the opening of an article

    1. Cross-site request forgery is an example of a confused deputy attack against a web browser because the web browser is tricked into submitting a forged request by a less privileged attacker.
    1. Pill can ruin sex drive permanentlyLast updated at 10:17 26 May 2005

      這就是andy field 在演講中談到的,誤解統計的新聞報導例子。他用改的寫的方式來修正這篇的內容。 資料來源:這裡

    1. Now you have the extension up and running. It's time to start annotating some documents.

      This is the example of annotation

    1. Use cases: Volumes are most useful when you need more storage space but don’t need the additional processing power or memory that a larger Droplet would provide, like: As the document root or media upload directory for a web server To house database files for a database server As a target location for backups As expanded storage for personal file hosting platforms like ownCloud As components for building more advanced storage solutions, like RAID arrays
    1. An escalator is a great example of progressive enhancement and graceful degradation in real life. The late comedian Mitch Hedberg joked, “An escalator can never break: it can only become stairs. You should never see an Escalator Temporarily Out Of Order sign, just Escalator Temporarily Stairs. Sorry for the convenience.” Regardless of its environment, an escalator maintains its functionality.
  6. Apr 2021
    1. the double bind faced by every politician: responding to scurrilous charges only gives them unwarranted publicity; not responding to such charges is often interpreted as an admission of guilt
    1. Adding another Steven Wright gem: "24 hour banking? I don't have time for that."
    2. Comedian Henny Youngman was famous for one-liners delivered in a deadpan manner. Much of his humor was both wry and dry. For example, his most famous line: Take my wife ... please. If you never saw the delivery, "Take my wife" was said as if he was using his wife as an example to set up a situation, as in "Take my wife [for example]." After a brief pause, the "please" turned it into a request.
    3. I'm sorry I hurt your feelings when I called you stupid. I really thought you already knew.
    4. Inside every older person is a younger person wondering what the hell happened.
    5. I swear; if my memory was any worse, I could plan my own surprise party.
    1. British HumorDry humor is particularly associated with British humor. Fawlty Towers, a British television comedy that aired from 1975 to 1979 is considered an unusually good example of dry humor. The series is set in a family run seaside hotel operated by a cynical and snobbish man, played by John Cleese, who finds himself in constant conflict with hotel guests. No matter how outlandishly silly each episode becomes, there is never any sense that the characters are trying to be funny.
    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. If you want to pipe it into something interactive, like less -R, where terminal input goes to less -R, then you need some extra trickery. For example, I wanted a colourful version of git status | less. You need to pass -R to less in order that it respect the colours, and you need to use script to get git status to output colour. But we don't want script to keep ownership of the keyboard, we want this to go to less. So I use this now and it works well: 0<&- script -qfc "git status" /dev/null | less -R . Those first few characters close stdin for this one commmand.

      Just git status | less -R worked for me without any additional trickery, but I see now that's because I told it to "always" use color in my .gitconfig:

      .[color]
        ui = always
        status = always
      

      I tried disabling that and then trying the

      0<&- script -qfc "git status" /dev/null | less -R
      

      trick, but it didn't work for me. It didn't show any output and I couldn't exit out with Ctrl-C or anything I tried. Had to force kill from another terminal.

      But it's a good example of the related but different problems:

      1. forcing less to respect colors (easy)
      2. force/trick git status to think it has a terminal
      3. force/trick it so you can control keyboard with less
    1. Incredible Mandy is a great example of design by subtraction, focusing on puzzle-solving and atmosphere and eschewing mechanics which do not contribute to the developer’s singular vision.
    1. An example of this would be a button that looks clickable but isn’t, underlined text that doesn’t contain a link, or a TV remote that turns on your lights but not the TV. False affordances are often present by mistake or occur due to lack of effective design techniques.
    2. For instance, when you see a door handle, you assume its function is to open a door. When you see a light switch, you assume it can be flicked to turn on a light. When looking at a chair, you know it can be sat in. All of these are affordances. Don Norman refers to affordances as relationships in his book The Design of Everyday Things. He goes on to say that, “when affordances are taken advantage of, the user knows what to do just by looking: no picture, label, or instruction needed.”
    1. He frequently interrupted his narrative with amusing asides.

      Aside seems to imply that it is somewhat related, even though not directly related.

  7. Mar 2021
    1. A business with a low barrier to entry would be those people in poor countries who “wash” your windscreen at traffic lights. A bucket, a cloth, some water and you are in business. A business with a high barrier to entry might be airlines: planes are expensive, staff with the right skills hard to find, the necessary permits to fly hard to obtain.
    1. בזמן שבאירופה ובאזורים נוספים בעולם ממשיכים להתמודד עם התפרצויות קשות של נגיף הקורונה והווריאנטים השונים שלו, ומטילים בשל כך הגבלות חדשות, באנגליה הורשו היום (ב') מיליוני תושבים לצאת מהבתים, במסגרת גל הקלות בסגר שהוטל שם בתחילת השנה. במסגרת גל ההקלות מורשים תושבי אנגליה לצאת בחופשיות מהבתים שלהם ולהתקהל במקומות פתוחים בקבוצות של עד שישה אנשים, משני בתי אב שונים. גם פעילויות ספורט במקומות פתוחים אפשריים כעת.

      sdjk bkjsdgkbgjk

    1. 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. The sentence "they drive the same car" is ambiguous. Do they drive the same type of car (the same model) or the same instance of a car type (a single vehicle)?
    1. For example within nouns there are two sub classes, concrete nouns and abstract nouns.
    2. The concrete nouns include people, plants, animals, materials and objects while the abstract nouns refer to concepts such as qualities, actions, and processes.
    3. Semantic classes may intersect. The intersection of female and young can be girl.

      More examples are given at https://en.wikipedia.org/wiki/Semantic_feature:

      • 'female' + 'performer' = 'actress'
    1. For instance English has a domain ‘Rain’, which includes words such as rain, drizzle, downpour, raindrop, puddle.

      "rain" seems more like a semantic field — a group of very related or nearly synonymous words — than a semantic field.

      Esp. when you consider the later example of basketball (https://hyp.is/ynKbXI1BEeuEheME3sLYrQ/en.wikipedia.org/wiki/Semantic_domain) and coffee shop, which are more like the sense of "field" that means (academic/scientific/etc.) discipline.

    2. For instance, in basketball there are many words that are specific to the sport. Free throw, court, half court, three pointer, and point guard are all terms that are specific to the sport of basketball. These words make very little sense when used outside of the semantic domain of basketball.

      But this example seems so different than the first example they gave, "rain", which seems more like a semantic field — a group of very related or nearly synonymous words.

    1. The English word "man" used to mean "human being" exclusively, while today it predominantly means "adult male," but its semantic field still extends in some uses to the generic "human"
    1. Every woman talked to a student. This has two interpretations. Under one reading, every woman talked to the same student (the class president, for example), and here the noun phrase a student is specific. Under the second reading, various students were talked to. In this case, a student is non-specific.
    1. endpoint Diagram::Operation::Create do |ctx, **| redirect_to diagram_path(ctx[:diagram].id) end.Or do |ctx, **| render :form end
    1. Suppose an administrator creates a forum using open source forum software, and then heavily modifies it by adding new features and options. This process requires extensive modifications to existing code and deviation from the original functionality of that software.
    2. cannot be run on any modern day computer or computer simulator, as it was developed during the days when LISP and PLANNER were still in development stage, and thus uses non-standard macros and software libraries which do not exist anymore
    1. As a simple example of a basic runtime system, the runtime system of the C language is a particular set of instructions inserted into the executable image by the compiler. Among other things, these instructions manage the process stack, create space for local variables, and copy function-call parameters onto the top of the stack. There are often no clear criteria for deciding which language behavior is considered inside the runtime system versus which behavior is part of the source program. For C, the setup of the stack is part of the runtime system, as opposed to part of the semantics of an individual program, because it maintains a global invariant that holds over all executions. This systematic behavior implements the execution model of the language
    1. An example app is an application that is designed to reproduce a bug or demonstrate an issue.
    2. 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. Another example: a list (<ul> or <ol>) should generally be used to group similar items (<li>). You could use a div for the group and a <span> for each item, and style each span to be on a separate line with a bullet point, and it might look the way you want. But "this is a list" conveys more information.
    2. The classic example is that if something is a table, it should contain rows and columns of data. To use that for layout is semantically incorrect - you're saying "this is a table" when it's not.
    1. Website: <input type="url" name="website" required pattern="https?://.+"> Now our input box will only accept text starting with http:// or https:// and at least one additional character
    1. Why don’t we put the “create user” task onto the failure track, and in case of successfully persisting the new user, we deviate back to the happy path?
    2. To implement such an activity, we only need to rewire the second step’s failure output to a new terminus.
    3. Visualized, our new composed structure would look as follows.
    4. Suppose that the validate task was getting quite complex and bloated. When writing “normal” Ruby, you’d break up one method into several. In Trailblazer, that’s when you introduce a new, smaller activity.
    5. Hey, that’s is an imaginary complication of our example - please don’t do this with every condition you have in your app.
  8. Feb 2021
    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?

    3. step :policy, before: :create_model
    4. the validate task gets removed, assuming the Admin won’t need a validation
    5. step Subprocess(Memo::Validate), Output(:invalid_params) => Track(:failure)
    6. 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.
    7. step :charge_creditcard, Output(:failure) => End(:declined)
    8. step :charge_creditcard, Output(:failure) => End(:success) end This reconnects both outputs to the same end, always ending in a - desirable, yet unrealistic - successful state.
    9. step :find_provider, Output(UsePaypal, :paypal) => Track(:paypal)
    1. So, what can we do to check for None in our programs? You can use builtin Optional type and write a lot of if some is not None: conditions. But, having null checks here and there makes your code unreadable.
    1. timeout_child () { trap -- "" SIGTERM; child=$!; timeout=$1; ( sleep $timeout; kill $child; ) & wait $child; } And the usage: ( while true; do echo -n .; sleep 0.1; done) & timeout_child 2
    1. {a: 1, b: 2, c: 3, d: 4} => {a:, b:, **rest} # a == 1, b == 2, rest == {:c=>3, :d=>4}

      equivalent in javascript:

      {a, b, ...rest} = {a: 1, b: 2, c: 3, d: 4}
      

      Not a bad replacement for that! I still find javascript's syntax a little more easily readable and natural, but given that we can't use the same syntax (probably because it would be incompatible with existing syntax rules that we can't break for compatibility reasons, unfortunately), this is a pretty good compromise/solution that they've come up with.

    1. def edit account = find_account! @account = UpdateAccount.new( account: account, first_name: account.first_name, last_name: account.last_name) end
    2. > RecordInteraction.run!(encoding: 'ascii') => #<Encoding:US-ASCII>

      Makes use of the fact that you can do:

      main > Encoding.find('ascii')
      => #<Encoding:US-ASCII>
      

      and that

      If the value does not match, it will call find on the class of the record.

    1. array :translations do hash do string :locale string :name end end array inputs can only have one input nested underneath them. This is because every element of the array must be the same type. And the inputs nested inside arrays cannot have names because they would never be used.
    1. describe '.validate(context, filters, inputs)' do let(:inputs) { {} } let(:filter) { ActiveInteraction::Filter.new(:name, {}) } let(:interaction) do
    1. In a rule-based system, a metarule is a rule governing the application of other rules.
    1. The word home, for instance, has a denotation of “the place (such as a house or apartment) where a person lives,” but it may additionally have many connotations (such as “warmth,” “security,” or “childhood”) for some people.
    1. Depending on the politics it might either mean that the implementation can no longer be changed, because that would break your code, or that your code is very fragile and keeps breaking on every upgrade or change of the underlying implementation.

      not quite sure how this is politics, but interesting example

    2. 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.
    3. It's more like providing an Employee object rather than the set of linked tables you use to store an Employee record. Or providing an interface to iterate through songs, and not caring if those songs are shuffled, or on a CD, or streaming from the internet. They're just a sequence of songs.
    1. class ConferencesController def create conference = Conference.new @conference_form = ConferenceForm.new(conference) @conference_form.submit(conference_params) if @conference_form.save redirect_to @conference_form, notice: "Conference: #{@conference_form.name} was successfully created." } else render :new end end end
    2. You can find a list of applications using this gem in this repository: https://github.com/m-Peter/nested-form-examples . All the examples are implemented in before/after pairs. The before is using the accepts_nested_attributes_for, while the after uses this gem to achieve the same functionality.
    1. class UsersController < ApplicationController def create success = -> (response, time) { redirect_to root_path, notice: "#{response} - at: #{time}" } failure = -> { render :new } Workflow::CreateUser.call(params[:name], success: success, failure: failure) end end
    1. Don't go around saying{-- to people that--} the world owes you a living. The world owes you nothing. It was here first. {~~One~>Only one~~} thing is impossible for God: To find {++any++} sense in any copyright law on the planet. {==Truth is stranger than fiction==}{>>strange but true<<}, but it is because Fiction is obliged to stick to possibilities; Truth isn’t.

      .example

    1. Are designers also wasting the time of the critics?

      Wow what a way to end the chapter. Are instcutional Designers wasting their time decorating their instruction or filling them with jargon that they miss the point of educating the learners.

      This is a wonderful story about something that anyone could be familiar with and understand how instrucitonal design can go at times. Lending to the attractiveness and lacking on the informing side.

    1. The first problem is that if you ever remove an item, there will be a big black block in the layout. Maybe that’s OK, but more likely it isn’t. The second problem is that grid containers do not, by default, shrink-wrap their items. Instead, they fill out the parent element, as block boxes do. Both of these problems are illustrated in Figure 6.
    2. div:nth-of-type(3n+1) { grid-column: 1; } div:nth-of-type(3n+2) { grid-column: 2; } div:nth-of-type(3n+3) { grid-column: 3; } div:nth-of-type(-n+3) { grid-row: 1; }
    3. #ttt > * { border: 1px solid black; border-width: 0 1px 1px 0; display: flex; /* flex styling to center content in divs */ align-items: center; justify-content: center; } #ttt > *:nth-of-type(3n) { border-right-width: 0; } #ttt > *:nth-of-type(n+7) { border-bottom-width: 0; }
    1. .box1 { grid-column-start: 1; grid-column-end: 4; grid-row-start: 1; grid-row-end: 3; } .box2 { grid-column-start: 1; grid-row-start: 2; grid-row-end: 4; }
  9. Jan 2021
    1. config.action_mailer.register_preview_interceptor :css_inline_styler

      That's probably the same hook that https://github.com/fphilipe/premailer-rails ties into, for it says:

      Emails are only processed upon delivery, i.e. when calling #deliver on the email, or when previewing them in rails.

    1. I want to make some add-ons or wrappers on components e.g BigButton.svelte <script> import Button from './Button.svelte' </script> <Button fz="16" h="64" {...$$props}> <slot slot="prepend" name="prepend" /> <slot /> <slot slot="append" name="append" /> </Button>
    1. Also as an aside, your REPL is far, far too complicated. You've got a much better chance of us being able to see your issue and fix it if you boil it down to just the minimum required code in order to reproduce the issue.
    1. beforeUpdate(async () => { console.log('the component is about to update'); await tick(); console.log('the component just updated'); });
    1. {#each charts as chart, i} <div class="wrapper"> <div class="icon" on:click={e => instances[i].handle(e)}>Click</div> <div class="content"> <svelte:component this={charts[i]} bind:this={instances[i]} /> </div> </div> {/each} ...where each child component exports a handle method: <script> let event; export function handle(e){ event = e; }; </script>
  10. Dec 2020
    1. What is a data-originated component? It’s a kind of component that is primarily designed and built for either: displaying, entering, or customizing a given data content itself, rather than focusing on the form it takes. For example Drawer is a non data-originated component, although it may include some. Whereas Table, or Form, or even Feed are good examples of data-originated components.
    1. const store = observable({ players: [ "Player 1", "Player 2", ], // ... }) reaction(() => JSON.stringify(store), json => { localStorage.setItem('store',json); }, { delay: 500, }); let json = localStorage.getItem('store'); if(json) { Object.assign(store, JSON.parse(json)); }
  11. Nov 2020
    1. highlighting

      Example of an annotation. Feel free to leave your own comments!

    1. The use of __proto__ is controversial and discouraged. It was never originally included in the ECMAScript language spec, but modern browsers implemented it anyway. Only recently was the __proto__ property standardized by the ECMAScript 2015 specification for compatibility with web browsers, so it will be supported into the future.