Typescript has an interesting approach to type checking: it will emit JS even if the code isn't well-typed! https://basarat.gitbooks.io/typescript/docs/why-typescript.html
(This is a nice property of gradual typing: you can run unit tests on refactored code even when some code still uses the old API.)
Related Posts
Over a sufficiently long time horizon, all code you write is legacy code.
I'm intrigued to see that Google has quantified that new code is generally buggier and less secure than code that has existed in your codebase for longer: https://security.googleblog.com/2024/09/eliminating-memory-safety-vulnerabilities-Android.html
It's really satisfying to use a profiler for the first time on a project. I always find a big performance win with only a small code change.
It's never the code that I expected to be slow, however!