Bao Huynh

Bao Huynh

@bhuynh.dev

Backend Engineer Web-deving with React, Svelte, and a bunch of other stuff https://bhuynh.dev

65 followers137 following150 posts

Just discovered writing from Sean Goedecke, and I'm really enjoying it. Very insightful perspective into software engineering on a high-scale level; would recommend to any SWE. One thing I'd like to see more is solutions to the problems Sean raised, because these problems are very intriguing to me.

Maybe it's just me but I am so sick of reading AI-touched-up articles. It's the same nauseous tone of sounding self-important with either short, choppy sentences, or tackling on with (And...) in parentheses. I read to enjoy human perspectives but now many times it's just the same AI-ish tones

Been touching up on some Auth topic, and it truly is "Convenience is the enemy of Security" Specifically, I have been reading about how, JWT, for all its convenience benefits, actually has bad security - so it should never be a first option. And I am really convinced. redis.io/blog/json-we...

redis.ioJSON Web Tokens (JWT) are Dangerous for User Sessions—Here’s a Solution | RedisDevelopers love Redis. Unlock the full potential of the Redis database with Redis Enterprise and start building blazing fast apps.

With increased generative AI in software development, I reminiscence past times where I "handcraft" the code for a personal project I love, fighting through doc frustration and enjoying the little victories when things work. It's much more efficient now with AI, but I still love the manual way.

I don't want to use Nextjs but my team is very good at Nextjs, partly due to AI, and so now I also have to use Nextjs

One thing I have been adding more to my instructions when chatting with LLM: "Give me the command to do/check/verify it myself" instead of letting the LLM conclude on its own A deterministic command run prevents against LLM's outputting solution & conclusion using baseless and wrong assumptions.

I actually kinda like Antigravity's name and logo. Functionality-wise, still testing out, but I have had decent result so far.

