What Development Language or Framework Should I Learn in 2020?

Reading Time: 2 minutes

If you’re asking “What development language or framework should I learn in 2020?”, then this post is for you! I too was intrigued by this question and it got me wondering how I should go about figuring this out.

It dawned on me that the best way to figure this out, would be looking at what dev jobs are being asked for – not just locally, but internationally too.

My thinking is those job postings by language and country will surely give an indication as to what employers are looking for and what skills are in demand. And here are the results:

Global Top 3 Development Languages

Globally, here are the top 3 languages you should strongly consider learning in 2020: (no shortage of jobs with these skills)

  • Java
  • Python
  • React

(Note: C# came in 4th place)

South African Top 3 Languages

South Africa paints a slightly different landscape. Locally speaking, here are the top 3 languages you should strongly consider learning in 2020: (no shortage of jobs locally with these skills)

  • C#
  • PHP
  • Java

(Note: ASP.net came in 4th place)

Bottom 3 Development Languages

However, based on my findings, the 3 languages/skills with little to no jobs on offer:

  • Cordova
  • Haskell
  • Rust

(in other words, if you’re job hunting, I’d say it’s safe to give these a skip learning in 2020)

Global Top 3 Frameworks

Two front-end frameworks seem to come out on top here.

  • React
  • Angular
  • WordPress

(Note: Vue came in 4th place, with Laravel not too far behind it)

A closer look

Below you’ll find a city in a country with dev languages and frameworks ordered by the number of jobs. To gather this info, I used LinkedIn Jobs to search for keywords, left with the default option of “within 25km” of the city.

Just a note: The cities and dev languages I’ve selected are based on my own interests, but to be broad, I’ve included some languages and cities that don’t necessarily appeal to me but may provide insights to others.

I apologize if a dev language/city you were looking for isn’t listed below.

It should also be noted that these results are based on just one job website (of many) and some countries/cities may not use LinkedIn Jobs to it’s fullest potential.

Cape Town, South Africa

LanguageJobs
PHP4582
C#4545
Java4419
ASP.net2020
Python1943
Angular1745
WordPress1257
React1086
Node973
Laravel878
Ruby573
Django538
Drupal335
Ionic314
Cordova304
Vue302
Kotlin107
Haskell17
Rust9

Johannesburg, South Africa

LanguageJobs
C#4879
Java4633
PHP3246
ASP.net2237
Angular1425
Python1030
WordPress688
Node643
React606
Laravel604
Ruby250
Django219
Vue178
Drupal158
Cordova150
Ionic132
Kotlin63
Haskell25
Rust19

Durban, South Africa

LanguageJobs
C#659
PHP406
ASP.net293
Java223
Angular194
WordPress170
Laravel95
Node94
React83
Python82
Drupal48
Vue47
Ruby26
Ionic24
Django17
Cordova11
Kotlin6
Rust0
Haskell0

Dublin, Republic of Ireland

LanguageJobs
Java1648
Python1411
C#844
Angular646
React628
Ruby423
PHP325
ASP.net323
Node230
Vue140
Kotlin95
WordPress74
Django62
Laravel44
Rust15
Ionic11
Drupal10
Cordova9
Haskell8

London, United Kingdom

LanguageJobs
Python14753
Java10704
React7300
C#6212
Node3436
Angular3190
PHP2688
Ruby2501
ASP.net1609
WordPress1244
Vue1107
Kotlin991
Django876
Laravel372
Drupal351
Haskell176
Rust148
Ionic38
Cordova36

Brighton, United Kingdom

LanguageJobs
React410
Python345
Java314
Angular239
PHP223
ASP.net220
C#175
Node144
Vue107
Ruby106
WordPress88
Laravel78
Drupal33
Django21
Kotlin20
Haskell1
Cordova0
Ionic0
Rust0

Miami, Florida, United States of America

LanguageJobs
Java725
React674
Python663
C#391
Angular207
WordPress171
PHP155
Node144
Ruby94
ASP.net82
Kotlin39
Vue31
Drupal28
Django10
Cordova8
Laravel7
Ionic7
Rust5
Haskell0

New York, United States of America

LanguageJobs
Java10936
Python9695
React4391
C#2966
Node2391
Angular2314
Ruby2151
PHP1316
ASP.net1290
WordPress669
Vue574
Django474
Kotlin428
Drupal282
Laravel96
Rust82
Haskell66
Ionic49
Cordova41

San Francisco, United States of America

LanguageJobs
Python16645
Java12693
React5349
Ruby2989
Node2568
C#2422
Angular2255
PHP1314
Django752
Vue648
Kotlin610
WordPress477
ASP.net274
Rust211
Drupal205
Ionic87
Haskell85
Cordova75
Laravel40

Auckland, New Zealand

LanguageJobs
React173
Java156
Python137
C#114
Angular86
PHP71
Node45
Vue39
ASP.net28
Ruby28
WordPress23
Drupal18
Kotlin16
Laravel9
Ionic5
Rust2
Django1
Cordova0
Haskell0

Sydney, Australia

LanguageJobs
Java1329
Python1299
React696
C#
631
Angular460
Node371
PHP343
Ruby310
WordPress162
ASP.net154
Vue136
Kotlin96
Django66
Drupal54
Laravel33
Haskell19
Rust16
Ionic6
Cordova4

Mumbai, India

LanguageJobs
Java1773
Python1090
Angular778
PHP755
C#658
React590
Node543
ASP.net477
WordPress267
Ruby262
Django175
Laravel154
Vue117
Drupal85
Kotlin78
Ionic48
Cordova35
Rust5
Haskell4

Toronto, Canada

LanguageJobs
Java3190
Python2471
React2188
C#1701
Angular1644
Node1046
ASP.net682
Ruby624
Vue476
PHP364
WordPress217
Kotlin216
Django146
Ionic74
Drupal66
Rust62
Laravel45
Cordova41
Haskell4

São Paulo, Brazil

LanguageJobs
Java2121
Python1136
Angular907
C#849
React837
PHP829
Node531
ASP.net377
Ruby375
Vue218
WordPress199
Kotlin193
Laravel153
Django95
Ionic91
Drupal40
Cordova25
Haskell3
Rust2

Dubai, United Arab Emirates

LanguageJobs
Java40
Python33
C#26
PHP17
Node15
React14
ASP.net12
Angular9
Ruby9
Kotlin4
Vue3
WordPress2
Laravel2
Drupal2
Django1
Ionic1
Cordova1
Rust0
Haskell0

Disclaimer: The job results listed here were taken in early Dec 2019 and were correct at the time of publishing this post.

PHP in 2019 – PHP 7.3 is the new minimum. Here’s why.

Reading Time: 2 minutes

Web server admins. Content Management System users. Anyone who runs a WordPress, Joomla and Drupal website. Laravel users. All take note; it’s time to upgrade your version of PHP.

At the very core of most of the usable web, is PHP. An underlying scripting language that powers 79%80% of the web.

Because of its popularity and the sheer amount of websites running PHP, it has a common underlying issue; while new versions of PHP are released regularly, it’s not updated on web servers around the globe nearly as often as it should be.

This poses a serious security problem for both the website and users visiting the website.

You can blame lazy web server (or network) admins, or slacking service providers or even website owners who run older websites not ensuring that their old website ‘plays’ nicely with newer versions of PHP.

If you’re not too tech-savvy, you may be asking “So what? Why should I even care if my WordPress website is running an older version of PHP?” The short answer is two-fold; 1) Security (the most important no-brainer answer) and 2) “Progress”.

