Bao Huynh (@bhuynhdev) header
Bao Huynh (@bhuynhdev) profile picture

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
Photo by Bao Huynh (@bhuynhdev)Photo by Bao Huynh (@bhuynhdev)Photo by Bao Huynh (@bhuynhdev)Photo by Bao Huynh (@bhuynhdev)Photo by Bao Huynh (@bhuynhdev)Photo by Bao Huynh (@bhuynhdev)Photo by Bao Huynh (@bhuynhdev)Photo by Bao Huynh (@bhuynhdev)Photo by Bao Huynh (@bhuynhdev)Photo by Bao Huynh (@bhuynhdev)
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
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
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
drizzle-seed comes w/ some sane default generators based on your column type and names. Examples: - col type includes "date" → GenerateDate - string col with "name" in name → GenerateFirstName - "email" → GenerateEmail More at: github.com/drizzle-team/driz…
1
32
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
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
3
1
12
573
Unsure if this's recommended or not - I can't find anything about this in Svelte doc (maybe I don't know the right keyword) - but it feels so elegant! This probably equals setting up some "$effect", but coming from React, I was taught that I should minimize effect usage
1
78
TIL: A <button> element inside a <label> element will not work, as the button captures the click for itself and doesn't pass it to the label at all. Greedy buttons.
62
Today I converted another person to the no-barrel-files team. Feels great.
57
TIL: the server is an incremental static site regenerator
60
Wow the SvelteKit CLI feels so nice and polished and user-friendly
50
Svelte 5 with Runes feel like React but with more (and a lot more) batteries included
65
Spent an hour today fixing a bug caused by auto-import importing my SideBar component from "lucide-react" instead of "~/components/ui/sidebar.tsx" 🤦 Wish that all lucide-react icon always have Icon suffix
54
Today is my birthday! I'm 39 yrs old. My only request is that you retweet this tweet & help me get a bunch of engineers and product managers hired 🙏 I have 17 open roles for frontend, backend, and product managers. 200 - 650k total comp. US/Canada 100% remote. JD's are below: Frontend (React/React Native) teapawt.net/i/jobs/183741677351305… Fullstack (React/React Native/Go) teapawt.net/i/jobs/183741469441334… Backend (Go) teapawt.net/i/jobs/183741582289084… Eng Manager teapawt.net/i/jobs/184629191116785… Product Manager teapawt.net/i/jobs/184627819992100… Senior Product Manager teapawt.net/i/jobs/184628153768973… Group Product Manager teapawt.net/i/jobs/184881667257001…
68
155
6
343
72,781
TIL: HTML checkbox input has a default value of "on" if you checked it In the reverse case of not checking, the form will simply not send the field to the server
41
PSA: Store your timestamps in the db in UTC timezone. This consistency will makes it much easier to think and reason about when you're parsing and localizing across different time zones Date and time is a real headache
1
68
Tmux stuff I learned today ⭐️You can just write "kill-sess" for "kill-session" ⭐️Enter copy mode w/ <prefix>+[ I never knew this. I was struggling to hold down the mouse selection while trying to press Ctrl Shift C with the other hand ⭐️You can enable vi keybind in copy mode
1
39
TIL: <button> actually has a type "reset" for use when your buttons reset all inputs in the form. It is rarely useful, and is a huge annoyance when users accidentally click one, but hey it's there if you need it
1
85
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
Finally got to use git cherry-pick the first time today
57