1,366 karma · joined December 12, 2012
Get in touch: hi at salem dot io
1. writing types for the big, central libraries that everyone uses (and make them "smart enough" to infer as much as possible).
2. teaching everyone at the company a brand new language without them hating it, and without their team losing (much) velocity.
https://codeascraft.com/2021/11/08/etsys-journey-to-typescri...
https://www.penguinrandomhouse.com/books/717356/the-creative...
Plus, it's worth mentioning that while Tokyo has a lot of mixed-traffic streets, the streets are small, have very low speed limits, and have strong restrictions on the size and type of car that can actually be within the city. It's less like you're walking in traffic and more like the car is intruding on a pedestrian space.
However, there are a few wealthy people against the change who can file lawsuits, pressure the community board, and donate to the mayor's office. That seems to have been enough to get the mayor to overturn his own DOT's plan[2]. The change itself isn't even a large-scale capital redesign of the street; it's entirely a plan using temporary repainting, movable barriers, and signal changes. It's exhausting living here.
Edit: If you live in New York and want to voice your support for the aforementioned road redesign, you can do so at https://www.safemcguinness.com
[1]:https://www.thecity.nyc/2023/6/13/23759703/keep-mcguinness-m... [2]:https://nyc.streetsblog.org/2023/07/05/mayor-yields-to-oppos...
I think it depends on where you are, but useful public transit is very possible in most places. Low frequency is the result of poor planning, not a requirement of public transit.
- I got one of those Stagg kettles[0]. I make a lot of pour-overs, and a nice kettle neck gave me a lot more control than I expected. Coffee tastes the same, but making it is more fun.
- Not Boring's "Habits" app is fantastic[1]. I've been trying to nail down a meditation practice, and this finally did the trick for me. It helps me stay on task without making me feel guilty for it. I've been meditating consistently every day for a few months now.
- I got a copy of "Salt Fat Acid Heat" and read the whole thing[2]. It's made me a lot more competent at cooking than I was, and now other cookbooks make more sense and are less daunting.
[0]:https://fellowproducts.com/products/stagg-ekg-electric-pour-... [1]:https://www.andy.works/product/habits [2]:https://www.saltfatacidheat.com/
In his telling (and I'm paraphrasing heavily here), PSR — as it was originally designed — was meant to get everything on precise scheduling (surprise), thereby allowing you to better predict when and where you'd need workers well in advance. That would let you better optimize not just your trains but also your workforce. If you have a schedule, you can make optimizations that keep train cars from sitting around, and your workers reap the benefits of a fixed schedule (time off, less on-call time, things like that).
In practice, getting things to run on a schedule often meant capital costs that a of these companies balked at, like upgrades to rail yards and track maintenance to keep things running on schedule. The only real part of P.S.R. that ended up getting adopted, as this article points out, is the optimization part. But without the capital investments, you don't get a precise schedule, nor do you get any of its implied benefits.
Optimizations ended up meaning things like pulling more cars with fewer trains. I don't think the article mentions this in explicit terms, but these longer trains are often a few miles long. This length means the trains don't fit in rail yards, nor do they fit in the sidings that allow Amtrak trains to pass them (which in turn keeps Amtrak trains from running on time). Since trains don't fit in the yards, they have to leave as soon as possible, and since there's no fixed scheduling, "as soon as possible" ends up meaning any time at all with little notice, meaning engineers are on call almost all the time. Plus, when you have a train that's almost 3 miles long, they're more likely to derail on curves, and staff have to walk literal miles to fix problems along the train.
There's a whole lot more to this than I can repeat off-hand on a Friday afternoon, but this issue isn't going to go away. The rail industry is untenable, and given how scared everyone is of a rail strike, it also isn't going away any time soon.
[0]: https://www.nytimes.com/2022/10/09/opinion/business-economic... [1]:https://www.youtube.com/watch?v=69A_UCdikE8
It helps to think of TS types as a guarantee of behavior and an encoding of intention, and of TS itself as a really smart linter. As long as you use my function according to these types, it'll behave as expected. If it doesn't, that's my problem and I'll fix it. If I say my function returns a string, you can use my function's return types as a string with the confidence that that's how I expected it to be used. TS will make sure that everything agrees with my type assertion, which removes the need for checking the types of parameters in tests, for example.
You're right in saying that having a clean and understandable development environment has a lot of complicated moving parts! Dropping the ball on any one of them means having a bad developer experience.
Since I've said this on other comments, I'm not going to dwell on the fact that this behavior isn't something Webpack itself solves. However, if you make a change in a .ts file, two things typically happen in a dev server:
1. Your code is retranspiled and rebundled, usually using partial recompilation. 2. Your IDE sends these updates to the TS language server that powers your IDE's TypeScript support. That server uses the same typechecking logic as the TypeScript compiler, so it's a good source of truth for surfacing type errors in the files open in your IDE.
Depending on your dev environment, one of a few things might happen next: 1. Your dev server might hot reload the changes in your browser once the build is finished. 2. Your dev server might also block reloading if a type error is found. 3. Your dev server might even show you that error in your browser so that you know what's going on.
Next.js currently does all three of those things, which makes for a really nice developer experience. You don't really have to keep an eye on another terminal — everything shows up in your browser. They even render a little loading icon to let you know when a rebuild is taking place.
Next.js uses Webpack internally, but Webpack isn't the reason for this nice developer experience; it's just a core part of it, and is only responsible for bundling and rebuilding.
I love talking about this stuff, for what it's worth, so feel free to ask more questions. I helped Etsy adopt both Webpack and TypeScript when I worked there, so I have a good chunk of experience in the area.
All that aside, it seems like Turbopack was literally developed with Webpack's maintainer, who claims it to be a "rust-powered successor to webpack" (his signature is quite literally on the homepage[0]).