Graphic showing numbers to represent algorithms

Algorithms – In Layman’s, Easy to Understand Terms

I am going to try to demystify algorithms for you. Hopefully!

If you make it to the end of this post, you should have a reasonable understanding of algorithms.

This word (algorithms) crops up a lot in our online activities and there is a lot of gibberish and misunderstanding as to what exactly algorithms are.

What you can expect in this tutorial;

  1. How Algorithms Work
  2. The Role of Plugins
  3. Tips and Conclusion
  4. Grammar – Syntax

Let’s get this underway.

If you have seen the movie Matrix then…

…you will have seen those little green numbers that were falling like rain in the opening credits. That’s machine code, binary code, ones and zeroes. Programmers who can programme in machine code are the ultimate hackers.

They are at the height of their profession, all programming at its very basic level is machine code. All other programs are just dressing on top of machine code to make it easier to work with.

1. How Algorithms Work

Algorithms are mathematical variables.

When you press a key on your computer first a code is generated by your keyboard and this is sent to your computer. This code is designated to the key you have pressed. The computer will already have a code as to where this keyboard stroke will end up on your computer screen

The software is waiting for an input from your keyboard. The software decides what to do with that input. It only takes a fraction of a second for this operation to be completed. When you click on a virtual button, even a ‘save’ button in word, there may be 100’s of operations taking place so if you see a spinning wheel, it shows a lot of computation is going on!

When pressing the letter ‘a’ on your keyboard the computer has to determine not just that that letter has been pressed but that it has to be placed in a certain position on your computer screen (your computer screen is divided into pixels – pixels are basically small dots between .1 and .29 of a millimetre) – there are many calculations involved in that simple action.

Have you made it this far? You haven’t fallen asleep, have you?

Every action taken on a computer is determined by a program which decides what happens next.

So when you click on any part of the screen, either with a mouse or your finger, there will be an algorithm which tells your computer what to do and tell the internet site what to do next.

There will be an algorithm that says that when the ‘subscribe’ button is pressed, go to a certain page, if that page can’t be found, then you get a 404 error.

There are programs that record this information. It can tell where you touched the screen, how often and even how you view websites in general. This is a great marketing tool for anyone selling on the internet.

In programs, there are a lot of ‘if’, ‘then’ and ‘else’ statements. ‘If’ s/he does this, ‘then’ do this, or ‘else’ do this – options galore.

Ranking

If someone comments on your site and they have written more than 25 words (approx.) in their comment, Google will see this as a valid comment and this will improve your ranking on Google.

Let’s say Google gives the post/blog writer 25 points and the comment writer 25 points. If the post/blog writer likes that person’s comment they will add another 25 points to each of their scores. If there are more likes for this page than comments they may reduce the points, so on and so on. In a nutshell these are the calculations algorithms perform. Google’s algorithms are very complex but they do follow logic.

Google calculates the validity of each action taken on the internet and gives it a value which either raises or lowers your ranking on a daily or monthly basis, depending on how well their crawlers are working.

Just one entry posted on your website and Google will then check if all their parameters are met, parameters such as: whether there is swearing in this post, is the title relevant to the content, how does it compare with a similar website, etc, etc, in order for them to index your post and rank it.

These parameters are checked fairly regularly. This is done in the blink of an eye.

Things will start to click after the next couple of pages (pun intended).

If you like what you are reading you may like to subscribe to our newsletter and get a free Procrastinator’s To Do List…we know, it should have been an un-to-do list. Please press the button below and remember to check your junk mail for the confirmation email or you won’t be able to receive any updates.

Computers haven’t changed, much.

Think of bicycles. We had pushbikes then we upgraded to pedals on wheels (penny farthings). Bicycles then had chains added to make them easier to pedal. Further enhancements included gears and motors, but basically they are still bicycles.

Computers grew in a similar way, starting with mechanical calculators, which were cumbersome. Early computers took up whole buildings to perform simple tasks, now they do the same things with a tiny chip.

We have compressed the computer and made a few more connections so they work faster but the principle is the same. Computers are still binary, one or zero. Just a lot of on and off switches.

