My son (12) has learned JavaScript over the last 2 years


My son (12) has learned JavaScript over the last 2 years. He struggles with picking good variable names. This leads to confusion about what his code does.

Takeaway: Naming things well isn't just about readability later. Naming things well makes code easier to *write* too.
A common conversation:

Son: "I don't know why this isn't working."

Me: "What is that line supposed to do?"

Son: "I don't remember what I was trying to do."

Me: "Pick a clear intent first. Then pick a good name that describes your intent."

View original on X