2.4 Variables only store data

The concept

A variable is a container of a small piece of information. And it only remembers the value of that information. It doesn’t know know how is that value generated or where it is coming from. This concept might seem easy, but it is worth taking some time really understanding it. Here is a sample code.

• • •

2.2 Variable types and conversions

The concept

In our last post, we mentioned that Apex is a strong typed language, which means each variable must have a type and that cannot be changed. In this post, I will show you a number of frequently used variable types in Apex and a few basic operations. Here comes the code:

• • •

2.1 Using variables to store information

The concept

There are always things we want to remember. We need to remember which tasks we need to work on. We need to keep track of grocery list we want to buy at the shopping centre. In those cases, if the information is hard for our brain to remember all of them, we write them down in a piece of page or track them down in the computer. So later we can find them.

• • •

1.3 Comments – why are they useful?

The concept

In short, comments are something which is for human to understand the piece of code, but doesn’t make any actual different to computer. Compilers will automatically ignore all the comments you have written in your code. So:

• • •

1.1 An important message

Open Developer Console

There are several ways to write code in Salesforce. For now, let’s use developer console. It is a very good tool for beginners. There are several reasons:

• • •

Programming – How hard is it?

If you search through google about how hard programming is, you will get very different answers. Some will tell you programming is easy, everyone can learn how to programme without any issue. Others will tell you it is extremely hard, you will never be able to achieve it without a strong will. So, which one is correct?

• • •