Readit News logoReadit News
space_crab commented on Playing Sudoku in TypeScript while the type checker highlights mistakes   github.com/gruhn/typescri... · Posted by u/mjcurl
moritzwarhier · 2 years ago
ESLint rules that require type information (not just stripping types) are prohibitively expensive for larger code bases.

As far as I know, there isn't any kind of tsconfig rule to disallow this (please correct me if I'm missing something here!). So unless you're using tools I don't know about, this is kind of a mandatory last bastion of "any".

You can disallow any, enable the strictest possible null/undefined checks (including noUncheckedIndexedAccess). And there's also the assertion TS check that normally prevents erroneous type assertions.

But "as unknown as MyType" is not preventable by means of tsc, as far as I know. Unless there's an option I don't know do disable this kind of assertion (or even all assertions).

space_crab · 2 years ago
lint-staged on pre-commit and full lint in CI solves this problem very well.
space_crab commented on Playing Sudoku in TypeScript while the type checker highlights mistakes   github.com/gruhn/typescri... · Posted by u/mjcurl
yieldcrv · 2 years ago
yeah this part is pretty bad

you can get lucky and reach a nirvana state where all your dependencies function well in a new project, but 6 months later its a disaster like ah you need to upgrade node, but ah your transpiler requires the older version of node, but ah the semantic versioning was not followed by your type definition addendum library and now there were autoupdated breaking changes, ah your project only worked with a locked package file and if you re-install any package the wrong way everything breaks in incomprehensible ways!

I know my way around it though, so yay big bucks and quick deployment of greenfield projects

space_crab · 2 years ago
I know this isn’t realistic for many many scenarios, but if you can help it there is a sweet spot where you dedicate ~30 minutes to merge weekly dependabot updates and you don’t run into this problem.
space_crab commented on Working from home allowed him to be a more engaged dad. Now it's over   npr.org/2024/08/09/nx-s1-... · Posted by u/rntn
linotype · 2 years ago
I can almost guarantee this is about commercial real estate taxes more than productivity. If agency review is months behind, they need to hire more people, not force their existing employees to lose hours a day to commuting.
space_crab · 2 years ago
I think the RTO policy is in part influenced by economic recovery research funded by the city [0]. My own conjecture is that it’s also influenced by SEPTA (regional transit) ridership recovery being a sticking point for funding from the state.

[0] https://www.pewtrusts.org/en/research-and-analysis/issue-bri...

space_crab commented on Test Scores Down, GPAs Up: The New Angst over Grade Inflation   wsj.com/us-news/education... · Posted by u/gnicholas
WalterBright · 2 years ago
If you're getting a business degree, what's the excuse for misspelling "business"?

None of these requirements were difficult or unreasonable. The students didn't have a problem with them, either. His classes were well-attended.

space_crab · 2 years ago
Off the top of my head, students who speak English as a second language, or students who have dyslexia or dysgraphia may have trouble spelling these words on written exams.

I’m curious if an ‘F’ for a typo can even be enforced if the professor provided a proper grading rubric.

u/space_crab

KarmaCake day3February 13, 2024View Original