FrontEnd Development Zero to Hero (67 Part Series)
This is a general overview of programming and is by no means a comprehensive guide to what programming is all about.
The process of communicating with these computers in the language they understand is known as programming.
Programming is fun and it's solely about one thing — problem solving but it can be defined as an art or part of an engineering process but, it mostly involves creating solutions to a set of problems or tasks.
- When should i program?
- What is problem solving?
- How can i program?
- What is a programming language?
- What makes up a programming language?
- Which programming language should i learn?
- What can go wrong with my code?
- How can i get better at programming?
Let's dive in.
You'll mostly want to program in two cases:
- When you have an app idea
- To automate a manual task
Ideas are everywhere, they can pop into your head when you least expect them and they can keep you up at night.
If it's an idea that really of interest, you should consider writing code to implement it. The relief you'll get when the application is done is priceless.
Humans (myself included) love to automate most of our manual tasks, the least been sending an email. If you find yourself doing some manual task repeatedly like emptying your recycle bin or deleting the contents of the temporary folder you might as well write a program to automate this stuff.
There is even a book dedicated to this kind of stuff, can you guess the name?
The moment you decided to automate a manual task or work on an application idea, you've created a problem for yourself and now, you have to solve it.
How you go about solving the problem is known as problem solving.
Problem solving is a fun brain exercise and it involves the following process:
- Requirement specification
- Problem analysis
- Design and implementation
This is the process of writing what the program should do and how it should it. You write this down in plain language you can understand.
Technically speaking these are known as constraints.
Now that you are done writing the constraints, you proceed by taking a birds eye view of the problem you are trying to solve (app idea or automating some boring stuff).
What I mean by "birds-eye view" is to think very carefully about the problem from different perspectives by asking yourself the following questions:
- What do you need to solve the problem?
- What is the cost of solving the problem (technical and man power)?
- Who will use the application?
- Are there similar apps that already solve the same problem as yours?
- If the app becomes a success (by releasing to the public) are you willing to commit to it?
Be honest with your answer(s).
Congratulations if you get to this stage. The design process specifies the procedure on solving the problem (that's the best explanation I could come up with). This will include the following:
- User interface
- This is the space where the user interact with the machine.
- User Experience
- Designing your application by keeping the user (yourself included) in mind.
- Database design
- If your application will store some form of data, you will need a database. Database design is a topic on its own and involves how the data is stored.
- Algorithm design
- Algorithm is a step by step unambiguous way of solving a problem. You can think of an algorithm as a recipe for preparing your favorite dish. To the best of your understanding write out the steps the application should take to achieve its tasks in plain language.
The implementation is the part where you convert the algorithm to code using a programming language that fits the domain of the problem you are trying to solve.
At this stage, you've completed the app and you write code to add new features or fix a bug.
You can listen to the following podcast about problem-solving.
You can program by writing code in a programming language using a text editor or an integrated development environment (IDE).
A Programming language is a tool in the toolkit of a programmer (you). A programming language is used to convert your algorithms to a form that can be executed on a computer.
Technically speaking a programming language is:
A programming language is a formal language, which comprises a set of instructions that produce various kinds of output. Programming languages are used in computer programming to implement algorithms.
Furthermore, programming languages can be classified into two:
When you use a compiled language, you write your code in a text editor or IDE and another program called a compiler converts your code to machine-readable format (0'1 and 1's) then produces an executable.
A compiler is a computer program that translates computer code written in one programming language (the source language) into another language (the target language)
When you use an interpreted language that means there will be an interpreter in the environment to read the actual source code and execute it.
In computer science, an interpreter is a computer program that directly executes instructions written in a programming or scripting language, without requiring them previously to have been compiled into a machine language program
As of December 2019 most programming languages are made up of the following (and more).
- Variables are memory locations that store data.
- Conditional statements
- Conditional statements are used to execute certain code based on a condition.
- Functions are a group of reusable code.
- Arrays are used to store homogeneous or heterogeneous data in an indexed form mostly starting at zero.
The list is incomplete but you'll find them in most programming languages.
You should learn a programming language when you are about to work on a project that requires the use of the language.
This is known as purpose driven learning.
Lots of things. They can be classified into two:
- Syntax errors
- Logical errors
Both classes of errors can lead to bugs in your code.
The act of finding these bugs is called debugging.
One of the ways to get better at programming is by working on projects that force you to think in a different approach every single time there by increasing your problem solving skills.