loading...
Cover image for Introduction to programming

Introduction to programming

ziizium profile image Habdul Hazeez Updated on ・6 min read

FrontEnd Development Zero to Hero (67 Part Series)

1) FrontEnd Development: Zero to Hero 2) What is the Internet 3 ... 65 3) What is the Web 4) Web Browsers 5) Tools for Web Development 6) Introduction to HTML 7) History of HTML 8) The HTML specification 9) HTML Elements and Tags 10) Replaced Element and Void Element 11) Writing Accessible HTML 12) Validating HTML documents 13) HTML Resources and Reference 14) Introduction to CSS 15) History of CSS 16) The CSS Specification 17) CSS Properties 18) CSS Selectors 19) CSS Units 20) CSS Specificity 21) The CSS Cascade 22) CSS Inheritance 23) The CSS Box model 24) CSS Margin Collapse 25) CSS Positioning 26) CSS z-index 27) CSS colors 28) CSS Backgrounds 29) CSS Variables 30) CSS Floats 31) CSS Block Formatting Context 32) CSS Flexbox part 1 33) CSS Flexbox part 2 34) CSS Grid part 1 35) CSS Grid part 2 36) CSS Media Queries 37) CSS Typography 38) CSS Animations and Transitions 39) CSS Naming conventions 40) Writing maintainable CSS 41) CSS References and Resource 42) Introduction to JavaScript 43) History of JavaScript 44) The EcmaScript specification 45) Introduction to programming 46) JavaScript Variables 47) JavaScript Arrays 48) JavaScript Objects 49) JavaScript Numbers 50) JavaScript Conditionals 51) JavaScript Loops 52) JavaScript Functions 53) The Document Object Model 54) Introduction to Ajax 55) JavaScript References and Resource 56) Introduction to Web Design 57) History of web design 58) Site Layouts in CSS 59) Introduction to Responsive web design 60) Introduction to Progressive Enhancement 61) Introduction to User Interface design 62) Introduction to user experience design 63) Introduction to Web accessibility and usability 64) Introduction to Color theory 65) Web design References and resource 66) Series final project 67) Building your career as a developer

This is a general overview of programming and is by no means a comprehensive guide to what programming is all about.

Humans communicate with each other using natural languages like English, Spanish or Arabic and communicate with computers using programming languages like JavaScript, Python or Java.

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 starting out with programming, you can ask the following questions:

Let's dive in.


When should I program?

You'll mostly want to program in two cases:

  • When you have an app idea
  • To automate a manual task

When you have an app idea

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.

To automate a manual task

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?

Automate the boring stuff.

[Back to questions]

What is problem-solving?

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
  • Maintenance

Requirement specification

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.

Problem analysis

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).

Design and Implementation

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.

Maintenance

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.

play pause Syntax - Tasty Web Development Treats

[Back to questions]

How can i program?

You can program by writing code in a programming language using a text editor or an integrated development environment (IDE).

[Back to questions]

What is a programming language?

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.
Wikipedia

Furthermore, programming languages can be classified into two:

  • Compiled
  • Interpreted

Compiled language

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.

Technically speaking a compiler is defined as :

A compiler is a computer program that translates computer code written in one programming language (the source language) into another language (the target language)
Wikipedia

Examples of compiled language are :

  • C
  • C++
  • Java

Interpreted 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.

Technically speaking, an interpreter is defined as :

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
Wikipedia

Example of interpreted languages are :

  • JavaScript
  • Python

What makes up a programming language?

As of December 2019 most programming languages are made up of the following (and more).

Variables
Variables are memory locations that store data.
Conditional statements
Conditional statements are used to execute certain code based on a condition.
Functions
Functions are a group of reusable code.
Arrays
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.

[Back to questions]

Which programming language should i learn?

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.

[Back to questions]

What can go wrong with my code?

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.

[Back to questions]

How can i get better at programming?

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.

[Back to questions]


Up next, we'll start coding in JavaScript starting with variables.

FrontEnd Development Zero to Hero (67 Part Series)

1) FrontEnd Development: Zero to Hero 2) What is the Internet 3 ... 65 3) What is the Web 4) Web Browsers 5) Tools for Web Development 6) Introduction to HTML 7) History of HTML 8) The HTML specification 9) HTML Elements and Tags 10) Replaced Element and Void Element 11) Writing Accessible HTML 12) Validating HTML documents 13) HTML Resources and Reference 14) Introduction to CSS 15) History of CSS 16) The CSS Specification 17) CSS Properties 18) CSS Selectors 19) CSS Units 20) CSS Specificity 21) The CSS Cascade 22) CSS Inheritance 23) The CSS Box model 24) CSS Margin Collapse 25) CSS Positioning 26) CSS z-index 27) CSS colors 28) CSS Backgrounds 29) CSS Variables 30) CSS Floats 31) CSS Block Formatting Context 32) CSS Flexbox part 1 33) CSS Flexbox part 2 34) CSS Grid part 1 35) CSS Grid part 2 36) CSS Media Queries 37) CSS Typography 38) CSS Animations and Transitions 39) CSS Naming conventions 40) Writing maintainable CSS 41) CSS References and Resource 42) Introduction to JavaScript 43) History of JavaScript 44) The EcmaScript specification 45) Introduction to programming 46) JavaScript Variables 47) JavaScript Arrays 48) JavaScript Objects 49) JavaScript Numbers 50) JavaScript Conditionals 51) JavaScript Loops 52) JavaScript Functions 53) The Document Object Model 54) Introduction to Ajax 55) JavaScript References and Resource 56) Introduction to Web Design 57) History of web design 58) Site Layouts in CSS 59) Introduction to Responsive web design 60) Introduction to Progressive Enhancement 61) Introduction to User Interface design 62) Introduction to user experience design 63) Introduction to Web accessibility and usability 64) Introduction to Color theory 65) Web design References and resource 66) Series final project 67) Building your career as a developer

Posted on by:

ziizium profile

Habdul Hazeez

@ziizium

I teach and write code with interests in Web Development, Computer Security, and Artificial Intelligence.

Discussion

markdown guide