Typescript lover, UI puppeteer and button painter... Engineer student in Applied Mathematics turned developer Educated at Polytech

Strasbourg, France
Joined February 2018
Alexandre Hassler retweeted
I just (re-)found one of the earlier Stack Overflow answers that had a profound impact on how I designed @solid_js. Posting it here so I don't lose it again. stackoverflow.com/a/6797091
5
12
2
156
Alexandre Hassler retweeted
The combination of useEffect and useState tends to causes problems Not because they're bad hooks (they're not; they're extremely useful), but because they're really easy to misuse
People give `useEffect` a bad rap, but it isn't usually the source of the problem. The real problem is too many `useState`s. Devs fail to see how their data is connected and model it too discretely. As those connections appear, it is easier to synchronize than refactor the model. And once you start down that path it becomes harder to refactor because you can't see the dependencies. You can't just look at the data declaration and be like "oh it depends on this." You have to find all the places you write to it, what those locations depend on, and what writes to those.
5
2
67
Alexandre Hassler retweeted
People give `useEffect` a bad rap, but it isn't usually the source of the problem. The real problem is too many `useState`s. Devs fail to see how their data is connected and model it too discretely. As those connections appear, it is easier to synchronize than refactor the model. And once you start down that path it becomes harder to refactor because you can't see the dependencies. You can't just look at the data declaration and be like "oh it depends on this." You have to find all the places you write to it, what those locations depend on, and what writes to those.
Alexandre Hassler retweeted
I started this being sceptical, I am now fully convinced code will quickly become a commodity, what database library or UI framework we use won’t matter anymore, the only differentiation is the programmer ability to understand design decisions deeply and skills in using models
4
2
1
70
Alexandre Hassler retweeted
accordion transitions w/ css ::details-content, <details> + <summary> 🧑‍🍳 details:has(~ [open]) { --y: -1; } [open] ~ details { --y: 1; } details { translate: 0 calc(var(--y) * 1rem); } [open]::details-content { height: fit-content; }
Accordion interaction ✨ Built with @motiondotdev and inspired by @nitishkmrk
27
86
3
1,498
0
Alexandre Hassler retweeted
I saw a lot of people assuming that the jelly slider only lives on the web, but thanks to react-native-wgpu by @wcandillon it can also live inside your React Native app. The shader code stayed the same since it’s all TypeScript, and the TypeGPU plugin works with both Vite and Babel. The only change was event handling, made easy by react-native-gesture-handler.
Alexandre Hassler retweeted
Testing... 👨‍🔬
8
3
128
0
Alexandre Hassler retweeted
tool iteration 👨‍🍳 drag source/destination to refine responsive CSS motion path timings ⚡ .p { animation: x .8s var(--x-time), y .8s var(--y-time); animation-composition: accumulate; } @​keyframes x { to { translate: var(--x) 0 } @​keyframes y { to { translate: 0 var(--y) }
when the tool is missing, make it 👨‍🍳 motion path visualizer w/ SVG for accumulated cubic-bezier timed CSS animations ⚡
Alexandre Hassler retweeted
This seems so valuable. I haven't tried it so I can't talk to how effective it is today, but the amount of time I'm spent blundering around in DevTools there trying to isolate performance impact is not insignificant.
New in @ChromeDevTools! Debug an app's full performance trace with Gemini! After recording a trace, you can now chat with Gemini about the entire trace, related Performance insights, and even connected field data - all without needing to select specific context beforehand!
3
8
172
Alexandre Hassler retweeted
in 2020 i started recreating the stamps my grandpa collected, it was a small lockdown project that sort of grew into a digital collection of my own. now, @rpavlini and I built an online philately experience where you can explore them and zooooom in like a true philatelist
Alexandre Hassler retweeted
After the renaissance of server-first web architectures over the last 5 years, it's time for a reality check. We don't need to rearchitect our apps to be server-first. SPAs are good. We just need better ways to leverage the server. We need isomorphic-first.
Since people seem to interested in alternative Server Component architectures, might as well publish the source. These documents are rough, basically brain dumps. But I think thanks to Tanstack there is interest. "Isomorphic First Framework" hackmd.io/@0u1u3zEAQAO0iYWVA…
Alexandre Hassler retweeted
Since people like pictures. I've used this before but this is why I find this direction compelling. I honestly don't have any ambition left of eCommerce. But I don't want to give up anything on the right side.
Since people seem to interested in alternative Server Component architectures, might as well publish the source. These documents are rough, basically brain dumps. But I think thanks to Tanstack there is interest. "Isomorphic First Framework" hackmd.io/@0u1u3zEAQAO0iYWVA…
Alexandre Hassler retweeted
Animation did for recent website we making for Apptics
Alexandre Hassler retweeted
Claude basically one shotted this. Wish I was kidding
Alexandre Hassler retweeted
Agents are Actors, some Actors are Workflows so some Agents are well represented by workflows but generally speaking Actors are better for this. Think about an agent as a human, we are entities that communicate via messages we are not deterministic algorithms
6
4
2
74
Alexandre Hassler retweeted
We often see people using the word "random variable" (RV), but their mathematical definition is unclear to most. Here is an attempt at a TL;DR to give an intuition. 1/11 P.S. Okay, now that I have written it, I fear it won't help
Alexandre Hassler retweeted
Math and ML → Part 1: The Mathematical Foundation of Regularization Regularization is one of the most crucial techniques in machine learning for preventing overfitting. But have you ever wondered why it actually works from a mathematical perspective? The Problem: When a model overfits, it essentially memorizes the training data instead of learning the underlying patterns. This leads to excellent performance on training data but poor generalization to unseen test data. The Mathematical Root Cause: Let's dive into the math In ordinary linear regression (first equation), we estimate parameters (θ*) by solving a system of equations. Here's where things get tricky: When your feature matrix exhibits high multicollinearity (features are highly correlated), certain columns become linearly dependent on others. Mathematically, this drives the determinant of the matrix toward zero, making it singular or leaning more towards a singular matrix. The problems? The inverse becomes unstable, leading to: >Unreliable parameter estimates >Extreme coefficient values >Poor model generalization And here's the reality: Multicollinearity isn't some edge case; it's incredibly common in real world datasets. The Mathematical Solution: Regularization, look at the second equation. Notice how the regularization parameter (α) is added to the diagonal of the matrix? By adding αI to X^T X, we're mathematically guaranteeing that the matrix remains invertible, regardless of multicollinearity in the original data. Even when X^T X is singular, (X^T X + αI) is always invertible for α > 0. This ensures: >Stable parameter estimation >Controlled coefficient magnitudes >Better generalization to new data This is Part 1 of my "Math & ML" series, where I'll bridge the gap between mathematical theory and practical machine learning. I want to show you the "why" behind the algorithms, not just the "how." If you found this insightful and want more content connecting mathematics to ML intuition, let me know in the comments! Retweets appreciated to help others discover the mathematical beauty in ML!