1. Find any file in Github Repository within a Second

E.g. you use Rector and you're curious about its guts. The main bin command is "vendor/bin/rector process", so you're interested in ProcessCommand. What's inside?

You go to the Github repository:

look for "process command" or "ProcessCommand"

find 150 irrelevant results

...and close it 😠

Great documentation is useless without the even better search.

Good news! Github is closer to PHPStorm than you think:

Just press t on your keyboard and "TypeYourClass".

👍

2. Get rid of Phing

All Phing scripts I've seen look like someone programmed their own Arduino to open glass with water.
So I migrate them to composer scripts, so people can actually use them without having an MIT degree.

I've migrated over 5 of these recently and you can see its a relief in developers eyes - they either have less code to maintain or (more often) they've finally got rid of that "black hole" code that no-one knew what it does.

5. Use Elementary Maths to become Master

Least Common Denominator

I've learned this principle in 5th grade, it has fascinated me ever since. It fascinates me even more, how they are used to create effective code - easy to write, read, maintain and doing what it should do.

What is the least common denominator?

These 2 pictures explain it:

Now, both pictures explain it. Which one do you prefer?

Disclosure

the left image is actually self-explanatory - it's used least common denominator to explain Least Common Denominator

the right image also explain it, but it uses much more extra data, that you don't need (e.g. root) and only slows down your neuron pipelines

Use the left approach to explain issues and problems. They're easier to understand, focused on the problem you really have and will get to the effective solution faster.

The right path is how the legacy code is manufactured in companies every day.

What Else is There?

Occam's razor - People that use Wikipedia or studied university renamed least common denominator to Occam's razor and added more academic words. The logic is the same, but you might prefer it.

SOLID - Again the same family, just different letters and vocabulary.

That's the beauty example of pattern thinking. Instead of remembering 3 different terms, you pick one and use it.