Bao Huynh
@bhuynh.dev
π€ 56
π₯ 135
π 132
Backend Engineer Web-deving with React, Solid, and a bunch of other stuff
https://bhuynh.dev
Another day another being bitten by <button> elements having type="submit" by default if one forgets to do type="button"
about 1 month ago
0
0
0
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.
3 months ago
0
1
0
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.
3 months ago
0
1
1
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.
5 months ago
0
1
0
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>`
5 months ago
0
1
0
Unironically, I really love Svelte because its font choices are just so elegant. Fit very well with Svelte's motto to "optimizize for vibes"
6 months ago
0
2
0
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
6 months ago
0
0
0
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
6 months ago
1
0
0
Reminding myself today to: Take voluntary struggles (in things I care about) so my mind is ready and prepared for involuntary struggles.
6 months ago
0
0
0
Phoenix 1.80-rc now includes DaisyUI by default. Huge win for DaisyUI and I love Daisy!
7 months ago
0
0
0
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
7 months ago
0
1
0
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.
8 months ago
0
0
0
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
8 months ago
0
0
0
Elixir Phoenix Plus is the coolest thing I have ever seen. Such flexible, extensible, and powerful way to do middleware.
8 months ago
0
0
0
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.
8 months ago
0
0
0
Playing with fire today and accidentally force push Git history and now all my 46 commits "happened" at the same time
8 months ago
0
0
0
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)
8 months ago
0
0
0
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
8 months ago
0
0
0
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...
add a skeleton here at some point
8 months ago
0
1
0
Today I finally reached the point where I typed ":w" in an Excel file
9 months ago
0
1
0
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`
9 months ago
1
0
0
This so much tbh. Esp when major versions can help with marketing too
add a skeleton here at some point
9 months ago
0
0
0
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-...
loading . . .
Modern JavaScript Explained For Dinosaurs
Learning modern JavaScript is tough if you havenβt been there since the beginning. The ecosystem is growing and changing so rapidly thatβ¦
https://peterxjang.com/blog/modern-javascript-explained-for-dinosaurs.html
9 months ago
0
1
0
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()`
9 months ago
0
0
0
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.
9 months ago
0
3
0
Mini Git tip: Use
github.new
to quickly create new repository.
loading . . .
Build software better, together
GitHub is where people build software. More than 150 million people use GitHub to discover, fork, and contribute to over 420 million projects.
https://github.new
9 months ago
0
1
0
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
9 months ago
1
0
0
reposted by
Bao Huynh
β lucia scarlet π°
10 months ago
looking for work (screenshot because yapping is not permitted on Bluesky)
18
240
65
New year new β¨DEV.TO article β¨: Use Typescript to allow your component to accept HTML-native attributes, in multiple JS frameworks.
dev.to/baohuynhlam/...
This article is mostly for me because I sometimes switched frameworks and always wondered how to do this. Let me know where I can improve!
loading . . .
Typescript and HTML attributes in various frameworks
If you have worked with Typescript in a JavaScript framework - React, Vue, Solid, or Svelte - then...
https://dev.to/baohuynhlam/typescript-and-html-attributes-in-various-frameworks-38j8
10 months ago
0
2
0
<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)
10 months ago
0
3
0
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
10 months ago
0
0
0
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
11 months ago
0
0
0
My Git wrap for this year Honestly better than I thought but definitely has room for improvements. Nice to be able to put actions into metrics, so I can come to 2025 stronger I don't know where the 25 stars come from haha
git-wrapped.com/profiles/bhu...
11 months ago
0
0
0
Amazing code image generation tool I just found:
chalk.ist
Love this so much - Support a ton of languages, including Svelte - A whole panel of customization for every thing - font family, font size, line numbers, window reflection, etc. - Insert multiple code blocks Tysm
@idered.bsky.social
loading . . .
Chalk.ist - Create beautiful images of your source code
Turn your source code into beautiful images
https://chalk.ist
11 months ago
0
0
0
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
11 months ago
0
0
0
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.
11 months ago
0
0
0
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
11 months ago
0
0
0
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
11 months ago
0
1
0
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.
11 months ago
0
1
0
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 π
11 months ago
0
0
0
New vim/neovim knowledge You can tell vim to "unmask" invisible characters such as tab or space with the simple `:set list` command Tabs are now > space are - and non-breaking space are + Undo with `:set nolist`
11 months ago
0
0
0
Underrated power of Firefox over Chrome: Case-sensitive word search (when Control-F) It's not always useful, but when you need it, you are going to lament so much my Chromium misses such a huge UX
11 months ago
0
1
0
"The sooner you make your first 5000 mistakes, the sooner you will learn how to correct them" Not that you have to fail repeatedly, but the sooner you're comfortable with making mistakes and learning from them, the sooner you will start growing.
11 months ago
0
1
0
reposted by
Bao Huynh
Tanner Linsley
11 months ago
Follow me, then repost this.
3
23
19
IMO if you're new in the company, esp. as juniors, an awesome way to impress others and get quick wins is: π write docs π As you learn the company's tech stack, write notes and eventually make some docs out of it, either big or small Spin the frustration of bad docs into an impactful opportunity.
11 months ago
0
1
0
My new noob discovery about
@svelte.dev
$derived: You might NOT need it! For simple expressions, put it straight into your markup. They're still reactive! $derived is nice to get a reactive **variable** for a complex expression and/or to be re-used many times. Other case, I prefer interpolation.
11 months ago
1
0
0
More reason to love
@drizzle.team
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!
12 months ago
2
5
1
The more I help people online (mostly on Discord forum), the more I realize I don't know everything, even for the most simple-looking questions. As a result, my language becomes softer, answering w/ questions and suggestions instead of strong assertive "yes you must do this/no you're so wrong"
12 months ago
0
0
0
you reached the end!!
feeds!
log in