I am 50 years old and have been a C / C ++ developer since I was 16. At the same time, I completed an apprenticeship as an electrician, did my Abitur and studied electrical engineering with a focus on software development.
Our professor always said that software development has little to do with a programming language, but much more with understanding structures and algorithms. Outside of my core competence (C / C ++) I program more in the field of dirty prototyping. A colleague once said that you can clearly see that I come from the C / C ++ area, even though we were programming PHP at the time. The structures learned in 35 years are difficult to reject. Of course,
$right = substr($string, strlen($string)-2,2)
works; just like
$right = substr($string,-2);
The first is the PHP-translated C++ way, the second is the PHP-native way (and the right way for PHP).
So, just do it!
During my studies, I was excluded from the competition for the fastest Quicksort algorithm. Although I had written the fastest algorithm, I switched off the background processes to generate computing power.There was still a bottle of sparkling wine, out of competition.