Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
@NewCoder18, It's not really a good question in the sense that it doesn't really clarify what you are asking for, which is to understand how to write better code up front. I'll answer the question though: you are trying to run before you can crawl. Even after 30+ years of software development, I still look at old code and realise I could have done something better. If you want to master programming, you practice it constantly, and learn from others, as well as from your own mistakes. You rarely get it right first go, so you test, refactor, and improve incrementally.
The problem with the question as written, is it's too loosely defined. By what standard is 'efficiency' measured? By which paradigm is the OP programming that is 'familiar'? @DocBrown I see the questions as fundamentally different. The other question asks when to break "the rules". In this case, the OP seeks guidance about whether it's better to just throw any old code together to make something work, or whether to fine tune it from the start. If the question is written in this context, it would be easy to cite several Agile sources as to why it's OK to do anything first, then improve.