HNHacker News
TopNewBestAskShowJobs

huy-nguyen

669 karma · joined August 2, 2016

Software Engineer at the National Institute of Allergy and Infectious Diseases (NIAID). Tech blog at huy.dev. Email me@huy.dev.
submissionscomments
huy-nguyen··on Puppeteer Support for Firefox
What’s the relationship between Selenium, Puppeteer and Webdriver BiDi? I’m a happy user of Playwright. Is there any reason why I should consider Selenium or Puppeteer?
huy-nguyen··on Weather.gov 2.0
The README says they’re done with prototyping and are now building the MVP.
huy-nguyen··on Learning Elm by porting a medium-sized web frontend from React (2019)
If you’re a front-end developer, you should checkout ReScript[1], supposedly a JS-oriented successor of ReasonML and developed by the ReasonML team.

[1] https://rescript-lang.org/

huy-nguyen··on Apple's Pro Display XDR takes Thunderbolt 3 to its limit
The article states the wrong resolution for the Apple display and it’s an interesting mistake because these days there are actually 2 versions of 6K in consumer-marketed computer monitors: the one used by the Apple display (6016x3384) and the slightly larger one used by the Dell U3224KB 6K that came out earlier this year (6144 x 3456). In fact, an interesting thing people found out when they use the Dell 6K display on Intel MacBook Pros running Mac OS between 10.15 and 13.6 is that the Mac cannot do Display Stream Compression at the Dell's native 6144 x 3456, hence the Mac can only drive the monitor at 30hz instead of 60hz. However, if they can fool the Mac into thinking the display is 6016x3384 (same as the Apple display), DSC magically works and they get 60hz on the Dell (at the expense of sacrificing some screen real estate). Apple must probably hardcode the 6016x3384 resolution somewhere in their OS code. Thankfully people report that this problem has been fixed as of Mac OS 14.1 but that bug existed for 4 years.

Edit: this problem only seems to happen on Intel, not Apple silicon machines.

huy-nguyen··on Apple agrees to $25M settlement with US over hiring of immigrants
I think the real punishment for Apple is that it’ll be harder for their employees to get their PERMs certified i.e. more likely to be denied/audited (audit adds 5-6 months on top of the normal 10-11 months), which has been the case for Facebook since the same settlement with DOJ.
huy-nguyen··on I'm Peter Roberts, immigration attorney who does work for YC and startups. AMA
Hi Peter. 2 questions for you:

1) PERM processing time keeps getting longer and longer (now at 11 months, up from 5-6 months a few years ago). Do you know why or if DOL has any plans to improve it?

2) What’s the current average PERM-based I-485 processing time you’re seeing in your office? Any processing time advantage to submitting I-485 separately versus concurrently with I-140?

Thanks.

huy-nguyen··on Yarn 4.0
I’ve been using the new yarn (with workspaces and Plug’n’Play) on a reasonably complex JS project for about 2 years and I think it works great. Congrats to the yarn team on this big release.
huy-nguyen··on Insomnia REST client now requires an account
Thanks. I’ll check it out.
huy-nguyen··on Insomnia REST client now requires an account
I’ve actually tried Paw but I found it tricky because it doesn’t have a quick fuzzy search for existing API requests, which is something I use a lot in Insomnia.
huy-nguyen··on The Atlas of Economic Complexity
Thanks for the kind words.
huy-nguyen··on The Atlas of Economic Complexity
I used to lead the front-end development of this site, including all the visualizations. Glad to see it make HN front page. The team building this consists of really great people and it’s a great place to work. Most visualizations were custom built to various degrees.

Fun fact: the tree map was done with vanilla WebGL2 completely from scratch (handwritten custom shaders, no ThreeJS or Babylon) for performance and I think it’s probably the fastest snd smoothest animating tree map you can find on the Internet.

huy-nguyen··on Ask HN: Does Anyone Like GraphQL?
I use GraphQL, React (concurrent mode) and Relay (hooks version) in a front end app of reasonable complexity and this combo makes fetching data and managing fetched data very ergonomic and cut down on a lot of the usual boilerplate (loading state tracker etc).
huy-nguyen··on Brute.Fail: Watch brute force attacks fail in real time
From the site:

