Canada shows us that it’s time to prepare for the worst

https://media.notthebee.com/articles/620b9e16e66eb620b9e16e66ec.jpg

In 1775, delivering one of the greatest speeches in American history, Patrick Henry urged the Second Virginia Convention to prepare for the "clash of resounding arms" coming from the burgeoning Revolutionary War.

Not the Bee

Introduction to Laravel caching

https://cdn.sanity.io/images/f1avhira/production/5899f504515cc5bdceae5764ed0b744b8e973aa3-2400×1256.png?w=1200

What is caching

A common pain point in applications is optimizing and reducing the number of trips you have to take to the database. Say you have an e-commerce admin dashboard. Maybe you have a page that displays all inventory — every product, associated category, vendors, and more. A single page like this may perform dozens of calls to your database before the page can even display any data. If you don’t think about how to handle this, your application can quickly become slow and costly.

One option to reduce the number of times you have to go to the database is through caching. Caching allows you to store specific data in application memory so that next time that query is hit, you already have the data on hand and won’t have to go back to the database for it. Keep in mind, this is different from browser caching, which is user-based. This article covers application caching, which happens at the application level and cannot be cleared by the user.

Laravel has robust built-in functionality that makes caching a breeze.

Let’s see it in action!

Set up a database

For this demonstration, you will use a PlanetScale MySQL database to get a practice database up and running quickly. I promise this setup will be fast and painless!

  1. Create a free PlanetScale account.

  2. Create a new database either in the onboarding flow or by clicking “New database” > “Create new database“.

  3. Give your database a name and select the region closest to you.

  4. Click “Create database“.

    PlanetScale modal to create a new database

    Once it’s finished initializing, you’ll land on the Overview page for your database.

    PlanetScale database overview page

  5. Click on the “Branches” tab and select the main branch. This is a development branch that you can use to modify your schema.

PlanetScale has a database workflow similar to the Git branching model. While developing, you can:

  • Create new branches off of your main branch
  • Modify your schema as needed
  • Create a deploy request (similar to a pull request)
  • Merge the deploy request into main

Diagram showing the PlanetScale workflow described above

Leave this page open, as you’ll need to reference it soon.

Set up Laravel app

Next, let’s set up the pre-built Laravel 9 application. This comes with a simple CRUD API that displays random bogus sentences (we’re going to think of them as robot quotes) along with the quote author’s name. The data for both of these columns are auto-generated using Faker. There is currently no caching in the project, so you’ll use this starter app to build on throughout the article.

For this tutorial, you’ll use the default file-based cache driver, meaning the cached data will be stored in your application’s file system. This is fine for this small application, but for a bigger production app, you may want to use a different driver. Fortunately, Laravel supports some popular ones, such as Redis and Memcached.

Before you begin, make sure you have PHP (this article is tested with v8.1) and Composer (at least v2.2) installed.

  1. Clone the sample application:

    git clone -b starter https://github.com/planetscale/laravel-caching
  2. Install the dependencies:

    
    
  3. Copy the .env.example file to .env:

    
    
  4. Next, you need to connect to your PlanetScale database. Open up the .env file and find the database section. It should look like this:

    DB_CONNECTION=mysql
    DB_HOST=<ACCESS HOST URL> 
    DB_PORT=3306
    DB_DATABASE=<DATABASE_NAME> 
    DB_USERNAME=<USERNAME>
    DB_PASSWORD=<PASSWORD>
    MYSQL_ATTR_SSL_CA=/etc/ssl/cert.pem
  5. Go back to your PlanetScale dashboard to the main branch page for your database.

  6. Click “Connect” in the top right corner.

  7. Click “Generate new password“.

  8. Select “Laravel” from the dropdown (it’s currently set to “General”).

  9. Copy this and replace the .env content highlighted in Step 4 with this connection information. It’ll look something like this:

    DB_CONNECTION=mysql
    DB_HOST=xxxxxxxx.xx-xxxx-x.psdb.cloud
    DB_PORT=3306
    DB_DATABASE=xxxxxxxx
    DB_USERNAME=xxxxxxxxxxxxx
    DB_PASSWORD=pscale_pw_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
    MYSQL_ATTR_SSL_CA=/etc/ssl/cert.pem

    Make sure you save the password before leaving the page, as you won’t be able to see it again.

    Note: Your value for MYSQL_ATTR_SSL_CA may differ depending on your system.

  10. Run the migrations and seeder:

    php artisan migrate
    php artisan db:seed
  11. Start your application:

    
    
  12. You can now view your non-cached data from the PlanetScale database in the browser at http://localhost:8000/api/quotes.

