13 Matching Annotations
- Mar 2025
-
github.com github.com
-
The goal of Lucia v3 was to be the easiest and cleanest way to implement database-backed sessions in your projects. It didn't have to be a library. I just assumed that a library will be the answer. But I ultimately came to conclusion that my assumption was wrong. I don't see this change as me abandoning the project. In fact, I think it's a step forward. If implementing sessions wasn't easy, I wouldn't be deprecating the package. But why wouldn't a library be the answer? It seems like a such an obvious answer. One word - database. I talked about how database adapters were a significant complexity tax to the library. I think a lot of people interpreted that as maintenance burden on myself. That's not wrong, but the bigger issue is how the adapters limit the API. Adapters always felt like a black box to me as both an end user and a maintainer. It's very hard to design something clean around it and makes everything clunky and fragile, especially when you need to deal with TypeScript shenanigans.
Tags
- when not to create a library
- creating/using library vs. copying code
- too easy/simple/trivial for end-developers to write from scratch to expect (don't need library to do it for them; don't need to provide feature)
- when not to create a library: too hard to support/maintain the many ways it would need to be flexible
Annotators
URL
-
- 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
- too hard/difficult/much work to expect end-developers to write from scratch (need library to do it for them)
- form design
- can't keep entire system in your mind at once (software development) (scope too large)
- easy to get wrong
- user experience
- a lot of things to consider
- difficult/hard problem
- tedious
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
-