Parker Codes's Avatar

Parker Codes

@parker-codes.dev.bsky.social

Code Wizard • Director of Technology • Statecharts • a11y • UX Design • Architecture • Security • Proud Father of 3

99 Followers  |  42 Following  |  43 Posts  |  Joined: 31.10.2024  |  1.8336

Latest posts by parker-codes.dev on Bluesky

Preview
CSS conditionals with the new if() function  |  Blog  |  Chrome for Developers Learn about the new CSS if function, which enables a cleaner developer interface for dynamic styles like style queries and media queries.

developer.chrome.com/blog/if-arti...

08.07.2025 17:53 — 👍 1    🔁 0    💬 0    📌 0
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>

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?

08.07.2025 17:53 — 👍 1    🔁 0    💬 1    📌 0
20 Lessons on Tyranny: by Timothy Snyder / read by John Lithgow
YouTube video by PoliticsGirl 20 Lessons on Tyranny: by Timothy Snyder / read by John Lithgow

youtu.be/cXR5HLodsT8?...

15.06.2025 05:24 — 👍 1    🔁 0    💬 0    📌 0

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.

15.06.2025 02:01 — 👍 0    🔁 0    💬 0    📌 0
Parker's JSNation 2025 badge

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...

13.05.2025 14:23 — 👍 1    🔁 0    💬 0    📌 0

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.

30.04.2025 18:33 — 👍 0    🔁 0    💬 0    📌 0
Grain-free tortilla chips, raisins, sunflower seeds, and Triscuits

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!

30.04.2025 18:33 — 👍 0    🔁 0    💬 2    📌 0
UIST 2019 Visions - Michel Beaudouin-Lafon: A World Without Apps
YouTube video by ACM SIGCHI UIST 2019 Visions - Michel Beaudouin-Lafon: A World Without Apps

“A World Without Apps” by Michel Beaudouin-Lafon (2019)

m.youtube.com/watch?v=ntau...

23.02.2025 21:17 — 👍 4    🔁 2    💬 0    📌 0

The International Space Station moves 5 miles per second. 😐

13.02.2025 03:50 — 👍 1    🔁 0    💬 0    📌 0

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?

16.01.2025 18:18 — 👍 2    🔁 0    💬 0    📌 0

Driving without my left-side rearview mirror was a bit terrifying. I did my best to only make right turns until we fixed it. 😄

15.01.2025 15:02 — 👍 0    🔁 0    💬 0    📌 0

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?

06.01.2025 19:41 — 👍 1    🔁 0    💬 1    📌 0

If the podcasts are too inspirational, maybe that isn't helping. 😄

06.01.2025 17:38 — 👍 1    🔁 0    💬 1    📌 0

For yourself, is it because your mind wanders? How late are you looking at a screen?

05.01.2025 21:01 — 👍 1    🔁 0    💬 1    📌 0
Wall-E movie shot depicting an overweight man watching a screen with no care for reality

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...

31.12.2024 20:15 — 👍 0    🔁 0    💬 0    📌 0

Every year I get several books for Christmas, but they are mostly from me. 😄

29.12.2024 05:15 — 👍 2    🔁 0    💬 0    📌 0
Post image

It also makes it harder for them to ban books.

22.12.2024 23:58 — 👍 23008    🔁 8395    💬 533    📌 493
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'."

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?!

16.12.2024 22:02 — 👍 0    🔁 0    💬 0    📌 0
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 'interest'

state of javascript 2024, showing svelte at the number one spot for 'positivity'

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)

16.12.2024 17:00 — 👍 364    🔁 40    💬 17    📌 7

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.

15.12.2024 18:29 — 👍 0    🔁 0    💬 0    📌 0

Oh, I've had this one ready. I'd want to learn Shavian or Quickscript.

15.12.2024 18:26 — 👍 0    🔁 0    💬 1    📌 0
An office desk of a freelancer burdened by many thoughts.

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...

14.12.2024 19:02 — 👍 0    🔁 0    💬 0    📌 0

Testing a system as an angry customer persona is so much fun

10.12.2024 16:15 — 👍 0    🔁 0    💬 0    📌 0
Code snippet:

const isValidFormat = () => validateFormat(input);
const isNotBlacklisted = () => checkBlacklist(input);
const hasValidSession = () => verifySession(user);

if (isValidFormat() && isNotBlacklisted() && hasValidSession()) {
  // Proceed with processing
}

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:

04.12.2024 17:53 — 👍 0    🔁 0    💬 0    📌 0
Code snippet:

const isValidFormat = validateFormat(input);
const isNotBlacklisted = checkBlacklist(input);
const hasValidSession = verifySession(user);

if (isValidFormat && isNotBlacklisted && hasValidSession) {
  // Proceed with processing
}

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?

04.12.2024 17:53 — 👍 0    🔁 0    💬 1    📌 0

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).

02.12.2024 02:22 — 👍 0    🔁 0    💬 0    📌 0
Preview
Ricky - Not just another boring AI companion The must have tool for those who aren't funny, but want to be.

What a fun site!

www.whoisricky.lol

28.11.2024 01:25 — 👍 0    🔁 0    💬 0    📌 0

I just did the same 2 weeks ago!

25.11.2024 20:17 — 👍 1    🔁 0    💬 0    📌 0

Not so hot here right now. 🙂

24.11.2024 17:45 — 👍 1    🔁 0    💬 0    📌 0

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.

21.11.2024 18:05 — 👍 0    🔁 0    💬 0    📌 0

@parker-codes.dev is following 20 prominent accounts