Programming General
Go Back to Programming Guides: Click Here!
Programming basics
Topics
Basics
These are the universal concepts you need to know for basic modern programming:
-Variables and Constants
-Arrays
-Control structures
-Loops (e.g., for, while)
-If-Else statements
-Functions
You can compute anything with these.
Intermediate concepts
-pointers and references
-(Optional)Object Oriented Programming and Classes*
-Polymorphism*
-Abstraction*
-Datastructures
-Time and Space Complexity
-Using External Libraries
*Learning OOP is highly recommended as most
organizations will require this.
Advanced Concepts
-Writing Good Code
-Code Smells
-Cognitive complexity
-Software Architecture
-Maintaining large projects
-Naming objects
Languages that I can advise for:
-C++
-C
-Java
-Python
-Axe Parser
-Cobol
-Z80 Assembly
Understanding programming for a beginner
Programming is more intimidating than it should be.
Mathematical ability is not necessarily required.
It depends on the domain, indeed, lots of programming
has very little to do with math.
Basic logic is the minimum requirement
Variables and Constants
Variables
Imagine variables are like boxes that hold numbers.
int a = 0;
You can put a number in the box. That's assignment.
Any number you put in the box replaces the previous number.
a = 1; //changed from 0 to 1
You can open the boxes to read the contents.
Constants
Constants work like variables except you can only
look inside the box.
The contents of the box can only be set at the beginning.
const int c = 3; //stuck as 3 forever
How do we tell boxes apart?
You can write a name on the boxes and that's called an identifier.
Arrays
Imagine Arrays as a row of boxes.
int c[3] = {1,2,3};
The boxes are numbered sequentially starting from, let's say, zero.
Every box in the array is called an element.
Arrays are useful as lists.
For Example, let's say we want to count the amount of
steps you take every day.
We would make an array of size 7 - one for each day of the week
int days[7];
If you took 500 steps on Monday you would put that number in the beginning element.
days[0] = 500; //monday
If you took 600 steps on Tuesday you would put that number in the next element and so on.
days[1] = 600; //tuesday
You can also sort the array starting from greatest to least by putting the largest
elements at the front and the smallest at the back.
This is not possible with individual variables in a generalized way.
Go Back to Programming Guides: Click Here!