This is now the conclusion section of this Python course,
and I want to give you a few best practices I've learned from
my own experience before you continue your Python journey.
Those will help you write better code and solve problems in a more efficient way.
Let's start.
First, try to respect the naming conventions.
For example, use underscore to separate words in a variable name,
but use capitalized words for classes names.
Doing this will force you to be consistent,
it will make your life easier when reading code from
others, who are also respecting those conventions,
and it will make other people's lives easier when reading your own code.
Well, the conventions are simply here to
facilitate collaboration, so use them properly.
Also, give meaningful names to your variables, functions, classes, etc.
If you need to read a temperature, then name the variable temperature,
and not tprt or just tpt for example, just to gain a few characters
and add a lot of confusion about what your variable means.
Then be careful with the indentation.
Python relies on indentation to make sense of the code you write,
so always double check that what you want to write in
a block of code is actually inside that block of code,
and not somewhere else because the indentation is not correct.
Another best practice is to try to not repeat yourself.
Use loops, functions, and if needed classes whenever you can.
Create building blocks and reuse them
instead of writing the same code all over again.
Then, and this is more general but super important, keep things simple.
It's not because your application is complex
that your code should be overcomplicated.
Think before you write code and write just what you need.
You don't create the foundation for a castle
when what you really need is a wood cabin, right?
So don't over-optimize your code
and actually don't optimize at all before you really need to.
Keep things simple when you code,
go to the point and focus on solving the problems you need to solve and no more.
And the last advice I'm going to give you now
is to search on Google and actually practice searching on Google.
This, I can tell you, is a real skill
that unfortunately is completely underestimated by many people.
Being good at programming doesn't mean
you know all the functions of all languages by heart.
Being good at programming is about being good at solving real problems using code.
And a part of that is searching on Google whenever you don't know something.
In fact, if you ask any developer out there, including me,
what they mostly do in a day, they are probably going
to tell you, "Well, I searched stuff on Google."
You don't need to know everything, but you need to know how to search for information
and how to apply that information to solve a given problem.
This is the real value of a great developer.