Syntax Simplify

Question Mark

What langauge should I learn first?

What’s best? Python? Java? C++?

Answer: None of these.

Python might have the least amount of typing. Java is used in enterprise systems across the globe. C++ is the performance king.

But none these are the best language to learn first. They are all tools to be used when they fit the job.

The best first language to learn is thinking like an experienced Developer. Think in terms of the process that needs to happen.

If you use Pseudo Code to write out the process needed then the syntax for programming languages will become interchangeable to you.

The sooner you start thinking in process terms the faster you will grow at finding solutions.


The Syntax Breakdown

Let's look at examples of a Repetition Structure. Probably one of the most powerful basic structures in computer programming.

Display "Hello Internet" 3 times

As Pseudo Code
Process Code
Initialize your starting point Declare Integer counter = 1
Start Loop & Compare counter to your end point While counter <= 3
Display output Display "Hello Internet"
Update your counter after each iteration Set counter = counter + 1
Close your Loop End While
As Python
Process Code
Initialize your starting point count = 0
Start Loop & Compare counter to your end point while count < 3:
Display output print('Hello Internet')
Update your counter after each iteration count = count + 1
Close your Loop Empty - Not used in Python
As Java
Process Code
Initialize your starting point int count = 0;
Start Loop & Compare counter to your end point while(count < 3){
Display output System.out.println("Hello Internet");
Update your counter after each iteration count++;
Close your Loop }
As C++
Process Code
Initialize your starting point int count = 0;
Start Loop & Compare counter to your end point while(count < 3){
Display output cout << "Hello Internet" << endl;
Update your counter after each iteration count++;
Close your Loop }

What can we learn from studying these examples?

The Syntax that is so confusing when we first start learning code isn’t the most important part. All of these examples share the same structure of process.

The differences in syntax between print or System.out.println or cout doesn't matter as much as you knowing that you're going to write output to the console each iteration of the loop.

Look beyond that to the second to last line at count++; and count = count +1. The important part is knowing that you need to update your Loop Control Variable or you'll have an endless loop.

If we focus on the process and logic of an algorithm, we can always find the correct syntax for the language we’re working in. It’s more important that we understand our starting point, the desired output, and the processes needed between them.