DEV Community

Cover image for Want to Be a Programmer?
Roseline Bassey
Roseline Bassey

Posted on • Edited on

Want to Be a Programmer?

Most likely, you've heard your friends, family, or social media buddies talk about programming and its benefits. Alternatively, perhaps you are interested in working in a company such as Google, Amazon, Meta, etc., and would like to learn how to program so you can get your dream job with them.

This blog post would provide you with an understanding of the basics of programming, as well as how you can start learning this valuable skill. I hope that after reading this post, you’ll be excited to start your programming journey!

What is Programming?
Programming is the process of writing instructions for a computer to follow. These instructions tell the computer how to carry out a task. For example, when you create a new Amazon account, you go through a set of instructions written by programmers.

This is made possible by the programming code that tells the computer what to do. So, writing these instructions is called programming. They are written by programmers.

Who is a Programmer?
A programmer is somebody who writes code, or specific sets of instructions, that tell a computer what to do. They might create and design websites, develop desktop programs, build mobile apps, develop video games, create Artificial Intelligence algorithms, or perform statistical analysis - just to name a few possibilities. In other words, they make the computer do what they want it to.

For example, they might write instructions that say ‘add the two numbers in cell A1 and cell B1, and put the answer in cell C1’. The computer will then follow those instructions and do exactly what the programmer has told it to do. In a sense, a programmer is like an artist who creates things with code. Programmers might work alone or in teams. They could be employed by companies or organizations that need their skills, or they could be self-employed.

The Language of the Computer
Just like you and I use language as a means of communicating our ideas, expressing our emotions and thoughts. Computers also make use of language to communicate. The computer language is defined as the syntax used to write specific applications. Its language is represented as binary digits 0’s and 1’s. The computer language can be classified into three categories:

High-level Language:
This is the language that is commonly understood by humans. A high-level language contains symbols and words familiar to humans. This kind of language is used by programmers in writing programs. Examples of high-level languages include BASIC, COBOL, Pascal, and C++.

Assembly language:
This is a low-level computer programming language that makes use of mnemonic codes (Abbreviation of a longer name) to represent instructions. Examples of assembly languages include 8086, 8085, 8051, and PIC Microcontrollers.

Machine language:
This is a low-level computer programming language that uses binary numbers to represent instructions. Instructions are represented in 0’s and 1’s that the computer understands and responds accordingly. For example, your first line of code could be a piece of code that displays “Hello World” on your computer screen. The only reason why your computer responded with “Hello World” text is that the compiler converts the programs to binary codes known as machine language.

An example of machine language for the text “Hello World” is interpreted this way:

           01001000 0110101 01101100 01101100
           01101111 00100000 01010111 01101111
           01110010 01101100 01100100.
Enter fullscreen mode Exit fullscreen mode

What Exactly is a Programming Language?
Programming language is a language that is understood by a computer. By receiving instructions written in the programming language, the computer acts, behaves, and executes according to the instructions.

Programming languages come in a variety of types, and each has a specific function. Before you start programming, it's important to understand how different programming languages operate. Moreover, it is important to choose a language that matches your vision or goals.

Types of Programming Language:
Just like human language is diverse from nation to nation or even within a nation, so is the programming language. There are different types of programming languages available today. Some of them make it easy to read and write code while others help programmers in solving complex problems. That being said, let’s take a look at some of the most popular programming languages:
JavaScript
Java
Python
C++ etc.

How to Learn to Code
Learning programming languages is similar to learning foreign languages. While acquiring your first language may seem easy with no or less amount of effort, a second language requires you to pay attention to the language rules. For example, to learn how to be proficient in a given language one needs to pay keen attention to the grammatical rules or conventions that guide the language.

So, learning to code is not far from this reality. Let's say for example you’re learning to write in JavaScript. You'll need to learn and get familiar with the syntax, its conventions, rules, etc. That way you’ll be able to write codes in JavaScript.

What Programming Language Should you Learn?
One of the most common questions asked by prospective programmers is what is the best programming language to learn? There is no absolute “best” language; each language has its strengths and weaknesses. Before choosing a programming language you should consider answering the following questions:

Do you intend to build web apps?
Do you want to develop Android apps or iOS apps?
Do you have an eye for video games?
Are you good at arranging data structures?
Are you fascinated by building stuff with AI?

Considering your answers to these questions you should have a clear guide to the type of languages required in your chosen field. However, it’s advisable at this point in your career that you focus on mastering a particular programming language. Don’t make the mistake of jumping from one language to another. Do you know why? No company pays you for knowing all the programming languages in the world, they rather pay you for what problem you’re able to solve with a specific language. Therefore, choosing a language is dependent on your career path.