Project structure overview

Before diving in, let’s explore the project and relevant files.

Quote controller

The sample application has a single controller, app/Http/Controllers/QuoteController.php, that has methods to display, update, create, and delete quotes. Since this is an API resource controller, you don’t need to include the usual show and edit controllers that only return views.

You’ll take a closer look at this soon once you add caching, but right now, nothing is cached.

Quote model

There’s also a model, app/Models/Quote.php, where you can define how Eloquent interacts with the quotes table. Since you only have one table in this application, there are no relationships or interactions, so the model is pretty barebones right now:

class Quote extends Model
{
    use HasFactory;

    public $timestamps = FALSE;
    protected $fillable = [
        'text',
        'name'
    ];
    
}

You’ll revisit it soon, though, once you implement caching.

Quote migration

Next up is the initial quotes migration file, database/migrations/2022_01_215158_create_quotes_table.php. When you ran the migrations in the previous step, this file created the quotes table with the specified schema:

public function up()
{
    Schema::create('quotes', function (Blueprint $table) {
        $table->id();
        $table->text('text');
        $table->string('name');
    });
}
Quote factory and seeder

Finally, there’s a factory and seeder. The factory, database/factories/QuoteFactory.php, uses Faker to create mock sentence and author data. The seeder, database/seeders/DatabaseSeeder.php, then runs this factory 100 times to create 100 rows of this Faker-generated data in the quotes table.

public function definition()
{
    return [
        'text' => $this->faker->realText(100, 3),
        'name' => $this->faker->name()
    ];
}

When you ran php artisan migrate and php artisan db:seed in the previous steps, these are the files that were ran.

Queries without caching

Before you add caching, it’s important to see how the application currently perform so you know the effect that caching has. And how will you do that if you don’t know what your query performance was before adding caching?

Let’s run some queries and see how long they take to complete.

Get all data

Open up the app/Http/Controllers/QuoteController.php file and go to the index() method. Replace it with:

public function index()
{
    $startTime = microtime(true); // start timer
    $quotes = Quote::all(); // run query
    $totalTime = microtime(true) - $startTime; // end timer

    return response()->json([
        'totalTime' => $totalTime,
        'quotes' => $quotes        
    ]);
}

The PHP function, microtime(true), provides an easy way to track the time before and after the query. You can also use an API testing tool like Postman to see the time it takes to complete.

Let’s call the API endpoint to check how long it currently takes to pull all of this data from the database.

Open or refresh http://localhost:8000/api/quotes in your browser. You’ll now see a totalTime value that displays the total time in seconds that it took to execute this query.

The total time will fluctuate, but I’m personally getting anywhere between 0.9 seconds and 2.3 seconds!

Of course, you’d want to paginate or chunk your data in most cases, so hopefully, it wouldn’t take several seconds to grab in the first place. But caching can still greatly reduce the time it takes to get data from this endpoint after the initial hit.

Let’s add caching now.

Add caching to your Laravel app

Open up app/Http/Controllers/QuoteController.php, bring in the Cache facade at the top of the file, and replace the $quotes = Quote::all(); in index() with:

// ...
use Illuminate\Support\Facades\Cache;

// ...
public function index() {
    // ...
    $quotes = Cache::remember('allQuotes', 3600, function() {
        return Quote::all();
    });
    // ...
}
// ...

Now let’s hit that API endpoint again. Refresh the page at http://localhost:8000/api/quotes. If this is your first time running the call, you’ll have to refresh again for the caching to take effect.

Check out the new time I’m getting: 0.0006330013275146484 seconds!

Before caching, this exact same query took between 0.9 seconds and 2.3 seconds. Incredible, right?

Even though this seems to be a massive improvement on the surface, there are still some issues that you need to tackle. Let’s first dissect the Cache::remember() method and then go over some gotchas with this addition.

Note — If at any time you need to clear the cache manually while testing, you can run the following in your terminal:


Caching with remember()

The Cache::remember() method first tries to retrieve a value from the cache. If that value doesn’t exist, it will go to the database to grab the value, and then store it in the cache for future lookups. You will specify the name of the value and how long it stores it, as shown below:

$quotes = Cache::remember('cache_item_name', $timeStoredInSeconds, function () {
    return DB::table('quotes')->get();
});

This method is super handy because it does several things at once: checks if the item exists in cache, grabs the data if not, and stores it in the cache once grabbed.

If you prefer just to grab the value from cache and do nothing if it doesn’t exist, use:

$value = Cache::get('key');

If you want to grab the value from cache and pull it from the database if it doesn’t exist, use:

$value = Cache::get('key', function () {
    return DB::table(...)->get();
});

This one is similar to remember(), except it doesn’t store it in the cache.

Inconsistent data in the cache

So what are the problems that you need to deal with? Let’s see one of them in action.

Refresh the [http://localhost:8000/api/quotes](http://localhost:8000/api/quotes) page in the browser one more time to make sure the cache hasn’t expired. Now, add a new record to the quotes table by pasting the following in your terminal:

curl -X POST -H 'Content-Type: application/json' -d '{
  "text": "If debugging is the process of removing software bugs, then programming must be the process of putting them in.",
  "name": "Edsger Dijkstra"
}' http://localhost:8000/api/quotes -i

You should get a HTTP/1.1 200 OK response along with the newly added record. Now go back to your Quotes page in the browser and refresh. The new data you added isn’t there! That’s because you just wrote this item to the database, but you’re not actually going to the database to retrieve it. The cache has no idea it exists.

You can confirm it was added to the database by going back to your PlanetScale dashboard, select the database, click “Branches“, and click “Console“.

Run the following command and you should see 101 records:


PlanetScale console select all query

Scroll to the bottom and you’ll see the newly added quote. You can also query it directly by id:

select * from quotes where id=101;

PlanetScale console select single quote query

Solving the write problem

If it’s important for your application to always show the most up-to-date data, one quick way to fix this is using the Quote model’s booted() method.

Open up app/Models/Quote.php and replace it with:

<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Support\Facades\Cache;

class Quote extends Model
{
    use HasFactory;

    public $timestamps = FALSE;
    protected $fillable = [
        'text',
        'name'
    ];

    protected static function booted()
    {
        static::saving(function() {
            Cache::forget('allQuotes');
        });
    }
}

The booted() method allows you to perform some action when a model event fires. In this case, when saving() is called, you’re instructing Eloquent to forget the cache item named allQuotes.

Let’s test it out. Refresh your quotes page in the browser one more time to make sure everything is cached, then add another quote with:

curl -X POST -H 'Content-Type: application/json' -d '{
  "text": "Sometimes it pays to stay in bed on Monday, rather than spending the rest of the week debugging Mondays code.",
  "name": "Dan Salomon"
}' http://localhost:8000/api/quotes -i

Now refresh again, and you’ll see the time to make this query has increased significantly, indicating that the database has been hit. You’ll also now see the new entry in the output! With this, you can be confident that the displayed quotes are always up-to-date.

The saving() method works on both new and updated records. However, if you delete something, the cache won’t be cleared. You can use the deleted() method to handle that.

First, try to delete something (replace the last number with the id of the item you want to delete):

curl -X DELETE http://localhost:8000/api/quotes/1 -i

Refresh the quotes page, and the item should still be there. Now, go back to your Quote model and add this in the boot() method underneath saving():

