Programming jargon crusher – Variables and Values.

In the previous post I’ve told you how
lack of jargon understanding can hold us
all back from learning new things.

Here I would like to explain and clarity for you
those few fundamental programming
concepts that you will be using all the time when you’re
working on your own programming project.

Ok, so let’s get moving:)

Let’s starts with a value.

What’s a value in programming?

It’s simply some kind of data.

If you think about what’s in the core of every web mapping applications it all boils down to showing
spatial data on a map.

And guess what – a map is a data too:)

So, in programming we have a few fundamental data types that we’re working with.

In web mapping applications the main piece of data are coordinates.

Latitude and longitude are pretty much everywhere.

So, our first data type we work with when programming is a number.

In programming you can use numbers directly, so every time you put a number like 2.22
into your code it will mean exactly that.

In a web mapping application we usually have a lot of text associated with latitude and longitude.

To use a text when programming you need to specifically put it into apostrophes. This for one simple
reason, source code is text too, so a text that you will be using in your application has to be somehow
distinguished from a source code.

So, those two types of values are by far the most commonly used in web mapping applications.

Since programming is all about working with data you also have to have some way to store it.

This is where variables come in.

A variable is a container that store values. When you create a variable you will also name it. Then
every time you use this variable’s name in your code it’s just like you would use its value.

You can change a value of a variable any time you want, you just assign different value to it.

Ok, so let’s recap what you’ve learned:
The two most fundamental values we’re working with in web mapping application are
numbers and text.

In programming, we use numbers directly. Every time you use a number a programming language
sees it as a number.

Text is different. You need to put a text into apostrophes.

A variable is just a way to store numbers and text. A variable has a unique name.
You can use variables just as you would use values.

Ok, that’s it for now:)

Next, I will tell you all about working with more that one value at the time.

I hope that was simple enough!

Feel free to leave me a comment and let me know what you think:)