Advertisement · 728 × 90

Posts by Parker Codes

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

9 months ago 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?

9 months ago 1 0 1 0
20 Lessons on Tyranny: by Timothy Snyder / read by John Lithgow
20 Lessons on Tyranny: by Timothy Snyder / read by John Lithgow YouTube video by PoliticsGirl

youtu.be/cXR5HLodsT8?...

10 months ago 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.

10 months ago 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...

11 months ago 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.

11 months ago 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!

11 months ago 0 0 2 0
Advertisement
UIST 2019 Visions - Michel Beaudouin-Lafon: A World Without Apps
UIST 2019 Visions - Michel Beaudouin-Lafon: A World Without Apps YouTube video by ACM SIGCHI

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

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

1 year ago 6 2 0 1

The International Space Station moves 5 miles per second. 😐

1 year ago 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?

1 year ago 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. 😄

1 year ago 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?

1 year ago 1 0 1 0

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

1 year ago 1 0 1 0

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

1 year ago 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...

1 year ago 0 0 0 0

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

1 year ago 2 0 0 0
Advertisement
Post image

It also makes it harder for them to ban books.

1 year ago 22871 8346 523 489
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?!

1 year ago 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)

1 year ago 357 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.

1 year ago 0 0 0 0

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

1 year ago 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...

1 year ago 0 0 0 0

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

1 year ago 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:

1 year ago 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?

1 year ago 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).

1 year ago 0 0 0 0
Advertisement
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

1 year ago 0 0 0 0

I just did the same 2 weeks ago!

1 year ago 1 0 0 0

Not so hot here right now. 🙂

1 year ago 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.

1 year ago 0 0 0 0