Posts by Parker Codes
Instead of this: <div class="bg-blue-500 {isError ? 'bg-red-500' : ''}"> Hello </div> It could look like: <div data-error={isError} class="bg-blue-500 if(--data-error):bg-red-500"> Hello </div>
Thoughts on @tailwindcss.com syntax for the new if() function support?
youtu.be/cXR5HLodsT8?...
Weeks later and I don't need any of these, so they acted as a transition to just eating less (no snacks). I feel less hungry throughout the day, and even eat smaller meals.
I’m attending JSNation – the main JavaScript conference of the year. You may join me there for free with 10k other JS engineers and 40+ great speakers. Just follow this badge.
#javascript
gitnation.com/badges/jsnat...
To be clear, "somewhat healthy" doesn't imply that this is my source of nutrition. I eat lots of protein throughout the day, and eat the bulk of my food at dinnertime.
That's just what works for me.
Grain-free tortilla chips, raisins, sunflower seeds, and Triscuits
These are my go-to desk snacks.
For me, they meet the sweet spot of tasty yet somewhat healthy, and I only need to have small portions.
Eating a full meal can cause me to feel drowsy, but if I pair these with lots of water and some short breaks from the screen, I'm golden!
“A World Without Apps” by Michel Beaudouin-Lafon (2019)
m.youtube.com/watch?v=ntau...
The International Space Station moves 5 miles per second. 😐
What tech conferences/expos do you recommend attending in 2025?
I'm looking for events that can inspire, showcase cutting-edge tech, bridge higher-level ideas into business practices, and are not focused on one specific framework or tool. Suggestions?
Driving without my left-side rearview mirror was a bit terrifying. I did my best to only make right turns until we fixed it. 😄
On one hand, mental stimulation before bed might cause problems. On the other, it might tire you out enough for a good night's sleep. So maybe it's not about stopping that, and about figuring out what to do in the middle to wind down?
If the podcasts are too inspirational, maybe that isn't helping. 😄
For yourself, is it because your mind wanders? How late are you looking at a screen?
Wall-E movie shot depicting an overweight man watching a screen with no care for reality
Latest Blog Post: Make Real Friends
parker-codes.dev/blog/make-re...
Every year I get several books for Christmas, but they are mostly from me. 😄
It also makes it harder for them to ban books.
Bot thought about HTML content in request string for 9 seconds, then said "Before I can help you with that, please solve this challenge first: Type the letter 'D'."
Oh, no. ChatGPT is now asking me to do things before it answers?!
state of javascript 2024, showing svelte at the number one spot for 'interest'
state of javascript 2024, showing svelte at the number one spot for 'positivity'
most interesting framework for the sixth year running, most positively viewed for the second
(usual caveats apply! but, like... the people have spoken. if you're starting a new web project, use @svelte.dev)
The character sets themselves are not useless, but I've never met anyone else that would use them so it would be like learning a dead language - not super practical.
Oh, I've had this one ready. I'd want to learn Shavian or Quickscript.
An office desk of a freelancer burdened by many thoughts.
New blog post: Top Tips for Freelance and Agency Developers: Hourly Billing and Beyond
parker-codes.dev/blog/freelan...
Testing a system as an angry customer persona is so much fun
Code snippet: const isValidFormat = () => validateFormat(input); const isNotBlacklisted = () => checkBlacklist(input); const hasValidSession = () => verifySession(user); if (isValidFormat() && isNotBlacklisted() && hasValidSession()) { // Proceed with processing }
Answer: Every condition is evaluated, even if the first false would do the trick.
Instead, we can utilize functions to keep the code readable.
A simple trick would be to use inline functions, only adding a few characters per line, and then call those functions like so:
Code snippet: const isValidFormat = validateFormat(input); const isNotBlacklisted = checkBlacklist(input); const hasValidSession = verifySession(user); if (isValidFormat && isNotBlacklisted && hasValidSession) { // Proceed with processing }
Code performance tip:
In programming, "short-circuit evaluation" refers to how logical operators like && and || evaluate from left to right and stop as soon as the result is determined.
Do you see what could be slow about this code?
I don't have it perfectly figured out, but in the past couple of years I've been able to get more personal time, usually after they're all in bed or when my partner takes the kids for a while (which I also do for her).
I just did the same 2 weeks ago!
Not so hot here right now. 🙂
I agree! I think that there was a time when React was rightly chosen for the size of the ecosystem, but in the past 3 to 5 years the other major frameworks have bolstered the quality and type of offering to match.