Here are a few tips that might make things easier when working on projects It's not unusual that people name their values and objects with something like "thingy" or letters typed randomly from the keyboard, but it makes it easier for you and others if you choose a name that describes what the value or object is going to be used for
Why it's helpful:
So when it's been a while and you look back to the project, you will be able to work out quickly what each value or object does rather than having to go through all the code to understand what each thing is meant to be doing
Things to consider when naming:
There are things you can think about when naming something too. The more descriptive your name is, the quicker you'll be able to remember what it does with just a glance. For example, you could use a value called 'cost A' to store the amount of money that it takes to buy an apple, but 'price of apple' tells you immediately what that value holds (and helps to avoid confusion if you add another item that has a name starting with A). Even if the name is a little longer, it takes you less time to work out what it does each time you look at it.
It can also be helpful to name the start of objects/values with the type of purpose they were made for. So if you have a lot of values for the costs of certain items (e.g. an apple, a banana, a carrot) and you name the values
CostCarrot the grouping might make it more convenient when you look for one cost, you see the other costs too. Or depending on your purpose, it might be easier for you if you want all values relating to carrot to be in one place. You could name your values starting with
Carrot so you can have them all there when you're looking for anything relating to the carrot.
You can always change it, and this can apply to other things too.
If you don't know what something will be used for at the time you choose its name, that's fine too as you can always change the name of an object or value at any time
though you can't change names of values at the moment (it turns out in the new update, you can change names of values now too! Thanks to @CreativeCoder and @CreationsOfaNoob for that!) But any name that you choose to describe what you think the value or object might be used for will be more clear and helpful than "asdf" or "Text4"
You can apply this to lots of other things too — naming projects, files on your device (and even titles of forum topics — "game not starting after tapping button" will help others get an idea of the problem more quickly than only "heeelppp" )
This is just a little something you can keep in mind and I just thought I'd share after reading a sample of App Development With Swift by Apple :) I am sharing too because it had me thinking about how I could improve naming values in my own projects :D