> No legitimate services are offered on the addresses receiving these attempts, so there is no chance of a real user accidently submitting their credentials.

huy-nguyen··on Exterminate your desk: How to remove your mouse
Does anyone have experience with both Shortcat (https://shortcat.app/) and Homerow (https://www.homerow.app/) to make a comparison?
huy-nguyen··on Cample.js: Reactivity without virtual DOM
The author seems to suggest that React is reactive in the sense of “functional reactive programming” (a la RxJS) but React has never been “reactive” at all (see “scheduling” heading on https://reactjs.org/docs/design-principles.html).
huy-nguyen··on How I learned about corporate firewalls
I work at a government agency and here are my tales.

1) They install a root certificate on all machines and use that to MITM all TLS connections using a firewall appliance. They turn this MITM on one day without notifying any developer. Overnight, all our builds (run on-prem) fail because npm install, pip install etc fail and we spent a long time trying to figure it out. They are still failing to this day and I have to get off the VPN every time I need to run these simple commands. IT absolutely doesn't give a flying **** about developers.

2) They ban all non-Chrome browsers from being installed. As in, if you install such a browser and try to launch it, the system will say "browser X is banned. Contact IT." They would have banned Safari too had it not been part of the OS. Furthermore, they also disabled private browsing in Chrome (probably the ability to do this is why they allow Chrome). I think they're preventing people from hiding their internet browsing.

huy-nguyen··on Testing React Apps in 2022 with Cypress: An In-Depth Guide for Beginners
PW’s test inspector is pretty good. You can step through your test code and debug selectors. The inspector also runs in headed mode so you have the regular browser’s dev tools. The only thing left I want from PW is for PW to automatically rerun a test when it’s changed.

https://playwright.dev/docs/debug

huy-nguyen··on Testing React Apps in 2022 with Cypress: An In-Depth Guide for Beginners
Agreed. I started a project with Cypress a year ago (having used Cypress for more than a year at that time) but then had to switch to Playwright and have been quite happy with it 200 tests later. PW is able to do everything I needed from Cypress and has much better performance (easy parallelism and sharding) and has tracing/video recording in the free version. PW also uses regular JS promise versus the mysterious half-async-half-sync Cypress commands. A less mentioned distinction between the 2 is that Cypress also runs in the browser main thread and I’ve observed that this interferes with React 18 applications that use concurrent rendering so tests become unreliable (not the case with PW). One thing PW lags behind is the interactive test runner and I think they’re working on it.
huy-nguyen··on Rethink Using Wrist Rests
I’ve used a Kinesis Advantage 2 for a long time and just upgraded to the new Advantage 360 + new palm rests, which actually achieves all the recommendations in the article. The heels of my palm (not wrists) rest on the large, nice, highly padded fabric palm rests. The 2 keyboard halves can be freely moved around, rotated laterally and tented (with 3 settings, up to 25 degrees) to ensure my hands, wrists, arms and shoulders maintain natural alignment. I also set my keyboard tray to be slightly below my elbow and the keyboards are placed on a negative incline so that my arms extend in a downward slope away from the elbow and my shoulder is not hunched. This setup allows my hands, arms and wrists to feel completely relaxed at all times.
huy-nguyen··on Singing: The key to a long life (2008)
> Singing is strange, you can't really see what other singers or yourself are doing. With the piano you can take a look at your teachers hands, but with singing you have to go on a kinda of exploration into sensations in your body, with the teacher as an experienced guide.

Actually the same is true for playing the piano as well. Piano playing is not as intuitive as people believe because it is not just the apparent vertical movement of fingers hitting the keys. Rather, it actually involves the entire lower arm from the elbow down to the finger tips working together. What you see as a concert pianist’s fingers moving up and down is a lot of the time actually a series of very rapid and infinitesimal wrist rotations and learning these rotations actually require piano students to feel the subtle muscle sensations and movement associated with those movements.

