The Information Age, why you should realize that everybody struggles, just like you

In this day and age, we are in the information age, you can access information so easily, you can become a “somewhat expert” in something or just about anything. That is a good thing, a very good thing. The information age has many benefits, but it also has many downsides. The most basic disadvantage is privacy. Your info can be accessed all around the web, it can be used to take advantage of you, your privacy, and all. But what I realized is something more subjective, something that I know is affecting most people.

In the information age, knowledge and information are everywhere, our brains should also try to gather all this information to survive in society.

In innovating careers and fields, information and knowledge are being shared around the world every day, creating more innovative data, creating more new studies, creating new information, creating new things to learn. To survive, we need to keep adapting to these ever-accelerating fast changes.

In the web development career, let’s say you just finished learning Laravel framework, or React JS framework, then suddenly a new JS Library pops out, Three JS. Now you will need to learn concepts of 3D objects, faces, vertices, and the never-ending bucket of information.

You become frustrated. 

You see a lot of people seem to adapt quickly, you feel like a loser.

NO!

Everyone struggles just like you, even the smartest ones feel the same way as you. In the information age, a lot of people struggle with studying, memorizing, remembering information. To survive at this age, all you need is perseverance. This may sound corny, you may have heard this a lot in self-improvement seminars. Well, it’s the truth. That’s why the numbers of successful people are lower than the least successful people. The rich are fewer, while the poor are in the billions in number. The rich perseveres, the poor want an easy life.

Use technology against technology.

With the wave of information, use your computer for the overwhelming data. You don’t need to memorize everything, save it on your computer. What is important is the theory, the concept of the data, the information you are learning.

This was my mistake, applying to an IT company, I always think “I need to know this and that.”. You will only burn yourself out. Try to learn the basic concept, the general structure, the whole picture. Just save and ready the smaller and countless info in your computer, your phone, your flash drives. LOL

Investing in One’s Self?

Wealth is such a good thing, it’s not just about money and assets, it’s also about your well being as a whole. Your mind, your soul, your health, and your life is in the scope of wealth.

When we hear the word “invest”, “investing”, “investment”, what usually comes to mind is about money, business and assets. That is true, but investment is also about providing and endowing something on someone or something or on yourself.

When we study in our schools we are investing knowledge in our selves. At the same time, we are teaching ourselves the value and virtue of responsibility as students. I believe what we put into something, it multiplies. Well there are things that when we put, it doesn’t multiply or increase.

There’s a story in the Bible about the Parable of the Talents in Matthew 25, the master gave talents to his servants. Two servants worked on the talents they were given and it doubled. One servant dug a hole in the ground and buried the talent so it wont get lost. When the master returned, he was pleased with the two servants and rewarded them while he was angry with the one servant who buried the talent in the ground, he was punished and all his talent was taken way from him.

It’s a story full of truth and wisdom. We can learn a lot from that parable.

In life we all live in different environments and arrangements, some of us live in first world countries, some in third world, some were born rich, and some poor, some were given education while some had no chance to go to school. Our scenarios in life are all different. But we can all be wealthy and prosperous, all we need to do is “invest”.

Invest your time for self improvement, invest your self in becoming a better person than yesterday. Wherever we are, whatever our situation is, these are all opportunities, these are all given, we need to use it.

Awhile ago I was playing games, just sitting lazy with my subconscious mind then the conscious mind snapped me back. What the hell am I doing? I decided to stand up, do house chores, started my laundry while thinking what new technology should I learn and master?

Also I was vaping, I thought, if I invest in myself, I should also invest in my health, I decided to throw my vapes into the trash. No more smoking for me.

Even your posture, if you don’t fix your posture you’re limiting yourself for a better future. A good posture can make you taller, more beautiful/handsome. You will look more healthy, people will admire you, people will respect you, you become more agreeable, it’s beneficial for making deals with clients and businesses, and your future body health will thank you for it.

Look at the things that multiply, and invest on it.

Why use PHP Namespace?

PHP Namespace is a virtual directory you create in PHP. It is used to avoid conflicts when declaring Classes in PHP.

In Object-Oriented Programming, it is best practice to place one class in one file, if there are 2 classes in 1 file then that just defeats the purpose of OOP. So why use Namespace? Here is an example.

In the index.php file, we have the code that:

  1. Requires 2 PHP files
  2. Instantiates the class A
require('first-class.php');
require('second-class.php');
$object = new A;

In first-class.php, we have a class and a method that displays a text.

class A{
    public function __construct(){
        echo "I am the first class A.";
    }
}

In our second file, second-class.php, we have a class with the same name.

class A{
    public function __construct(){
        echo "I am the second class A.";
    }
}

Now if we run the index.php file, we will get an error.

Fatal error: Cannot declare class A, because the name is already in use in C:\xampp\htdocs\php_tester\namespace\second_class.php on line 2

What happened is that the instance variable object is confused on which Class to instantiate. To solve this is to use namespace. This is important especially on huge projects and projects that use libraries. Namespace can also help collaborative projects for teams who code on a single project.

To use a namespace is simple. We add the namespace code at the top of the class and specify a name for it. In first-class.php file, we update the code to:

namespace FirstA;
class A{
    public function display_text(){
        echo "I am the first class A.";
    }
}

Now in our code in index.php, when we want to access the methods and properties under the first-class.php file, we update the following code to:

require('first-class.php');
require('second-class.php');
$object = new FirstA\A; //qualified class name

//result "I am the first class"

The code $object = new FirstA\A; is called the Qualified Class Name.

We can also place a namespace in our index.php file.

namespace FirstA;
require('first-class.php');
require('second-class.php');
$object = new A; //unqualified class name

//result "I am the first class"

Notice that I removed the namespace in the instantiation, we can call it as Unqualified Class Name.

But… how do we call the class under second-class.php? We do it by:

namespace FirstA;
require('first-class.php');
require('second-class.php');
$object = new A; //unqualified class name
echo "<br />"
$object = new /A; //fully qualified class name

We call it Fully Qualified Class name or FQCN.

We can also use the code “use“.

//namespace FirstA;
require('first-class.php');
require('second-class.php');

use FirstA\A as NewA

$object = new NewA; //unqualified class name
echo "<br />"
$object = new /A; //fully qualified class name

Mobile Legends’ Annoying Team Algorithm

So you are a good team player in Mobile Legends. Either you have mastered a single hero or have mastered more than 5 heroes, you are a good player with a win rate of 60% and above.

Then comes Mobile Legend’s algorithm. Mobile Legends like any other games want to control people so people get hooked up. If a game is too easy, people will get easily bored. If the game is challenging, then people will get hooked to it because they want a challenge. Mobile Legends keep people hooked up in 2 ways. They have their own algorithm so players are always hooked up and always wanting to play more and win more.

  1. The Team Algorithm
    Supposed you are a good player and a good team player, and you won 3 to 4 games in Rank Mode. The next game, the algorithm will automatically set you to a player who has lost in their 3 or 4 games in a row. Or worse, feeders, you will be teamed with feeders. The worst thing is there are more dumb players than good players. I am sure you know that.

    So, here you are a good player, with 3 or 4 dumb/feeder teammates and 1 average player. The result is, there is a high chance you will lose and lose a star.

  2. Stats Controlling Algorithm
    Have you noticed how your hero starts performing/damaging very low compared to your previous matches? I noticed it too. If you are a good player with too many wins on your last 3 or 4 games, the algorithm will lower your stats in the background. Of course, they will not display it on the stat bar but in the background, your stats are decreased.
    That’s why your damage is lower, and your enemies have higher.

Just like the algorithms in gambling, casinos want their customers hooked up so there’s always a higher chance of you losing in the casino than winning, but still people get hooked up because you know, greed. Facebook and other social media also hire people who know how to get people hooked in to their platforms, from the display, the interface and the content they display. It’s all psychological. The same with games like Mobile Legends, the feeling of winning feels so great so the game will give you higher chance to lose so you will be dissatisfied and will keep on playing just to have the win.

I am deleting my account and the game app now, I don’t want to play games that are being manipulated.

WordPress 5 Page Editor Will Not Let You Exit Page

WordPress 5 has finally come to the WordPress CMS. It has many features that lets it step up it’s game.

One thing I noticed while using WordPress 5 is that when you’re editing a page using it’s custom built Page Editor, if you want to go to another Admin page, it doesn’t let you. It requires you to Save/Update your current page first before it exits you.

Closing the browser doesn’t work either, nor closing the tab. It prompts you to Save the current work before you can leave.

I am sure that the WP team did not put the functionality on purpose but it’s a bug of a script or maybe the browser having some issues or conflicts. I am currently using Chrome as a browser, I don’t know if this happens on other browsers.

This is a bad thing especially when you didn’t edit a content of a page or post and you’re just visiting the page editor to copy some custom code or you’re just checking the page settings so you can make a reference for other pages. You don’t save the page, it’s a bad practice, what if you accidentally touched something or added some texts or codes or accidentally deleted a code or text.

The best way to exit the page is to force close the application, or a technique that I do, click the close button on top while pressing enter.

Posted in Fix

Specified key was too long – Migration error – Laravel

If you encounter this error when migrating database in your Laravel project, “Specified key was too long” then you might be using an older version of MySQL or MariaDB.

To fix it. Go to your App directory then Providers and open AppServiceProvider.php

Specified key was too long - Migration error - Laravel
Specified key was too long – Migration error – Laravel

Add the Schema Facad at the top “use Illuminate\Support\Facades\Schema;

Then paste this inside Boot function “Schema::defaultStringLength(191);

That’s it! Run your migration again.

Posted in Fix

How To Install Laravel

How to install laravel is fairly easy. A beginner like can do it. Working on dependencies, Laravel uses PHP composer. You need to install Composer in your computer before installing Laravel.

First – Visit the following link and download composer to install it to your system.

Next – After the Composer is installed, you can check if it’s installed properly in your system by typing “composer” in your command prompt.

command prompt composer laravel
command prompt composer laravel

Next – Create a directory inside your working location, if you’re using XAMPP then go to C:/xampp/htdocs then create a folder. name it as the name of your project. I would name mine “laravel” so the directory would be C:/xampp/htdocs/laravel.

Open Command Prompt then go to the directory you just created, once inside, type the following code to start installing Laravel composer create-project laravel/laravel –-prefer-dist

composer create-project laravel/laravel –-prefer-dist
composer create-project laravel/laravel –-prefer-dist

Wait for it to finish the install.

Next – To start the laravel service, type the following inside your laravel directory. php artisan serve

composer laravel php artisan serve
composer laravel php artisan serve

You may need to restart your computer after installing Composer.

Finish – Make sure that Apache server is running, go to your browser and type localhost/laravel/laravel/public/ for my project

laravel intro browser
laravel intro browser

Fix the CSS Bug in Divi Theme Front End Builder

This article shows how to fix the css bug in Divi theme front end builder.

If you’re using Divi Theme from Elegant Themes, then you’d have probably encounterd a bug in the Frontend Builder feature. That is if you added a mobdule/block to the front end and try to edit it’s settings, you cannot click the elements inside the settings Popup.

Here is an image example:

In the image above, if you cannot click any of the elements in that popup settings eg(Max Width, Header Font, Header Color) then you have a similar problem.

Also if you try to change the the background color of the module, the popup settings background will also change.

Solution:

  • Go to your Theme Directory via FTP or Cpanel File Manager
    • That would be /wp-content/themes/Divi
  • Go to the following sub directory /includes/builder/scripts/ext
  • Locate and Open wp-color-picker-alpha.js
  • Search for the term “absolute”
    • The code should look like this ‘position’: ‘absolute’,
  • Replace the word “absolute” with “relative”.
    • So the code now would be ‘position’: ‘relative’,
  • The same with wp-color-picker-alpha.min.js,
  • Open wp-color-picker-alpha.min.js
  • Search for the term “absolute”
    • The code would look like this ….height:”100%”,position:”absolute”….
  • Replace the word “absolute” with “relative”
    • So the code now would be ….height:”100%”,position:”relative”….
  • Upload and replace the files in your website.

That’s it! Refresh and clear the Browser Cache and enjoy using Divi Theme smoothly without the buggy CSS.

Get Rid Of Your Lazy Personality

Get rid of your lazy personality, but how? Why are you still poor? That should be the most often asked question to ourselves. Why is it a question? Because it’s hard to know the answer. Or maybe the answer was there all along, we’re just too dumb to realize or too busy doing other things which aren’t supposed to be in our priority. Being poor is not just about not having enough money. Being poor is about your personality, yourself, lacking the discipline on basically just everything or most of the things in life.  Be aware of these per

We all get there sometimes, stuck, confused and lost off your purpose, not for all maybe but I think most people. I have always been a very busy person, when I say busy, busy on progressing myself, my work and my projects. I knew what I wanted, and I knew how to get it. Those were the days where my momentum is unstoppable. I even pushed on starting my own company because there’s a boost of client sales and projects.

It felt good, I felt confident and satisfied. Everything’s going well, there are ups and downs in my career and I don’t know what happened since then, everything changed. I lost my momentum, I lost my clients, my projects, my money-making routine.  I’ve become lazy, my mind became lazy, my focus went down, my eagerness to learn vanished. I started taking clients for granted, I lost everything.

Being satisfied while being a fool is a bad combination. I admit, I felt satisfied, I took things for granted, I felt confident, I said to myself, this is life, and I should remain like this in order to enjoy life. What a bad idea.

I never realized that I was still young, 23 at that time and I have so much to learn. Being arrogant and having false confidence, I stopped listening to other people, I only listened to myself, and so here right now, I’m 26, 3 years of being dumb and stupid without realizing it.

I would like to list what I learned from my mistakes.

The qualities of a lazy person and know how to get rid of your lazy personality.

1. Easily Loses Motivation
2. He Knows/Wishes What He Wants But Doesn’t Fully Focus On Getting It
3. Out of Focus
4. Takes Time For Granted
5. Procrastinating
6. Sleeps a lot and do useless things

You should first know this 6 symptoms to get rid of your lazy personality.

If you find yourself to have these characteristics then you’re in trouble, you may not realize it now but soon you will see how it materializes and affects your future. I realized that as we are still younger, you must develop good characteristics. If you’re a student and is always late, you will carry that bad late-habit when you start working.

We always hear the saying and similar quotes that lazy people will always become poor, it’s Biblical, it’s practical, it’s a reality. Get rid of your lazy personality now, so you can start growing.

If you want to know more about self improvement, feel free to contact me and we can share our thoughts with each other.