- Mar 2021
-
trailblazer.to trailblazer.to
-
This could be an operation, a workflow, or hand-baked Ruby code completely unrelated to Trailblazer.
-
-
rachelcoldicutt.medium.com rachelcoldicutt.medium.com
-
according to Hao, Mark Zuckerberg wants to increase the number of people who log into Facebook six days a week. I’m not going to get into whether this is good or bad here, but it certainly shows that what you are doing, and how you are doing it, is very important to Facebook.
Can we leverage these data points to follow a movement like Meatless Monday to encourage people to not use Facebook two days a week to cause this data analysis to crash?
Anything that is measured can be gamed. But there's also the issue of a moving target because Facebook will change it's target which then means the community activism will need to change it's target as well. (This may be fine if the point is community engagement and education as the overall mission, in which case the changing target continually engages people and brings in new people to consider what is happening and why.)
-
-
impedagogy.com impedagogy.com
-
Muse
Reminded of Chapter 11 in The Odyssey:
I am likely going to retire this year and I find resonance in this as it appears that I will be accepting a "voluntary" buyout at the end of this fiscal year. My long sea journey, 25 years worth in teaching, will be officially over. Hence...the appeal to propitiate the gods, to let all the pain go, to ask forgiveness of the implacable Poseidon.
-
-
twitter.com twitter.com
-
ReconfigBehSci on Twitter. (n.d.). Twitter. Retrieved August 25, 2020, from https://twitter.com/SciBeh/status/1297566120900268035
-
-
news.trust.org news.trust.org
-
Pandemic may reverse human development for first time in 30 years, UN says. (n.d.). World Economic Forum. Retrieved June 1, 2020, from https://www.weforum.org/agenda/2020/05/pandemic-international-human-deveolpment-covid19-coronavirus/
-
-
psyarxiv.com psyarxiv.com
-
Bonder, Taly, Ido Erev, and Elliot Ludvig. ‘On the Impact of Germs and Demons’. PsyArXiv, 10 March 2021. https://doi.org/10.31234/osf.io/vscz4.
-
-
en.wikipedia.org en.wikipedia.org
-
Franklin thereby invented the first newspaper chain. It was more than a business venture, for like many publishers since he believed that the press had a public-service duty
Long before the internet, and even national level newspapers, Franklin understood the power of the written word. His, and other like minded individual’s words were distributed in the form of pamphlets, that extolled their ideas on liberty and justice, and spread those words to all who were interested.
-
-
www.theguardian.com www.theguardian.com
-
the Guardian. ‘How a String of Failures by the British Government Helped Covid-19 to Mutate | Anthony Costello’, 22 December 2020. http://www.theguardian.com/commentisfree/2020/dec/22/uk-government-blamed-covid-19-mutation-occur.
-
-
www.apa.org www.apa.org
-
https://www.apa.org. ‘Controlling the Spread of Misinformation’. Accessed 22 February 2021. https://www.apa.org/monitor/2021/03/controlling-misinformation.
-
-
www.breitbart.com www.breitbart.com
-
after many online called for her firing over a social media post that likened the experience of Jews during the Holocaust to the U.S. political climate
-
-
api.rubyonrails.org api.rubyonrails.org
-
Third configurable block to run.
I like how they identify in the description which order things run in: 1st, 2nd, 3rd, and last.
Though, it would be more readable to have a list of them, in chronological order, rather than having them listed in alphabetical order.
-
Last configurable block to run. Called after frameworks initialize.
-
-
medium.com medium.com
-
However, if all of these are hosted in the same repository, you lose a lot of those benefits.
-
-
blog.izs.me blog.izs.me
-
All too often, people get hung up on the wrong aspects of the Unix Philosophy, and miss the forest for the trees
-
Those sorts of complaints are like saying that someone is not a buddhist unless they speak Pali.
-
-
www.merriam-webster.com www.merriam-webster.com
-
www.chevtek.io www.chevtek.io
-
he goes on to talk about third party problems and how you're never guaranteed something is written correctly or that even if it is you don't know if it's the most optimal solution
-
Write modules for publication, even if you only use them privately. You will appreciate documentation in the future.
-
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.
Tags
- write/document it as if it will be published even if only will use privately/internally (for the benefit of future self) (maintain rigor without shortcuts)
- trust/reliance/dependence on open-source libraries
- for the benefit of future self
- allowing developer/user to pick and choose which pieces to use (a la carte, not all or nothing)
- trust/reliance/dependence on third party
- dependencies: trusting open-source dependencies: review the source code/diff before installing/updating
- modularity
- vetting a dependency/library/framework
- granularity of control
- flexibility to use the tool that you prefer
- how can you know?
- micropackages
- all or nothing (granularity of control)
Annotators
URL
-
-
en.wikipedia.org en.wikipedia.org
-
non-regression testing
That would probably be a better name because you're actually testing/verifying that there hasn't been any regression.
You're testing for the absence of regression. But I guess testing for one also tests for the other, so it probably doesn't matter. (If something is not true you know it is false, etc.)
-
-
news.ycombinator.com news.ycombinator.com
-
here is my set of best practices.I review libraries before adding them to my project. This involves skimming the code or reading it in its entirety if short, skimming the list of its dependencies, and making some quality judgements on liveliness, reliability, and maintainability in case I need to fix things myself. Note that length isn't a factor on its own, but may figure into some of these other estimates. I have on occasion pasted short modules directly into my code because I didn't think their recursive dependencies were justified.I then pin the library version and all of its dependencies with npm-shrinkwrap.Periodically, or when I need specific changes, I use npm-check to review updates. Here, I actually do look at all the changes since my pinned version, through a combination of change and commit logs. I make the call on whether the fixes and improvements outweigh the risk of updating; usually the changes are trivial and the answer is yes, so I update, shrinkwrap, skim the diff, done.I prefer not to pull in dependencies at deploy time, since I don't need the headache of github or npm being down when I need to deploy, and production machines may not have external internet access, let alone toolchains for compiling binary modules. Npm-pack followed by npm-install of the tarball is your friend here, and gets you pretty close to 100% reproducible deploys and rollbacks.This list intentionally has lots of judgement calls and few absolute rules. I don't follow all of them for all of my projects, but it is what I would consider a reasonable process for things that matter.
-
That said, I wish more people would talk both sides. Yes, every dependency has a cost. BUT the alternatives aren't cost free either. For all the ranting against micropackages, I'm not seeing a good pro/con discussion.
-
-
en.wikipedia.org en.wikipedia.org
-
Whenever majorities trample upon the rights of minorities—when men are denied even the privilege of having their causes of complaint examined into—when measures, which they deem for their relief, are rejected by the despotism of a silent majority at a second reading—when such become the rules of our legislation, the Congress of this Union will no longer justly represent a republican people.
-
-
www.sitepoint.com www.sitepoint.com
-
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.
-
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.
-
We standardize on a finite subset of JS (such as asm.js) — and avoid the endless struggle through future iterations of the JavaScript language, competing super-sets and transpilers
asm.js and RPython sound similar (restrictive subsets)
Tags
- competition in open-source software
- JavaScript: as a process VM
- programming languages: choosing the best language for the job
- annotation meta: may need new tag
- the high churn in JavaScript tooling
- RPython
- level playing field
- standardization
- avoid giving partiality/advantage/bias to any specific option
- neutral/unbiased/agnostic
- good idea
- runtime environment
- software freedom
- programming languages
- neutral ground
- separation of concerns
- asm.js
Annotators
URL
-
-
en.wikipedia.org en.wikipedia.orgPyPy1
-
There used to be other backends in addition to C: Java, CSharp, and Javascript but those suffered from bitrot and have been removed.
-
-
en.wikipedia.org en.wikipedia.org
-
much software requires continuous changes to meet new requirements and correct bugs, and re-engineering software each time a change is made is rarely practical.
-
-
www.inuse.se www.inuse.se
-
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.
-
-
github.com github.comd3/d32
-
They reduce the distinction between a “core module” and a “plugin”
-
No d3 global is exported if AMD or CommonJS is detected.
-
-
github.com github.com
-
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.
-
-
github.com github.com
-
I don't understand why this isn't being considered a bigger deal by maintainrs/the community. Don't most Rails developers use SCSS? It's included by default in a new Rails app. Along with sprockets 4. I am mystified how anyone is managing to debug CSS in Rails at all these days, that this issue is being ignored makes sprockets seem like abandonware to me, or makes me wonder if nobody else is using sprockets 4, or what!
-
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.
-
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.
-
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.
-
I'm not sure about all consequences of my change and this is very complex.
Tags
- annotation meta: may need new tag
- don't understand even what's going on, let alone how to go about finding/identifying/fixing the problem
- why aren't people talking about/asking this?
- where (which project) do I even report this problem/bug? (whose responsibility is it?)
- hard to figure out where the problem lies / how to solve the problem / where to even begin
- is anyone even still using it anymore?
- sprockets
- difficult/hard problem
- why aren't the maintainers more concerned about / fixing this?
- admit the limitations/shortcomings of your argument/benefits
Annotators
URL
-
-
github.com github.com
-
The docs say: "When using Rails and Sprockets in development mode, no assets are concatenated."
-
-
github.com github.com
-
we want source maps in production (like DHH)
-
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?
-
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).
-
The only place I can find it is in the sprockets-rails gem. javascript_include_tag calls this: def find_debug_asset(path) if asset = find_asset(path, pipeline: :debug) raise_unless_precompiled_asset asset.logical_path.sub('.debug', '') asset end end
-
It seems I'm in the minority, and Sprockets seems to already pretty far along in the beta process, so at most we should add a configuration option to enable it for static compilation.
Tags
- irony
- rails: the Rails way
- best practices
- official preferred convention / way to do something
- missing configuration option or way to customize this behavior
- read the source code
- sad/unfortunate conclusion
- can be disabled by default but at least provide a way to opt in if needed
- unfortunate
- reasonable defaults
- the needs/wishes of a minority
Annotators
URL
-
-
github.com github.com
-
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 :(
-
If a company really wanted to invest, I would prefer they dedicated an employee for X hours a week for Y months than money.
-
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.
Tags
- work: doing what you love
- receiving money: is it worth the hassle/responsibility of bookkeeping?
- unfun
- hard to figure out where the problem lies / how to solve the problem / where to even begin
- boring
- would prefer _ over _
- too coupled/dependent
- good point
- bookkeeping
- doing what you love: leaving what's boring to you for others
Annotators
URL
-
-
-
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
-
-
docs.openfaas.com docs.openfaas.com
-
OpenFaaS® makes it easy for developers to deploy event-driven functions and microservices to Kubernetes without repetitive, boiler-plate coding.
-
-
www.codetriage.com www.codetriage.com
-
Finally: Give a link to the example app to a maintainer (usually through an issue).
Tags
Annotators
URL
-
-
-
Rails still encourages you to dump all validation errors at the top of a form, which is lulzy in this age of touchy UX
-
-
stackoverflow.com stackoverflow.com
-
Fits the ideal behind HTML HTML stands for "HyperText Markup Language"; its purpose is to mark up, or label, your content. The more accurately you mark it up, the better. New elements are being introduced in HTML5 to more accurately label common web page parts, such as headers and footers.
-
-
jangawolof.org jangawolof.orgPhrases12
-
Degg naa ko muy tari Alxuraan.
-
Beykat yi duñu dem tool altine.
-
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).
-
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).
-
Almet ji dafa tooy.
Les allumettes sont mouillées.
almet ji -- (French) matches.
ji -- the (indicates nearness).
dafa -- are (?).
tooy v. -- to be/get wet, humid, to be soaked; be fresh, be green.
-
Fexeel ba kër gi bañ ñàkk alkol.
Veille à ce qu'il ne manque pas d'alcool à la maison.
fexe+el (fexe) v. -- search/seek by all means.
ba -- the (?).
kër gi -- house; family.
gi -- the (indicates nearness).
bañ v. -- refuse, resist, refuse to; to hate; verb marking the negation in subordinate clauses.
ñàkk v. / ñàkk bi -- vaccinate / vaccine (not sure exactly how this fits in the sentence if it's even the right translation -- perhaps it has to do with surgical alcohol rather than drinking alcohol).
alkol ji -- (French) surgical alcohol. (I'm certain this is also used for the type of alcohol you drink -- but sangara is probably the most used term).
-
Alkaati ba jàpp na sàcc.
Le gardien de la paix a pris un voleur.
alkaati bi -- policeman.
ba -- the (indicates remoteness).
jàpp v. -- grab, take, stop.
na -- (?).
sàcc bi -- thief.
-
Noo mën a def dinga fey alamaan bi.
Quoi que tu fasses, tu paieras l'amende.
noo -- you (?)
mën v. -- power ; be stronger than 💪🏽; can, will.
a -- (?).
def v. -- do, commit, execute; to put.
dinga -- you will.
fey v. -- turn off, switch off 📴, appease; pay 💵.
alamaan bi -- (French: l'amende) fine.
bi -- the.
-
Sér bi aju na ci caru garab gi.
Le pagne s'est accroché à la branche.
sér bi -- loincloth. 🩲
bi -- the.
aju v. -- hang on.
na -- (?).
ci -- close; at @, in, on, inside, to.
car+u (car) bi -- twig, branch. 🎋
garab gi -- tree 🌲, plant 🪴; medicine 💊, remedy.
gi -- the.
-
Faatu aj na laytanam.
Faatu a placé sa calebasse en haut.
faatu -- a feminine name of Arabic origin. 👩🏽
aj v. -- place on top 🔝, perch.
na -- her (?).
laytan+am (laytan) gi -- small calabash (to have).
-
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.
-
Xabaar bi agsi na démb.
La nouvelle est arrivée hier.
xabaar (Arabic) v. -- report (a new one).
bi -- the.
agsi v. -- to arrive, to arise.
na -- as (?).
démb ji -- the past; yesterday 📆, long ago.
Tags
- seek
- placenta
- degg
- dafa
- démb
- na
- tooy
- has
- alamaan
- kër
- faatu
- make
- ñaari
- refuse
- his
- tree
- bu
- son
- ji
- ni
- góor
- bi
- fresh
- sama
- vaccine
- -e
- sér
- teach
- not
- aloom
- taawan
- dagg
- she
- sangara
- fexe
- a
- news
- alkaati
- support
- aj
- moroom
- mën
- bañ
- pilgrimage
- loincloth
- ñàkk
- ba
- roots
- fori
- garab
- go
- for
- fever
- fruit
- fellowship
- yesterday
- they
- soaked
- reeni
- alxuraan
- uninhabited
- dem
- nijaay
- recite
- male
- feebar
- jàng
- sàcc
- laytanam
- wolof
- beykat
- mespiliformis
- -an
- alkol
- tari
- vaccinate
- went
- mi
- sure
- fey
- are
- heard
- taproot
- collect
- hate
- noo
- pay
- fibar
- and
- uncle
- gi
- companion
- shortage
- him
- cut
- I
- whatever
- caught
- yoon
- duñu
- agsi
- man
- muy
- tool
- how
- fièvre
- taaw
- diospyros
- dagge
- no
- house
- calabash
- her
- into
- surgical
- neighbor
- hung
- reen
- yi
- to
- matches
- thief
- home
- ñuy
- green
- wet
- feexeel
- field
- copulate
- the
- àll
- there
- peacekeeper
- aju
- almet
- comrades
- family
- land
- fine
- ko
- made
- jàngale
- naa
- distant
- monday
- as
- ci
- mecca
- xabaar
- resist
- healer
- comrade
- ak
- ebenacea
- equal
- fatou
- top
- with
- branch
- bush
- jàpp
- at
- you'll
- on
- he
- taught
- what
- my
- learn
- humid
- ànd
- -el
- from
- caru
- verses
- of
- -i
- placed
- alcohol
- koran
- janga
- dinga
- first
- you
- pick up
- farmers
- sickness
- def
- altine
- is
- twice
- came
- search
- eldest
- do
- jàngal
- child
- together
Annotators
URL
-
-
afarkas.github.io afarkas.github.ioWebshim1
-
Webshim is opinionated, that a developer should always solve a problem the HTML5 way.
-
-
store.steampowered.com store.steampowered.com
-
i need to write review so i get my badge
-
-
trailblazer.to trailblazer.to
-
In production, you will never trigger one specific callback or a particular validation, only. Your application will run all code required to create a Song object, for instance. In Trailblazer, this means running the Song::Create operation, and testing that very operation with all its side-effects.
-
There’s no need to test controllers, models, service objects, etc. in isolation
-
Run the complete unit with a certain input set, and test the side-effects. This differs to the Rails Way™ testing style, where smaller units of code, such as a specific validation or a callback, are tested in complete isolation. While that might look tempting and clean, it will create a test environment that is not identical to what happens in production.
Tags
- testing: avoid testing implementation details
- rails: the Rails way
- the Trailblazer way
- unnecessary
- testing: test the side effects
- testing: avoid unnecessarily testing things in too much isolation, in a different way than the code is actually used (should match production)
- testing: tests should resemble the way your software is used
- testing: philosohy of testing
- isolation (programming)
Annotators
URL
-
-
www.nytimes.com www.nytimes.com
-
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.
-
-
twitter.com twitter.com
-
The COVID Tracking Project. (2020, November 19). Our daily update is published. States reported 1.5M tests, 164k cases, and 1,869 deaths. A record 79k people are currently hospitalized with COVID-19 in the US. Today’s death count is the highest since May 7. Https://t.co/8ps5itYiWr [Tweet]. @COVID19Tracking. https://twitter.com/COVID19Tracking/status/1329235190615474179
-
-
-
trailblazer.to trailblazer.to
-
Admittedly, both the signature and the return values of invoke feel a bit clumsy. That’s becaus we’re currently working with the low-level interfaces.
-
Instead of one big code pile, activities will gently enforce a clean, standardized way for organizing code.
-
the Activity component is the heart of TRB
-
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.
-
Hey, that’s is an imaginary complication of our example - please don’t do this with every condition you have in your app.
Tags
- easy to understand
- strictly enforced rules/conventions: benefits
- clean code
- trailblazer-activity
- easy to follow/read/understand
- example: not how you would actually do it (does something wrong/bad/nonideal illustrating but we should overlook it because that's not the one thing the example is trying to illustrate/show us)
- extremes
- artificial example
- clumsy interface/syntax
- software design patterns
- low-level interface
- the Trailblazer way
- admit the limitations/shortcomings of your argument/benefits
- Trailblazer
- convention
- why?
- main/key/central/essential/core thing/point/problem/meat
- clean/uncluttered code
- easy to see/notice
- answer the "why?"
- coming up with hypothetical examples
- standardization
Annotators
URL
-
-
trailblazer.to trailblazer.to
-
we have a helpful little framework behind the page rendering that pulls code snippets from real tests out of the actual gems
-
Writing documentation for the new website has been fun. Yes, fun!
-
-
trailblazer.to trailblazer.to
-
The circuit interface is a bit more clumsy but it gives you unlimited power over the way the activity will be run.
-
-
Local file Local file
-
CHILD DEVELOPMENT PERSPECTIVES
The article is found in this scholarly journal.
-
- Feb 2021
-
www.reddit.com www.reddit.com
-
Anyway, sorry for the short novel. But that's the danger of pithy one-liners: assumed context for the poster can be entirely lost in translation.
-
-
trailblazer.to trailblazer.to
-
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 breaksmagnetic_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")
-
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?
Tags
- semantics
- helper functions
- tip
- flexibility
- powerful
- feels wrong
- trailblazer-activity
- example: not how you would actually do it (does something wrong/bad/nonideal illustrating but we should overlook it because that's not the one thing the example is trying to illustrate/show us)
- useful
- example: in order to keep example concise/focused, may not implement all best practices (illustrates one thing only)
- concise
- verbose / noisy / too much boilerplate
- I have a question about this
Annotators
URL
-
-
www.biorxiv.org www.biorxiv.org
-
Transparent Peer Review
Download the complete Review Process [PDF] including:
- reviews
- authors' reply
- editorial decisions
-
-
www.biorxiv.org www.biorxiv.org
-
Transparent Peer Review
Download the complete Review Process [PDF] including:
- reviews
- authors' reply
- editorial decisions
-
-
-
Transparent Peer Review
Download the complete Review Process [PDF] including:
- reviews
- authors' reply
- editorial decisions
-
-
www.biorxiv.org www.biorxiv.org
-
Transparent Peer Review
Download the complete Review Process [PDF] including:
- reviews
- authors' reply
- editorial decisions
-
-
www.biorxiv.org www.biorxiv.org
-
Transparent Peer Review
Download the complete Review Process [PDF] including:
- reviews
- authors' reply
- editorial decisions
-
-
www.biorxiv.org www.biorxiv.org
-
Transparent Peer Review
Download the complete Review Process [PDF] including:
- reviews
- authors' reply
- editorial decisions
-
-
www.biorxiv.org www.biorxiv.org
-
Transparent Peer Review
Download the complete Review Process [PDF] including:
- reviews
- authors' reply
- editorial decisions
-
-
www.biorxiv.org www.biorxiv.org
-
Transparent Peer Review
Download the complete Review Process [PDF] including:
- reviews
- authors' reply
- editorial decisions
-
-
www.biorxiv.org www.biorxiv.org
-
Transparent Peer Review
Download the complete Review Process [PDF] including:
- reviews
- authors' reply
- editorial decisions
-
-
www.biorxiv.org www.biorxiv.org
-
Transparent Peer Review
Download the complete Review Process [PDF] including:
- reviews
- authors' reply
- editorial decisions
-
-
www.biorxiv.org www.biorxiv.org
-
Transparent Peer Review
Download the complete Review Process [PDF] including:
- reviews
- authors' reply
- editorial decisions
-
-
-
Transparent Peer Review
Download the complete Review Process [PDF] including:
- reviews
- authors' reply
- editorial decisions
-
-
www.biorxiv.org www.biorxiv.org
-
Transparent Peer Review
Download the complete Review Process [PDF] including:
- reviews
- authors' reply
- editorial decisions
-
-
www.biorxiv.org www.biorxiv.org
-
Transparent Peer Review
Download the complete Review Process [PDF] including:
- reviews
- authors' reply
- editorial decisions
-
-
www.biorxiv.org www.biorxiv.org
-
Transparent Peer Review
Download the complete Review Process [PDF] including:
- reviews
- authors' reply
- editorial decisions
-
-
www.biorxiv.org www.biorxiv.org
-
Transparent Peer Review
Download the complete Review Process [PDF] including:
- reviews
- authors' reply
- editorial decisions
-
-
www.biorxiv.org www.biorxiv.org
-
Transparent Peer Review
Download the complete Review Process [PDF] including:
- reviews
- authors' reply
- editorial decisions
-
-
www.biorxiv.org www.biorxiv.org
-
Transparent Peer Review
Download the complete Review Process [PDF] including:
- reviews
- authors' reply
- editorial decisions
-
-
www.biorxiv.org www.biorxiv.org
-
Transparent Peer Review
Download the complete Review Process [PDF] including:
- reviews
- authors' reply
- editorial decisions
-
-
biorxiv.org biorxiv.org
-
Transparent Peer Review
Download the complete Review Process [PDF] including:
- reviews
- authors' reply
- editorial decisions
-
-
github.com github.com
-
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? %>
-
-
github.com github.com
-
Now that I've thought more about it, I honestly think the auto-adding the script feature is overrated, over-complicated, and error-prone (#98, #100), and I propose we just remove it (#110).
-
-
github.com github.com
-
now that I've thought more about it, I think the auto-adding the script feature is overrated, over-complicated, and error-prone (#100), and ought to just be removed (#110).
-
-
github.com github.com
-
now that I realize how easy it is to just manually include this in my app: <%= javascript_include_tag 'xray', nonce: true if Rails.env.development? %> I regret even wasting my time getting it to automatically look for and add a nonce to the auto-injected xray.js script
-
This is failing CI because CI is testing against Rails < 6. I think the appropriate next steps are: Open a separate PR to add Rails 6 to the CI matrix Update this PR to only run CSP-related test code for Rails >= 6.0.0 Can you help with either or both of those?
Tags
- removing legacy/deprecated things
- removing feature that is more trouble than it's worth (not worth the effort to continue to maintain / fix bugs caused by keeping it)
- regret
- wasted effort
- pull requests: can't just throw it over the fence and be done (requires follow-through)
- removing features to simplify implementation
- fix design/API mistakes as early as you can (since it will be more difficult to correct it and make a breaking change later)
Annotators
URL
-
-
forum.wordreference.com forum.wordreference.com
-
At work, we often mention "throwing something over the fence" and "wrong rock" so there is (to us) a proverbial fence and a proverbial wrong rock.
-
-
www.chemistryworld.com www.chemistryworld.com
-
github.com github.com
-
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.
-
-
www.schneems.com www.schneems.com
-
For example, what if your site has a customer interface and an “admin” interface? If the two have totally different designs and features, then it might be considerable overhead to ship the entirety of the admin interface to every customer on the regular site.
-
Before we get into what the manifest.js does, let’s look at what it is replacing.
-
Have you ever felt like a framework was getting in the way instead of helping you go faster? Maybe you’re stuck on some simple task that would be easy to do manually, but your framework is making you jump through configuration hoops. I end up getting lost in a sea of documentation (or no documentation), and the search for that one magical config key takes just a tad bit too long. It’s a productivity sink, and worse than the time delay it adds to my frustration throughout the day.
-
-
cherrycreekschools.instructure.com cherrycreekschools.instructure.com
-
Did the district just not see the problem with taking away some schools busing?
-
why don't the teachers look at this and see that the cause is racism?
-
I find it crazy that the school lost 100 students weekly.
-
I think it is ridiculous that they came up with the idea to segregate the schools, while also leaving black students with the worst school supplies.
-
I thought that these numbers where really interesting, especially when the Hispanic enrollments increased
-
Its cool that different nationality and race are on the city council board
Tags
- In 1968, the year before busing began, 63,398 white students attended Denver publicschools. Last year, there were 18,000. Black enrollments have remained about 13,000, whileHispanic enrollments have increased to 28,283 from 18,611.
- Denver's school board deliberately segregated schools through a strategyof building schools and shifting attendance boundaries. Largely black schools routinelyended up with the oldest books and the youngest teachers.
- "We lost 7,000 students in the summer of 1975," recalled Naomi L. Bradford, a white busingopponent who was elected head of the school board in 1985. "In the fall, we lost 100students a week -- probably as soon as their homes were sold."
- Without waiting for judicial approval, the board pulled nineelementary schools out of the busing program this summer, reducing to 10 percent thenumber of students being bused.
- Although high school diploma standards have been eased in recent years, the number ofeligible students graduating from high school has slipped from three-quarters in 1990 totwo-thirds today. In the past decade, the number of disciplinary suspensions has tripled, to7,183 in 1994.
- Black and Hispanic men and womenare in the City Council, the schoolboard, the State Legislature andother political positions."
Annotators
URL
-
-
trailblazer.to trailblazer.to
-
In order to invoke, or run
-
A task is often called step.
-
In other words: the controllers usually contain only routing and rendering code and dispatch instantly to a particular operation/activity class.
-
They help streamlining the control flow, and take away control code while providing you with an incredibly cool developer experience.
-
-
en.wikipedia.org en.wikipedia.org
-
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.
-
-
sobolevn.me sobolevn.me
-
Let’s start with the same number dividing example, which returns 0 when the error happens. Maybe instead we can indicate that the result was not successful without any explicit numerical value?
-
You can use container values, that wraps actual success or error value into a thin wrapper with utility methods to work with this value. That’s exactly why we have created @dry-python/returns project. So you can make your functions return something meaningful, typed, and safe.
-
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.
-
You still need to have a solid experience to spot these potential problems in a perfectly readable and typed code.
-
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.
Tags
- the benefit of experience
- need to solve specific case/problems individually (there is no general solution)
- good example
- monad: monadic value (wrapping a value within the monad)
- railway-oriented programming
- depends on use case / application
- sad/unfortunate conclusion
- the specific context is important
- Python
- error/exception handling
- safety (programming)
- easy to miss / not notice (attention)
Annotators
URL
-
-
en.wikipedia.org en.wikipedia.org
-
despite initially appearing to be an appropriate and effective response to a problem, has more bad consequences than good ones
-
-
-
I'm not a fan of listing exceptions functions can throw, especially here in Python, where it's easier to ask forgiveness than permission.
-
-
github.com github.com
-
Make your functions return something meaningful, typed, and safe!
-
-
en.wikipedia.org en.wikipedia.org
-
can transform monadic values m a applying f to the unwrapped value a
-
procedure to wrap values of any basic type within the monad (yielding a monadic value)
-
Supporting languages may use monads to abstract away boilerplate code needed by the program logic.
-
-
dry-rb.org dry-rb.org
-
Another solution is using the Safe Navigation Operator &. introduced in Ruby 2.3 which is a bit better because this is a language feature rather than an opinionated runtime environment pollution
-
-
www.morozov.is www.morozov.is
-
I want to emphasize that Result is just an alternative name for the Either monad.
-
-
en.wikipedia.org en.wikipedia.org
-
it is inconvenient to write specific implementations for each datatype contained, especially if the code for each datatype is virtually identical. For example, in C++, this duplication of code can be circumvented by defining a class template
-
-
trailblazer.to trailblazer.to
-
An operation has two invocation styles. This is the only difference to an Activity.
-
-
github.com github.com
-
Instead of dealing with a mix of before_filters, Rack-middlewares, controller code and callbacks, an endpoint is just another activity and allows to be customized with the well-established Trailblazer mechanics.
-
-
trailblazer.to trailblazer.to
-
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.
-
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
-
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!
-
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.
-
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.
-
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.
-
It’s so simple that I sometimes wonder why it took years to develop it!
-
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.
Tags
- annotation meta: inherit same annotation/tags
- recant/retract/revert/withdraw your previous plans
- state charts
- funny
- free content
- advantages/merits/pros
- trailblazer-endpoint
- fix design/API mistakes as early as you can (since it will be more difficult to correct it and make a breaking change later)
- finally / at last
- very simple/small result/change in the end but took a lot of work/time to arrive there
- focus on the user
- learn from your mistakes
- programming: return values / result objects that communicate a more precise/complete representation of the outcome
- the Trailblazer way
- I agree
- the missing link
- admit the limitations/shortcomings of your argument/benefits
- improvement
- documentation
- Trailblazer
- non-binary
- rails: the Rails way
- shift in preference
- knowledge commons (information/data/content)
- pointing out gaps/downsides/cons in competition/alternatives
- welcome/good change
- non-free content
- unambiguous
- do it right/well the first time because it may be too hard to clean up/fix later if you don't
- software preferences are personal
- more than one right way (no one right/best way)
- strong (extreme/great/high/intense degree/level/concentration/amount/quality of)
- I'm glad they did it this way
- community-driven development
- interfaces (programming)
Annotators
URL
-
-
www.huffpost.com www.huffpost.com
-
They fail to recognize the value of an initial investment of time in future productivity.
-
-
2019.trailblazer.to 2019.trailblazer.to
-
Why is TRB licensed under LGPL, not MIT?
-
-
github.com github.com
-
In Trailblazer, models are completely empty. They solely contain associations and finders. No business logic is allowed in models.
-
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.
Tags
- leaving the details of implementation/integration up to you
- models: should be thin, dealing with persistence/associations only, not business logic
- Trailblazer
- rails: the Rails way
- making changes / switching/migrating gradually/incrementally/step-wise/iteratively
- focus on what it should do, not on how it should do it (implementation details; software design)
- newer/better ways of doing things
- freedom of user to override specific decision of an authority/vendor (software)
- abstractions
- allowing developer/user to pick and choose which pieces to use (allowing use with competing libraries; not being too opinionated; not forcing recommended way on you)
- the Trailblazer way
- focus on concepts/design/structure instead of specific/concrete technology/implementation
Annotators
URL
-
-
www.nytimes.com www.nytimes.com
-
bird counts across the United States have fallen a staggering 29 percent in the last 50 years
29% in 50 years? That means in the next 50 years half of the bird population could decrease!
-
-
psyarxiv.com psyarxiv.com
-
Aczel, Balazs, Marton Kovacs, and Rink Hoekstra. ‘The Role of Human Fallibility in Psychological Research: A Survey of Mistakes in Data Management’. PsyArXiv, 5 November 2020. https://doi.org/10.31234/osf.io/xcykz.
-
-
unix.stackexchange.com unix.stackexchange.com
-
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.
-
-
stackoverflow.com stackoverflow.com
-
Check yourself some shell-sources.
-
If interested, you can check the plain old /bin/sh signal handling in the source code here.
-
-
unix.stackexchange.com unix.stackexchange.com
-
Also, this code will fail if $$ is not the process group leader, such as when the script is run under strace. Since a call to setsid(2) is probably tricky from a shell script, one approach might be to ps and obtain the process group ID from that.
-
you really need #!/bin/sh -m for correct behavior of nested subshells. fg, bg, and wait wont work correctly otherwise
-
-
www.washingtonpost.com www.washingtonpost.com
-
The Quest for Truth
The quest for Truth is everywhere and not limited to the economic topics linked here. This is just a topic that started a thought process where I had access to a convenient tool (Hypothesis) to bookmark my thoughts and research.
Primary thought is: The Quest for Truth. Subcategories would provide a structured topic for the thought. In this case the subcategory would be: US Economy, Inflation
The TRUTH is a concept comprised of inconsistencies and targets that frequently move.
Targets (data, methods, people, time, semantics, agenda, demographic, motive, means, media, money, status) hold a position in time long enough to fulfill a purpose or agenda. Sometimes they don't consciously change, but history over time shines light and opens cracks in original narrative that leads to new truth's, real or imagined.
Verifying and validating certain Truth is very difficult. Why is That?
-
-
cdixon.org cdixon.org
-
A popular strategy for bootstrapping networks is what I like to call “come for the tool, stay for the network.” The idea is to initially attract users with a single-player tool and then, over time, get them to participate in a network. The tool helps get to initial critical mass. The network creates the long term value for users, and defensibility for the company.
This is an interesting and useful strategy. I've heard the idea several times before.
I'm curious if this is the oldest version of it? I have to imagine that there are earlier versions of it dating back to 2011 or 2012 if not earlier.
-
-
-
In Ruby 3 we now have a “rightward assignment” operator. This flips the script and lets you write an expression before assigning it to a variable. So instead of x = :y, you can write :y => x
-
-
hackmd.io hackmd.io
-
“Myths about COVID-19 vaccination - HackMD.” Accessed February 19, 2021. https://hackmd.io/ovEzSQWcRp2bctQn8MYElQ#Myths-about-COVID-19-vaccination.
-
-
github.com github.com
-
In this simple example, the destroy interaction doesn't do much. It's not clear that you gain anything by putting it in an interaction.
-
-
github.com github.com
-
This is a breaking change so it'll have to go into a major release. I was working on a v4 release but it's too much. I think I'm going to pair it back and we can add this to the new v4. When I have that ready, I'll rebase the merge onto that branch.
-
-
github.com github.com
-
No one has requested it before so it's certainly not something we're planning to add.
-
To give a little more context, structures like this often come up in my work when dealing with NoSQL datastores, especially ones that rely heavily on JSON, like Firebase, where a records unique ID isn't part of the record itself, just a key that points to it. I think most Ruby/Rails projects tend towards use cases where these sort of datastores aren't appropriate/necessary, so it makes sense that this wouldn't come up as quickly as other structures.
-
-
web.hypothes.is web.hypothes.is
-
Learn more about how we made the decision to put our guidance in the public domain
-
In order to support easy reuse, revision, remixing, and redistribution, the entire Hypothesis Help knowledge base by Hypothesis is dedicated to the public domain via CC CC0 1.0. While we appreciate attribution and links back to Hypothesis from anywhere these works are published, they are not required.
-
-
github.com github.com
-
I don't think seeing it in Rails PRs naturally means we should do it blankly. Put it another way, what's the justification in those PRs for doing it?
-
The main realization came when I figured out that the main_model was just another association. This means we can move a lot of logic to just that class and reason about it a lot better.
Tags
- rationale
- doing something without knowing why/how it works
- it's just _
- why?
- understand the ramifications/effects/consequences
- justification for existence
- understand both sides of an issue
- fallacy: doing something because it's popular / everyone is doing it
- investing time to really understand something
- easy to reason about
- special cases
- solving/handling the general case
- realization
- understand the trade-offs
Annotators
URL
-
-
github.com github.com
-
But ActiveModel doesn't support out of the box argument parsing, e.g. having a datetime attribute be a datetime attribute and a boolean attribute be a boolean attribute.
Doesn't it now, with the (newer)
ActiveModel::Attributes
API?
-
-
github.com github.com
-
Examples of different ways of defining forms
Wow, that's a lot of different ways.
The inline_form way in particular seems interesting to me, though it's worth noting that that method is just an example, not actually part of this project's code, so it's not really a first-class option like the other options.
-
-
-
The press release also quoted a UA assistant provost for institutional research who explained that while the swipes of student ID cards were not used in the current student retention analytics, about 800 other data points were
The research in questions was not currently being used by the institution to improve rention, but other student data was already being used for that purpose
-
The researcher noted that the data she had used had been anonymized before she was given access to it—however, she added that if/when her research might inform the ongoing efforts to improve student retention, the student’s personal details would be “shared” with the students' academic advisers.
The data was anonymized before she was given access, but she admitted that there might be interest in sharing students' personal details with academic advisors
-
She then used that data to create large networks mapping which students interacted with one another and how often.
The researcher sought to track the personal interactions of students with one another
-
On the university’s website, a press release
The university share the finding of the research after the fact
-
At the University of Arizona, for example, a researcher analyzed the swipes of student ID cards at locations across campus, “to see what they reveal about students' routines and relationships, and what that means for their likelihood of returning to campus after their freshman year.”
Fact. Student ID Cards Collect Data Fact. A researcher was given access to this data for her own purposes.
-
-
github.com github.com
-
We are still open to the idea but the implementation should leverage the attributes API introduced in Rails 5.2 in Active Model.
-
-
www.infoworld.com www.infoworld.com
-
If you don't understand both sides of an issue, you cannot make an intelligent choice; in fact, if you don't understand all the ramifications of your actions, you're not designing at all. You're stumbling in the dark.
-
Stating that some language feature or common programming idiom (like accessors) has problems is not the same thing as saying you should never use them under any circumstances.
-
By the same token, marketing or political incentives often push design idioms
Tags
- decisions have long-lasting effects/consequences
- getters/setters
- doing things for business/marketing/political reasons/incentives
- living with the consequences
- understand the ramifications/effects/consequences
- doing things for the wrong reasons
- understand both sides of an issue
- extremes
- design idioms
- programming idiom
- software design patterns
- the specific context is important
- understand the trade-offs
Annotators
URL
-
-
-
I think maybe the terms we're using are a bit confusing.
-
It makes me happy to see people actually think about things and not just accept a shitty API.
Tags
- doing something without knowing why/how it works
- don't settle for/accept something that's not as good as it can be
- actually consider / think about how it _should_ (ideally) be
- less than ideal / not optimal
- can we do even better?
- describe the ideal hypothetical solution
- intentional/well-considered decisions
- discussion: first have to agree on the meaning of the words/terms we're using
- "makes me happy when ..."
Annotators
URL
-
-
-
with ActiveForm-Rails, validations is the responsability of the form and not of the models. There is no need to synchronize errors from the form to the models and vice versa.
But if you intend to save to a model after the form validates, then you can't escape the models' validations:
either you check that the models pass their own validations ahead of time (like I want to do, and I think @mattheworiordan was wanting to do), or you have to accept that one of the following outcomes is possible/inevitable if the models' own validations fail:
- if you use
object.save
then it may silently fail to save - if you use
object.save
then it will fail to save and raise an error
Are either of those outcomes acceptable to you? To me, they seem not to be. Hence we must also check for / handle the models' validations. Hence we need a way to aggregate errors from both the form object (context-specific validations) and from the models (unconditional/invariant validations that should always be checked by the model), and present them to the user.
What do you guys find to be the best way to accomplish that?
I am interested to know what best practices you use / still use today after all these years. I keep finding myself running into this same problem/need, which is how I ended up looking for what the current options are for form objects today...
- if you use
-
DSLs can be problematic for the user since the user has to manage state (e.g. am I supposed to call valid? first or update_attributes?). This is exactly why the #validate is the only method to change state in Reform.
-
The reason Reform does updating attributes and validation in the same step is because I wanna reduce public methods. This is to save users from having to remember state.
I see what he means, but what would you call this (tag)? "have to remember state"? maybe "have to remember" is close enough
Or maybe order is important / do things in the right order is all we need to describe the problem/need.
Tags
- order is important / do things in the right order
- annotation meta: may need new tag
- making it easy to do the wrong thing
- making it easy to do the right thing
- whose responsibility is it?
- state management
- simplicity by design
- reform (Ruby)
- missing the point
- DSL
- have to remember
- good point
- overlooking/missing something
- I have a differing opinion
- rails: validation
Annotators
URL
-
-
github.com github.com
-
We think that, although Ruby is a great language for the backend, the view should be written in languages designed for that purpose, HTML and JavaScript.
-
-
en.wikipedia.org en.wikipedia.org
-
As with other software patterns, MVC expresses the "core of the solution" to a problem while allowing it to be adapted for each system.
-
-
cherrycreekschools.instructure.com cherrycreekschools.instructure.com
-
I feel like schools should read this book in order to acknowledge how badly African Americans were being treated even after fighting for America.
-
I had never heard of the Red Ball Express until reading this article.
-
-
psyarxiv.com psyarxiv.com
-
Lalwani, P., Fansher, M., Lewis, R., Boduroglu, A., Shah, P., Adkins, T. J., … Jonides, J. (2020, November 8). Misunderstanding “Flattening the Curve”. https://doi.org/10.31234/osf.io/whe6q
-
-
simplychurch.com simplychurch.com
-
The Lord led me to a wonderful Christian ophthalmologist with unconventional methods of arresting the disease through diet alone and that has saved my sight.
-
-
www.conversioner.com www.conversioner.com
-
These two mistakes, especially the second one, plant worries in your customers mind before they’ve even had time to think of them.
-
Stop warning people – no contract, no obligations, cancel anytime – companies can’t resist saying this on every pricing page but by using negative words they’re just putting ideas into people’s heads.
-
-
invisibleup.com invisibleup.com
-
Let's face it, these days, if you want to socialize, you don't go out to the mall or the library, and it's a 50/50 shot if you even have anything resembling a town square. You go on the internet.
And this is the problematic part of the internet as a town square: we have no defined governance or pale beyond which to cast people who go far beyond societal norms.
-
-
stoa.anagora.org stoa.anagora.orgUntitled1
-
The Timeless Way of Building is the first in a series of books which describe an entirely new attitude to architec- ture and planning. The books are intended to provide a complete working alternative to our present ideas about ar- chitecture, building, and planning—~an alternative which will, we hope, gradually replace current ideas and practices,
[[the timeless way of building]]
-
-
www.sciencedirect.com www.sciencedirect.com
-
Eichengreen, B., Aksoy, C. G., & Saka, O. (2021). Revenge of the experts: Will COVID-19 renew or diminish public trust in science? Journal of Public Economics, 193, 104343. https://doi.org/10.1016/j.jpubeco.2020.104343
-