Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to start reading others code?

Tags:

php

wordpress

I learned some php basic, and I would like to learn some PHP coding techniques. I downloaded some code to read. To start with, I downloaded the Wordpress, but I have no idea which file I should start first. Where should I start? Thank you.

like image 557
Tattat Avatar asked Jan 21 '23 03:01

Tattat


2 Answers

Don't start reading wordpress sources unless it's your job of for some masochistic purpose.

Production services aren't intended for learning purposes.
Start from lesser applications.

like image 79
Your Common Sense Avatar answered Jan 24 '23 22:01

Your Common Sense


In my opinion, If you are understanding other's code you should first go with how the data flow is working before understanding any specific module.

Data flow is nothing but how the files executed if you enter url in browser address bar.

Which file is calling the script(index.php is common) and how they are generating final html.

Many of the software in today's world follow MVC. Understand how the files executed when you enter the URL in browser address bar. From start to end.

How URL is dispatched and how files called as required and then go with the specific module.

like image 38
Shakti Singh Avatar answered Jan 24 '23 23:01

Shakti Singh