huy-nguyen··on Ask HN: Best React and TypeScript book for experienced programmers?
The React team is working on a beta version of React tutorial that is much more organized and up to date (using function components and hooks instead of classes) than what’s in the production site: https://beta.reactjs.org/learn. I think it’s easily the best tutorial out there because it explains concepts very clearly.
huy-nguyen··on About the Reactor
I was aware of the reactor when I applied but it wasn’t the primary motivating factor. I’m sure many schools have unique programs like this and it’s just a matter of taking advantage of them wherever you attend.
huy-nguyen··on About the Reactor
I went to Reed as an undergraduate in the recent past and spent 2 academic years (freshman and sophomore) attending the training courses to earn both a Reactor Operator and Senior Reactor Operator licenses. Each level took about one and a half semester and consisted of weekly lectures and labs. The remaining half semester is spent on prepping for the federal licensing exam. The Nuclear Regulatory Commission fly out 2 examiners at the end of each academic year to administer these exams (around 3 hours of written exam and 2 hours of “walk through” exam where they walk with you around the facility and ask you anything and everything about the reactor and its supporting systems). As an undergraduate, your license automatically expires when you graduate unless you become an associate director of the reactor (I personally know one person who was good enough to qualify for this exception). It was a unique experience and I learned a lot about nuclear physics in the process.
huy-nguyen··on My journey through the American immigration system as a computer engineer
This is a great point that is rarely mentioned. China has larger population than India yet has a much shorter backlog so is it really the fault of the US immigration system that India has a long backlog? The Indian outsourcing industry and India’s lower level of economic development are parts of the problem.
huy-nguyen··on Two Silicon Valley executives charged with H-1B visa fraud
You should have filed form WH-4 [1] with the Wage and Hour division of the Department of Labor to report the violation. That could have stopped the employer from exploiting other foreign workers.

[1] https://www.dol.gov/agencies/whd/forms/wh4

huy-nguyen··on Two Silicon Valley executives charged with H-1B visa fraud
This sounds like just another run-of-the-mill H1B staffing firm fraud to me.
huy-nguyen··on America COMPETES Act of 2022 passed House and Senate
Per [1], the House version contains important immigration provisions.

1) The bill would create a new category of non-immigrant visa called the W visa for owners (W-1) or essential employees (W-2) of start-up companies and their dependent family members (W-3).

2) The bill would exempt applicants holding a PhD in a STEM field from the annual per-country green card limits, enabling them to quickly apply for permanent residency without being subject to the availability of an immigrant visa. This would benefit Indians and Chinese nationals the most.

3) The bill would provide for Temporary Protected Status for certain qualified residents of Hong Kong, as well as Special Immigrant Status for highly-skilled Hong Kong residents, capped at 5,000 per year.

However, this bill is not finalized yet according to [2]:

> But it’s not through to Biden yet: Now the Senate and the House will have to reconcile their competing versions of the bill, and “a final measure is unlikely to be completed before the end of May”

[1] https://www.rnlawgroup.com/immigration-provisions-in-the-ame...

[2] https://www.politico.com/newsletters/playbook/2022/03/29/the...

Edit: clarified that these are only in the House version and will have to be reconciled with the Senate version.

huy-nguyen··on Dentist broke his patients’ teeth to make millions installing crowns, jury finds
“THE TRUTH ABOUT DENTISTRY. It’s much less scientific—and more prone to gratuitous procedures—than you may think.”

https://www.theatlantic.com/magazine/archive/2019/05/the-tro...

huy-nguyen··on Ask HN: Who is hiring? (March 2022)
I left this team a few years ago after working there for 3 years under the parent’s poster (PM of the team). I really loved it there and parent poster is a really great manager to work with. Feel free to email me if you need to talk to someone outside the hiring org.
huy-nguyen··on Facebook settles federal lawsuit over allegations it favored foreign applicants
You're right. What Facebook is accused of is not putting enough effort into recruiting US workers to show that there's no qualified US worker for the Green Card "positions" that H1B workers have to "apply" to.
Page 1 of 5Next →