“Security, got ya, but why should I care about progress?” you ask. There is a myriad of fundamental reasons why both your website and your PHP version should be kept up to date.

Firstly, the web and more importantly web technologies move at an astounding pace. As the months go by, incremental improvements are made to the scripting language, massive security improvements are made and more tools, features and optimizations become available to developers.

Web developers heavily rely on a scripting language such as PHP to deliver the end product to a user be it a web application or website.

Secondly, because of this tectonic shift between the web server, PHP versions and the code running on your website (ie. a WordPress CMS) it’s common for a CMS to get updated while the PHP version is left behind; usually decaying to a point where it becomes almost critical to update.

This is usually where the problems begin to occur as certain components / plugins / features cease to stop working on newer versions of PHP. This can become a very expensive and time-consuming exercise to try to align older code with modern versions of PHP. It’s something that could have been totally avoided if PHP was just incrementally kept up to date on your web server.

As of 2019, a shocking amount of websites still run older versions of PHP, specifically PHP 5 which is now discontinued. As is PHP 7.0.

In fact, PHP 7.1 is on it’s way out too with PHP 7.2 reaching the end of it’s life span next year, around this time (no more security updates). Here is a handy chart to make sense of it all:

PHP supported versions
30 Nov 2020 is when PHP 7.2 stops receiving security updates. Source.

