There are instances where we need to write APEX code when the desired functionality cannot be achieved through point and click. Following are the links which talks about APEX best practices:
https://developer.salesforce.com/page/Apex_Code_Best_Practices
Enjoy writing good apex code!