12 Matching Annotations
- Nov 2023
-
github.com github.com
-
So then they put it into lib only to find that they have to manually require it. Then later realize that this also means they now have to reboot their server any time they change the file (after a painfully long debugging time of "why what aren't my changes working?", because their lib folder classes are now second-class citizens). Then they go down the rabbit hole of adding lib to the autoload paths, which burns them because rake tasks then all get eager loaded in production. Then they inevitably realize anything inside app is autoloaded and make an app/lib per Xavier's advice.
-
I think the symmetry of the naming between lib and app/lib will lead a fresh Rails developer to seek out the answer to “Why are there two lib directories?", and they will become illuminated. And it will prevent them from seeking the answer to “How do I autoload lib?” which will start them on a rough path that leads to me advising them to undo it.
-
- Aug 2021
-
-
Now consider we want to handle numbers in our known value set: const KNOWN_VALUES = Object.freeze(['a', 'b', 'c', 1, 2, 3]) function isKnownValue(input?: string | number) { return typeof(input) === 'string' && KNOWN_VALUES.includes(input) } Uh oh! This TypeScript compiles without errors, but it's not correct. Where as our original "naive" approach would have worked just fine. Why is that? Where is the breakdown here? It's because TypeScript's type system got in the way of the developer's initial intent. It caused us to change our code from what we intended to what it allowed. It was never the developer's intention to check that input was a string and a known value; the developer simply wanted to check whether input was a known value - but wasn't permitted to do so.
-
- Jun 2021
-
www.migrationencounters.org www.migrationencounters.org
-
I've never felt challenged by any of my teachers. All their curriculums I've laughed at. I run circles around my teachers and most of them hated me because I'd finish my work and I'm pretty sure they hated me. I remember this lady. What was her name? I don't remember her name, but she was redheaded with glasses. She fucking hated me, man, because I'd laugh at pretty much all her work. I'd finish it in seconds and she'd get so frustrated with me because she's like, "Ugh. What am I supposed to do with you?"
Time in the US, School, Teachers
Tags
Annotators
URL
-
- Feb 2021
-
-
Writing the uniqueness validations yourself is easy so I felt it was better to leave this up to the developer
-
- Dec 2020
-
github.com github.com
-
Can we just forward/bubble all events emitted by the underlying input element?
-
- Oct 2020
-
www.basefactor.com www.basefactor.com
-
If you want to implement a form with a superb User Experience, you have to take care of many variables:
-
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
- a lot of things to consider
- difficult/hard problem
- user experience
- can't keep entire system in your mind at once (software development) (scope too large)
- tedious
- too hard/difficult/much work to expect end-developers to write from scratch (need library to do it for them)
- form design
- easy to get wrong
Annotators
URL
-
-
-
But it sounds like the library could use some way to setTouched()
-
-
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.
-
-
-
Furthermore, JSX encourages bad non-dry code. Having seen a lot of JSX over the past few months, its encourages copypasta coding.
-
- May 2020
-
kellysutton.com kellysutton.com
-
there’s 3 steps to building software: Make it work Make it right Make it fast
-