Starting with HTML and CSS
CSS and HTML are technically not programming languages, but they are an excellent place to begin when learning about how programming works.

What is HTML?
HTML is an acronym that stands for HyperText Markup Language and the latest version is HTML5. It defines how the web page contents can be displayed on different devices such as computers, tablets, phones, and other portable devices. HTML describes the structure of a Web page.

It is the skeleton to which you build your page's content. It describes how text, links, and images will be formatted and displayed on a webpage. It consists of several elements and each element tells the browser how to display the content.

The Basic Structure of an HTML Document

A basic structure of an HTML document

Typically, an HTML document consists of 5 elements:

1.<!DOCTYPE html>
The DOCTYPE declaration is used to specify which version of HTML the page is written on.

  1. <html>
    This is the root element of an HTML page.

  2. <head>
    The head element contains meta information of the page that isn’t displayed directly on the Web page. <meta> element provides additional information such as page keywords, page description, and the author(s) of a web document.

  3. <title>My New HTML Page</title>
    The title element defines the title of the page. It is displayed in a Web browser’s title bar.

  4. <body>
    The body element contains Web page content such as texts, videos, images, links, etc. that are visible.

HTML Elements and Attributes
HTML tags or elements, and attributes are the building blocks of HTML and are used to create dynamic and responsive web pages.

Elements
An element consists of an opening and closing tag with the content inserted in between. It is enclosed by angle brackets but with a forward slash inserted before the end tag. For example, the <p> element is used to create a paragraph.
<p>My first paragraph.</p>

Attributes
An attribute provides additional information about an element. Attributes are written within the opening tag. It is made up of a name and a value. The value of an attribute is inserted within quotation marks like in the image below.

An example of HTML element and attribute

File Naming Conventions
While there is no standard way to name your HTML and CSS files, there is a standard extension suffix that should follow your file name. HTML files must end in .html while CSS files must end in .css just like in the image below.

An image displaying HTML and CSS file naming format

What is CSS?
CSS, or Cascading Style Sheets, is a common language used to define the style of a page. It defines the visual appearance of a site. CSS is used by your browser to design the layout and style of your web page.

Understanding CSS Style Guide: Inline, and External Style Guide
The CSS style guide defines how CSS elements create different layouts on any web page or platform.

These are two types of CSS style guides: inline, and external.
Inline:
Inline style means that the styling information is contained within your HTML source code itself. This approach is easy for most people to understand and maintain, but can lead to conflicting styles within your source code when developers work on different pages in a website.

External:
External style refers to styles that are located in an external file referred to as an external style sheet (or .css file for short). These styles can usually be modified without affecting other files.

Tools You Need to Start Programming
To start writing codes you’ll need a text editor. There are lots of them out there but I’ll recommend only a few.

Atom: This is a free desktop text editor that allows you to work with Git and GitHub directly from Atom. It’s one of the best text editors.

Visual Studio Code: This is a code editor optimized for building and debugging modern web and cloud applications. It is free and easy to use. It has tons of plugins available to make work easier for you. The user interface is simple to understand and you’ll get used to it in no time.

Notepad++: Notepad++ is a free source code editor that supports several languages. It runs in the MS Windows environment.

Aside from a text editor, you’ll need a browser too. Browsers help in reading and interpreting your codes. The following browsers are recommendable; Chrome, Firefox, Microsoft Edge, etc.

You’ll also need a good working laptop and an internet connection.

Where do I learn to program?
There are many ways to learn how to program. You can take courses at your local college or university, or you can take online courses on sites like Coursera, Udacity, Udemy, FreeCodeCamp, or Pluralsight. You can also teach yourself by reading books or watching tutorials on YouTube.

Conclusion
Overall, programming is a high-paying career that requires patience, dedication, and a great deal of attention to detail.
It does not matter from which background you come, if you love learning new things and are willing to stay positive, you can succeed.

Top comments (3)

Collapse
 
emmanuelokpong profile image
Emmanuel Okpong

Just finished reading it. Very detailed write up Roseline.
I really like the example-based style you use in explaining each concept.

Keep it up!.

Collapse
 
roselinebassey profile image
Roseline Bassey

I'm glad you enjoyed reading this, and that you liked the "example-based" style I used.

Collapse
 
emmanuelokpong profile image
Emmanuel Okpong

You are welcome