Mini git tip of the day: When pushing a brand-new local branch to upstream (i.e. with `git push -u`, you don't have to type the whole branch name. You can either just type the first letters then use Tab to let the CLI autocomplete Or just use HEAD: git push -u origin HEAD Keystrokes saved!

Incredible Vim tip I just learned today Use = to let Vim smartly auto-indent for you. Very useful when you copy-paste blocks of code and they become jumbled. Not sure how Vim knows where to indent, but it has been quite correct so far. I feel so stupid for all manual indentation I did in the past.

Another day another being bitten by <button> elements having type="submit" by default if one forgets to do type="button"

Man Svelte {@const} block is such a godsend. Being able to keep variables close to where they're actually needed feels so so elegant and powerful. And these variables are reactive too.

Svelte snippet is becoming my new favorite way to organize long component/page. Snippet can access all of its parent data, making it a lot more convenient than separate components. I can easily split away part of the markup into separate snippets put at the end of the file to improve readability.

I love and prefer to use built-in tools, but the `apt` package manager on Ubuntu very often will have outdated package versions. So I installed `brew` and have been enjoying it so far.

Mini Git tip of Saturday: `git merge-base` finds the common ancestor between 2 branches: `git merge-base main branch-1` This is especially useful when you want to rebase/filter-branch from the branch's begin - change committer emails, remove files from history, etc. `git rebase -i <merge_base>`

Unironically, I really love Svelte because its font choices are just so elegant. Fit very well with Svelte's motto to "optimizize for vibes"

I think I will give up trying to make my dashboard web app mobile-friendly due to long tables. The intended use case is for desktop anyway - it's just for use by me and my small team occasionally and I know we wouldn't using phones. Trying to fit a table into mobile view looks negative ROI

Really enjoying "Wild Courage" by Jenny Wood 📖 A quote I find very profound: "Success mindset precedes success". You need to have a winner mindset before you can succeed There's no magical turning point where everything will suddenly become perfect. Build success from the way you take action daily

Reminds of the quote that I am finding increasingly relevant in my life: "The way you do anything is the way you do everything". Our attitudes and mindsets are the biggest "optimizations" we can make to improve and propel our lives forward.

Reminding myself today to: Take voluntary struggles (in things I care about) so my mind is ready and prepared for involuntary struggles.

Modular Form and Tanstack Form both look so good I can't choose ahh. Tanstack is obviously powerful, well-designed, w/ a big community and clearer plans for SSR. But something about Modular Form just really hook me - maybe it's the simpler API for smaller use cases, or just the very nice looking doc

Wow Phoenix changes so fast almost every tutorial I've seen has now been somewhat outdated. Good thing the docs are very well-written. Hard thing is knowing which doc to look for and seeing concrete examples.

Today I learned: If you are using `createAsync` at the component level, your component should wrap the async access in a <Suspense>, or else SolidStart may cause some weird flash of content issue

LLM is an incredible piece of technology, and good prompting seems to affect results a lot, but I'm often not patient enough to write a good long prompt myself with all needed context. I often rather code it myself, completed with small snippets from chatGPT instead of whole project generation.

Recently I have seen my Git folder getting corrupted quite often in WSL2. Not sure why. Push your commits often everyone, even WIP commits (you can always rebase later)

Man I love tailwind's Amber color. 300 and you got a pleasant yellow, and 500 you got a nice-looking orange. Not too overtly yellow nor orange - very easy on the eyes

Honestly, not always. Reading a good doc feels amazing. When every problem you thought of they immediately solved it in the next sections, and you keep having moments of enlightenment "wow that's so cool". You glide on the sea of knowledge taking it all in. Writing the docs though...

Samuel@samuel.fm

TIL: `onpointerup` to make mobile-only click event. On mobile w/ limited horizontal space, I want to implement tapping on the row to show extra info. But on desktop with lots of whitespace, I prefer dedicated buttons. → Solution: Mobile-only clicking with `onpointerup` and `event.pointerType`

Man this was such an awesome read: The history of modern JavaScript tooling → How we went from <script> tags to all of the various tools we have today (each serves a very particular and useful purpose). It's a bit old but very good. Love articles that show the why. peterxjang.com/blog/modern-...

peterxjang.comModern JavaScript Explained For DinosaursLearning modern JavaScript is tough if you haven’t been there since the beginning. The ecosystem is growing and changing so rapidly that…

TIL: ESM Dynamic import has a cache! So if you're developing a module to be dynamically imported, and seeing that it keeps importing the old version, you can bust the cache by just adding a query string with `Date.now()`

A lot of website accessibility can be achieved by just: - Using semantic HTML elements: nav, fieldset, dialog, label, etc. - And use ARIA attributes occasionally. Mostly aria-label, aria-labelledby, and role to give more context to things that screen readers may not understand: emojis, buttons, etc.

I wonder (and hope) if AI will make recruiting better for juniors, as CTO and HR realize one don't need years of exp in certain tools Talents only need strong conceptual knowledge, and quick thinking & analysis skills. Then AI will cover any syntax and intro knowledge on new language/topic/codebase

If you're a junior that's feeling gloomy about AI, how about leveraging AI to stand out: quickly learn new tools/language and build more complex projects Maybe implement real-time stuff, sprinkle in job queues, event stream, concurrency, etc. Or use AI to help understand the inner working of tools

<2024> 🏫 Graduated from uni 🧑‍💻 Got my first dev job at an amazing company 📝 Learned 2 new languages and 2 new JS frameworks 🚀 Introduced esbuild to my workplace 💪 Started exercising daily </2024> 2024 to me was a year for setting up a solid foundation. Here's to 2025! (hopefully more OSS)

Spent 2 hours yesterday helping someone tracing a weird Vite bug. Turns out the issue has been reported in the 3rd-party tool's Github a year ago, and the fix is even in the doc Moral of story: Always check GH Issues, esp. if you're helping on a public forum Wish that Google also index GH issues

Send Christmas wishes is a great "excuse" to catch up on your relationships. - someone who helped when you were in need - friends you forgot to reply to last month - acquaintances you hope to connect w/ again Life can be busy, and Christmas is a chance to slow down and nurture your relationships

Svelte 5 runes tip: exporting reactive values across files = WRAP it in a function Get/set accessor, class method, or just plain function This's because runes/signals are just plain-old JS that work by calling functions to access latest values This truly blows my mind coming from React and hooks

Linux apt is great but the package versions is often so so outdated I have transitioned to use HomeBrew on both Mac and Linux (WSL) and the result has been awesome.

More random mini Git tips to make your day easier: To test a merge without actually merging first - to see if you will have any merge conflicts ⭐ `git merge <branch> --no-commit ---no-ff` ⭐ If you then don't like the conflicts, you can `git merge --abort` it

A mini Git tip to make your life easier If you're using `git commit -m` then suddenly realize this commit message is gonna be a lot longer than expected → Use the `--edit` flag to open up a Message Edit window to further add to your commit

Learning Svelte, it's been incredibly helpful for me to truly grasp Signal Many times, Svelte is that way because that's how Signal™ works My breakthrough is realizing Signal reactivity isn't magic, just plain old JS based on the idea of: to get the latest value, just re-invoke the `get` function.

Spent hours today debug why Mandarin wouldn't display on WezTerm but VsCode works. Turns out MacOS default *implicitly* fallback on "PingFang SC". Not obvious at all. I fixed it w/ Noto Sans CJK SC 🧑‍🍳💋 And the story's hero is WezTerm's incredible CLI, with the exact command for debugging fonts 🙏