
Backend Engineer 1 @OnlineRewards. Expert chess sacrificer ♛♟️& master at ruining my own sleep schedule. Connect with me at https://teapawt.net/t.co/2Se3RvzYrB
Cincinnati
Joined August 2019
- Tweets1.4K
- Following322
- Followers136
- Likes2K
Replying to @bhuynhdev @sveltejs
I feel silly only realizing this about Svelte today.
Bonus discovery: expression interpolation is the only way to do this, whereas $derived can't
1
53
My new noob @sveltejs discovery: You might NOT need $derived!
For simple expressions, put it straight into your markup. They're still reactive!
$derived is useful for reactive **variable** w/ a complex expression and/or to be re-used many times. But otherwise, I prefer simple
2
146
Replying to @bhuynhdev @DrizzleORM
Or further refine for more sophisticated schemas w/ drizzle-seed's included generators, or even your own implementation
drizzle-seed has:
- valuesFromArray
- int
- firstName/lastName/fullName
- phoneNumber
- country
- jobTitle
- companyName
and more at orm.drizzle.team/docs/seed-f…
32
More reason to love @DrizzleORM for me:🆕 "drizzle-seed" just dropped last week 🌱
- Just pass in your schema
- Intelligent default generators
- Ability to further refine generation
- Seed relationships too
- Utility to reset whole table
drizzle-seed now on Drizzle 0.36.4!
1
67
The "writable derived" is an incredible Svelte trick I just learned from @joyofcodedev
🚩 Problem: 2-way sync btw two states, but can't use "$derived" because it's 1-way readonly
→ ✅Use an object with get/set
Here, typing activate checking, and unchecking also reset email
TIL: The `pnpm why` command shows you why a package was installed, in case one day you need to debug package dependencies issues.
Saw some warnings today about deprecated sub-deps I didn't install, so I used `pnpm why` to trace the top-level package that is potentially outdated.
42
Cool SQL feature you might not have known: Generated columns ⚒️
TIL: I can use generated column in My/PostgreSQL to auto calculate/insert a column based on other columns!
I used it to generate a "first_last_email" that combines all strings so we can search anyone using any info

ALT SQL code to generate a search_str Generated column that concat fields first_name, last_name, and email CREATE TABLE users ( user_id INT PRIMARY KEY AUTO_INCREMENT, first_name VARCHAR(100), last_name VARCHAR(100), email VARCHAR(255), search_str VARCHAR(455) GENERATED ALWAYS AS (CONCAT(first_name, ' ', last_name, ' ', email, ' ')) STORED );
25
Replying to @perplexity_ai
@perplexity_ai is a such an incredible learning tool 🤯. The source citing makes me much more confident I'm learning the right thing. GPT still say one thing then contradict itself 5s later.
The unbelievable reasoning capabilities also wins over Google for advanced questions.
1
39
Replying to @nicknisi
These are the ones I got from Ohio. It's so cool to realize that we are viewing the moon's movement from different angles
1
99