Programmers have the luxury of using libraries, which means they don’t have to write lines of code (they’ve already been written and are available as libraries to programmers – little packages if you like) to make the letter ‘a’ appear on a certain part of your screen. Now they just add a library into their programming.

Are you with me so far? I sure hope so!

Now we have packages that can be dropped into the programmer’s software. We still use binary to program computers but they are operated by other programs. Imagine a radio; you turn a dial and the volume increases. You only turned a dial but behind that dial is a lot of wizardry going on.

The same with using packages or ‘drag and drop’ as it is now known. The package saves a person from writing 1,000’s of lines of code, they are all included in the package.

The code has been debugged and used a lot. The only time we get bugs in programming is when new code is written or the packages don’t work well together. Packages are translated back into machine code by the CPU Central Processing Unit. (I am not going to talk about compilers and such like here).

2. The Role of Plugins

All those apps you have on your phone are called higher-level languages (anything that is not machine code is a higher-level language).

Plugins (a kind of app) are little bundles of software which do small functions for you (the latest thing is drag and drop, but I will leave that for the moment).

The reason plugins might slow down your website page is because they may not be well written. It might take your website a long time to get these little suckers to work. If the plugins are not friendly with each other then you have a problem.

If you have a paid theme which has 19 plugins, then the people selling those themes have made sure the plugins work well with each other. They may write software that makes sure these plugins work with each other.

We now come to the very heart of algorithms.

SEO’s, Keywords, etc.

Disclaimer: I am not an authority on algorithms, so people who are may find holes in my logic. This post is only about understanding algorithms in order to make better use of them but, of course, there will be more in depth information on the internet.

My programming history: I have worked with Cobol, Fortran, Pascal, C and Basic. I have fiddled around with HTML, IDE and a few other things in setting up Arduinos, Raspberry PI and Beaglebone Black. All computers work in machine code, the ultimate programming language.

I won’t cover AI (Artificial Intelligence), this post is already long enough!

Algorithms are formulae which define actions on a computer.

As an illustration, if we take a string of numbers say, 623718294284276552 I could write software that would pull out the 2’s from the other numbers, add, multiply or divide them and then decide what to do with the end result. My program may decide that if the total is more than ten (>10) a message will pop up with “Well done!” or if the total is less than ten (<10) “Sorry you lose!”

So let’s see how algorithms work with your Keywords.

Let’s say you know how to build a brick wall. You might use the post title: ‘How to build a brick wall’. Lucky for you, 534 people per month are looking for ‘how to build a brick wall’.

The competition is low, so you have a good niche here.

So Google looks at your title and goes, ‘oooh this looks interesting’, let’s take a look at his/her subtitles and see what more they have to say on this.

Now you are smart and you put in there, ‘how to build a brick wall with mortar’, sticking with your main title but adding to it. So Google sees a bit of repetition and goes ‘okay this person may be an authority’ on building brick walls, and goes to your content and checks if you mention it a few more times.

Repeating keywords

In the old days you could just keep repeating the same thing over and over and you would get ranked highly. They used to have an algorithm that would say if ‘how to build a brick wall’ is >5 (greater than 5) we will rank them highly. But not any more. 🙁

Now they have to weigh up what you’ve written against their criteria, which might go, for ‘build a brick wall’ this person needs to mention: cement, mortar, bricks, water, trowel, foundation, etc. Then we might consider them an authority.

Then they might have an algorithm that says, if they mention ‘sexy’, we might have to think twice and put this blog into a different category.

So you say, ‘I built a sexy wall, the wall looks sexy’, and before you know it your post is not as useful as Google first thought and you get demoted. So they may have a string of words that could bring your ranking score down.

So let’s say you write a very informative post on how to build a brick wall. You include pictures (for pictures to be rated by Google you need to put a clear description into the picture because at the moment they have a hard time trying to figure out picture logic, they are just a bunch of pixels).

You have relevant pictures with relevant titles: Mixing mortar (if that is your picture), Levelling wall etc, Google will then compare your post with a similar post and then decide whether you are a better authority than the other poster.

You will be ranked accordingly.

