How to find the microprocessor speed ?

Here is the command to find the microprocessor speed in unix machine. MacOs is a unix machine so you can run the following command :


unix logo
unix logo
API General Web API

How to improve an API speed performance ?

Today’s challenge : investigate the slow responsiveness of the api. I was assigned the task to investigate the performance report produced the day before. The report concluded in the most unclear manner that the backend was lacking in term of performance. No precision regarding the list of failing api calls was provided. I used newRelic and discovered that indeed during the specific timeframe mentioned a clear bottleneck was surfacing an a specific api call to a specific internal server.

I reached out to the developer mainly responsible of this server. The newRelic information [pointing out the entanglement] was challenged in the most defensive and almost aggressive manner to my stupefaction.

Developer do not like to be pointed out or criticized. What/How should have approach this developer ?=

The developer challenged the results by saying “I just executed the specified api endpoint with the specified payload and guess what; the result came back under one second”. Omitting the context of Heavy Test Performance. So being pushed back multiple time, I moved on to the sysOp department to get more information on what was going on.

The slow server obviously was not monitored with newRelic. A coordination with sysOp was necessary to get this server under surveillance. During our meeting, it was established that the server was under provisioned in term of CPU power and memory space. We did increase these metrics.

The tests were ran and passed successfully. The main challenges were to get the approval from the CIO to have sysOp moving and the developer’s resistance to acknowledge a possible glitch on the server.

My approach toward this developer although very specific and data documented should have been persuasive rather than convincing.


What is the command line of the day ? valet use [email protected]

valet use [email protected]


What is a Developer Love Dream ?

No more time wasted in configuration => Just develop!

Developers spend considerable time configuring their work environment. This is an exhausting task and it is tiring. Software engineering is Joy when we can develop and think about logic and Speed performance.

Surprise is there to facilitate development for software engineers and myself !

Starting with providing tips about best devices and tools and of course articles and solutions about diverse configuration issues


What is the easiest way to run Mysql on a Mac ?

The easiest way to run MySQL on a Mac is to install MAMP. The advantage is that it does not conflict with valet which is another powerful tool for local development specially with Laravel. If you do not want to face the same issue as the lost of your mysql password after installing with homebrew, MAMP is the my fastest solution

See StackOverflow issue : MacOSX homebrew mysql root password


What is a palindrome ?

What is a palindrome ? Find the definition below from the online oxford

a word, phrase, or sequence that reads the same backward as forward, e.g., madam or nurses run.

In the example below only a word palindrome could be identified. Additional conditions would be necessary to analyze phrase or sequences

function isPalindrome($str): bool
    $str_length = strlen($str);
    $mid = round($str_length / 2);
    $last_character = $str_length - 1;

    for ($i = 0; $i <= $mid; $i++) {
        if ($str[$i] != $str[$last_character]) {
            return false;
    return true;

var_dump( isPalindrome('madam'));
var_dump( isPalindrome('nursesrun'));
var_dump( isPalindrome('davad'));
var_dump( isPalindrome('avaava'));

What is the run time complexity ?

It sounds to be O(n/2)

What is the space complexity ?

We do not allocate memory except for few variables as $i, $mid and $last_character



How to execute PHP code from the command line?

Simple just type

php -a

More info about php :

Interview Interview questions

Big O notation Chart

Speed performance is the key of any successful application – use the following charts for understanding the big O nation and for upcoming FAANG interviews


Also do not hesitate to prepare your interviews with this book


How to make twitter card working with wordpress ?

First please install the plugin SmartCrawl

then configure as follow


Twitter Card not working ERROR: Fetching the page failed because other errors.

If you are experiencing the issue below , you can try here

Enabling AES128 as an ssl cipher will allow the Twitterbot to connect.

See different forums confirming the solutions

If you are using cloudfare, please see configuration

See more information about cloudfare

then it will work