Start Over Coder

045: Improving Naming Conventions

Informações:

Synopsis

The more you write code, the more you realize the importance of choosing good names for your functions and variables. In this episode I discuss a few best practices I’ve picked up so far. As a newbie to writing code, it's just about getting the darn code to work. Lots of questions take priority: What is a function? What is this var I keep seeing everywhere? Did I miss a semicolon AGAIN!? Thinking about how to name functions, variables, or elements takes a back seat. But the more you read code, and especially the more you read your own code from the past, it's easy to see just how important it is to name things well. It's probably the most important thing you can do to make your code readable.  Here are some tips I've picked up so far about naming conventions: Be specific with names so that the name describes what is actually happening. Example: name a function calculateAge() instead of just calculate(), which is too vague. Don't use similar names. My terrible bad example was when I called a button "item-rewa