- Mar 2021
-
stackoverflow.com stackoverflow.com
-
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
Tags
- testing: avoid testing implementation details
- 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)
- isolation (programming)
- testing: tests should resemble the way your software is used
Annotators
URL
-
-
www.kickstarter.com www.kickstarter.com
-
Shogi is a classic game. I know many people who want to play Shogi, but the Kanji on the pieces makes it too hard to master. I have designed this Shogi with icons so anybody can learn it easily.
-
-
github.com github.com
-
It can also be included as individual modules, i.e. Hashie::Extensions::MethodReader, Hashie::Extensions::MethodWriter and Hashie::Extensions::MethodQuery.
-
-
github.com github.com
-
The Model macro literally does what our model! step did.
That information is not generally relevant. Only makes sense for someone who actually knew about or used the old interface.
The docs shouldn't assume you are an experienced user / a user of the previous version.
Would have been appropriate in a Changelog entry or announcement, but not in the general docs.
-
-
store.steampowered.com store.steampowered.com
-
a strategy game for me is mostly about the mechanics and the replayability. I love good art and design, but function follow form!
-
- Feb 2021
-
trailblazer.to trailblazer.to
-
To understand this helper, you should understand that every step invocation calls Output() for you behind the scenes. The following DSL use is identical to the one [above]. class Execute < Trailblazer::Activity::Railway step :find_provider, Output(Trailblazer::Activity::Left, :failure) => Track(:failure), Output(Trailblazer::Activity::Right, :success) => Track(:success)
-
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")
Tags
- tip
- helper functions
- useful
- 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)
- flexibility
- demystified
- equivalent code
- powerful
- concise
- verbose / noisy / too much boilerplate
- being explicit
- automatic
Annotators
URL
-
-
trailblazer.to trailblazer.to
-
The sole purpose to add Dev::Trace::Inspector module is to make custom inspection possible and efficient while tracing. For example, ActiveRecord::Relation#inspect makes additional queries to fetch top 10 records and generate the output everytime. To avoid this, Inspector will not call inspect method when it finds such objects (deeply nested anywhere). Instead, it’ll call AR::Relation#to_sql to get plain SQL query which doesn’t make additional queries and is better to understand in tracing output.
-
Feel free to pick and choose what you need for your applications.
-
-
stackoverflow.com stackoverflow.com
-
trailblazer.to trailblazer.to
-
While you could program this little piece of logic and flow yourself using a bunch of Ruby methods along with a considerable amount of ifs and elses, and maybe elsif, if you’re feeling fancy, a Trailblazer activity provides you a simple API for creating such flow without having to write and maintain any control code. It is an abstraction.
-
-
github.com github.com
-
So, what can we do to check for None in our programs? You can use builtin Optional type and write a lot of if some is not None: conditions. But, having null checks here and there makes your code unreadable.
-
-
sobolevn.me sobolevn.me
-
Return None. That’s evil too! You either will end up with if something is not None: on almost every line and global pollution of your logic by type-checking conditionals, or will suffer from TypeError every day. Not a pleasant choice.
-
-
dry-rb.org dry-rb.org
-
Writing code in this style is tedious and error-prone.
-
Monads provide an elegant way of handling errors, exceptions and chaining functions so that the code is much more understandable and has all the error handling, without all the ifs and elses.
-
-
jrsinclair.com jrsinclair.com
-
It’s definitely better than littering our code with endless if-statements.
-
As you can see, we end up with a lot of boilerplate if-statements. The code is more verbose. And it’s difficult to follow the main logic.
-
-
functionalprogramming.medium.com functionalprogramming.medium.com
-
polymorphic method inside shape class, its possible to discriminate them. without if’s.
-
-
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.
-
-
github.com github.com
-
The bare bones operation without any Trailblazery is implemented in the trailblazer-operation gem and can be used without our stack.
-
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.
-
Only use what you like.
-
you can pick which layers you want. Trailblazer doesn't impose technical implementations
Tags
- newer/better ways of doing things
- trailblazer-operation
- focus on concepts/design/structure instead of specific/concrete technology/implementation
- abstractions
- making changes / switching/migrating gradually/incrementally/step-wise/iteratively
- 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)
- Trailblazer
- leaving the details of implementation/integration up to you
- freedom of user to override specific decision of an authority/vendor (software)
- rails: the Rails way
- focus on what it should do, not on how it should do it (implementation details; software design)
Annotators
URL
-
-
trailblazer.to trailblazer.to
-
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.
Tags
- learn from your mistakes
- fix design/API mistakes as early as you can (since it will be more difficult to correct it and make a breaking change later)
- do it right/well the first time because it may be too hard to clean up/fix later if you don't
- pointing out gaps/downsides/cons in competition/alternatives
Annotators
URL
-
-
github.com github.com
-
account.first_name = first_name if first_name.present? account.last_name = last_name if last_name.present?
I guess this is needed so we don't reset to nil (erasing value in database) when they haven't even provided a new value as input.
But surely there's a cleaner way...
-
-
github.com github.com
-
Almost always form objects wrap existing model or two.
-
-
github.com github.com
-
@adisos if reform-rails will not match, I suggest to use: https://github.com/orgsync/active_interaction I've switched to it after reform-rails as it was not fully detached from the activerecord, code is a bit hacky and complex to modify, and in overall reform not so flexible as active_interaction. It has multiple params as well: https://github.com/orgsync/active_interaction/blob/master/spec/active_interaction/modules/input_processor_spec.rb#L41
I'm not sure what he meant by:
fully detached from the activerecord I didn't think it was tied to ActiveRecord.
But I definitely agree with:
code is a bit hacky and complex to modify
Tags
- recommended software
- I agree
- hard to understand
- evaluating software options
- flexibility
- too complicated
- recommended option/alternative
- pointing out gaps/downsides/cons in competition/alternatives
- too coupled/dependent
- switching/migrating to something different
- reform (Ruby)
- active_interaction
Annotators
URL
-
-
github.com github.com
-
The assert method is used by all the other assertions. It pushes the second parameter to the list of errors if the first parameter evaluates to false or nil.
Seems like these helper functions could be just as easily used in ActiveRecord models. Therefore, they should be in a separate gem, or at least module, that can be used in both these objects and ActiveRecord objects.
-
-
github.com github.com
-
I like this idea a lot. I have had problems too with having multi-parameters assignments depending so heavily on active record.
-
-
-
I do think it's a common pattern that should be solved, and I am probably going to try and solve it as a Gem as opposed to simply writing code that we use in our code base
-
My only concern with this approach is that if someone calls #valid? on the form object afterwards, it would under the hood currently delete the existing errors on the form object and revalidate. The could have unexpected side effects where the errors added by the models passed in or the service called will be lost.
-
My concern with this approach is still that it's somewhat brittle with the current implementation of valid? because whilst valid? appears to be a predicate and should have no side effects, this is not the case and could remove the errors applied by one of the steps above.
-
I find reform's implementation a bit too complicated too (lots of layers of abstraction, including going through the representable gem for a lot of things)
-
I have developed a simple pattern that copies errors from the model or the service into the form object so that the view can still use those errors
Tags
- evolved into unfortunate state and too late to fix now
- prefer simpler option
- rails: validation: valid? has side effects
- rails: validation
- surprising behavior
- unfortunate
- me too
- common pattern
- should have no side effects
- too complicated
- sharing/publishing your code so others can use it/benefit too
- general solution
- workaround
Annotators
URL
-
-
github.com github.com
-
An additional usecase is where we would like to update multiple records
-
Some developers found work arounds by using virtual attributes to # skip validators
-
-
-
Writing the uniqueness validations yourself is easy so I felt it was better to leave this up to the developer
-
-
github.com github.com
-
I found the code a little bit complicated. Why to instanciate instance variables in this class instead to do a hash that could be used like this form.models[:first_model]; form.model[:second_model]?
Tags
Annotators
URL
-
-
www.amazon.com www.amazon.com
-
It does seem a bit like class notes and is *too* simplified to really be of much practical use though.
-
-
store.steampowered.com store.steampowered.com
-
From having the DLC only items be both constantly in your face and the kind of things you should really have access to as a base (medium sized building, most of the decorations etc) to the maps layout being seemingly purposefully made to be agravating, everytme I tried to play and like this game I got spit in the face by the devs
-
-
subpixel.space subpixel.space
-
Patreon is a good example of why generic community platforms are not the future. You could certainly say that Patreon is already at the center of content, social, and commerce. But of course, Patreon has for years been getting unbundled into A, B, and C type businesses. The reason for Patreon’s erosion is that its product design is totally unsuitable for all three use cases: it’s a bad brand platform, a bad content platform, and a bad social platform. Patreon is a classic case of what Venkatesh Rao calls “Too Big to Nail,” and businesses that try to follow in its stead will face similar challenges.
An interesting analysis of why Patreon is doomed to failure.
-
-
stackoverflow.com stackoverflow.com
-
Yes, i'm trying to find the union of two relations
I guess that's what I needed too. How much of the time can a or() be converted to a union?
-
-
-
stackoverflow.com stackoverflow.com
-
You use grid-area, so the place for the side nav is allocated at start. If you hide (or even delete) the side nav, that won't change anything about this. You have to do a little trick: Set the width for the first column to 0 and change the grid-gap because otherwise you will have a (not needed) gap at the left.
-
-
- Jan 2021
-
www.facebook.com www.facebook.com
-
Group Rules from the Admins1NO POSTING LINKS INSIDE OF POST - FOR ANY REASONWe've seen way too many groups become a glorified classified ad & members don't like that. We don't want the quality of our group negatively impacted because of endless links everywhere. NO LINKS2NO POST FROM FAN PAGES / ARTICLES / VIDEO LINKSOur mission is to cultivate the highest quality content inside the group. If we allowed videos, fan page shares, & outside websites, our group would turn into spam fest. Original written content only3NO SELF PROMOTION, RECRUITING, OR DM SPAMMINGMembers love our group because it's SAFE. We are very strict on banning members who blatantly self promote their product or services in the group OR secretly private message members to recruit them.4NO POSTING OR UPLOADING VIDEOS OF ANY KINDTo protect the quality of our group & prevent members from being solicited products & services - we don't allow any videos because we can't monitor what's being said word for word. Written post only.
Wow, that's strict.
-
-
askubuntu.com askubuntu.com
-
Setting up docker-ce
hanging
-
-
-
serverfault.com serverfault.com
-
it still hangs when installing
-
-
-
bugzilla.redhat.com bugzilla.redhat.com
-
Ok, fixed it by upgrading docker
-
-
stackoverflow.com stackoverflow.com
-
So, what I've discovered in a meanwhile. It was an ubuntu-docker issue. Recently I upgraded my ubuntu from 16.04 to 18.04. This change seems to be incompatible with the docker version I had, 1.11.0.
-
-
unix.stackexchange.com unix.stackexchange.com
-
-
As you installed a development release (17.04) that had only a 9-month life span and had an End of Life (EOL) in Jan 2018, there is no way to upgrade it to 17.10 as that went EOL back in July 2018. So as you're stuck with a release without an upgrade path (as you cannot skip versions)
-
-
css-tricks.com css-tricks.com
-
Situation: you have a single line of text in a flex child element. You don’t want that text to wrap, you want it truncated with ellipsis (or fall back to just hiding the overflow). But the worst happens. The unthinkable! The layout breaks and forces the entire flex parent element too wide. Flexbox is supposed to be helping make layout easier!
-
-
forums.theregister.com forums.theregister.com
-
the bloody mount points. I couldn't believe that when I realised what was going on. I got the wire brush and dettol out and scraped it off my drive. Never, ever again.
-
Plus, have you seen how many loopback mounting points it creates? "df" becomes very hard to use as it buries your actual drives with it's own. One for the daemon, one for GTK, one for Gnome, one for each of the snaps you have installed....
-
The strangest "quirk" I had was that I couldn't get the web browser to save a file directly to an attached, encrypted drive. Permissions problem. So I had to save to an interim folder then move it across by hand. Utter pain.
-
It appears that Canonical is continuing it's vice grip of unliateral, maybe dictatorial control on the development of Snap to the benefit of Ubuntu, but to the detriment of groups like Linuxmint, and all other non-Ubuntu based Linux distributions - like CentOS/Redhat, Suse/openSuSe, Solus, Arch/Manjaro, PCLinuxOS, etc, that are pushing Flatpak as a truly cross-distro application solution that works equally well and non-problematic for all. .
-
What's wrong here is Canonical trying to position itself as a powerhouse and ascertain control over Linux users.
-
See also BMW and Tesla owners. If Tesla does become the largest US-based carmaker, many of the buyers will, I'm sure, think of reasons to move onto something else.
-
If we're not careful, it could become the new 'systemd' problem It probably already is. I don't want to sound too Stallman, but this is the inevitable "company" influence you'll always have. Companies do have their objectives which they will pursue determinedly, since they are not philanthropic (no judgment, just observation). Systemd and Red Hat. Nvidia and their drivers. Google and Android. Apple and iOS. Manufacturers with MS only support. And Canonical also has a history there: the Amazon links, Unity, Mir, and now snap.
Tags
- too much noise
- analogy
- too much control/influence by a single company/entity
- trying to control you
- Snap
- Flatpak
- software freedom
- company getting too large
- abandoning/migrating away from
- Canonical
- messy
- Apple
- Chromium snap: removing
- Chromium snap: bad
- snap: bad
- problems
- snap
- forced on you
- I have this problem too
- bind mount
Annotators
URL
-
-
-
I have nothing against snap in theory, but spamming my mounts, processes, and filesystem is just too darn much
-
-
www.theregister.com www.theregister.com
-
What we didn't want it to be was for Canonical to control the distribution of software between distributions and 3rd party editors, to prevent direct distribution from editors, to make it so software worked better in Ubuntu than anywhere else and to make its store a requirement,"
-
-
github.com github.com
-
Basically the typescript compiler emits no code for interfaces, so webpack can not find them in the compiled module; except when a module consists of only interfaces. In that case the module will end up completely empty and then webpack will not investigate the exports.
-
-
medium.com medium.com
-
Knowing exactly what happens in your application can mean the difference between feeling in full control or experiencing deep frustration. Personally, unknowns drive me crazy, which in turn often leads to all sorts of experiments and/or debug sessions.
-
-
-
The CSS Zen Garden era was hugely inspirational to many.
-
-
discourse.ubuntu.com discourse.ubuntu.com
-
Repeatedly posting in this thread that there are problems, won’t actually get anything fixed.
-
The “no-snaps” ship already sailed years ago…you folks missed that boat. It’s too late to wish for a return to the past. Snaps in Ubuntu have been happening for years already, and will continue regardless of any opinions expressed here.
-
-
guides.rubyonrails.org guides.rubyonrails.org
-
You may find that your application requires a layout that differs slightly from your regular application layout to support one particular controller. Rather than repeating the main layout and editing it, you can accomplish this by using nested layouts (sometimes called sub-templates).
-
- Dec 2020
-
www.npmjs.com www.npmjs.com
-
The change is too consequential to be developed in situ.
-
-
github.com github.com
-
Can we just forward/bubble all events emitted by the underlying input element?
-
- Nov 2020
-
github.com github.com
-
@monkeythedev can your work be used already? I would suggest not yet, i'm still doing core changes every day
-
-
-
If I understand the problem correctly, just changing the imports to point to svelte/internal isn't enough because they could still point to different packages depending on how your components are bundled. It solved your specific issue, but if you had two completely unrelated Svelte components compiled to vanilla javascript bundled with Svelte, you'd still hit issues with mismatching current_component when using slots or callbacks.
-
It sounds like another case of multiple svelte/internal modules? I think we need to look into reworking how svelte/internal keeps track of the current component since it breaks when mixing components not bundled with the app. It sounds like we need to find a way to pass Svelte's internal runtime state when instantiating components, since slots and callbacks end up mixing different svelte/internal together.
-
-
opinionatedgamers.com opinionatedgamers.com
-
I’m fan of maps (in real life and in games), and the map play here is interesting
-
-
www.kickstarter.com www.kickstarter.com
-
I'm still calling this v1.00 as this is what will be included in the first print run.
There seems to be an artificial pressure and a false assumption that the version that gets printed and included in the box be the "magic number" 1.00.
But I think there is absolutely nothing bad or to be ashamed of to have the version number printed in the rule book be 1.47 or even 2.0. (Or, of course, you could just not print it at all.) It's just being transparent/honest about how many versions/revisions you've made. 
-
-
github.com github.com
-
A Chrome Extension designed with one intention: Increase the speed and privacy of your web browsing by skipping tracking redirects and removing the tracking parameters from URLs to keep them short and cleaner for sharing, bookmarking, etc.
-
-
support.google.com support.google.com
-
github.com github.com
-
It is impossible to rebuild the base from the Dockerfile as the 3rd party dependencies have changed significantly since 8 months ago when the base was last built. The tags for my base image have been overwritten and I can only restore them from a descendant image. With Docker 1.8 I simply pulled the descendant image, tagged the base layer and I was done. With Docker 1.10+ I'd need to save, then manually construct the base image descriptor and reload it. Doable but sad that it's far more complex.
-
Is anything like this possible with the new setup?
-
Unfortunately, this image was built months ago. No one has the build any more. We are left with a descendant image that has all the original content but on lower layers.
-
is there a way we can specify for image build layers to be included in the pull?
-
Sorry, I don't totally know how the internals work, but does there currently exist a workaround? By that I mean, can I pull an image, then run it at a layer other than the top layer? (I basically use this for testing purposes, its certainly possible to build the image myself then do it, but its slightly less convenient)
-
-
github.com github.com
-
So I propose having the repo in place, and using it for targeted proposals where we really want feedback from early users, and hold off formalising anything more until early next year, as you said.
-
-
github.com github.com
-
How about renaming this to something more meaningful:
-
-
-
Don't you hate to repeat yourself? For example, I hate working on anything related to user authentication or authorization that isn't directly related to the system I'm working on. I see it as necessary evil, an accidental complexity.
-
-
github.com github.com
-
It looks like you just deleted our lovely crafted issue template. It was there for good reasons. Please help us solving your issue by answering the questions asked in this template. I'm closing this. Please either update the issue with the template and reopen, or open a new issue.
Ignoring official advice
-
@evilebottnawi Closing the issue because I removed the template looks like excessive bureaucracy.
-
-
github.com github.com
-
Obviously we shouldn't rush into anything. But changes like these are best made earlier on in a project's lifecycle, so I'm eager to hear what people think so that we can start making some progress.
-
-
-
In principle, this information is already available through other means, but it is actually a fair amount of work to gather it in this form, and I think it could be useful to open it up to programmatic consumption.
-
- Oct 2020
-
github.com github.com
-
To be honest, I'm not sure what networking activity docker-compose is doing directly vs. what the docker daemon is doing.
Tags
Annotators
URL
-
-
www.basefactor.com www.basefactor.com
-
Focus on your application: forget about forms details like I'm dirty, field touched...
-
You can try to build a solution to tackle these issues on your own, but it will cost you time and money... why not use a battle-tested solution to handle all this complexity?
-
If you want to implement a form with a superb User Experience, you have to take care of many variables:
-
Form validation can get complex (synchronous validations, asynchronous validations, record validations, field validations, internationalization, schemas definitions...). To cope with these challenges we will leverage this into Fonk and Fonk Final Form adaptor for a React Final Form seamless integration.
-
Managing Form State (holding field information, check if a control has been touched, if the user has clicked the submit button, who owns the current focus...) can be tedious and prone to errors. We can get help from React Final Form to handle these challenges for us.
Tags
- too hard/difficult/much work to expect end-developers to write from scratch (need library to do it for them)
- difficult/hard problem
- fonk (form validation library)
- form design
- integration
- can't keep entire system in your mind at once (software development) (scope too large)
- tedious
- form validation
- a lot of things to consider
- don't write your own
- easy to get wrong
- complexity
- react-final-form
- form validation library
- reinventing the wheel / not invented here
- user experience
- adapter
Annotators
URL
-
-
-
But it sounds like the library could use some way to setTouched()
-
-
-
I don't want Svelte to go out of its way to try to catch all these edge cases. It would require lots of fragile heuristics in the compiler. I want a solid compiler I can trust, not something magic but often out of service. I want it the simplest possible.
-
-
-
Especially when rollup is configured with multiple outputs, I find this particular onwarn to be helpful in reducing warning clutter. It just displays each circular reference once and doesn't repeat the warning for each output:
-
I think my personal preference would be to see them all at once. Or maybe limit it to up to 10 messages and then list the count of how many more messages were not displayed. Pick your reaction
-
Another thing we could do to limit output would be to only every show the first circular dependency warning. I think we already do this for other types of warnings. Then you would need to tackle the warnings one-by-one, though.
-
It looks like your links for "this" and "that" no longer work, and I'd be really curious to see.
It looks like your links for "this" and "that" no longer work, and I'd be really curious to see.
-
-
final-form.org final-form.org
-
Wondering how to get field state from multiple fields at once? People coming from Redux-Form might be wondering where the equivalent of Redux Form's Fields component is, as a way to get state from several fields at once. The answer is that it's not included in the library because it's so easy to write one recursively composing Field components together.
-
-
stackoverflow.com stackoverflow.com
-
"doesn't work" is meaningless
-
-
-
One of the primary tasks of engineers is to minimize complexity. JSX changes such a fundamental part (syntax and semantics of the language) that the complexity bubbles up to everything it touches. Pretty much every pipeline tool I've had to work with has become far more complex than necessary because of JSX. It affects AST parsers, it affects linters, it affects code coverage, it affects build systems. That tons and tons of additional code that I now need to wade through and mentally parse and ignore whenever I need to debug or want to contribute to a library that adds JSX support.
-
Furthermore, JSX encourages bad non-dry code. Having seen a lot of JSX over the past few months, its encourages copypasta coding.
-
However, as a developer that uses JSX, I find it too useful/concise to give up in the name of syntax purity, especially when I know that what it translates to is still very isolated and computationally pure.
What does "isolated" mean in this case? Is it a different sense than how isolated is usually used in programming context?
What does "computationally pure" mean? Sounds like a bit of a vague weasel word, but this is an honest question of curiosity and wanting to understand/learn.
Tags
- too useful to give up
- syntax
- high-cost changes
- making it easy to do the wrong thing
- avoid complexity
- mentally filter/ignore
- fundamental
- engineers
- can't keep entire system in your mind at once (software development) (scope too large)
- for-reaching consequences
- isolation (programming)
- semantics (of programming language)
- engineering (general)
- infectious problem
- copy and paste
- complexity
- encourages the wrong thing
- primary task/job/responsibility
- making it too easy to do the wrong thing
- JSX
- implementation complexity
- unintended consequence
- copy and paste programming
- duplication
- the cost of changing something
- too complicated
- making it easy to do the right thing
- purity
- mental bandwidth
Annotators
URL
-
-
github.com github.com
-
Compare that with the current recommended way to add/remove fields in an array, which is very verbose and boilerplatey:
-
-
www.agileconnection.com www.agileconnection.com
-
Incurring high-cost changes isn't evolutionary design-it's oscillation caused by poor planning and requirements specification on a high cost-of-change component-it tips the anticipation/adaptation balance too far towards adaptation.
-
-
-
I don't think we want the cookbook to become a collection of tutorials regarding how to use certain libraries and tools with svelte. A set of more generic recipes or deep dives into topics would probably serve people better and have broader application.
-
-
en.wikipedia.org en.wikipedia.org
-
emphasized the disutility of 1:1 maps and other overly detailed models: "A model which took account of all the variation of reality would be of no more use than a map at the scale of one to one."
-
-
-
We are very close to full inline components (with css, js logic, and templates).
-
always end up with a boilerplate function somewhere, which feels hacky.
-
-
github.com github.com
-
It provides several capabilities that are difficult to achieve with React alone, while being compatible with the newest features of React.
-
-
github.com github.com
-
I'm not sure I understand the problem, everything you are describing is already possible.
-
-
-
focuses way too much on the getter/tracking part of the equation which is really the part you want reduce the mental bandwidth on
-
I started Solid years ago before I thought anyone would be interested in using it. I only started promoting it because it had already achieved the goals I had set out for it.
-
-
github.com github.com
-
Comparison to useReducer
-
This library is built in TypeScript, and for TypeScript users it offers an additional benefit: one no longer needs to declare action types. The example above, if we were to write it in TypeScript with useReducer, would require the declaration of an Action type: type Action = | { type: 'reset' } | { type: 'increment' } | { type: 'decrement' }; With useMethods the "actions" are implicitly derived from your methods, so you don't need to maintain this extra type artifact.
-
-
-
A new option --proximate=N groups together lines of output that are within N lines of each other in the file. This is useful when looking for matches that are related to each other.
I'd been wishing for a feature like this with grep/etc. tools.
I've had to use some really ugly workarounds (chain grep -C5 | grep -B5) which end up showing extra irrelevant context lines.
So I'm glad there's a clean way to do this now!
Tags
Annotators
URL
-
- Sep 2020
-
stackoverflow.com stackoverflow.com
-
do I really have to do something like that in order to have my local modules working? it's quite impracticable to explain it to a team! there's nothing a little bit more straightforward?
-
-
-
There are work arounds, but nothing clean. I just feel like this should be functionality that should be part of the slot feature.
-
-
github.com github.com
-
It would be tiresome - and bloated - to include a class pass-through for every component or assigning custom properties (from the RFC linked) for all potential properties on every component, just in case it's gonna be used in layouts that requires it. Wrapping them in a wrapper div is certainly an option, but potentially creates 100s or 1000s (long lists, several lists etc.) of new elements in the DOM slowing down low-end devices.
-
-
-
You must: reference each element you are extending using refs or an id add code in your oncreate and ondestroy for each element you are extending, which could become quite a lot if you have a lot of elements needing extension (anchors, form inputs, etc.)
-
the ability to pass around element names as strings in place of components
Tags
- too hard/difficult/much work to expect end-developers to write from scratch (need library to do it for them)
- could be easier / more difficult than it needs to be
- scalability
- difficult/hard
- framework taking care of responsibility so users can leverage it and not have to worry about that responsibility themselves
- I want this too
- why this feature is needed
- Svelte: problem: how to pass dynamic element name
Annotators
URL
-
-
github.com github.com
-
The feature is highly likely to be implemented, the API and implementation are the only real topics of discussion right now.
-
I am curious if this is being looked at seriously or not. This is currently an issue I keep running into when trying to build highly general purpose UI Library style component sets.
-
I keep needing this feature three times a week.
Tags
- I want this too
- "I want this too"
- API design
- idea/general proposal is accepted but still working out specific/API/implementation details
- accepting merge requests
- do it right/well the first time because it may be too hard to clean up/fix later if you don't
- okay for proposal to not be accepted
Annotators
URL
-
-
refactoring.guru refactoring.guru
-
Eliminating needless classes frees up operating memory on the computer—and bandwidth in your head.
-
-
jsrocks.org jsrocks.orgJS Rocks1
-
6to5 attempted to ship a quick and dirty TDZ static checking feature but had to retract it immediately afterwards due to various bugs in the algorithm.
-
-
svelte.dev svelte.dev
-
Your styles are scoped to the component. No more leakage, no more unpredictable cascade.
-
It's fashionable to dislike CSS. There are lots of reasons why that's the case, but it boils down to this: CSS is unpredictable. If you've never had the experience of tweaking a style rule and accidentally breaking some layout that you thought was completely unrelated — usually when you're trying to ship — then you're either new at this or you're a much better programmer than the rest of us.
-
It gets worse when you're working on a team. No-one dares touch styles authored by someone else, because it's often unclear what they're doing, what markup they apply to, and what disasters will unfold if you remove them. The consequence of all this is the append-only stylesheet. There's no way of knowing which code can safely be removed, so it's common to undo some existing style with another, more specific style — even on relatively small projects.
-
-
jsreport.io jsreport.io
-
Too much choice can be overwhelming.
-
-
daveceddia.com daveceddia.com
-
Seems like an awful lot of typing to make a simple input control, especially when Angular did all that for you.
-
- Aug 2020
-
github.com github.com
-
I really can't see how we can trust browsers accept headers. :'( More about the situation than about your statement.
-
-
github.com github.com
-
Safari sends following order application/xml (q is 1) application/xhtml+xml (q is 1) image/png (q is 1) text/html (q is 0.9) text/plain (q is 0.8) \*/\* (q is 0.5) So you visit www.myappp.com in safari and if the app supports .xml then Rails should render .xml file. This is not what user wants to see. User wants to see .html page not .xml page.
-
-
svelte.dev svelte.dev
-
It starts to get a bit boilerplatey though, especially if your component subscribes to multiple stores.
-
- Jul 2020
-
svelte.dev svelte.dev
-
Take the case of the <input> element in this component — we could add an on:input event handler that sets the value of name to event.target.value, but it's a bit... boilerplatey
-
-
-
In the Set class we already called this - and difference, which it is ok but not really accurate because of the previous explanation, but probably not worthwhile to change it.
Is this saying that the name difference is inaccurate?
Why is it inaccurate? You even called it the "theoretic difference" above.
Is that because "relative complement" would be better? Or because the full phrase "theoretic difference" [https://en.wiktionary.org/wiki/set-theoretic_difference] is required in order for it to be accurate rather than just "difference"?
-
- Jun 2020
-
www.reddit.com www.reddit.com
-
I was just expressing that, even thought I like React, I dread having to still manually handle everything, instead of just using a directive, a la Vue.JS. This is what I consider boilerplate. Hence my comment on how I could leave React for Svelte just because of that. Clearly a Svelte side-by-side code comparison shows a much cleaner code for Svelte.
-
Man, just because it gets rid of SO MUCH boilerplate I want to switch already.It kills me everytime I work with forms in React. So much noise for such a simple task.
-
-
signal.org signal.org
-
Some large tech behemoths could hypothetically shoulder the enormous financial burden of handling hundreds of new lawsuits if they suddenly became responsible for the random things their users say, but it would not be possible for a small nonprofit like Signal to continue to operate within the United States. Tech companies and organizations may be forced to relocate, and new startups may choose to begin in other countries instead.
-
-
-
Security agency frustration at the lack of lawful interception for encrypted messaging is understandable, but the problem with global over-the-top platforms is that once those weaknesses are inbuilt, they become potentially available to bad actors as well as good.
-
-
www.forbes.com www.forbes.com
-
They also argue that it cannot fall to them to determine good actors from bad—not all governments are forces for good, and who decides how each one should be treated.
-
- May 2020
-
kellysutton.com kellysutton.com
-
there’s 3 steps to building software: Make it work Make it right Make it fast
-
-
gitlab.com gitlab.com
-
Just to make this clear, I'm on the side that adding strict rules doesn't necessarily improve a situation. Especially with something that is subjective like a commit message.
-
If we can encourage people to create clean commits as they go, the example as you showed above should be far less common, because cleaning up such history as an after-math is most of the time almost impossible.
-
- Apr 2020
-
www.cnbc.com www.cnbc.com
-
For instance, one recent blog entry from the Irish Data Protection Commission discussing events at schools borders on the absurd:“Take the scenario whereby a school wants to take and publish photos at a sports day – schools could inform parents in advance that photographs are going to be taken at this event and could provide different-coloured stickers for the children to wear to signify whether or not they can be photographed,” the Commission suggested. The post goes on to discuss the possibility of schools banning photographs at a high school musical, but suggests that might be unwieldy.
-
-
www.troyhunt.com www.troyhunt.com
-
many organisations block torrents (for obvious reasons) and I know, for example, that either of these options would have posed insurmountable hurdles at my previous employment
-
Actually, I probably would have ended up just paying for it myself due to the procurement challenges of even a single-digit dollar amount, but let's not get me started on that
-
- Mar 2020
-
www.adrianjock.com www.adrianjock.com
-
I don’t know anymore whether something is still legal or not
-
- Feb 2020
-
about.gitlab.com about.gitlab.com
-
Not every problem should lead to a new process to prevent them. Additional processes make all actions more inefficient, a mistake only affects one.
-
-
www.core-econ.org www.core-econ.org
-
Market competition provides a mechanism for weeding out those who underperform.
Note how this has failed in the current guilded age of the United States where it is possible for things to be "too big to fail".
-
- Jan 2020
-
github.com github.com
-
Hypothesis considers a "close enough match" to be a success and does NOT place the corresponding annotation in the Orphan category, thus creating a false positive.
-
-
github.com github.com
- Dec 2019
-
stackoverflow.com stackoverflow.com
-
Basically, the standard said something, interpreters ignored it because the standard seemed illogical, but now interpreters like Bash have really confusing semantics, and no-one wants to fix it.
-
- Oct 2019
-
-
For the uninitiated, Granny Smith was Maria Ann Smith, a resident of the area who in 1868 "accidentally" grew the first batch of green apples that now bear her name.
Yes, good thinking. Throw in a truthful fact or two. Impressive!
-
- Jul 2019
-
-
but Salt Lake City’s cost of living is 16 percent lower than in Denver, 37 percent lower than Seattle’s and 48 percent under San Francisco’s, according to PayScale. The state — often led personally by Governor Gary Herbert — pitches its advantages well to firms considering relocation, says Joe Vranich, whose consulting firm helps small businesses looking to move. “They will roll out the carpet for you and treat you like a king.” The approach is working. Utah’s “Silicon Slopes”
Utah's low cost of living attracts tech companies to operate in Utah. This will make more outsiders to relocate to Utah for jobs which can further aggravate the burden of housing shortage and pricing.
-
- Mar 2019
-
-
Now, iPhone sales are finally leveling off, and at $1,000-plus, they’re pushing the limits of what people are willing to pay.
yikes
-
- Jan 2019
-
static1.squarespace.com static1.squarespace.com
-
symmetrical faith in our access to representationsover things
"Language has been given too much power."
I'm finding it helpful to repeat that phrase when I don't understand what she means.
-
-
foucault.info foucault.info
-
excessive reading has a scattering effect: “In reading of many books is distraction.”
I feel personally attacked. ;)
-
- Dec 2017
-
crumplab.github.io crumplab.github.io
-
cles For journal articles, the generic format for a reference is as follows: Author, A. A., Author, B. B., & Author, C. C. (year). Title of article. Title of Journal, xx(yy), pp–pp. doi:xx.xxxxxxxxxx
-
Presenting your research
i wish this was closer to the beginning of the book since we had to do papers before we covered this chapter.
-
- Jan 2017
-
plantsinaction.science.uq.edu.au plantsinaction.science.uq.edu.au
-
A plant science manifesto
During the Spring 2017 semester, students taking a plant physiology course at Dickinson State University will be publicly annotating chapters from this online textbook.
-
- Apr 2016
-
www.sanders.senate.gov www.sanders.senate.gov
-
Sanders Is Right About Busting Up the Big Banks By: Robert Reich
-