July 2023: The Future of Responsive is Exciting and Very User Preferences Driven
Also, avoid some hard-to-locate JavaScript bugs with just a few extra lines of code in your package.json file.
Hey all,
I hope you’re all doing your best to stay cool during this global heat wave this summer. It’s definitely hot here, but I won’t complain - I’ll take heat over cold any day.
But enough about the weather, let’s get to what I’ve been up to over the past month tech-wise, that’s what you’re all here for, right?
Una Kravets and Adam Argyle of Google’s Chrome DevRel team shared how responsive design is easier and better than ever in a fresh PodRocket interview.
Becoming a part time host for LogRocket’s podcast this past spring has given me the chance to speak to some very cool and influential people in the web development community, and talking about the future of responsive design with Una Kravets and Adam Argyle from the Google Chrome DevRel team was no exception.
They cover so many new features like high dynamic range (HDR) colors, CSS container queries, more intelligent layouts, and browser-based view-transitions that are just going to make websites that much slicker.
It was great speaking to them both, and if you have time, I’d also highly recommend watching their conference talk of the same name - the code demos they put together to show what’s possible now are amazing!
I also wrote a blog about defining Node engines in JavaScript projects to prevent hard to pinpoint bugs during production deployments.
If you’ve been doing professional web development for any length of time, you’ve probably encountered a similar scenario: the code’s working fine on your machine, everything’s looking good, and as soon as it’s deployed to production, it fails.
Again, you fire the app up locally and all is good: the code runs, no errors are thrown, automated tests are passing - what gives?
Well, what might be the cause of the problem is a mismatch between the Node.js version you’re developing with locally and the Node.js version your production app is trying to run in on the cloud.
Needless to say, this is a very hard to locate bug that requires carefully reading logs and checking various software versions, and the thing is, it can be prevented (or at least made less likely to happen) by defining Node engines inside of a JavaScript app’s package.json
file.
When “engines”
is included in a package.json
, the build will download a version of Node.js at or above the version specified - and it can also be used for npm and Yarn versioning as well.
A few simple lines of code can prevent at least one way that code might work locally and mysteriously fail when going to production. Don’t let your app fall prey to it.
I hope you enjoyed this month’s edition of “Paige Codes.” Please share with your friends if you did.
See you again at the end of August,
- Paige
Not subscribed yet? No worries.
I send a free email every month or so. You can check out my archive, or sign up below: