Cory House
banner
housecor.com
Cory House
@housecor.com
Convex
September 4, 2025 at 6:12 PM
How I handled React state over 10 years:

2014: Class state
2016: Redux
2018: useState, useReducer, useContext
2020: React query
2021: Zustand for globals
2024: useOptimistic, useTransition, useFormStatus, useActionState, RSC
2025: Tanstack DB or sync engine (Zero, Electric, Convex)
September 3, 2025 at 12:53 PM
TypeScript syntax is often inspired by JavaScript.

In some cases, TS even uses the exact same syntax as JS for a different purpose.

The difference?
JS features focus on values.
TS features focus on types.

Here's a few examples.
June 2, 2025 at 4:32 PM
Are TypeScript types worth testing?

Sometimes.

Here's when, and how.

www.youtube.com/shorts/Uv7r-...
Should I test my TypeScript types? #coding #programming
YouTube video by Cory House
www.youtube.com
May 30, 2025 at 5:12 PM
Problem: I want to enforce a string format at compile time.

Solution: Use a template literal type.

Full "TypeScript: Deep Dive" course: dometrain.com/course/deep-...
May 29, 2025 at 1:53 PM
Problem: I want to ensure my switch statement handles all potential cases.

Solution: Use TypeScript's never type.

Here's how:

Full course: dometrain.com/course/deep-...
May 28, 2025 at 11:31 AM
Problem: You have complex logic for narrowing a TypeScript type that you'd like to reuse in a few spots.

Solution: Consider an assertion function.

20% off the full course: dometrain.com/course/deep-...
May 24, 2025 at 5:29 PM
It’s live!

“TypeScript: Deep Dive” explores advanced TS concepts:

- Utility types
- Generics
- Mapped types
- Conditional types
- Template literal types
- Runtime validation
- Decorators
- tsconfig techniques

And over 250+ examples!

Get 20% off at launch here: dometrain.com/course/deep-...
May 23, 2025 at 12:31 PM
LLMs are handy when working with the command line.

I wanted a count of all the exercise files in my new course.

ChatGPT provided the correct Bash command immediately.
May 22, 2025 at 3:18 PM
It’s done!

I’ve been heads down for 3 months creating my most ambitious course yet:

“TypeScript: Deep Dive”

Just recorded the final clip. This course is 7 hours of advanced features, tips, patterns, and tricks to level up your TS skills.

Publishing this week on Dometrain!
May 21, 2025 at 3:03 PM
Tesla paid back the loan, and did so early. Implying they survived merely because of a loan is reductive.

SpaceX survives because, like Tesla, they're profitable. They're able to do things cheaper than alternatives, because they innovated and created reusable rockets.
May 18, 2025 at 4:22 PM
Many current and former Tesla employees received stock options and are now quite wealthy.

Tesla is an obvious American success story. Without Tesla, EVs would likely still be rare.

What system do you propose to avoid successful entrepreneurs getting too wealthy for your taste?
May 18, 2025 at 4:14 PM
With 2, we may never bother becoming stricter. And any new code is held to a low standard, which creates "type debt".

With 1, new code is held to a strict standard, and existing code can selectively have looser typing rules via nested tsconfigs, or by disabling TS in spots if necessary.
May 18, 2025 at 4:03 PM
When migrating a codebase from JS to TS, there are two schools of thought:

1. Start strict, and loosen in spots as needed.
2. Start loose, and migrate to stricter rules over time.

I prefer 1. It's safer.

Default strict. Loosen when necessary.
May 18, 2025 at 4:03 PM
Just realized Vitest now has built in support for testing TypeScript types.

How? It includes expect-type now by default. Handy.

Example:
May 13, 2025 at 4:15 PM
How? Because he helped build multiple extremely valuable companies.

His wealth primarily stems from *equity* in those companies, and he funded them in hard times despite many near bankruptcies. Both SpaceX and Tesla would likely have went under without his financial support.
May 13, 2025 at 1:57 PM
I'm saying it's good...but it's important to know how to code so one can debug and validate the results
May 9, 2025 at 6:04 PM
Vibe coding is the modern version of copy/pasting code you don’t understand from Stack Overflow.

It seems fine at first, but at some point you need to understand how to code.
May 8, 2025 at 10:28 PM
Example: The Dropbox team used this pattern to test many OS and file system edge cases quickly on CI.
May 5, 2025 at 2:04 PM
Result: Now we can code and test against a mocked implementation in non-prod environments. The mocked implementation can be deterministic and fast, and thus allow quickly testing our business logic against many scenarios. In prod, the wrapper implementation merely forwards to the real APIs.
May 5, 2025 at 2:04 PM
Problem: Some interfaces like dates, times, localStorage, the URL, and the file system are “globals” that may change at any time. This makes it difficult to set up complex edge cases and hampers testing.

Solution: Instead of coding against these APIs directly, wrap access in an interface.
May 5, 2025 at 2:04 PM
Still early so can’t say
May 3, 2025 at 12:38 PM
Problem:
When I correct an LLM it “forgets” and makes the mistake again later.

Solution:
1. Create a llm-learning file.

2. Tell the LLM to write to that file each time I correct it. (I use copilot-instruction.md to instruct Copilot)

Now it “learns” over time!
May 2, 2025 at 12:54 PM
Oooof wow
April 19, 2025 at 1:39 PM