Going into 2020, one should be aiming for a minimum of PHP 7.3 (7.4 if possible) to avoid both headaches and heartbreak. If there is one thing I can ask you to take away from this; it’s the knowledge that not maintaining your PHP version can become a very costly lesson.

Switching to Cloud Hosting

Reading Time: 3 minutes

Background

Over the course of a long weekend, I attempted to move my standard shared hosting websites over to a cloud hosting solution.

Having multiple websites on shared servers, can get quite costly on a monthly basis and I wanted a solution that not only saved me some cash, but gave me some technical flexibility.

The Solution

I started investigating DigitalOcean which I’ve heard good things about before. They offer a cloud hosted VM solution called “Droplets“.

“More than just virtual machines. Droplets are a scalable compute platform with add-on storage, security, and monitoring capabilities to easily run production applications.”

– From DigitalOcean’s website

This sounded like a winning solution to me and off I went, signing up and spinning up a Droplet that runs the latest Ubuntu LTS release with a LAMP setup.

This was great because it allowed me to install the latest version of Apache, PHP and MySQL without being at the mercy of a service provider dictating versions to me (often found them to be behind the curve). I could run wild on my server install what I liked.

Weighing It Up

Pros of this approach:

  • Ability to run latest versions of LAMP packages.
  • Flexibility and freedom of managing your own server.
  • Better overview of what’s going on “under the hood”.
  • Cost effective with all your websites in one space, billed at a single cost per month.
  • All websites share the same server resources (this could a negative depending on how you look at it).
  • Potential to be way more secure.
  • Potentially snappier access for international users.

Cons of this approach:

  • Initially took a while to set up.
  • Security is all up to you and there is no one to blame if the system gets compromised.
  • Up to you to keep your server and packages up to date and not let the server decay over time.
  • Renewing SSL certs is up to you (but this can be automated).
  • Backups are all up to you (but there are DigitalOcean solutions to this).
  • Not locally hosted. Potentially slower access for local users, but this can be debated.

The Test

To test my new shiny server out, I had to start small. I tested my fiance’s website out first, a basic HTML5 website. After playing around with some DNS settings, I was able to get the domain pointing and working as intended.

The next task was to move my other, more complex sites over to the droplet. This included a Drupal 8 and WordPress website. The WordPress site worked like a charm, with no issues, but the Drupal site complained a bit about using a newer version of MySQL (MySQL 8) it wasn’t quite happy with. After a few tweaks here and there, I finally got it playing nicely with MySQL 8.

Amongst other new features and improvements, one big advantage MySQL 8 offers is improve performance; InnoDB is significantly better at Read/Write workloads, IO bound workloads, and high contention “hot spot” workloads. Read more about MySQL 8 here:
https://dev.mysql.com/doc/refman/8.0/en/mysql-nutshell.html

I updated both domains to point to my new server and after a bit of tweaking here and there to get HTTPS working correctly, I was finally up and running with both PHP sites working perfectly.

Next step was security hardening on both an Apache and server level. After following a few guides online and a bit of trial and error, I was successfully able to harden the server and get the firewall operating optimally. Final step was performance optimization, particularly on Apache and MySQL’s side to reduce memory usage and not be so frivolous with precious server resources.

Conclusion

Overall I was impressed with how well everything went. Not only was this my first real web server setup from scratch using this particular flavour of Linux, but it was my first attempt at cloud based VM management.

So far, I’m super impressed with DigitalOcean. It’s dashboard is superb and it’s one-click solutions of certain things is so snappy and efficient. It has great monitoring and alert tools to ensure my VM stays up 24/7 and the feeling of having all my websites in one place makes me feel warm and fuzzy inside.

If you’re interested in challenging yourself in learning something new, while potentially saving in hosting costs (if you host more than 3+ websites), definitely take the time to explore and investigate a DigitalOcean droplet.

WordPress REST API: Pull Through Posts From Another WordPress Site

Reading Time: 2 minutes

I recently needed to pull through 2 or 3 posts (they were recipes in this instance) from another WordPress website into the current WordPress project I was working on. It seemed tricky at first and then I remembered the WordPress Rest API!

As of version 4.7, the REST API is included out of the box and plugins are no longer required. The endpoints are accessible to anyone by appending /wp-json/wp/v2/posts to the end of the website’s URL (provided they are using WordPress 4.7 and higher)

Thankfully, with the help of a little snippet of code I wrote (see below), that was more than enough to get random posts pulling through from another WordPress website along with a like to that post and it’s featured image.

Update 09 July 2018: I’ve improved the code below. Simply throw the below into your functions.php file:

/**
 * Add this to your functions.php file
 * Using the REST API, retrieve posts from another website.
 * Retrieves images and renders the output below called via a [render_recipes] shortcode
 */
function get_recipes()
{
    // Enter The URL to the API here:
    $api_url = 'https://www.website-goes-here.com/wp-json/wp/v2';

    // Retrieve 100 items via the WordPress RestAPI - can be increased
    $response = wp_remote_get(add_query_arg(array(
        'per_page' => 100
    ), $api_url . '/recipes'));

    // Make sure the response is valid before we proceed...
    if (!is_wp_error($response) && $response['response']['code'] == 200) {
        $remote_posts = json_decode($response['body']); // Our posts are stored here

        uksort($remote_posts, function() { return rand() > rand(); }); // Shuffles the results around

        $remote_posts = array_slice($remote_posts, 0, 2); // Limits the array to 2 items for render

        // Loop through each item and render it
        foreach ($remote_posts as $remote_post) {
            echo '<div class="recipe-post col-md-6">
			    <a href="' . $remote_post->link . '" target="_blank" rel="noopener">';

            // Lets go get the corresponding media for each item looped, on the fly
            $medias = json_decode(file_get_contents($api_url . '/media/'. $remote_post->featured_media));

            // Render the image
            echo '<img class="nwc-recipe-img" src="' . $medias->source_url . '" alt="' . $remote_post->title->rendered . '">';

            // Render the title
            echo '<h5 class="nwc-recipe-title">'. $remote_post->title->rendered . '</h5>';

            echo '</a>
            </div>';
        }
    }
}

// Add the [render_recipes] shortcode
add_shortcode('render_recipes', 'get_recipes');

Then, you can call the function via a shortcode on your .php theme pages like so:

<?php
 // Add this to the .php page you need to call it on.
 do_shortcode('[render_recipes]');
?>

Quick break down of how the above function works:

  1. Retrieves the posts list in JSON format from the site’s WordPress Rest API
  2. If the response is a valid one, decode the posts and start looping through the results
  3. Retrieves 100 posts, shuffles it around and then sets a limit to 2 (all I needed in this example).
  4. Chuck the responses in a basic div element (div called recipe-post in this case, but also has a bootstrap class of col-md-6)
  5. While looping through each item, also get the media attached to that post. $remote_post->featured_media returns an id in this instance.
  6. We then spit out the $medias source_url (the full path to the full featured post image)
  7. Then spit out the title and close up the <div>

The above works fairly well in my instance I needed it for. Hopefully, the above snippet of code comes in handy for you too.

Some things to keep in mind using the above:

  • This may potentially slow down your site as it has to make a few more calls. (Set the per_page argument lower if it’s taking too long)
  • This will only work on websites using WordPress 4.7 and higher (relies on the REST API natively added in this version )
  • This also assumes the default endpoints are enabled and not blocked or closed up.

What Is Web Development?

Reading Time: 5 minutes

Over the years, many people have asked me “How did you get started in making websites?”, “I want to get into web development, please help me?” and often it’s followed by a long convoluted explanation. I want to create a basic guide here for people looking for answers and do my best in pointing them in the right direction, assuming they are interested in a career in website development.

