20,173 Matching Annotations
  1. Feb 2021
    1. on one of the most popular websites of F #

      which one?

    2. This is the most popular article “railway oriented programming” on one of the most popular websites of F #.

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

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

    1. No contribution is too small Even if you find a single-character typo, we're happy to take the change! Although the codebase can feel daunting for beginners, we and other contributors are happy to help you along.
    1. Please go to https://github.com/dotnet/fsharp/. All contributions to the F# compiler/library/tools now go there.

      Couldn't this be set up to redirect over there then?

    1. Intuitively, you understand the flow just by looking at the BPMN diagram. And, heck, we haven’t even discussed BPMN or any terminology, yet!
    2. If anything here did fail in “validate omniauth”, all other steps in the chain would be skipped as the flow would follow the path leading to the failure terminus.
    3. Things could go wrong in two places here. First, the validation could fail if Github sends us data we don’t understand. Second, we might not know the user signing in, meaning the “find user” logic has to error-out
    4. Whatever data from the outside is needed in the activity has to be passed explicitely into the activity’s call method.
    5. In other words: the controllers usually contain only routing and rendering code and dispatch instantly to a particular operation/activity class.
    6. At this stage, routing, controllers, etc is irrelevant. Just imagine a Rails controller action, a Sinatra router or a Hanami action as follows.
    7. They help streamlining the control flow, and take away control code while providing you with an incredibly cool developer experience.
    8. Activities are a necessary abstraction on top of Ruby.
    9. provide interfaces so you don’t have to think about them

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

    10. You’re allowed to blame us for a terrible developer experience in Trailblazer 2.0. It’s been quite painful to find out which step caused an exception. However, don’t look back in anger! We’ve spent a lot of time on working out a beautiful way for both tracing and debugging Trailblazer activities in 2.1.
    11. An activity is a high-level concept to structure code flow
    12. Trailblazer is an architectural pattern that comes with Ruby libraries to implement that pattern.
    13. Whether this is the life-cycle of a <user> entity or just a sign-up function, it has to be defined and coded somewhere.
    14. Trailblazer strikes when it comes to organizing business code.
    1. Here comes a sample screenshot.
    2. Trailblazer goes further and provides an approach to model entire life-cycles of business objects, such as "a song" or "the root user" using workflow (pro feature). Also, you don't have to use the DSL but can use the editor instead (cool for more complex, long-running flows).
    3. Their high degree of encapsulation makes them a replacement for test factories, too.
    4. Operations completely replace the need for leaky factories.
    5. In Trailblazer, models are completely empty. They solely contain associations and finders. No business logic is allowed in models.
    6. Operations don't know about HTTP or the environment. You could use an operation in Rails, Hanami, or Roda, it wouldn't know.
    7. Operations encapsulate business logic and are the heart of a Trailblazer architecture.
    8. The bare bones operation without any Trailblazery is implemented in the trailblazer-operation gem and can be used without our stack.
    9. An operation is not just a monolithic replacement for your business code. It's a simple orchestrator between the form objects, models, your business code and all other layers needed to get the job done.
    10. Operations define the flow of their logic using the DSL and implement the particular steps with pure Ruby.
    11. Trailblazer extends the conventional MVC stack in Rails. Keep in mind that adding layers doesn't necessarily mean adding more code and complexity. The opposite is the case: Controller, view and model become lean endpoints for HTTP, rendering and persistence. Redundant code gets eliminated by putting very little application code into the right layer.
    12. Trailblazer offers you a new, more intuitive file layout in applications.
    13. Instead of grouping by technology, classes and views are structured by concept, and then by technology. A concept can relate to a model, or can be a completely abstract concern such as invoicing.
    14. Concepts over Technology
    15. 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.
    16. Only use what you like.
    17. Trailblazer is no "complex web of objects and indirection". It solves many problems that have been around for years with a cleanly layered architecture.
    18. you can pick which layers you want. Trailblazer doesn't impose technical implementations
    1. The activity gem is an extraction from Trailblazer 2.0, where we only had operations. Operations expose a linear flow which goes into one direction, only. While this was a massive improvement over messily nested code, we soon decided it’s cool being able to model non-linear flows. This is why activities are the major concept since Trailblazer 2.1.
    1. I started Trailblazer GmbH 4 years ago with my relocation from Australia back to Europe. One of our consulting clients is the central police department of a German state that has kept me busy for more than three years now.
    2. In addition to the organically formed core team
    3. Endpoint is the missing link between your routing (Rails, Hanami, …) and the “operation” to be called. It provides standard behavior for all cases 404, 401, 403, etc and lets you hook in your own logic like Devise or Tyrant authentication, again, using TRB activity mechanics.
    4. TRAILBLAZER-WORKFLOW is another dream ‘o mine come true. It allows creating long-term processes (or state machines) based on BPMN diagrams that can be modeled using our editor.
    5. Not only does it help to structure myself,
    6. TRAILBLAZER-TEST The official stable release is only weeks away bringing you a bunch of new assertions that drastically reduce coding effort for tests! Of course, Minitest and RSpec will both be supported. TRAILBLAZER-STORY will follow as it turned out to be inevitable for setting up application state for tests. Instead of fumbling around with factories and traits in your tests, you “tell a story” about what to create in which order, easily customizable, and all written using activities. Currently, I’m working on designing the interfaces and it’s real fun!
    7. In the past 1 ½ years something weird happened: a real core team formed around the Trailblazer gems. I say “real” because in the past 15 years of OSS, I’ve had people come and go, being of great help but never staying and taking over long-term responsibilities - which I found to be the pivotal element of a core team. Eventually, those kids convinced me to start the Trailblazer organization on Github and move over all “apotonick gems”. Over the course of time, I saw myself giving away that aforementioned responsibility with a smile on my face, adding owners and collaborators to gems, yes, even giving away entire gems, letting people work on documentation and just trusting someone and their skills. I have no words to describe how good that feels!
    8. I work with crazy geniuses who share many of my opinions (not all, and that’s good).
    9. For me, a dream has come true. I work with crazy geniuses who share many of my opinions
    10. Messages like “don’t worry, I’ll do it” combined with a pull requests minutes later - things I literally dreamed of a few years ago, are now part of my daily routine.
    11. I learned to “let go” and simply trust others to maintain certain gem suites.
    12. Around 2 years ago I decided to end the experiment of “TRB PRO” as I felt I didn’t provide enough value to paying users. In the end, we had around 150 companies and individuals signed up, which was epic and a great funding source for more development.
    13. The legendary cfp-app will become a Rails-to-TRB refactoring tutorial.
    14. We decided against paid documentation, so all will be freely available on our shiny new website.
    15. What this means is: I better refrain from writing a new book and we rather focus on more and better docs.

      I'm glad. I didn't like that the book (which is essentially a form of documentation/tutorial) was proprietary.

      I think it's better to make documentation and tutorials be community-driven free content

    16. We’re now relaunching PRO, but instead of a paid chat and (never existing) paid documentation, your team gets access to paid gems, our visual editor for workflows, and a commercial license.
    17. And yes, at TRB GmbH, we do pay people to work on OSS
    18. Using a terminus to indicate a certain outcome - in turn - allows for much stronger interfaces across nested activities and less guessing! For example, in the new endpoint gem, the not_found terminus is then wired to a special “404 track” that handles the case of “model not found”. The beautiful thing here is: there is no guessing by inspecting ctx[:model] or the like - the not_found end has only one meaning!
    19. termini (or “ends” as we used to call them).
    20. A major improvement here is the ability to maintain more than two explicit termini. In 2.0, you had the success and the failure termini (or “ends” as we used to call them). Now, additional ends such as not_found can be leveraged to communicate a non-binary outcome of your activity or operation.
    21. Yes, Trailblazer is adding new abstractions and concepts and they are different to the 90s-Ruby, but now, at the latest, it becomes obvious how this improves the developing process. We’re no longer talking in two-dimensional method stack traces or byebug hoops, the language and conception is changing to the actual higher level code flow, to activities sitting in activities structured into smaller step units.
    22. To tell you the truth, the new tracing feature was the original reason why I decided to write 2.1 and make you sit and wait in agony for years. Nevertheless, tracing is simply blowing my mind. I can’t count how many hours and angering rushs of adrenaline I’ve saved since the introduction of the wtf? method and its helpful higher-level stack trace.
    23. The new 2.1 version comes with a few necessary but reasonable changes in method signatures. As painful as that might sound to your Rails-spoiled ears, we preferred to fix design mistakes now before dragging them on forever.
    24. The new call API is much more consistent and takes away another thing we kept explaining to new users - an indicator for a flawed API.
    25. We try to keep the “information architecture” - a word I wouldn’t have learned without the inspiring Alex Coles - as simple as possible: so far, we got a handful of pages accessible through the top navigation, and then the documentation behind the DOCS link. Here, the right sidebar helps you to navigate within the chapter.
    26. To make it short: we returned to the Rails Way™, lowering our heads in shame, and adhere to the Rails file and class naming structure for operations.
    27. I feel how needed those new abstractions are. Yes, you can write everything with your own code, you don’t need abstractions for flow control and automatic error handling, which makes me wonder why you’re not programming in assembler since Ruby is also an “unnecessary abstraction” on top of a processor. We need abstractions, unless you want to program like we did 30 years ago.
    28. Also, the more I use Trailblazer in projects or even in Trailblazer itself, I feel how needed those new abstractions are.
    29. ather, data is passed around from operation to operation, from step to step. We use OOP and inheritance solely for compile-time configuration. You define classes, steps, tracks and flows, inherit those, customize them using Ruby’s built-in mechanics, but this all happens at compile-time. At runtime, no structures are changed anymore, your code is executed dynamically but only the ctx (formerly options) and its objects are mutated. This massively improves the code quality and with it, the runtime stability
    30. It’s so simple that I sometimes wonder why it took years to develop it!
    31. There is nothing wrong with building your own “service layer”, and many companies have left the Traiblazer track in the past years due to problems they had and that we think we now fixed.
    32. The work put into Trailblazer 2.1 has been tremendous, it could easily have been TRB 3.0, or even TRB III, since Roman version numbering turns out to be quite a fancy thing to do. However, as much as the internals have been improved, as little has changed on the public APIs of Trailblazer, so we decided to go with a minor release.
    33. We removed the trailblazer-loader gem just like Apple removed the headphone jack from the iPhone 6. This brings you faster startup and consistency with Rails autoloading.

    Tags

    Annotators

    URL

    1. There are two definitions of ‘Enterprise’ 1 - Enterprise as a business. In fact, in French, ‘enterprise’ literally means ‘business’ 2- Enterprise as a large business. This is the most common use of the term in business, differentiating between small, medium, and large businesses. In this context, there is no official rule, however it is generally accepted for enterprise to mean companies with over 1,000 employees and/or $1B in revenue
    2. This would be the taxonomy:
    1. Our company reinvests our funds straight back into developing all Trailblazer gems, better documentation and support, plus building up a nice team of fantastic people to help you with Trailblazer.
    2. would love to hear from you if you’re excited about our gems, high-level abstractions and improving our documentation
    3. We’re actively looking to grow this team and would love to hear from you
    4. And: we will never stop innovating.
    1. Software architecture is about making fundamental structural choices that are costly to change once implemented.
    2. Software architecture refers to the fundamental structures of a software system
    3. Software architecture choices include specific structural options from possibilities in the design of the software.
    1. The adapter is where authentication, policy checks, and eventually your domain logic happen. All termini of the protocol’s activity are standardized end events - that’s how protocol and adapter communicate.
    2. An endpoint links your routing with your business code. The idea is that your controllers are pure HTTP routers, calling the respective endpoint for each action. From there, the endpoint takes over, handles authentication, policies, executing the domain code, interpreting the result, and providing hooks to render a response.
    3. The endpoint gem is the missing link between your routing framework and your business code. It acts like a mix of before_filters and “responder” that handles authentication and authorization, invoking your actual logic, and rendering a response.
    1. They do not maintain a to-do list (mentally or physically).
    2. I am a delegation junkie. Whenever possible, I assign tasks and responsibilities originally assigned to me onto others.
    3. In the classroom, I delegate responsibilities to my students at a rate that astounds people. There is almost nothing that I will not allow my students to do, including teaching my lessons whenever possible. My students take full and complete ownership of the classroom, whether they like it or not, and as a result, they possess great ownership of their learning.
    4. 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.
    5. They cannot accept any less than 100 percent of their expectations being met.
    6. They fail to recognize the value of an initial investment of time in future productivity.
    7. They fail to understand the importance of autonomy when delegating responsibilities.
    8. They lack faith in the capacity of others.
    9. They possess an unwavering belief in “one right way.”
    1. I admit, I was a bit cynical -- I mean, how much can what I scribble on the back of a used envelope really change my life?
    2. ’ve had Paula Rizzo’s book, Listful Thinking: Using Lists to be More Productive, Highly Successful and Less Stressed, on my to-read list (see what I did there?)
    1. This text wound up founding the discipline which we today call "metaphysics", and one way to describe what this subject encompasses is that it covers things at a level of abstraction above physics.
    2. a documentary is a meta movie, no question about it
    3. Any "rising above" is meta. When works do it about themselves, that of course is meta as well: the specific kind of meta which is self-referential (what Hostadter calls a Strange Loop. BTW, do you know what Hofstadter's motto is? "I'm So Meta, Even This Acronym")
    1. One of the most difficult transitions for leaders to make is the shift from doing to leading.
    2. The upper limit of what’s possible will increase only with each collaborator you empower to contribute their best work to your shared priorities.
    3. 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. One of the main reasons to work with components is re-usability and portability, but also a delegation of responsibilities. Adding a component should be as easy as simply adding the component without having to know the inner workings (or markup) of this component. A consumer should only be aware of the properties, methods and events of a component. In order to style a child component one has to be aware of the markup as well, which violates this 'delegation of responsibility'-principle.
    1. "Open access" refers to toll-free or gratis access to content

      not necessarily free content

    2. What is the opposite of free content?

      The opposite of free/open-source software is proprietary software or non-free software (https://en.wikipedia.org/wiki/Proprietary_software).

      So should we call the opposite of free content "non-free content"? Or "proprietary content"?

      Seems likes either would be fine.

      Looks like https://en.wikipedia.org/wiki/Wikipedia:Non-free_content prefers the term "non-free content".

      Couldn't find anyone contrasting these 2 terms (like I could no doubt find for software):

      Not to be confused with:

      • paid content ... just like:
      • free content should not be confused with gratis content (?)
      • free software should not be confused with freeware
    3. Open access refers to online research outputs that are free of all restrictions on access (e.g. access tolls) and free of many restrictions on use (e.g. certain copyright and license restrictions).
    4. A free cultural work (free content) is, according to the definition of Free Cultural Works, one that has no significant legal restriction on people's freedom to: use the content and benefit from using it, study the content and apply what is learned, make and distribute copies of the content, change and improve the content and distribute these derivative works.
    5. Free content encompasses all works in the public domain and also those copyrighted works whose licenses honor and uphold the freedoms mentioned above.
    6. Because the Berne Convention in most countries by default grants copyright holders monopolistic control over their creations, copyright content must be explicitly declared free, usually by the referencing or inclusion of licensing statements from within the work.
    7. A free cultural work (free content) is, according to the definition of Free Cultural Works, one that has no significant legal restriction on people's freedom to:
    8. A free content, libre content, or free information, is any kind of functional work, work of art, or other creative content that meets the definition of a free cultural work.
    1. The Definition of Free Cultural Works is a definition of free content from 2006. The project evaluates and recommends compatible free content licenses.
    1. a framework containing the basic assumptions, ways of thinking, and methodology that are commonly accepted by members of a scientific community. such a cognitive framework shared by members of any discipline or group:
    1. A freemium model is sometimes used to build a consumer base when the marginal cost of producing extra units is low.
    1. In the telecommunications industry, on a conceptual level, value-added services add value to the standard service offering, spurring subscribers to use their phone more and allowing the operator to drive up their average revenue per user.
    2. For mobile phones, technologies like SMS, MMS and data access were historically usually considered value-added services, but in recent years SMS, MMS and data access have more and more become core services, and VAS therefore has begun to exclude those services.
    3. A distinction may also be made between standard (peer-to-peer) content and premium-charged content.
    1. We use a subset of BPMN for the visual language in the editor, but added our own set of restrictions and semantics to it.
    2. 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.

    3. Why is TRB licensed under LGPL, not MIT?
    4. The LGPL allows users to use and integrate LGPL software components into their own software without being required to release the source code of their own software components. However, if users modify LGPL software components (“derivative work”), they are required to make the modified software component available under the same LGPL license. To avoid the latter with TRB, users have to comply with para. 5 LGPLv2.1: A program that contains no derivative of any portion of the Library, but is designed to work with the Library by being compiled or linked with it, is called a “work that uses the Library”. Such a work, in isolation, is not a derivative work of the Library, and therefore falls outside the scope of this License. In other words: if you use the TRB libraries in your commercial applications or Open-Source projects, you’re not creating a derivative work of Trailblazer. Your software can be distributed under any terms.
    5. Trailblazer (TRB) is an Open-Source project. Since we want to keep it that way, we decided to raise awareness for the “cost” of our work - providing new versions and features is incredibly time-consuming for us, but we love what we do.
    6. This creates a win-win situation, you as the user have your peace of mind, and we can continue working with your funds.
    1. Business Process Model and Notation (BPMN) is a standard for business process modeling that provides a graphical notation for specifying business processes in a Business Process Diagram (BPD),[3] based on a flowcharting technique very similar to activity diagrams from Unified Modeling Language (UML).
    1. ActiveModel provides a powerful framework for defining callbacks. ActiveInteraction hooks into that framework to allow hooking into various parts of an interaction's lifecycle.
    1. People who buy this buy for a reason, bonsai and some gaming experience. I'm disappointed from what I saw. I'd love to turn back and give another chance after it's completed. For now what I can say is it really amazes me how people here tend to glorify things easily while writing reviews.
    1. I was aware of the mixed reviews but "mixed" to me could be a game that's perfectly suitable for one person's taste and detestable to the next.
    1. Note: This question has been edited since it was asked. The original title was "Test whether a glob has any matches in bash". The specific shell, 'bash', was dropped from the question after I published my answer. The editing of the question's title makes my answer appear to be in error. I hope someone can amend or at least address this change.
    1. # catch multi-char special key sequences read -sN1 -t 0.0001 k1 read -sN1 -t 0.0001 k2 read -sN1 -t 0.0001 k3 key+=${k1}${k2}${k3}
    2. for term in vt100 linux screen xterm { echo "$term:" infocmp -L1 $term|egrep 'key_(left|right|up|down|home|end)' }
    3. For example, on the terminal I'm using, the right arrow outputs ^[[C. You can see what sequence your terminal outputs by pressing Ctrl-V Right Arrow. The same is true for other cursor-control keys such as Page Up and End.
    1. However, because so many shells follow that convention of having 128 + signal_number, programs know to avoid using those values above 128 for their exit code (or when they do exit(130), it's to report the death of a child that dies of a signal 2 like some shells do under some circumstances).
    2. So if you get a number of 130, there's an ambiguity in that you don't know whether the process dies of a signal 2 or just did an exit(130).
    1. non-interactive shells (actually when job control is not enabled)
    2. In any case signal handling in shells is one of the least reliable and portable aspects. You'll find behaviours vary greatly between shells and often between different versions of a same shell. Be prepared for some serious hair pulling and head scratching if you're going to try to do anything non-trivial.
    3. Here, you could use zsh instead of sh which doesn't have either of those annoying "features" (at least in current versions).
    4. for sig in $(kill -l) ; do trap "echo parent:$sig" $sig done
    1. As usual with almost any command, if you want a normal argument that starts with a - to not be interpreted as a switch, precede it with --
    2. rkill command from pslist package sends given signal (or SIGTERM by default) to specified process and all its descendants:
    1. Typically, a process associated with a controlling terminal is foreground process and its process group is called foreground process group. When you start a process from the command line, it's a foreground process:
    2. Quit the program by sending a different signal to both processes, e.g. SIGQUIT with Ctrl + \.
    1. Most users make mistakes while typing, so a backspace key is often useful. This could of course be implemented by the applications themselves, but in accordance with the UNIX design philosophy, applications should be kept as simple as possible. So as a convenience, the operating system provides an editing buffer and some rudimentary editing commands (backspace, erase word, clear line, reprint), which are enabled by default inside the line discipline.
    2. Beware, though: What you are about to see is not particularly elegant. In fact, the TTY subsystem — while quite functional from a user's point of view — is a twisty little mess of special cases. To understand how this came to be, we have to go back in time.
    1. Why then sending the SIGINT manually to the shell doesn't kill the child, e.g. 'kill -2 <shell-pid>' doesn't do anything to a child process while Ctrl-C kills it?
    2. -Wpedantic
    3. The shell process itself is in yet another process group all of its own and so doesn't receive the signal when one of those process groups is in the foreground. It's that simple.
    4. Switching "jobs" between foreground and background is (some details aside) a matter of the shell telling the terminal which process group is now the foreground one.
    5. Check yourself some shell-sources.
    6. If interested, you can check the plain old /bin/sh signal handling in the source code here.
    7. I am trying to understand how CTRL+C terminates a child but not a parent process. I see this behavior in some script shells like bash where you can start some long-running process and then terminate it by entering CTRL-C and the control returns to the shell. Could you explain how does it work and in particular why isn't the parent (shell) process terminated? Does the shell have to do some special handling of CTRL+C event and if yes what exactly does it do?
    1. However, banning him opens a very dangerous precedent, making the US more like a dictatorship... more like China. Also it's not effective. Those who were silenced will only have more motivation, and the risk of terrorism is greatly increased. The people must decide what is true. Not big companies. Individuals must be able to express their beliefs. Bot accounts must be banned, but real individuals must not. If you think a group of people is a bunch of idiots who believe fake news, then, tough, that's democracy for you. Maybe it means that your government is not investing enough in education and welfare to properly educate and give hope to those people.
    2. I oppose the banning of Donald Trump and his non-violent believers/content from social media platforms such as Facebook Twitter, YouTube and Amazon. I feel (irrationally?) Trump is arrogant and disgusting as a person. I like some of his anti-CCP policies, but not sure I'd vote for him. The "USA First" stance is particularly damaging as it scares USA allies away. I don't think there's enough evidence for the electoral fraud allegations, but I haven't researched the court cases extensively. However, banning him opens a very dangerous precedent, making the US more like a dictatorship... more like China. Also it's not effective. Those who were silenced will only have more motivation, and the risk of terrorism is greatly increased. The people must decide what is true. Not big companies. Individuals must be able to express their beliefs. Bot accounts must be banned, but real individuals must not. If you think a group of people is a bunch of idiots who believe fake news, then, tough, that's democracy for you. Maybe it means that your government is not investing enough in education and welfare to properly educate and give hope to those people. I'm against violence.
    1. AWS can even terminate or suspend its agreement with a customer immediately under certain circumstances as it did in 2010 with Wikileaks, pointing to violations of AWS’ terms of service.
    2. The swiftness with which Amazon acted shouldn’t come as a shock. Companies have been disclosing details about their deals with Amazon that warn of these kinds of sudden discontinuations for years.
    3. The incident demonstrates a type of power that Amazon wields almost uniquely because so many companies rely on it to deliver computing and data storage.