8 effective tips for PHP beginners

  • 2020-03-31 21:18:49
  • OfStack

Learning a new language can be a daunting task, and the best way to do it is to learn from the experience of previous generations and get more with less. Here are some tips for PHP novices (this writer is also a novice).
If you are a PHP developer, whether you are new or experienced, I hope you can discuss your thoughts and tips on PHP here.
1. Start with OOP
Naramore is a SourceForge employee and founder of PHPWomen.org. For starters, she recommends learning about OOP(Object Oriented Programming), the idea of object-oriented Programming, before learning PHP.
"If you're from a non-tech industry, it's important to spend some time learning the basics of software development. Such as object-oriented programming, test-driven development, version control, debugging, design patterns, etc.
"If you've tried and can't solve the problem, don't be afraid to ask. Many of the PHP communities are very friendly and offer a wealth of resources that beginners can use, which can be helpful. Find a stable community that works for you, a local user group or an open source project community, or a relevant IRC chat channel on freenode."
2. Google at any time
Casey started a software store and did a lot of research on the unconference process.
His advice is to find your place in the PHP community and follow the "Google before you ask."
"Find a user group to join right away, a PHP group of smart people all over the world who come together to chat, develop ideas, and help each other."
"Remember, try Google before you ask. No one likes a lazy person."
3. Join an open source project
Leonard runs an Irish software company, echolibre, and is the co-founder of CloudSplit, a cloud computing analytics service. Like many of his peers, he advises actively trying out open source projects, even if you're new to them.
"By participating in open source projects, you have the opportunity to see the source code and learn from those who have gone before you."
"Help open source project teams with time-consuming tasks like finding and documenting repetitive bugs, and they'll appreciate it. When we want to hire a developer, if he has ever worked on an OSS project, we think more about his potential contribution to the company."
Do what you think
Lornajane is better known online as Mitchell, a PHP consultant, developer, author, and speaker.
She gave a brief piece of advice: do what you want.
"PHP is a language that is very easy to understand and can be developed quickly. The best way to know if something is possible is to do it."
"Anyone can program in PHP. Low barriers to entry mean a lot of bad PHP work. But a lot of bad PHP work can be very useful, even if it doesn't look pretty. I personally think if you can solve a problem with PHP, go for it, even if it's not perfect."
Avoid coding burnout
Cornutt, who runs PHPDeveloper.org and joind.in, has been using PHP since 1998. His advice to PHP beginners is never to develop coding fatigue and burnout.
"I think it's easy for novice PHP developers to get into a situation where they're overwhelmed... Beginners are often interested in languages, but are often misled by a "just work" mentality, which results in less effort.
"Try to find a mentor to guide you through these initial learning steps. When you actually communicate with others, you will find many different things in the world. "IRC is a great choice, but a great teacher is definitely the best choice."
"PHP development is also a skill that needs to be honed. No one can become a master overnight."
6. Choose a good coder
Turner has been doing web related work and working on open source projects since 1996. He runs PHPKitchen.com and was recently selected to the final of Seedcamp.
He gives great advice to novice PHP developers to save time, write better code, and help maintain your interest in coding.
"Reading the code of experienced developers, you will always find some better and more concise way to do it. Don't reinvent the wheel. Use libraries to avoid writing duplicate code yourself."
"Make sure your code is human-readable. If you can't read your code after six months, how do you get other developers to read it?"
"Keep the interface as simple as possible. Writing simple code is more difficult, but good refactoring saves a lot of time and headaches for maintenance."
"Finally, learn about some great programmers and how they've kept their passion for the art of programming alive for years."
7. Understanding test-driven development, packaging, and code control
Herbert has been playing PHP since 1999 and has contributed a lot to Gentoo Linux.
For PHP beginners, he says, "learn test-driven development and encapsulation. Once you get used to it, your code will write faster, and the people who inherit your code will thank you.
"Learn to code control. It's the way to go."
One of the biggest advantages of PHP, he says, is that there is a lot of free documentation online and you don't have to go to a bookstore down the street to buy a tutorial like you do with some other languages.
Understand safety issues
Maclean is a Scottish PHP and Python developer.
"PHP is being used by a lot of people because of its ease of use, but we have to think about what beginners are doing with it," he says. You don't have to write everything from scratch. Choosing the right framework is a good place to start."
"The other thing to do is to understand the safety issues. PHP used to have a bad reputation for security because of the side effects of ease of use. We must learn to avoid these problems.

Related articles: