// actually my first language

JavaScript / TypeScript

7 min read

I’m covering JavaScript and TypeScript together on one page, which breaks the “one language per page” rule I set for the rest of this section, but I think treating them separately would be dishonest about how I actually use them. I don’t write JavaScript by choice anymore; I write TypeScript, which compiles to JavaScript, which runs because the web gives me no other option for anything that lives in a browser. That’s the real relationship, and it deserves one honest page instead of two defensive ones.

There’s also a chronological honesty I want to get out of the way up front: if we’re being strict about it, JavaScript — paired with just enough HTML and CSS to make it do something — was actually my first language, years before Python. I was tinkering with a personal webpage, not learning to program in any disciplined sense, and I don’t think that early tinkering really counts as “learning a language” the way sitting down with Python later did. But it’s the honest, literal answer to “what did you touch first,” and I’d rather own that than let the cleaner Python story stand in uncorrected.

Where I stand with it

My frontend work is smaller than my backend work, but it’s not nothing. I’ve built React interfaces, including working through React Server Components specifically for a post on the subject — deliberately digging into the boundary between server and client rendering rather than staying comfortable with the client-only mental model I started with. I’m comfortable with modern React patterns: hooks, component composition, the general shape of how state flows through a tree of components. I’m less comfortable with the deeper corners of the ecosystem — I haven’t gone deep on state management libraries beyond what React itself and basic context provide, and I’m still building intuition for when server components actually help versus when they’re just complexity for its own sake.

TypeScript is where I spend almost all of my actual typing time, and that’s deliberate. I treat plain JavaScript the way I’d treat Python without type hints at this point — technically fine, but something I’d only reach for in a quick throwaway script, not in anything I intend to keep touching. Once a project has more than one file and more than one future editing session (even if that editor is just me, three months later, having forgotten my own assumptions), TypeScript’s types stop feeling like ceremony and start feeling like the only thing standing between me and a very confusing bug report from my own past self.

What I think of it

JavaScript as a language, on its own, is the one I have the least natural affection for on this entire page, and I want to be specific about why rather than just repeating the standard pile-on. It’s not the dynamic typing — I’m fine with dynamic typing in Python. It’s the specific combination of dynamic typing with a type-coercion model that was clearly never designed, just accreted, plus a prototype-based object system that most JavaScript code (mine included) actively works around rather than embraces, plus a standard library that’s thinner than it should be for a language this universal. None of that is a moral failing on JavaScript’s part — it was built in ten days to glue things together on web pages and then had the misfortune of becoming load-bearing infrastructure for the entire internet. I don’t think that history is JavaScript’s fault. I do think it’s the reason the language still feels, to me, like it’s wearing several decades of patches over an original design that was never meant to carry this much weight.

TypeScript is where my opinion flips almost entirely positive. Structural typing — caring about shape rather than declared identity — fits how JavaScript already worked informally, so TypeScript feels less like a foreign layer bolted on top and more like someone finally writing down the rules everyone was already half-following. The type inference is genuinely good; I write far fewer explicit type annotations than I expected to, because TypeScript correctly guesses intent from context more often than not. And critically, TypeScript caught real bugs for me during the React Server Components work specifically — mismatches between what I assumed a server component was handing a client component versus what it actually was, caught at compile time instead of as a confusing runtime error three clicks deep in a browser.

My actual complaints about TypeScript are narrower and more specific than my complaints about JavaScript: the type system’s complexity ceiling is enormous, to the point where I’ve seen conditional and mapped types that look more like a logic puzzle than application code, and I don’t think that complexity is always proportional to the problem being solved. I also think the “it’s just JavaScript with types, the types disappear at runtime” model, while a reasonable design choice, means TypeScript can give you false confidence — a type assertion is a promise to the compiler, not a runtime guarantee, and I’ve been bitten by exactly that gap at least once, trusting a type that an external API silently violated.

On React Server Components specifically, since that’s genuinely changed how I think about this ecosystem: I don’t think it’s “just” a performance optimization, and I said as much in the post I wrote on the subject. It changes where you’re allowed to think about data fetching, it changes what “client” even means for a given piece of UI, and it’s forced me to be much more deliberate about the server/client boundary instead of treating the whole tree as one undifferentiated client-rendered blob. I’m still forming a settled opinion on whether that complexity is worth it for the kind of smaller projects I tend to build, versus the larger apps it was clearly designed for.

Where I go to learn it

  • The TypeScript Handbook (official docs) — the best single resource on this page, maybe on this whole site, for how clearly it explains a feature’s purpose before showing syntax. I read it cover to recent-chapter before touching a serious TypeScript project and I still go back to it.
  • MDN Web Docs — unavoidable and excellent, especially for the parts of JavaScript-the-platform (not JavaScript-the-language) that TypeScript doesn’t touch: DOM APIs, fetch behavior, browser-specific quirks. I trust MDN more than almost any other web resource I use for anything.
  • The official React documentation, specifically the newer docs rewritten around hooks and server components — a genuinely good example of documentation keeping pace with a fast-moving ecosystem instead of lagging a version or two behind, which is rarer than it should be.
  • Josh Comeau’s blog and course material — the resource that made CSS-adjacent React patterns and some trickier rendering behavior click for me in a way drier documentation didn’t. Good at building intuition, not just listing APIs.
  • Matt Pocock’s TypeScript content (total-typescript.com and related) — the single biggest influence on how I think about TypeScript’s type system specifically. He’s the reason I stopped treating any as an escape hatch I reach for under deadline pressure and started treating it as an admission that I haven’t understood my own data shape yet.
  • The React Server Components RFC and Dan Abramov’s writing on the topic — denser than a typical tutorial, but this is exactly the kind of “why was this actually built this way” source I go looking for once a feature has moved past “how do I use it” and into “do I actually agree with the design.”

Where this is headed

The TypeScript side of this page will keep growing steadily, because it’s part of active work. My opinion on React Server Components specifically is still the least settled thing here — I want to ship more with the pattern, not just have written about it once, before I commit to a verdict stronger than “interesting, still deciding.”