Today I Learned - Rocky Kev

TIL of a guide for naming things

POSTED ON:

TAGS:

This is a very very excellent guide to naming things.

But honestly, it's been my bible.

There's so many things I agree with.

So something like this:

// avoid this
.imgFloatLeft
{
float: left;
}

.imgFloatRight {
float: right;
}

// Try this instead:

.rtfMedia--left
{
float: left;
}

.rtfMedia--right {
float: right;
}

Why is this important? Because .imgFloatLeft no longer is accurate when we switch to ltr format.

There's so many great tips here, and I can't just copy/paste it all.

Read it.

https://blog.frankmtaylor.com/2021/10/21/a-small-guide-for-naming-stuff-in-front-end-code/


Related TILs

Tagged:

TIL Microservice vs Monolith

Final Verdict: You can do way more damage setting up a microservice architecture incorrectly in the long run than a really bad monolith.

TIL of a guide for naming things

Naming is hard. Naming is important because '.imgFloatLeft' no longer is accurate when we switch to 'ltr' format.

TIL this glorious website - No Hello

Nothing worst than the dreaded 'Hello', followed by silence. Just start talking.