Matthew Phillips Profile
Matthew Phillips

@matthewcp

4,188
Followers
1,363
Following
1,009
Media
31,610
Statuses

CTO @ The Astro Technology Company Co-creator of @astrodotbuild . Building Yums, ()

Louisville, United States
Joined April 2008
Don't wanna be here? Send us removal request.
Pinned Tweet
@matthewcp
Matthew Phillips
7 months
This is a prototype web interface for . It looks like an ordinary recipe site, but this is actually an email client. An email client that only reads emails saved with , optimized for recipe viewing. ๐Ÿฝ
4
2
25
@matthewcp
Matthew Phillips
2 years
If you're ever feeling bad about an API you designed just remember that someone thought Cache-Control: no-cache should mean to, in fact, cache.
35
220
2K
@matthewcp
Matthew Phillips
6 months
Unpopular opinion: Don't use http verbs PUT, PATCH, DELETE. Just use POST for everything. Reasons: - <form> doesn't support the others. Frameworks that allow it do so through hacks. - URLs are free, you don't gain anything by overloading them. - Purity < practicality
345
77
1K
@matthewcp
Matthew Phillips
2 years
.js, .mjs, .cjs, .jsx, .ts, .tsx, .cts, .mts, what have we done.
66
118
1K
@matthewcp
Matthew Phillips
1 year
Serverless: "what if we made basic things like connecting to a database as hard as fuck?"
16
68
1K
@matthewcp
Matthew Phillips
5 years
Announcing Robot ๐Ÿค– . A new library for building finite state machines that is: ๐Ÿ•บ 1kB ๐Ÿคบ Functional ๐Ÿ’ƒ Fun
21
138
819
@matthewcp
Matthew Phillips
3 years
Anyone else decoded some HTML today?
62
42
783
@matthewcp
Matthew Phillips
2 years
Feels like GraphQL is a technology on its way out.
103
38
742
@matthewcp
Matthew Phillips
9 months
Announcing ๐Ÿ‘‡ is a recipe storage system built on top of email. Find a recipe you like, send an email to `save @yums .email` and you'll get an email back with the recipe nicely formatted. See for more.
37
62
530
@matthewcp
Matthew Phillips
3 years
Announcing the alpha release of Lucy, a new DSL for finite state machines and statecharts that compiles to XState machines. What CSS does for styling, Lucy aims to do for runtime logic. Checkout Lucy at
31
118
512
@matthewcp
Matthew Phillips
5 months
I still see people using <script type="text/javascript"> and <link type="text/css"> all the time Why are you doing this, it hasn't been necessary in like 10 years!
97
21
459
@matthewcp
Matthew Phillips
2 years
Announcing Corset, a new approach to declarative DOM binding! Corset is an alternative to frameworks like React and Vue. Instead of JSX/templates, you use a CSS-like DSL to bind to the DOM that already exists. This difference has profound implications ๐Ÿ‘‡๐Ÿผ
21
82
423
@matthewcp
Matthew Phillips
19 days
Career upgrade today ๐Ÿ“ˆ: I'm now CTO at The Astro Technology Company ( @astrodotbuild ) Thank you @FredKSchott for continuing to believe in me. And to all of core and the community for putting up with me. Let's keep ๐Ÿšขing.
40
5
308
@matthewcp
Matthew Phillips
11 months
This is amazing! Remember that a browser is a *user* agent. It represents the user's wishes, not websites. Websites have had 30 years in charge of things and they failed. Take the web back, for the user.
@browsercompany
The Browser Company
11 months
What if the internet... was actually ๐‘ฆ๐‘œ๐‘ข๐‘Ÿ internet? ๐ŸŽจ Introducing Boosts 2.0 โ€” only in Arc
492
2K
14K
12
21
287
@matthewcp
Matthew Phillips
1 year
We need to have a talk about the recent trend among frameworks to promote a sort of pseudo-JavaScript. It looks like JS, but the semantics are not the same. The semantic are also not documented, because the point is to trick you into thinking it's normal JS.
27
29
295
@matthewcp
Matthew Phillips
2 years
Find someone who loves you as much as the React team loves tweeting about how much better their unreleased projects are than current tech.
11
13
277
@matthewcp
Matthew Phillips
9 months
Today we released Astro 2.9 which comes with *experimental* support for View transitions. View transitions is a new browser API that makes it easy to build smooth transitions when navigating pages.
9
28
275
@matthewcp
Matthew Phillips
2 years
Remember when "tree shaking" was the miracle solution to all of your JS size problems?
13
10
251
@matthewcp
Matthew Phillips
2 years
I'm pretty strongly in the "components should never do data loading" camp now. turns out MVC was right.
21
15
236
@matthewcp
Matthew Phillips
9 months
Quick demo, working on DOM persistence in the @astrodotbuild ViewTransitions router. The idea is you can add `transition:persist` to an element or island you want to keep state for and it will be transferred over to the new page. Will make a nicer demo for later :D
10
15
224
@matthewcp
Matthew Phillips
9 months
Shout out to whoever came up with the names `atob` and `btoa` for trolling us all.
10
5
214
@matthewcp
Matthew Phillips
6 months
Prop-drilling is a derogatory term for "passing arguments to a function". The fact that passing required arguments to a function is considered to be something that's so abhorrent that it deserves a term specifically for it, is a massive ๐Ÿšฉ for component-oriented architecture.
55
16
212
@matthewcp
Matthew Phillips
2 years
Any updates on this issue?
35
16
212
@matthewcp
Matthew Phillips
10 months
Great video about why you should use S3 for your file uploads.
@t3dotgg
Theo - t3.gg
10 months
Bleed Responsibly - an overdue rant
Tweet media one
53
9
204
7
7
198
@matthewcp
Matthew Phillips
2 years
I wish TypeScript was aware of throws. And you could declare a function as never throwing and it would tell you if it ever could because a child function throws.
28
7
194
@matthewcp
Matthew Phillips
8 months
Is it possible to build a successful open source project in 2023 without being a comedian?
25
4
192
@matthewcp
Matthew Phillips
6 months
There are too many things in Astro 3.5 than what we could fit into the announcement tweet. So I'll go over a few here. ๐Ÿงถ
5
21
185
@matthewcp
Matthew Phillips
1 year
If you find yourself wishing that () returned a cached value and not, you know, the current timestamp, it's time to take a step back and introspect whether you're building the right thing.
10
10
185
@matthewcp
Matthew Phillips
5 months
We released Astro 4 today, here's why and what's included ๐Ÿ‘‡
6
19
186
@matthewcp
Matthew Phillips
6 months
Remember when the Chrome dev account produced a whole animated short for the following diff?
Tweet media one
@ChromiumDev
Chrome for Developers
7 months
New name. Same Chrome. We launched our browser 15 years ago, and since then we've been dedicated to simplifying web development. Thanks for sharing this journey with us. Here's to the next 15 years of partnering to build a powerful web! Sound on! ๐Ÿ”Š
21
39
212
5
6
180
@matthewcp
Matthew Phillips
3 months
I wrote a blog post. You can read it by running: ssh -p 2062
42
16
181
@matthewcp
Matthew Phillips
5 years
Announcing Haunted: The same React Hooks API you know and love, but for standard web components and lit-html:
11
46
174
@matthewcp
Matthew Phillips
6 months
A lot of y'all weren't around, but when ES6 came out there was a group of prominent devs who hated it and kept using ES5 (var and whatnot) for several years later. Most dropped out of the community but some did eventually convert.
13
7
157
@matthewcp
Matthew Phillips
4 years
I'm building a performance-oriented meta-framework ala create-react-app, Next.js, etc. My goal is to take all of the performance related features of today's web and make them convenient to use. No trading away UX for DX. This thread goes over things I'm working on. (updated)
3
6
157
@matthewcp
Matthew Phillips
2 years
How I avoid `any` in my codebases: type whatever = any; addOne("foobar" as whatever);
7
8
157
@matthewcp
Matthew Phillips
1 year
Which is more likely? 1. Twitter is intentionally slowing down their website to push people towards mobile. 2. This fixes a race condition some poor engineer didn't have time to properly diagnose b/c gotta hit those commit quotas.
@rauchg
Guillermo Rauch
1 year
@charliermarsh I actually might have figured it out. There's a `5000` constant here and `waitUntil`
Tweet media one
31
78
895
12
9
155
@matthewcp
Matthew Phillips
2 years
Why can't Tailwind users just like Tailwind and not constantly insult and shame people into conformity.
23
4
155
@matthewcp
Matthew Phillips
1 year
Fuck it, I'm learning Laravel.
22
2
147
@matthewcp
Matthew Phillips
2 years
Caching is the last thing you do to make something fast, not the first. A slow thing is slow no matter how much you cache its slowness. If you see a tool bragging about its caching techniques and not its algorithms you should be skeptical of how well it will work in practice.
8
15
148
@matthewcp
Matthew Phillips
6 months
What does it say about web development that in 2023 we still can't style a select element (no disrespect to Open UI, you're doing the lord's work) but there is an API (sendBeacon) designed specifically to ensure that analytics data gets to the server under all circumstances.
7
10
141
@matthewcp
Matthew Phillips
3 years
Monorepos are actually kind of a pain.
22
2
136
@matthewcp
Matthew Phillips
2 years
@Brocco @BenLesh Developers will write 5 layers of TS generics to help clarify a function argument but won't type a semicolon to clarify the end of a statement.
3
13
135
@matthewcp
Matthew Phillips
6 months
A small bit of trivia. What gets logged here? And can you explain why?
Tweet media one
32
9
130
@matthewcp
Matthew Phillips
5 years
๐Ÿ“ฃ ANNOUNCING: Velocirender- A new way to speed up your SPA that works with any framework! ๐Ÿ“– Article
3
33
130
@matthewcp
Matthew Phillips
2 years
Announcing TypeScript loose mode. Globally enable an entire file to be typed as `any`. Just rename your file to .js and get instant type flexibility.
5
14
124
@matthewcp
Matthew Phillips
4 months
Hidden magical APIs is a classic leaky abstraction mistake. You think you're helping users by giving complex things a sheen of simplicity, but you're really just making the non-happy path a nightmare. Soon you'll need to add more magic to cover the previous holes.
10
9
128
@matthewcp
Matthew Phillips
4 years
@kinsilee_ks Notice these police officers aren't dressed like Avengers as well.
2
2
118
@matthewcp
Matthew Phillips
9 months
Astro 2.10 is out! With persistent UI in View Transitions. Gotta keep those counters alive.
3
20
122
@matthewcp
Matthew Phillips
2 years
Signals are cool but don't be fooled, they are observables and have been used by client-side frameworks on the web for *at least* 12 years if not longer. If you look at their implementations they are more or less the same.
15
6
118
@matthewcp
Matthew Phillips
2 years
One very annoying thing about TypeScript is that it doesn't allow you to do dot notation to check if a property exists on a union type. if(data.href != null) ... Complains but `('href' in data)` is ok. #TypeScript
17
4
116
@matthewcp
Matthew Phillips
2 years
Where Web Components Went Wrong (And How We Can Turn It Around)
12
15
115
@matthewcp
Matthew Phillips
2 years
New in Astro 1.0 is full support for HTML streaming. As Astro renders your template it breaks it into static HTML, expressions, and components. Static HTML can always be sent right away, and then each expression and component can block.
3
18
116
@matthewcp
Matthew Phillips
3 years
It's interesting how these SPA frameworks are now adding "MPA mode" and "no JS" config options. I wonder if there's anything driving that. Probably not, I'm sure it's a coincidence.
11
13
114
@matthewcp
Matthew Phillips
2 years
Web component authors creating form controls. This is wrong: <my-select></my-select> This is right: <my-select><select>...</select></my-select> Web components enhance HTML. Forms controls that require JavaScript are broken by design.
10
9
112
@matthewcp
Matthew Phillips
5 years
It's like Angular took all of the hard parts of UI programming and layered 4 or 5 new concepts on top of those to make sure you have to take a paid course before you can successfully render a list.
11
19
111
@matthewcp
Matthew Phillips
3 years
If you're feeling lonely just tweet about TypeScript.
6
1
107
@matthewcp
Matthew Phillips
3 years
We'll refactor post-launch.
1
14
106
@matthewcp
Matthew Phillips
1 year
Can someone build a client-side router that's *not* callback based? Here's one way to do it. Routes are just data. There's no reason to couple them with templating. More flexible + easier to test = huge wins.
Tweet media one
23
9
103
@matthewcp
Matthew Phillips
2 years
Google Login (or whatever they are calling it now) uses a mix of camelcase and snake case for property names in their authorization response. #thisisfine
Tweet media one
12
1
102
@matthewcp
Matthew Phillips
5 years
The biggest unsolved problem in web development today is the inability to write declarative views that are both server rendered and used in the client. Today's solution is to shim the server so that it can run code intended for a browser. Cont ๐Ÿ‘‡
19
14
100
@matthewcp
Matthew Phillips
9 months
@Shyamal890 @amix3k No one wants that
2
0
97
@matthewcp
Matthew Phillips
2 years
Story time. When we started on the original Astro prototype we didn't set out to make it be 0 JS by default. We knew we wanted to do partial hydration (and hired @n_moore , he we was one of the only people working in that space with Microsite). But 0 JS happened by accident ๐Ÿ‘‡
1
12
98
@matthewcp
Matthew Phillips
4 years
1
0
85
@matthewcp
Matthew Phillips
1 year
We shipped a new homepage at @astrodotbuild ! Clocks in at 7.4kB of JS. Without server components. We're investigating how that's possible.
4
7
96
@matthewcp
Matthew Phillips
3 months
The solution to npm's global namespace running out is obvious. Charge a yearly fee, like domains do. If a package name is not renewed it goes back up for registration. Next owner must do a semver-major to prevent breaking old usage.
22
5
92
@matthewcp
Matthew Phillips
6 months
@jaffathecake The thing I don't like about this sort of thing is that it breaks semantics. It appears that you have access to the closure, but you don't really. Instead you have serialized, async access to some stuff, and runtime errors for others (ie, anything with a prototype).
2
1
92
@matthewcp
Matthew Phillips
2 years
FFS, don't add custom scrolling on your websites. Ever.
8
8
88
@matthewcp
Matthew Phillips
1 year
There's this illusion that modern frontend architectures are declarative. They are a mix of imperative and declarative. Your views are declarative, but your state is very much not. Reactivity can look a little declarative, but your setters are imperative. There is no fixing that.
4
6
90
@matthewcp
Matthew Phillips
2 years
If you're using vitest to test code that runs outside of the vite runtime, ala in regular Node.js, you've just created a test / prod difference that will result in bugs down the line. This was the major flaw with using jest on Node.js code and people are just repeating it again.
11
7
89
@matthewcp
Matthew Phillips
1 year
(some of) the @astrodotbuild team at a sports thing.
Tweet media one
5
1
86
@matthewcp
Matthew Phillips
3 years
Happy to announce that I'm joining @skypackjs ! I'm thrilled to get the chance to help push the web forward and normalize ES module usage in every web development community. The web is too slow today. The sky (pun intended) is the limit on what we can do to change that.
14
1
86
@matthewcp
Matthew Phillips
1 year
My feeling is, I have to know the rules of the code I'm writing. I know (most of) the rules of JS. I don't know the rules of this thing that looks similar but doesn't allow normal JS things. This is why I'm such a big fan of DSL, they clearly delineate from normal code.
3
2
85
@matthewcp
Matthew Phillips
3 years
@estark37 Many (most) websites are not continually maintained. It's not reasonable to expect developers to update old websites that are finished (I know personally I can't even remember every website I might have used an alert on but it's non-zero for sure).
0
9
84
@matthewcp
Matthew Phillips
8 months
View Transitions are not just about page navigation.
@argyleink
Adam Argyle
8 months
Took 30m to make this! viva View Transitions ๐Ÿค˜๐Ÿป๐Ÿ’€
15
141
1K
3
10
84
@matthewcp
Matthew Phillips
11 months
Client-side routing stans are going to have a rough go of it here pretty soon. Always bet on MPAs.
@argyleink
Adam Argyle
11 months
Can you believe these slides are full page loads to completely new HTML pagesโ€ฝ #smashingconf ^ try it with Canary and enable the flag chrome://flags/ #view -transition-on-navigation what. rad. tech. ๐Ÿคฏ
39
395
3K
9
4
83
@matthewcp
Matthew Phillips
1 year
It grinds my gears when JS programmers think they are writing functional code because they don't use classes. If your functions are mutating state galore, it's imperative. The definition of functional programming is nuanced, but what you're writing isn't it.
8
4
82
@matthewcp
Matthew Phillips
3 years
@BenLesh @Rich_Harris @domenic @estark37 @yoavweiss @dan_abramov @KittyGiraudel @chriscoyier @carlosjoan91 It's devolved from "Don't break the web." to "Don't break 90% of the web." and now "Don't break the web whose content we agree with."
1
4
79
@matthewcp
Matthew Phillips
3 months
Run your own VPS. You can run all the software you want, with no cold start, and it scales up to the 0 users you have.
9
4
80
@matthewcp
Matthew Phillips
7 years
I don't use react but like how productive the discussion is (from various parties) in this issue:
3
30
79
@matthewcp
Matthew Phillips
2 years
It's too bad that JavaScript doesn't allow a comma to ignore an argument: function handle(, ctx) This makes designing APIs that have 2 arguments hard, as you have to choose which is more important (some times it's neither)
30
1
76
@matthewcp
Matthew Phillips
7 months
F# is one of the most underrated languages out there.
6
15
75
@matthewcp
Matthew Phillips
8 months
htmx is the kind of thing that the web components community should have been building. Instead we collectively chose to follow frameworks down the JS-everything road. "The same, but standards" was never going to work. Embrace all parts of HTML, JS, and CSS, even the weird ones.
4
9
76
@matthewcp
Matthew Phillips
2 years
Islands architecture in @astrodotbuild is not a philosophy. It's not a stake in the ground or a hill to die on. It's just a simple solution to a common problem. When something better comes around we'll use that instead. Fix the problems of today, today, the best way you can.
2
5
74
@matthewcp
Matthew Phillips
9 months
@BHolmesDev Zig is the C equiv. Go comparison is probably closest to Java... although it's also used for CLIs a lot and Java never was.
4
0
74
@matthewcp
Matthew Phillips
2 years
@ireneista @melissamcewen Also, early HTML was written with uppercase tag names. I'm not sure if was required or just the convention but it's the dead giveaway that you're looking at 90s HTML.
3
0
73
@matthewcp
Matthew Phillips
4 months
A lot of the time in OS you will have someone say "I'd like feature X" and you respond with "why do you want that". They interpret this to mean you disagree. But in reality you just want to understand, in detail, how they arrived at the need. But communication is hard.
9
8
73
@matthewcp
Matthew Phillips
3 years
Seeing a lot of discussion recently about TypeScript vs JSDoc. Any reasons why you couldn't use *both* in a project? TypeScript files for interfaces and types, JS files (with JSDoc) for code.
25
10
72
@matthewcp
Matthew Phillips
3 years
A new side project I've been working on recently, Ocean, a web component server rendering template function: It will render your custom elements to declarative shadow roots and add the polyfill for you.
4
12
72
@matthewcp
Matthew Phillips
3 months
Just got the email about Google Podcasts being sunset. Congrats to the PM that got a promotion for that one, hope you have success on that chat app you are going to build next.
5
3
71
@matthewcp
Matthew Phillips
3 years
Imagine how much jQuery would raise today.
4
1
69
@matthewcp
Matthew Phillips
4 years
Event emitters are an inherently mutable concept. In the immutable / functional world, what do you use instead of event emitters?
18
6
68
@matthewcp
Matthew Phillips
6 months
your ๐Ÿ‘ full ๐Ÿ‘ app ๐Ÿ‘ is ๐Ÿ‘ not ๐Ÿ‘ a ๐Ÿ‘ minimal ๐Ÿ‘ reproduction ๐Ÿ‘, thank ๐Ÿ‘ you.
3
7
69
@matthewcp
Matthew Phillips
8 months
The best thing @htmx_org did was make non-templating based solutions for dynamism be respected again. It feels like there's a whole undiscovered frontier of solutions based around HTML, selectors, etc. It's an exciting time.
4
3
67
@matthewcp
Matthew Phillips
2 years
@PeteCapeCod People are into RPC these days, which is neither REST but also not GraphQL (GraphQL is kind-of an RPC). See as an example.
4
1
69
@matthewcp
Matthew Phillips
5 years
The web is the ultimate canvas. You can build whatever you want, however you want, host your creation yourself, and answer to no one. From pure works of creativity, to family photos, to historically important documents, to business critical applications; the web does it all.
1
16
68
@matthewcp
Matthew Phillips
16 days
@beaudjango @ulricmusset The brilliant part is convincing people that owning a phone with 60% market share makes you part of an exclusive club instead of being basic.
2
4
68
@matthewcp
Matthew Phillips
3 years
A new prerelease of @astrodotbuild is out, the next release is going to be big. Just one of the new features is a hydrator for media queries. You can do: <Sidebar client:media="(max-width: 768px)" /> Which will only load the Sidebar on mobile. A ๐Ÿงถ on Astro loading ๐Ÿ‘‡
7
11
68
@matthewcp
Matthew Phillips
2 years
Using meta-programming for test creation makes it harder to debug failing tests. Testing should focus on conditions of failure, not on saving characters on tests.
Tweet media one
Tweet media two
12
8
66
@matthewcp
Matthew Phillips
2 years
The guy who regularly posts about his 90 hour work weeks wants his employees to do the same, while offering them "competitive salaries" and not the 2x or 3x salaries that would be justified for the amount of work being asked for. Avoid.
9
1
65
@matthewcp
Matthew Phillips
2 years
This cycle never fails in OS: 1. Popular thing is too complex. 2. Small thing fixes an annoying part of Popular thing. 3. Small thing is now Popular thing. 4. (new) Popular thing adds features to address growing use-cases. 5. goto 1
2
6
63