static::deleted(function() {
    Cache::forget('allQuotes');
});

Run that cURL command one more time, but with a different id, to trigger a delete event. Refresh again and those records should now be gone!

More Laravel caching strategies

As you’ve seen, when it comes to caching, you’re going to have to think about a few things specific to your application before diving in.

Retrieving data

How long do you want to store the data in cache? The answer to this depends on the data. Is this data relatively static? Or does it change a lot? When a set of data is requested, how important is it that it’s always up to date? These questions will help you decide how long to cache the data and if you should cache it at all.

Storing/updating/deleting data

This tutorial covered caching retrieved data. But you can also store new or updated data in the cache as well. This is called write caching. Instead of going to the database every time you need to add or update something, you store it in the cache and eventually update it all at once.

Deciding the time at which you update actually leads to more questions. What if you wait too long and there’s a system failure? All of the cached data is gone. What if someone makes a request to see a product price, but that price has changed, and you’ve been storing the update in cache? The data between the cache and database is inconsistent, and the user won’t see the latest price, which will cause problems.

The solution to write caching will depend on your application’s needs. Write-back and write-through caching are some options. Check out this excellent primer for more information.

Conclusion

As you’ve seen, caching can immensely speed up your application, but not without caveats. When implementing caching, it’s important to think about how often your data will be accessed and how important immediate data consistency (from the user’s perspective) is in your application.

Hopefully, this guide has shown you how to get started with Laravel caching. Make sure you check out the Laravel Cache Documentation for more information. And if you’re interested in learning more about PlanetScale’s next-level features like database branching and deploy requests, check out our documentation. You can find the final code complete with caching in this GitHub repo. Thanks for reading!

Laravel News Links

New Ryobi Rotary Tool Hobby Station

https://i0.wp.com/toolguyd.com/blog/wp-content/uploads/2022/02/Ryobi-Rotary-Tool-Hobby-Station-RHS01.jpg?resize=600%2C600&ssl=1

Ryobi-Rotary-Tool-Hobby-Station-RHS01

Ryobi has introduced a new Hobby Station, model RHS01, for use with select corded and cordless rotary tools.

Most rotary tool workstations on the market have much simpler designs, such as Dremel’s drill press station. The new Ryobi Hobby Station looks to take things to a whole new level.

Ryobi RHS01 Hobby Station Features

Ryobi-Rotary-Tool-Hobby-Station-RHS01-Features
  • Telescoping tool hanger
  • Cord management
  • Keyless tool change
  • Drill press lever
  • 2-inch drilling depth gauge
  • Adjustable height
  • Adjustable tool angle (up to 90°)
  • Reversible baseplate
  • Routing fence
  • Built-in dust management with 1-7/8″ vacuum adapter
  • Accessory storage
  • Benchtop mounting holes

Ryobi Hobby Station Vertical Operation

Ryobi-Rotary-Tool-Hobby-Station-RHS01-Drilling-Task

The Hobby Station allows tools to be oriented vertically, for sanding, cutting, or precision drilling operations.

The base has x-shaped slots for drill bit clearance and possibly 3rd party work-holding clamps or fixtures.

It also comes with a removable “routing fence,” which I suppose can be used for grooving and maybe even edge-routing applications.

Ryobi Hobby Station Angled Operation

Ryobi-Rotary-Tool-Hobby-Station-RHS01-Horizontal-Orientation

The tool holder can also be rotated up to 90°, for angled or horizontal operation.

Ryobi Hobby Station Dust Collection

Ryobi-Rotary-Tool-Hobby-Station-RHS01-Sanding-and-Dust-Collection

The baseplate is reversible, with x-shaped slots on one side and a downdraft table on the other. This allows for dust collection during sanding or other such operations.

If this feature works well, it could be a big deal for a lot of users who might otherwise have to source, use, and store separate dust containment accessories.

The 1-7/8″ vacuum adapter is located on the left side of the base.

Ryobi Hobby Station Compatibility

Ryobi-Rotary-Tool-Hobby-Station-RHS01-Compatibility

At this time, the Ryobi RHS01 will be compatible with (4) models of rotary tools:

Price and Availability

Price: $99
ETA: Available Now

The Hobby Station is available exclusively at Home Depot.

Discussion

$99 seems a little steep for a rotary tool accessory, but the Ryobi Hobby Station looks to offer a lot more capabilities than all of the other rotary tool workstations currently on the market.

There are separate drilling/vertical workstations on the market, as well as mini router table accessories. The Ryobi Hobby Station looks to offer beyond the functionality of these types of separate attachments.

The built-in dust management – the downdraft table – could be a big deal for users that prefer to work in a cleaner environment.

This looks to be the ultimate rotary tool workstation.

Ryobi-Rotary-Tool-Product-Family-February-2022
Ryobi Cordless Rotary Tool Collection as of Q1 2022

It seems that Ryobi has been on a mission to take over the hobby, crafting, and maker tool space. At this pace, it won’t be long before Bosch’s Dremel brand starts to sweat – if this hasn’t made them nervous already.

ToolGuyd

Harry Potter and the Prisoners of Cyberpunk

https://theawesomer.com/photos/2022/02/harry_potter_cyberpunk_t.jpg

Harry Potter and the Prisoners of Cyberpunk

Link

Imagine, for a moment, that Hogwarts wasn’t a school of witchcraft and wizardry and instead taught its students computer coding and hacking. That’s what Alex Skor of Inventor Headquarters did when he reinvented the world of Harry Potter as a high-tech cyberpunk adventure, loaded with fun and geeky easter eggs.

The Awesomer

MySQL Developer – Income and Opportunity

https://blog.finxter.com/wp-content/uploads/2022/02/image-58.png

Annual Income

The average annual income of a MySQL Developer is between $87,828 and $149,975 according to Glassdoor (source):

A more conservative range would be to reach an annual income between $70,000 and $139,000 within 2-4 years of education as a MySQL professional.

Hourly Rate

If you decide to go the route as a freelance MySQL Developer, you can expect to make between $60 and $99 per hour on Upwork (source). Assuming an annual workload of 2000 hours, you can expect to make between $120,000 and $198,000 per year.

If you look at the skill descriptions of these freelancers, you’ll see that having some experience with alternative database technologies such as MariaDB and PostgreSQL can be a great help to position yourself as an expert on Upwork.

⚡ Note: Do you want to create your own thriving coding business online? Feel free to check out our freelance developer course — the world’s #1 best-selling freelance developer course that specifically shows you how to succeed on Upwork and Fiverr!

Industry Demand

But is there enough demand? Let’s have a look at Google trends to find out how interest evolves over time (source):

One of the reasons for the declines may be the rise of NoSQL database technologies such as DynamoDB and MongoDB and fully managed solutions such as ElasticSearch.

Work Description

So, you may wonder: MySQL Developer – what’s the definition?

MySQL Developer Definition: A MySQL Developer is responsible for database administration such as performance optimization, troubleshooting, problem solving, and customer support. (Source)

Learning Path, Skills, and Education Requirements

Do you want to become a MySQL Developer? Here’s a learning path I’d propose in five steps to get started:

You can find many courses on the Finxter Computer Science Academy (flatrate model).

But don’t wait too long to acquire practical experience!

Even if you have little skills, it’s best to get started as a freelance developer and learn as you work on real projects for clients — earning income as you learn and gaining motivation through real-world feedback.

🚀 Tip: An excellent start to turbo-charge your freelancing career (earning more in less time) is our Finxter Freelancer Course. The goal of the course is to pay for itself!

Related Video

Related Income of Professional Developers

The following statistic shows the self-reported income from 9,649 US-based professional developers (source).

💡 The average annual income of professional developers in the US is between $70,000 and $177,500 for various programming languages.

Question: What is your current total compensation (salary, bonuses, and perks, before taxes and deductions)? Please enter a whole number in the box below, without any punctuation. If you are paid hourly, please estimate an equivalent weekly, monthly, or yearly salary. (source)

The following statistic compares the self-reported income from 46,693 professional programmers as conducted by StackOverflow.

💡 The average annual income of professional developers worldwide (US and non-US) is between $33,000 and $95,000 for various programming languages.

Here’s a screenshot of a more detailed overview of each programming language considered in the report:

Here’s what different database professionals earn:

Here’s an overview of different cloud solutions experts:

Here’s what professionals in web frameworks earn:

There are many other interesting frameworks—that pay well!

Look at those tools:

Okay, but what do you need to do to get there? What are the skill requirements and qualifications to make you become a professional developer in the area you desire?

Let’s find out next!

General Qualifications of Professionals

StackOverflow performs an annual survey asking professionals, coders, developers, researchers, and engineers various questions about their background and job satisfaction on their website.

Interestingly, when aggregating the data of the developers’ educational background, a good three quarters have an academic background.

Here’s the question asked by StackOverflow (source):

Which of the following best describes the highest level of formal education that you’ve completed?

However, if you don’t have a formal degree, don’t fear! Many of the respondents with degrees don’t have a degree in their field—so it may not be of much value for their coding careers anyways.

Also, about one out of four don’t have a formal degree and still succeeds in their field! You certainly don’t need a degree if you’re committed to your own success!

Freelancing vs Employment Status

The percentage of freelance developers increases steadily. The fraction of freelance developers has already reached 11.21%!

This indicates that more and more work will be done in a more flexible work environment—and fewer and fewer companies and clients want to hire inflexible talent.

Here are the stats from the StackOverflow developer survey (source):

Do you want to become a professional freelance developer and earn some money on the side or as your primary source of income?

Resource: Check out our freelance developer course—it’s the best freelance developer course in the world with the highest student success rate in the industry!

Other Programming Languages Used by Professional Developers

The StackOverflow developer survey collected 58000 responses about the following question (source):

Which programming, scripting, and markup languages have you done extensive development work in over the past year, and which do you want to work in over the next year?

These are the languages you want to focus on when starting out as a coder:

And don’t worry—if you feel stuck or struggle with a nasty bug. We all go through it. Here’s what SO survey respondents and professional developers do when they’re stuck:

What do you do when you get stuck on a problem? Select all that apply. (source)

Related Tutorials

To get started with some of the fundamentals and industry concepts, feel free to check out these articles:

Where to Go From Here?

Enough theory. Let’s get some practice!

Coders get paid six figures and more because they can solve problems more effectively using machine intelligence and automation. To become more successful in coding, solve more real problems for real people. That’s how you polish the skills you really need in practice. After all, what’s the use of learning theory that nobody ever needs?

You build high-value coding skills by working on practical coding projects!

Do you want to stop learning with toy projects and focus on practical code projects that earn you money and solve real problems for people?

If your answer is YES!, consider becoming a Python freelance developer! It’s the best way of approaching the task of improving your Python skills—even if you are a complete beginner.

Join my free webinar “How to Build Your High-Income Skill Python” and watch how I grew my coding business online and how you can, too—from the comfort of your own home.

Join the free webinar now!

Finxter

Comic for February 08, 2022

https://assets.amuniversal.com/03888880628c013a9525005056a9545d

Thank you for voting.

Hmm. Something went wrong. We will take a look as soon as we can.

Dilbert Daily Strip

qirolab/laravel-themer

https://packalyst.com/assets/img/logo.pngA Laravel theme manager, that will help you organize and maintain your themes inside Laravel projects.Packalyst :: Latest Packages

MariaDB Developer – Income and Opportunity

https://blog.finxter.com/wp-content/uploads/2022/02/image-49.png

Annual Income

The average annual income of a MariaDB Developer is $85,000 according to Payscale (source).

Hourly Rate

If you decide to go the route as a freelance MariaDB Developer, you can expect to make between $20 and $99 per hour on Upwork (source). Assuming an annual workload of 2000 hours, you can expect to make between $40,000 and $198,000.

⚡ Note: Do you want to create your own thriving coding business online? Feel free to check out our freelance developer course — the world’s #1 best-selling freelance developer course that specifically shows you how to succeed on Upwork and Fiverr!

Industry Demand

But is there enough demand? Let’s have a look at Google trends to find out how interest evolves over time (source):

Work Description

So, you may wonder: MariaDB Developer – what’s the definition?

MariaDB Developer Definition: MariaDB is a database framework focusing on relational databases that are compatible with Oracle. MariaDB developers provide value to clients by integrating their applications with new or existing MariaDB databases. (Source)

Learning Path, Skills, and Education Requirements

Do you want to become a MariaDB Developer? Here’s a learning path I’d propose in three steps to get started:

You can find many courses on the Finxter Computer Science Academy (flatrate model).

But don’t wait too long to acquire practical experience!

Even if you have little skills, it’s best to get started as a freelance developer and learn as you work on real projects for clients — earning income as you learn and gaining motivation through real-world feedback.

🚀 Tip: An excellent start to turbo-charge your freelancing career (earning more in less time) is our Finxter Freelancer Course. The goal of the course is to pay for itself!

Related Video

Related Income of Professional Developers

The following statistic shows the self-reported income from 9,649 US-based professional developers (source).

💡 The average annual income of professional developers in the US is between $70,000 and $177,500 for various programming languages.

Question: What is your current total compensation (salary, bonuses, and perks, before taxes and deductions)? Please enter a whole number in the box below, without any punctuation. If you are paid hourly, please estimate an equivalent weekly, monthly, or yearly salary. (source)

The following statistic compares the self-reported income from 46,693 professional programmers as conducted by StackOverflow.

💡 The average annual income of professional developers worldwide (US and non-US) is between $33,000 and $95,000 for various programming languages.

Here’s a screenshot of a more detailed overview of each programming language considered in the report:

Here’s what different database professionals earn:

Here’s an overview of different cloud solutions experts:

Here’s what professionals in web frameworks earn:

There are many other interesting frameworks—that pay well!

Look at those tools:

Okay, but what do you need to do to get there? What are the skill requirements and qualifications to make you become a professional developer in the area you desire?

Let’s find out next!

General Qualifications of Professionals

StackOverflow performs an annual survey asking professionals, coders, developers, researchers, and engineers various questions about their background and job satisfaction on their website.

Interestingly, when aggregating the data of the developers’ educational background, a good three quarters have an academic background.

Here’s the question asked by StackOverflow (source):

Which of the following best describes the highest level of formal education that you’ve completed?

However, if you don’t have a formal degree, don’t fear! Many of the respondents with degrees don’t have a degree in their field—so it may not be of much value for their coding careers anyways.

Also, about one out of four don’t have a formal degree and still succeeds in their field! You certainly don’t need a degree if you’re committed to your own success!

Freelancing vs Employment Status

The percentage of freelance developers increases steadily. The fraction of freelance developers has already reached 11.21%!

This indicates that more and more work will be done in a more flexible work environment—and fewer and fewer companies and clients want to hire inflexible talent.

Here are the stats from the StackOverflow developer survey (source):

Do you want to become a professional freelance developer and earn some money on the side or as your primary source of income?

Resource: Check out our freelance developer course—it’s the best freelance developer course in the world with the highest student success rate in the industry!

Other Programming Languages Used by Professional Developers

The StackOverflow developer survey collected 58000 responses about the following question (source):

Which programming, scripting, and markup languages have you done extensive development work in over the past year, and which do you want to work in over the next year?

These are the languages you want to focus on when starting out as a coder:

And don’t worry—if you feel stuck or struggle with a nasty bug. We all go through it. Here’s what SO survey respondents and professional developers do when they’re stuck:

What do you do when you get stuck on a problem? Select all that apply. (source)

Related Tutorials

To get started with some of the fundamentals and industry concepts, feel free to check out these articles:

Where to Go From Here?

