List out 3 tips you would give a beginner to be a better programmer. 🤓
I follow this routine:
Over period you will identify a pattern. Then go full steam on it.
I wrote about it here: Become a better programmer
.....................
..............
.........
Feel free to read the programming language books, learn some frameworks, and etc... But at the end of the day, the reality is, in order to be a good, smart, engineer, you must master the fundamentals. I'm sure you've heard the lore: Algorithms and Data structures can get you very far with the tech giants, right? Well, why is this? What are these things? They're the fundamentals! Instead of just using other people's code, you actually understand how to implement these things from scratch! Do not ever underestimate this power... Just as it is easy for people to get on YouTube and blurt out obscenities to one another and it requires much more discipline to hold our tongues back when we are challenged, it also requires much more discipline to stop worrying about throwing a product together fast and truly understand the fundamentals of programming. Doing so will cause you to realize there's no such thing as a "hard" problem anymore: Just ones that needs to be broken down, divided, or reduced more.
Take AES-256 Rijndael encryption algorithm for example... At first, you may look at the process of creating this and be scared or intimidated. "I'm no security expert or mathematician." However, when AES-256 becomes:
A couple of lookup tables with:
AddRoundKey(); SubBytes(); ShiftRows(); MixColumns();
rinse, dry, repeat a few times... It becomes much easier to take in... Now, you take those 4 functions and you create sub-problems where you write down the steps you need in order to AddRoundKeys, in order to SubBytes, etc..., Then you go read up on whatever you need, and/or get to work... Next thing you know, Rijndael, something that was "extremely complicated" isn't hard or intimidating at all anymore. This can be applied to all programming and even other life problems. If for example you are breaking those steps down further, now you hear about something called a Galois Finite Field, and you get scared again... Do the same thing with that... Keep breaking things to the atomic level... Ask yourself this question: How did Physicists create a nuclear bomb? By stressing out about "complex problems?" No! They get down to the atomic/nuclear level and played with the basics! That's why it was literally called an atomic/nuclear bomb.
IMO, this is the most important part of programming and something that is overlooked and undertaught like absolute madness... You go to the bookstore and you find 100 syntax books, and these may give hints to the problem-solving aspect, but rarely do books tackle this head-on. If you read the book Cracking the Coding Interview by Gayle Laakman McDowell even, you will notice that she tells Google, Facebook, Microsoft, etc... To look for problem solvers, because most people can learn the knowledge. This is not to say knowledge isn't powerful, because it is, but definitely focus on problem solving via the fundamentals!
PS: Do not actually use your own Rijndael algorithm in a production environment due to the possibility of side-channel attacks. But it's a fun algorithm to write just to learn and challenge yourself! If you want to implement this algorithm, make sure you use the built-in AES-256 capability of your Intel processor because it will be more efficient and also not susceptible to side-channels.
I guess it depends what level you are as to what you need to focus on, but these should be good overall goals for anyone:
make mistakes. the best way to learn coding os to make mistakes, and then fix them. Make sure you know WHY the mistake was caused, so that you can avoid that in the future,
once you got the basics down, go try to help others on Q&A sites. This'll help you realize what you know, and what you need to work on
have fun! if you're not having fun most of the time, then maybe it's time to find something else that you will enjoy.
==> Write a code which handles worst case input as well. - You have to take care before you start writing code
==> Handle unexpected situation in proper way ( ie. many tutorials of php to mysql - if db connection fails then they write die(), this is very bad - PFA ) You can redirect user to some page instead of calling die() & terminating page and give shocking surprise to your end user
==> If you need to repeat a code, never do it. Create separate user defined functions and then call them - In case in future you get to know that something makes your logic more correct - making that change will be very easy

And never give up. Enjoy the coding.
Oh, there are many! Here are the top three according to me:
Sayture Storver
@amir_anwar It's something like. If you are early stage on development. And making chat application then use can use mysql,but after some time you should find the new way to develop chat application any than after you learn how Whatsapp work on chat. and so on...
Martijn Scheffer
1) DRY, don't repeat yourself, write reusable code, it's not just helpful for the next project, code can also be reused in the same project, less code is easier to maintain.
2) Prefer data over code, a simple example: if you are calling the same function over and over, with just different parameters, write a loop and get the values from data.
3) write small functions, rarely more than what fits on a screen, a function should do ONE thing, if you want to do multiple "things" write more functions, then write one function that controls the flow and uses those functions as building blocks.