The hard part of optimizing code is to find areas were your code is weak at and taking too long to do something.<p>In my best practices and I learned this from a video by Grace Hopper, is to use less code to do the same thing. Less code takes up less memory and usually runs faster.<p>Just writing code and then compiling it without any errors doesn&#x27;t mean it is done. You still have to optimize it and do security checks as well as quality checks. You still have to check for bugs and side effects. You have to use it and think like a user would to see how the user would see it.