You finally get traffic and there are people outside with their cement, gravel, trowel, bricks etc, and they look at your website, but you start with how beautiful the Great Wall of China is, including pictures, then you show pictures of your finished wall.

This is when the person flicks to the next website because they want a ‘how to’ and although you may go into that in your last paragraph, your customer has already moved on. This might lower your ranking with Google.

So not only has your title got to be relevant, the first paragraph needs to reaffirm your title so that if that is the only thing they read, they get your message and may thank you for it.

Then you get some comments on your site. Google will have algorithms which sort out which comments on your site would make your site worthy of top position.

So if someone says, I have used your formula of cement/sand/gravel and have found it worked perfectly for my wall. That is a useful and relevant comment and will help you rise above the rank and file.

If you get lots of: ‘I love your website’ or ‘fantastic job’ or ‘wow I never would have believed this was possible’ this will not be as favourable to your website. Although, in the beginning, if that’s all you get, you need them.

Google will take useful comments and say, yes, people are interacting with the subject at hand. So the smarter websites may remove ’empty’ comments so they can rank higher, not being rude but they need to make a living as we all do.

So the message I am trying to impart is this: Make sure your title is good, relevant, your content is useful and relates to your title and doesn’t stray off on tangents. You could say, ‘my dog loves our new wall and I am growing tulips next to it’ but that will detract from what the post is about.

I know this has been a long one and I hope you have benefitted? I know there is a whole lot more to this but I wanted to keep it as short as possible because I know several people will have fallen asleep and be dreaming of the next interesting post. 🙂

Now that you know content is super important, you should be able to get good traffic to your site, courtesy of Google, you’ve pleased their crawlers.

3. Tips and Conclusion

Algorithms are just mathematical formulae.

For every action you perform on your computer, there is a lot going on, tens of millions of calculations.

What has made it possible to do so many calculations?

Miniaturisation – doing the same job but in a smaller space. If we used the same technology as we used back in the ’50s then your computer would revert back to the size of a building, possibly a shopping mall, but with the same functionality of today’s computers.

Thank heavens we don’t have to carry a building in our bag!

If you have any questions, please ask in the comments.

Maybe now you can appreciate how much work our computers do. Millions of calculations go into a few actions on the net.

But before you go would you like to hear a little about grammar?
In writing software, we have to be precise otherwise the software won’t work. Commonly known as bugs and fixing them is known as de-bugging.

Get a comma wrong in programming and the computer will throw out an error!

4. Grammar – Syntax

The English language.

Now I am not perfect by any stretch but I know that if you use language correctly, it’s a much better experience for your readers. If you are going to write for a living then you need to understand the rules of grammar.

You can get away with grammatical errors with your friends and family but online it can make you look like you don’t know or care about your subject matter. A comma in the wrong place can change the meaning of a sentence. It also makes it hard work for your readers to comprehend your meaning.

Use a grammar checker like Grammarly to improve your English. It won’t show you all the errors you have made but it will give suggestions on some of your most obvious mistakes. It is free to use.

Sentence structure is important and Grammarly can help you there too.

Common mistakes; their, they’re and there (the first one is ownership the second one is ‘they are’ the third one relates to a place).

Your and you’re ( the first one is ownership the other is short for ‘you are’).

When abbreviating a word, try it out longhand first, then you will find if the word you are using is correct.

eg; Is that you’re bike? longhand = Is that you are bike (see how that doesn’t make sense?)

Correct; is that your bike (your is ownership)

In most cases double vowels elongate a sound; lop or loop, drop or droop.

Double consonants shorten a sound; biter or bitter, write or written

The rules of grammar are to make your communications clearer. If you don’t know how to use words properly, then you will not be able to communicate your message as clearly as you could. 🙁

More examples; That’s real good of you vs that’s really good of you. You done good vs you did well. I bought it for cheap vs I bought it cheaply.

English is a beautiful language and deserves your respect. My English is always improving, I am still learning. I hope this post will inspire you to learn some of the rules of grammar, you will learn so much. The people who created these rules did so with the intention of getting rid of ambiguity.

Have a stupendous day my friends.