Banner image showing a programmer resting his hands over a Apple keyboard whilst working on code seen on a large screen

Programming vs. Coding: what is the difference?

29 November 2022

Human civilizations have invented many machines, each designed to perform a specific function. The computer is different: it’s a miraculous machine that can do almost anything we can imagine. But there’s a catch: we have to tell it which of those things we want it to do right now.

What is code and why do we need it?

In computing, code is any string of symbols that can be used to control the computer and make it do our bidding.

A computer is just a box full of electronics. It has no understanding or experience of the world and doesn’t speak a language, so we can’t talk to it and explain what we want. We can't "tell" a computer anything. That’s why we need code.

For our purposes, a code is a formalized way to express something. By “formalized” we mean it’s governed by strict rules, which makes it a lot simpler and less ambiguous than ordinary language.

Musical notation, traffic signs and knitting patterns are all examples of codes. Your own DNA is a code in the sense that it’s a formalized expression of something, which happens to be you.

Examples of code and coding languages

HTML (HyperText Markup Language)

An example is the web page you’re looking at now. In the early days of the internet, information was transferred via plain text files. This was soon replaced by a code called HTML (HyperText Markup Language), which allowed for the text to be enhanced by formatting, images, links and other features. The crucial idea is that the text had to be “marked up” with special code elements that a piece of software called a “web browser” could interpret.

CSS (Cascading Style Sheets)

Today HTML is usually combined with CSS (Cascading Style Sheets), which helps us to customize the way our pages look. HTML and CSS are used together to build the page you’re currently reading.

To see its code the way the computer does, your browser might allow you to right-click on a blank area and choose “View Source” or “View Page Source”.

[image - this page's source code]

Like all codes, it may seem complicated but it’s much easier than it looks; you can learn to write code like this with City Lit’s web development courses.

SQL

Another example of a code is SQL, which was developed in the 1980s as a way to

  • describe the structure of a database,
  • alter the data in a database, and
  • subject the database to “queries”.

Before this, data was mostly held in paper records that made it difficult to answer questions: SQL allows us to ask very refined questions of our data and get back detailed answers.

It’s fair to say that, alongside the internet, this has been one of the most transformative applications of computers so far.

What is programming?

Programming is a specific kind of coding whose purpose is to give the computer instructions. Programmers may think of the computer as an employee who is very stupid and lacks any common sense, but works tirelessly and never makes mistakes. We must learn to explain what we want it to do very carefully.

This is done using special codes called programming languages, although they’re only a little bit like the natural languages spoken by humans. They allow us to express instructions in a very clear and precise way that the computer can execute.

Examples of programming languages in current use include Python, Java and JavaScript.

Programming is the art of making the machine do what we want. 

What can you create through programming?

The outcome of programming can be a piece of software, such as the web browser you’re using to read this page. But it could also be a more interactive “notebook”, widely used in data science to combine code with statistical analyses and visualizations.

It could even be a simple “script”, a short programme that automates a single task that would otherwise have to be performed manually.

What skills are needed for programming?

Systemic thinking and problem solving skills are key

All coding requires systematic thinking and an ability to break down the desired outcome into the simple steps that a code can express. Programming requires all this too, as well as deeper problem-solving skills – in fact, most of the challenge for the beginning programmer arises from the need to reason about problems in a new way, not from the jargon of the language.

Maths is beneifial

Because of that, many programmers like to also study on some mathematics courses for programming, which fosters similar analytical and problem-solving skills. It’s a myth, though, that you have to be good at maths to be a programmer.

Benefits of learning to code

  1. Career prospects — Learning to code whether independently to by completing a coding course, you’ll gain the skills to increase your options when applying for digital jobs.
  2. Digital independence — If you own your own business, knowledge of coding can help you create a bespoke website or computer processes, rather than employing freelancers to do this for you. Learning a little coding will also help you understand the digital world more broadly.
  3. Problem solving — Programming and coding offer an opportunity to develop and practice your ability to work with technical information, identify problems and, above all, come up with clever solutions.
  4. Creativity — Above all, programmers make things, and often what we make and the way we choose to do it offer scope for creative expression. Many of us who code for a living also choose to do it for fun.
  5. Use coding everywhere — Once you learn to code it becomes a tool you always carry with you like a swiss army-knife, allowing you to quickly perform tasks that would otherwise be long and tedious. This doesn’t only apply in the workplace; coding is just as useful in creative arts, hobbies, and leisure interests.

A top tip for learning to code

Although programming languages are a lot simpler than human languages, some of the same techniques apply to learning both.

Immerse yourself in the language by reading and writing it as often as possible: a routine of daily practice, however basic, is an important ingredient of success.

Even solving the same problem multiple times can be very beneficial at the beginning. You’ll get lots of support with these techniques on our introductory web design and programming courses here at City Lit.


Join us

Learn Programming & Coding at City Lit

Short & Long Courses | Daytime | Evenings | Weekdays | Weekends

Web design and programming

Whether you want to learn how to build a WordPress website, improve your UX/UI skills, or learn HTML or a more powerful programming language such as Python, Java or SQL, we have a course that’s right for you.

Data analytics and statistics

Gain valuable skills you need to confidently analyse, visualise, and extract key insights from data. Whether you're using Python, Excel, or machine learning and AI, our courses can help you enhance your career or open up new opportunities.


About the Author

Rich Cochrane

Rich is a programmer, writer and educator with a particular interest in creative practice. In his previous career he worked as a software developer in the CIty, first at a dot-com startup and later at a top-tier investment bank where he worked mostly on trading floor systems and got to play with a wide range of languages and technologies. He now teaches coding and maths-related courses full time.