The truth is that there is no single correct path one can take in the journey to becoming a website developer – every website developer out there will give you a different story on how he/she did it and offer you advice – listen to them as none of them is wrong. We all got here in different ways.

Technologies that power the web are constantly evolving and new career paths and technologies are forged every day. Here are just some of the web developer careers paths one can venture down:

  • Website Developer
  • Website Designer
  • Front-end Developer
  • Back-end Developer
    • PHP Developer
    • Python Developer
    • .NET Developer
  • UX Designer
  • DevOps

Any web developer worth their salt usually has the same foundational knowledge. It’s likely they would have started learning the same three basic web languages and at the very least know the following technologies well: (This would also be your starting point if you know absolutely nothing about website development)

  • HTML (HTML5 is the current standard)
  • CSS (CSS3 is the current standard)
  • JavaScript (Also known as ECMAScript – 3rd edition at the very least)

From here on out, the roles start to require a person knowing different technology and scripting languages.  Each website developer role knows at least one server scripting language, with the most common ones being; (You would typically pick at least one and try get really good at it)

Once you’ve got the basic foundations down, your next step would be learning at least one library, one framework, one database technology and one web server technology (sounds like a lot, but it’s more cohesive than you think). It’s usually at about this point, a person would be deemed ’employable’ and could start earning a living off of website development.

PHP Syntax
A basic example of PHP. Some PHP syntax has been added to an HTML page.

What is a library?

A web library is best described as a collection of common functions and behaviours. It’s usually one or a collection of files that a developer can include or embed into their code. By including a library, you can add simple or complex features to your website and not have to worry about writing lengthy code to achieve it.

Common libraries found on modern websites: (good to know as many as possible)

  • jQuery (simplifies JavaScript)
  • Font Awesome (adds easy to use icons)
  • Bootstrap (adds an easy to use responsive layout and components)
  • React (JavaScript library for building interfaces)
  • D3.js (manipulating documents based on data)
  • Backbone.js (give your JavaScript code access to Models, Views, Collections, and Events)
  • three.js (create and display animated 3D computer graphics in a web browser)

jQuery example
A basic jQuery example. In this example, the jQuery was included and the simple ability to hide a few paragraphs with the click of a button was added. This would typically take a bit more code if you wrote it with just Javascript

What is a framework?

A web framework is a base set of tools (think of construction scaffolding) that a developer can use to build a website. A framework is usually built to take advantage of web server technology and includes many libraries and building blocks to ease a developers workflow, speeding up development. Probably the most well know and well-used framework in the world is WordPress, a content management system (CMS for short) built with PHP.

Common frameworks: (good to know at least one)

Laravel features
Features the Laravel framework provides a web developer to build with.

What is a database?

Think of a database as a spreadsheet for your website, only on a larger scale. It’s data stored behind the scenes that won’t necessarily be always served to the end-user and it can be manipulated in a vast number of ways before its ever shown to the user. You would store data such as content for blog posts, user information/profiles data and even some basic settings if you’d wish.

Common database technologies: (good to know at least one)

Wordpress Database
An example of a very basic database. These 12 tables you see represent the basics of a WordPress database.

What is a web server?

A web server is a technology that serves up all the above to the end-user. It’s responsible for linking all the above together and ensuring the end-user sees a website when they type in a website address and the DNS has sent them to your website. Think of it as the butler who answers the door to a lavish mansion and shows you up the stairs, to your room.

Common web server technologies: (good to know at least one)

Web Server
A very basic example of a user, using the internet to hit your web server that serves your website.

 

Visualising the structure of a WordPress website:

Visualising Web Development Technologies
Visualising Web Development Technologies

Closing Words

I have two tidbits of good news to share with you. Firstly, the path to becoming a web developer has a relatively low barrier to entry, possibly more so than any other IT fields. You can become a successful website developer without ever spending any money as there are TONS of resource with free guides and tutorials out there. The only difference between you and someone who is making a living as a web developer is that they have taken the time to learn the basics and the required technologies.

Secondly, all the technologies I have mentioned in the article above is 100% free to download, use and get your hands dirty with. You can go from learning to building to launching your first website project for next to nothing.

I’ll be following this article up in due time with learning resources and further advice.

When it comes to learning web development; time and a terrible internet connection is your only enemy.