Automation Champion

Automating Salesforce One Click at a Time
Automation Champion
  • Home
  • About Me
    • Testimonials
    • Resources
  • Process Builder
  • Salesforce Flow
  • Pardot
  • Apex
  • Training Details
    • Salesforce Administrator
    • Salesforce Advanced Administrator
    • Platform App Builder
    • Lightning Flow
    • Pardot
    • Sales Cloud
    • Service Cloud
    • Community Cloud
    • Hands-on Excercises
  • My Books
  • Contact Me
  • Tag: Logical operators in Apex

    • Writing Comments? Focus on Why, not What!

      Posted at 11:01 AM by Rakesh Gupta, on October 24, 2017

      Good code is self-documenting – so the adage goes!

      Comments and codes have inverse relationship – it is believed that better codes need less comments! Only when one reaches a point – where, it would be difficult to grasp the underlying logic without few clues, should one resort to adding comments. This is true; but, is it always true?

      The use case for writing comments – when you write large amount of codes, it might be difficult for others – including you, for that matter! – to remember why were the codes written in the first place! At such junctures, having comments as a guide posts can be a time-saver.

      Before we take a deep dive into why one needs to write comments around codes – and explore different types of comments – let me draw your attention to my previous article Bugged by Bugs? Master Debugging! In the article, I discuss how to debug your code using Developer Console; it is also a good first step in understanding when, and how, to use comments!

      This is fourth article in learning Apex series. If you have not read previous articles – Mastering Apex Variables – a Stepping Stone in your Apex Journey and Pre-requisites for Learning Apex – Logical Mind and Confidence! – I strongly recommend going through them now. Also, there are few assignments for you in the articles; go ahead! take a crack at it right now! It should not take you more than 30 minutes to complete them. Irrespective of whether you are a newbie, just starting a career as a Salesforce Developer, or have some programming background, completing the assignments will help you to – (1) either learn few new things; or (2) at the least, help you to brush up your concepts. At a bare minimum, these articles and assignments will help you to brush up your basic concepts of programming. Good Luck!

      Read the rest of this entry!

      Posted in Apex | 0 Comments | Tagged Admin to Salesforce developer, Always add comments to your code, Apex Journey, Apex Training, best practice to write Apex trigger, best way to add comment in Apex code, best way to add comment in code, Clarification comments, Clarification comments in Apex, Comment your code, Develop logical ability, Develop logical ability in Apex, developer console, Developer Console in Salesforce, Documentation Comments, Documentation Comments in Apex, Execute Anonymous, Execute Anonymous in Apex, Execute Anonymous in Developer Console, How to add comment in Apex code, How to become Salesforce DevArchitecteloper, How to become Salesforce Developer, Logical operators in Apex, not What!, Online Salesforce training, salesforce certified developer exam, Salesforce Online Training, Salesforce Platform Developer I, Salesforce Platform Developer I Exam, Salesforce Platform Developer II Exam, save debugging time add comment, Why comment is important, Why to write comment in your code, Writing Comments? Focus on Why
    • Bugged by Bugs? Master Debugging!

      Posted at 10:05 AM by Rakesh Gupta, on September 18, 2017

      Debugging is an art of finding errors. There are certain constants in life which are unavoidable – death, taxes, and bugs in programming! Debugging comprises of finding the source of a problem in a code base, identifying possible causes, testing out hypotheses until the ultimate cause is found, and then eventually eliminating that cause and ensuring that it will never happen again.

      Before we take a deep dive into mastering debugging, let me draw your attention to my previous article Pre-requisites for Learning Apex – Logical Mind and Confidence! I discussed Variables naming convention and Operators. There were few assignments for you in that article, if you did not get a chance to complete it, do it right now. It will not take more than 30 minutes to complete them. 

      Irrespective of whether you are a newbie, just starting a career as a Salesforce Developer, or have some programming background, I would suggest you complete the assignments. The assignments will help you to, either learn few new things or, at the least, brush up your concepts.

      This is the third article in learning Apex series. If you have not read first two articles – Mastering Apex Variables – a Stepping Stone in your Apex Journey and Pre-requisites for Learning Apex – Logical Mind and Confidence! – I strongly recommend going through it now. At bare minimum, these articles will help you to brush up your basic concepts of programming. 

      The common question people repeatedly ask me is – Are there any prerequisites to start learning Apex Programming? To that, my simple answer is – yes!  However, my recommended prerequisites is not to practice ABCs of Apex! But, it is to cultivate your ability to build logic! If you cultivate your logical mind then, it is not difficult to learn programming languages. After all programming languages are created by mortals like us!

      A person who really wants something will find a way, a person who does not will find an excuse. 

      To learn Apex programming, remove the rust! One of the most efficient ways to do so is to complete a Sudoku puzzle daily – start with easy puzzles.  Let this be a starting point, or a pre-requisite, of your Salesforce Developer Journey!

      Second suggestion – start writing Pseudocode instead of writing Apex code directly. It means solving the problem in plain English (Pseudocode)! And, only then, write the code. Pseudocode is an easy way of writing programming code in English – it is not an actual programming language. It uses short phrases to spell out the logic on how one would solve a requirement before one creates codes in a particular language. Once you are confident about Pseudocode, only then start converting your Pseudocode into any programming language – in our case, into Apex. Remember Pseudocode is just plain English not related to any programming language. 

      Salesforce offers lots of content to get you started on your Apex journey. If you are just starting your Salesforce Developer career then read this article – Creatively Decode Your Salesforce Developer Journey– to get some guidance, as well as, to learn how to achieve your Salesforce Developer goal. 

      My primary purpose, through this and other blogs, is to be your guide and a mentor. As for Apex learning tools – such as browsing through Apex content to get you started on learning the language – there is no shortage of material available on the Web. For example, search for ‘best practice to write Apex trigger’ and you will Read the rest of this entry!

      Posted in Apex | 4 Comments | Tagged Admin to Salesforce developer, Apex Journey, Apex Training, Best way to debug your Apex code, Best way to debug your code, Bugs are your friends, Bugs in Apex, Debugging is not limited to Programming - It is Omnipresent!, Debugging through Debug Log, Debugging through Developer Console, Develop logical ability, Develop logical ability in Apex, Develop logical ability in C++, Develop logical ability in Java, developer console, Developer Console as Source Code Editor, Developer Console in Salesforce, Execute Anonymous, Execute Anonymous in Apex, Execute Anonymous in Developer Console, Execute SOQL in Developer Console, Find bug in Apex, Find bugs in my program, How to become Salesforce DevArchitecteloper, How to become Salesforce Developer, Learn how to debug Apex code, Learn how to debug your code, Logical operators in Apex, Online Salesforce training, Rectify bugs in Apex, salesforce certified developer exam, Salesforce Online Training, Salesforce Platform Developer I, Salesforce Platform Developer I Exam, Salesforce Platform Developer II Exam, Set and View Checkpoints in Apex Code
    ← Older posts
    • Search

    • Upcoming Trainings

      Salesforce Administrator Certification
      Salesforce Advanced Administrator Certification
      Salesforce Platform App Builder Certification
      Lightning Flow & Process Builder
      Pardot Specialist & Consultant Certification
      Sales Cloud Consultant Certification
      Service Cloud Consultant Certification
      Community Cloud Consultant Certification
    • Sponsor #1

    • Sponsor #2

    • Sponsor #3

    • Sponsor #4

    • Order Now!

    • Buy My Book

    • Buy My Book

    • Recent Posts

      • Getting Started with Salesforce Flow – Part 55 (Add or Remove Followers to a Record with the Help of Salesforce Flow)
      • Getting Started with Salesforce Flow – Part 54 (Auto-follow a Chatter Question After Reply)
      • Getting Started with Salesforce Flow – Part 53 (Clone a User with their associated Public Group, Queue Membership and Permission Sets)
      • Getting Started with Pardot – Part 14 (How to Use Pardot Form Handlers)
      • Getting Started with Salesforce Flow – Part 51 (Add a Flow to a Lightning Page)
    • Salesforce ID Converter Build on Lightning Flow

      Converting 15 digit ID to 18 digit Salesforce ID
    • Blog Archives

    • Categories

  • Information

    • About Me
    • Affiliate Disclaimer
    • Contact Me
    • Privacy Policy
  • Top Posts

    • Salesforce Spring’21 Release Quick Summary
    • Learning Flow
    • Getting Started with Salesforce Flow – Part 53 (Clone a User with their associated Public Group, Queue Membership and Permission Sets)
    • Learning Process Builder
    • Getting Started with Salesforce Flow – Part 55 (Add or Remove Followers to a Record with the Help of Salesforce Flow)
    • Getting Started with Salesforce Flow – Part 31 (Auto Submit Record into Approval Process with Flow)
    • About Me
    • Getting Started with Salesforce Flow – Part 11 (Count Number of records in a Record Collection Variable)
    • Getting Started with Salesforce Flow – Part 24 (Automatically Assign Permission Sets to New User)
    • Getting Started with Salesforce Flow – Part 33 (Prior Value of a Record in Record-Triggered Flows)
  • Social Media

    • View Automationchampion’s profile on Facebook
    • View Automationchamp’s profile on Twitter
    • View Rakeshistom’s profile on GitHub