New pinned tweet: interesting Autumn!
🧑🏫 I teach UI Testing best Practices for the 13th time 😱
🗣️ 2 talks for and
📄 I'll publish some articles for sure
As usual, here is the list of the previous articles/talks/courses ❤️
Stefano Magni
@NoriSte
Passionate, positive-minded / Front-end Tech Leader (platform) / Speaker / Instructor / Author of UI Testing Best Practices / Remote worker
Stefano Magni’s Tweets
Interesting commit message-related article. I discussed this approach with and in the past when said to me "your PR descriptions are great but they live on GitHub instead of the Git history..." (PR description article here: dev.to/noriste/suppor )
Quote Tweet
Replying to @AdamRackis @Swizec and @jody_lecompte
Really have to disagree here. I have a blog post that touches on that topic: tkdodo.eu/blog/avoiding-
But I have to admit that I don't care as much anymore as I did when I wrote that article, because it's too hard to align a whole team on that. I still do it personally
1
1
Show this thread
"building a successful platform team at Croz": an interesting deep dive about the processes, the dynamics, the organization of this platform team.
Following: the link with my annotations
I recently watched this great Nx Custom Generators talk
youtube.com/watch?v=b0pk_t
perfect to let you imagine its potential in a multi-team product 🚀
Thanks for sharing 😊
2
Interesting, well-explained, and full-of-resources-linking article about callback refs and uncontrolled compound components 😊
Quote Tweet
Show this thread
1
Very interesting engineering productivity-related thread 😱
Quote Tweet
In the last 9 months, working with leaders in the @stripe Developer Productivity org, I advocated for and established a team and a measurement framework to understand and improve the software engineering experience at @stripe.
Show this thread
Uh, I forgot about this awesome utility!! Just installed it and yes, it's the coolest way to check a file's history!!
Quote Tweet
I forgot this tool exists but @pomber's "Git History" is probably still the most convenient way to check a file's history out there.
githistory.xyz
Video alt: Inspecting a file's history by using the keyboard to show file additions/deletions.
Show this thread
0:22
117.2K views
And while speaking about ESLint + TypeScript... here are some superb advice
Quote Tweet
Replying to @TkDodo @mattpocockuk and @tseslint
Hi hi
!
My biggest +1 for @tseslint is using the recommended-requiring-type-checking config -- and once you feel comfortable with that, the strict config. They have a lot of great stuff that @TkDodo mentioned!
typescript-eslint.io/docs/linting/c
1
I like leveraging linters as much as possible to get less-ambiguous code. Here is a way to remove unnecessary conditions 😊
Quote Tweet
Replying to @mattpocockuk and @tseslint
no-unnecessary-condition is my favorite rule. E.g. if you refactor from required to optional, TypeScript will naturally tell you to add a check. But the other way around, it won't because it doesn't matter for correctness. But @tseslint does care about those unnecessary checks
1
I tweet it to be sure I do not forget about it again: Jest has a nice `test.failing` API
A great, interactive, functional React component and hooks lifecycle timeline ❤️
You deserve to be proud of that, Jules!!
Quote Tweet
Proud to publish my latest blogpost: an interactive diagram showing how a React component with hooks run. It includes a quiz too with some tricky React Riddles to test your knowledge. Check it out julesblom.com/writing/react- #react
Show this thread
0:04
38.3K views
2
I love this super-simple and tree-shakable env/prod detection!!! 😱
Quote Tweet
this was built for SvelteKit, so that we can do things like
import { DEV } from 'esm-env';
if (DEV) {
do_expensive_validation();
}
and it will be shaken out of client bundles, without any bundler configuration. but you can use it anywhere! twitter.com/puruvjdev/stat…
Just used for one of the following Hasura features to cast a convert an input field value into a numeric value 😊
Quote Tweet
z.coerce is a SUPER cool feature of the new Zod release.
Lets you really easily parse search params into numbers/strings/booleans, and errors if they can't be coerced. Really nice.
Show this thread
2
Exciting packaging/modules lint tool!
cc
Quote Tweet
Found this PubLint tool by @bluwyoo really useful to debug packaging issues.
publint.bjornlu.com
I've got 1 warning and 1 error in the `exports` field structure to fix.
Show this thread
1
I partially forgot about Error's cause API 😊 I have just set it up before sending some error to Sentry 😊
Quote Tweet
Problem: You want to re-throw a JavaScript error to provide a friendlier error. But, you want to keep the original error details too.
Solution: Include the original error via `cause`.
More: developer.mozilla.org/en-US/docs/Web
#javascript
1
Until now, this is the best article I read (maybe also because it's one of the few about UI-Platform teams, since usually the platform is the infrastructure)
Thinking in platform - What does it mean to be in a UI Platform team
1
Show this thread
It's important to keep it in mind, especially when you have you deal with a high technical debt every day and prioritizing efforts could be hard. We are also reading other companies' Platform-related stories to gather useful feedback without reinventing everything
👇
1
Show this thread
In we are now split in Feature teams and one Platform team. The mindset transition requires time, either for the company and for us.
As part of the Platform team, we need to be sure we prioritize our customer needs, and our customers are... Feature team's engineers! 👇
1
Show this thread
TIL: Class Variance Authority! If you have a big clsx mess in your components, maybe you could give it a shot 😊 Here is the repo
github.com/joe-bell/cva#r
And here is the great introduction by
youtube.com/watch?v=T-Zv73
thanks for sharing 😊
1
1
2
Show this thread
Uh, something to give a shot if you care about showing/explaining code ♥️
Quote Tweet
Replying to @mattpocockuk
we have a small discord for this type of tools if you wanna join codeexplainers.com
The new Visual Regression Testing chapter of UI Testing Best Practices is out, thanks to ❤️
2
17
How to recreate a Flash Player from scratch to save your games... ❤️
I can recall the early years of my career working with ActionScript, then Starling and Adobe AIR... 😍 anyway, let's go back to the article, what Robin did s frigging cool 😱
Quote Tweet
I've written an article about the process of bringing Hapland Trilogy to Steam: foon.uk/how-flash-2022/
#gamedev
1
A thread that's worth if you need to debug... TypeScript itself 😊
Quote Tweet
What are the best ways to "debug" @typescript types? Is there some tooling magic available here?
I'd love to be able to "inspect" how Typescript came to the conclusion on a particular type inference.
1
Does a server object contains more properties than the ones the UI needs? Type them only if the UI has an active role (ex., must send back the unused properties)
1
Show this thread
Does the API throw 10 exceptions, but 8 are prevented by the form validation? Type and manage only 2!
You can leave a comment or type down the errors as `Error1 | Error2 | unknown` if you want to be sure the error management scales.
1
Show this thread
Does the API accept 10 things, but the UI needs 2? Type only 2!
You can leave a comment in the code pointing to the server docs to look for more options, but do not write the types. You have to maintain them then!
1
1
Show this thread
If you have to write the TS types for your server APIs/DTOs because they are not provided... write ONLY the ones the UI needs! Typing only the part of the server consumed by the UI is more resilient and less tedious...
1
5
Show this thread
Indeed! And I always push for these low-indent rules in code reviews because readability is usually underrated while writing code 😊
youtu.be/CFRhGnuXG-4
Quote Tweet
What tools are out there for animating code?
This YT channel is EXTREMELY inspiring. I'd LOVE to make stuff like this, but I have no idea where to start.
youtube.com/@CodeAesthetic
The whole thread is one of the lot of "React 18 strict mode ruins everything here" but I think it's a bit more interesting than the usual ones 😊
Quote Tweet
Replying to @aaronmcadam @leepowell and 2 others
I second the synchronization model. Before StrictMode I was often treating useEffect as declarative change detection. Now I've started to find events instead & my code has generally improved with fewer hard-to-follow useEffect chains + missing deps. e.g.
read image description
ALT
1
Sort-of Copilot for the terminal?!? 😱❤️
Quote Tweet
0:49
57.9K views
1
3
I remember sharing a hypothetical new API for @xstate/react that allowed to keep the machine's context in sync with a React component state ... am I wrong?
I'm doing this, but I am not sure that using events to update the context is the most idiomatic solution...
2
2
The great (❤️) wrote a great new chapter for UI Testing Best Practices and we are in the process of reviewing and discussing it. The topic is visual regression testing, if you want to have a sneak peek, here is the PR
6
Wow, type narrowing for the win!!!
Quote Tweet
const modifiers for type parameters are coming to TS 5.0, I had a feeling that this might happen soon
loving, loving it
declare function bar<const T>(obj: T): T;
bar([1, 'foo']) // readonly [1, 'foo'], and not (string | number)[]
github.com/microsoft/Type
Show this thread
1
When you have a finite number of strings, this is extremely useful to keep type safety and improve the DX! Try it against a union of strings...
Quote Tweet
1:58
2

















