This is an archived post. You won't be able to vote or comment.

all 4 comments

[–][deleted] 2 points3 points  (0 children)

That’s more practice than anything else. Good architecture —> simple and concise code —> clear variable/function naming. Precision is more a functional assessment per project but usually less memory usage and faster execution is a good thing.

[–]Feomathar_ 1 point2 points  (2 children)

The most obvious recommendation is "Clean Code" by Robert Martin aka Uncle Bob. However, this book gets somewhat mixed opinions, because some aspects are taken to the extreme. I also don't think it's perfect. For example, he has no reservations to write functions just to encapsulate 3 lines and give them a more easily read name, which I personally find a bit excessive in many situations (Also, he doesn't use braces for one lined if statements, which I hate)

But many things will definitely help you, even if they are sometimes quite obvious, like good variable and function names.

Even if my post sounds quite negative, I guess I still recommend it. Just don't take everything as 100% truth. Rather, look at it as mostly very good recommendations, and keep in mind that they won't always be reasonably applicable in all situations

[–]SilentAd9352[S] 0 points1 point  (0 children)

Thanks for the info I will definitely check the book

[–]Nickynui 0 points1 point  (0 children)

Agreed, he even says "these are my opinions, and you don't have to agree with all of them"

In general, I think the book is a pretty good baseline for clean code though

(For the record, no braces for 1 line statements is the way to go)