Enough theory. Let’s get some practice!

Coders get paid six figures and more because they can solve problems more effectively using machine intelligence and automation. To become more successful in coding, solve more real problems for real people. That’s how you polish the skills you really need in practice. After all, what’s the use of learning theory that nobody ever needs?

You build high-value coding skills by working on practical coding projects!

Do you want to stop learning with toy projects and focus on practical code projects that earn you money and solve real problems for people?

If your answer is YES!, consider becoming a Python freelance developer! It’s the best way of approaching the task of improving your Python skills—even if you are a complete beginner.

Join my free webinar “How to Build Your High-Income Skill Python” and watch how I grew my coding business online and how you can, too—from the comfort of your own home.

Join the free webinar now!

Finxter

Laravel 9 is Now Released!

https://laravelnews.imgix.net/images/laravel9.png?ixlib=php-3.3.1

Laravel 9 is now released and includes many new features, including a minimum PHP v8.0 version, controller route groups, a refreshed default Ignition error page, Laravel Scout database engine, Symfony mailer integration, Flysystem 3.x, Improved Eloquent accessors/mutators, and many more features.

Before we jump into the new features, we’d like to point out that starting with Laravel 9, Laravel will release a new major version about every twelve months instead of the previous six-month schedule:

Laravel uses a variety of community-driven packages as well as nine Symfony components for a number of features within the framework. Symfony 6.0 is due for release in November. For that reason, we are choosing to delay the Laravel 9.0 release until 2022.

By delaying the release, we can upgrade our underlying Symfony components to Symfony 6.0 without being forced to wait until September 2022 to perform this upgrade. In addition, this better positions us for future releases as our yearly releases will always take place two months after Symfony’s releases.

From the releases support policy documentation, here’s what you can expect going forward with tentative dates of upcoming releases:

Version PHP (*) Release Bug Fixes Until Security Fixes Until
6 (LTS) 7.2 – 8.0 September 3rd, 2019 January 25th, 2022 September 6th, 2022
7 7.2 – 8.0 March 3rd, 2020 October 6th, 2020 March 3rd, 2021
8 7.3 – 8.1 September 8th, 2020 July 26th, 2022 January 24th, 2023
9 (LTS) 8.0 – 8.1 February 8th, 2022 February 8th, 2024 February 8th, 2025
10 8.0 – 8.1 February 7th, 2023 August 7th, 2024 February 7th, 2025

Laravel 9 is the next long-term support version (LTS) and will receive bug fixes until February 2024 and security fixes until February 2025. Here are some of the major features that we’ve covered in detail in our A look at what is coming to Laravel 9 post:

  • PHP 8 is the minimum version in Laravel 9
  • New Design for routes:list
  • New test --coverage option displays coverage directly in the terminal
  • Anonymous Stub Migrations are now the default
  • New Query Builder Interface
  • PHP 8 String Functions
  • Moved mailer functionality from SwiftMailer to Symfony Mailer
  • Flysystem 3.x
  • Improved Eloquent Accessors/Mutators
  • Implicit Route Bindings With Enums (PHP 8.1)
  • Controller Route Groups
  • Enum Eloquent Attribute Casting
  • Forced Scoped Bindings
  • Laravel Breeze API & Next.js
  • Laravel Scout Database Engine
  • Full-Text Indexes / Where Clauses
  • Rendering Inline Blade Templates
  • Soketi Echo Server
  • Optional Bootstrap 5 Pagination Views
  • Improved Ignition Exception Page
  • New str() and to_route() helper functions

Find out more about Laravel 9.x

These are just a few of the new features in Laravel 9 and to see a complete list check out the Laravel 9 release notes as well as the upgrade guide. Also, don’t forget about Laravel Shift if you want an easy way of updating.

If you prefer video format, check out Laracasts: What’s New in Laravel 9 also has free videos about this release.

Finally, we’d like to thank everyone who contributes, submits PR’s, shares ideas, and uses the framework. Laravel is genuinely a global team effort.

Laravel News