Alexi 🦄 🚀 🐶
1.6K posts

Alexi 🦄 🚀 🐶
@alexi_be3
const alexi = { occupation: 'software engineer @Strava', interest: 'javascript', hobby: '🏃', ✏️: 'https://t.co/7upvQB3u3U' };
San Francisco, CA Katılım Nisan 2009
562 Takip Edilen155 Takipçiler
Alexi 🦄 🚀 🐶 retweetledi

@t3dotgg 017 is a valid octal number, making it 15, while 018 is not and is treated as a decimal, making it 18.
English
Alexi 🦄 🚀 🐶 retweetledi

Scroll shadows are cool, but these scroll... indicators? are perhaps even more clear that there is more content to see in a specific direction. Plus they are powered by CSS' new Scroll Timelines feature with deliciously little code.
codepen.io/shuding/pen/WN…
English
Alexi 🦄 🚀 🐶 retweetledi

All this ditching TypeScript notion that emerged recently sets a dangerous precedent. As things often are online, people seldom go into due detail when explaining decisions. Bright titles scream the loudest, I suppose. I should probably put this into an article but I'll start from here.
One of the common complaints about TS is the need to bring in a compilation step. Despite the compilers being generally fast, with experimental third-party compilers even bringing that to outstanding speed, I share the outlook that no compilation is the best outcome. But that hasn't been the case for JavaScript (yes, you've not misread) for almost a decade now. Apps were built by Babel when I started my engineering career in 2016, and they are still built by Babel or other tooling. The compilation step was always there, and I dare say it will remain there, regardless if you're using tools like TypeScript or not.
The community has long seemed to realize that same as CSS and HTML are unmaintainable in their raw form, so is JavaScript. There will always be a shiny Stage 0 experimental syntax you want to try. There will always be browser-specific bugs. There will always be the need to mangle, compress, minify, sign, tree-shake, dedupe... You will always need a compiler.
ESM tries to bring modern JavaScript to the browsers. I don't know in what universe the folks live who abandon TypeScript, but the last time I checked ESM-only web is but a distant dream. Five years from now, maybe. Likely ten. Let's speak about it when that time comes.
The second most common complaint is the mental and resource overhead when writing types. I get it, types are hard, they are. Nobody wants to spend time fighting a nested generic when there are features to ship or bugs to be fixed. Until you realize that time spent on types pays off. Suddenly, feature releases get smoother, and bugs are caught even before they are pushed to remote because type-checking is, essentially, a static test. I don't hear folks complaining about other strictly-typed languages. Somehow, there, over the hill, the type-safety makes sense, but not in TypeScript, no. I never understood that. Perhaps people who claim this have never seen a production database go down due to a wrong data type being written. Or never fixed issues where a chunk of data suddenly changes its type 10 levels down the transformation tree. Or never seen plain JavaScript cause products to loose revenue and customers due to the poor quality of the written code.
Writing pure JavaScript is like trying to cut a watermelon with a chainsaw in the dark. It sounds fun and free and quite easy until there's a roomful of mess to clean up. I suppose some can live and thrive in that mess. In the end, everyone decides for themselves.
I've been using TypeScript for 4 years now and I'm not planning to switch to anything else. It's a unique tool in its proximity to plain JavaScript and high return values that have been helping me ship reliable code for years. It's also a well-written and actively maintained tool, which only plays in its favor.
English
Alexi 🦄 🚀 🐶 retweetledi

Array vs T[] - which should you use in TypeScript?
I think the difference is close enough to be subjective - but here's everything I know:
The two syntaxes are functionally identical - you can use them interchangeably.
keyof T[] is a massive gotcha. Instead of it resulting in ('id' | 'name')[], it does a keyof on 'person[]'.
This instinctively makes me lean towards Array.
TypeScript's errors and hovers always use the T[] syntax.
This means that using T[] feels more natural, is more supported in the docs, and leads to less cognitive load for beginners.
What would I recommend? The decision is too close to be objective about. Would I reject a PR containing one or the other? No.
But if pushed, I would choose T[] - it just feels natural.



English
Alexi 🦄 🚀 🐶 retweetledi
Alexi 🦄 🚀 🐶 retweetledi

Shopify deleted 12,000 meetings this year.
Today, they went a step further with a tool that shows the $$$ cost of holding meetings.
I spoke to @nejatian (Shopify's COO) about meeting bloat and protecting craft time.
Here are 6 spicy takes from our interview 👇

English
Alexi 🦄 🚀 🐶 retweetledi
Alexi 🦄 🚀 🐶 retweetledi

Introducing Plate: the modern rich-text editor for React.
github.com/udecode/plate
◆ Core: Plugin system.
◆ Plugins: 50+ Headless, unstyled packages.
◆ Primitives: State and behavior hooks.
◆ Components: @radix_ui + @shadcn ui.
Free. Open Source. Responsive. Dark Mode.
English
Alexi 🦄 🚀 🐶 retweetledi


A thread of Benji on film.
📷 Pentax k1000
📍Golden Gate Park threads.net/t/CuWC8JOL4oR/…
English

Hello @threadsapp, here’s a video of Benji boy 🐶 what a majestic, chubby pup. threads.net/t/CuWBS9lPcmw/…
English

A great read by favorite author @katie_cakes7 “On Body Image and Identity” by Kaitlyn Kuehn
link.medium.com/kH6r8FKjXyb

English
Alexi 🦄 🚀 🐶 retweetledi










