10 Beginner Tips from PHP Masters




PHP Elephant
PHP is the language behind some of the most powerful and pervasive web applications around, including the ubiquitous Facebook and the unstoppable WordPress.
Learning a new language can be daunting, so we’ve tapped a few PHP experts for their advice for novice PHP coders (stay tuned for an intermediate/advanced selection of tips, coming up in a couple weeks).
If you’re a new PHP developer (or an old pro), be sure to leave a note in the comments and let us and other readers know what specific steps you’ve taken that’s made learning the language easier for you.

1. Elizabeth Naramore: Start with OOP



Naramore is a SourceForge employee and founded PHPWomen.org. For total beginners, she recommends getting a thorough background in object-oriented programming (OO) before diving straight into PHP.
“If you’re coming from a non-tech industry, take the time to learn solid principles of software development. Things like object-oriented programming, test driven development, version control, debugging, design patterns, etc.
“If you’ve tried and can’t solve your problem, don’t be afraid to ask. The PHP community in general is very helpful and friendly, and there are countless resources for the beginner available online. Entrench yourself in a community, whether it be a local user group, an open source project community, or an IRC channel like #phpc on freenode.”

2. Keith Casey: Google It



Casey founded a software shop and does a lot of work in the unconference circuit.
His advice centers around finding your place in the PHP community and following an increasingly important dictum: Google before you ask.
“Connect with a Users’ Group right now. There are PHP Groups all over the world where smart people gather to chat, explore ideas, and help one another.
“Remember to try a Google search before asking questions. No one likes lazy.”

3. Eamon Leonard: Join Open Source Projects



Leonard runs Ireland-based software company echolibre and co-founded CloudSplit, a real-time analytics service for cloud computing. Like many of his peers, he recommends trying your hand at open-source projects, even as a beginner.
“Get involved in open source as soon as you come to grips with the basics… This gives one access to source code and a chance to learn from industry veterans.
“Finding and documenting reproducible bugs is a time consuming task, and one that would be greatly appreciated by any open source team… When it comes to hiring developers to work with us, we would value someone’s potential contribution to our company a lot more if they have worked on an OSS project.”

4. Lorna Jane Mitchell: Just Do It



“Lornajane,” as Mitchell is more commonly known online, is a PHP consultant, developer, writer and speaker.
She gives a word of advice quite commonly heard in hacking circles: Just do it.
“Jump in! PHP is a really accessible language and fast to develop in. The best way to find out if something can be done that way is to try.
“Anyone can program PHP. The low entry barrier means that there is a lot of bad PHP in the world. But bad PHP that works is useful even if it isn’t pretty. Personally I think that if you can solve your problems with PHP, then you should get on and do it, even if it isn’t perfect.”

5. Chris Cornutt: Avoid Coding Burnout



Cornutt runs PHPDeveloper.org and Joind.in and has been using PHP since 1998. In his advice to baby PHP devs, he cautions against coding fatigue and burnout.
“I think new developers get overwhelmed too easily… Beginners like the language and they hack away with the ‘just make it work’ mentality, but I dare say more than half stop there.
“Try to find a mentor that can guide you through some of these early steps. It makes worlds of difference when you have someone real to talk to. IRC is a good option, but a go-to person is so much better.
“Thankfully, they also have the entire web at their disposal with loads of PHP sites and examples to help them through the tough spots. Some of the examples are good, some not so much, but they’ll come to learn those over time. PHP development, like anything else, is a skill that has to be honed — you can’t just jump into the middle and be an expert overnight.”

6. Abraham Williams: Try Drupal



Williams is a developer and self-styled “hacker advocate.” He, too, advises new PHP coders to jump into a coding project, giving preference to open source work.
”Find a quality project or community (preferably open source oriented) to contribute to. Get to know the code, the people and the customs. Not only will you learn from experienced developers, but the maintainers have a vested interest in quality code and a friendly community. They will be more than willing to recommend code improvements in patches and even how to be a better community member.
“I suggest the Drupal project as a good starting point. It is mature, has a epic community, a great growth rate and lots of jobs for good Drupal developers.”

7. Demian Turner: Study Seasoned Coders



Turner has been working with web and open source projects since 1996. He runs PHPKitchen.com and was a recent Seedcamp finalist.
He gave us a ton of great advice for new PHP developers, advice that can save time, make for better code and help sustain your interest in coding.
“Read the code of seasoned devs; there’s always a better, cleaner way to do things. Don’t reinvent any wheels; you will always have more than enough to program; use reputable libraries whenever you can avoid writing the code yourself.
“Ensure your code is human readable; if you can’t understand it six months later, how will it be for other devs?
“Always try and simplify your interfaces; it’s much more difficult to write simpler code, but consistent refactoring will save you a lot of time and headaches when it comes to maintenance.
“Finally, read up on some of the great programmers and find out how they stayed passionate about the art of programming so many years later.”

8. Stuart Herbert: Know Test-Driven Development, Encapsulation and Source Control



Herbert has been coding PHP since 1999; he’s been writing about PHP for several years and has contributed greatly to Gentoo Linux.
For new PHP devs, he advises, “Learn about test-driven development and encapsulation. Once you get the hang of it, you’ll ship code quicker, and whoever inherits your code will thank you for it.
“Oh, and learn about source control; it’s never optional!”
He also says the language’s biggest strength is “the fantastic documentation available at PHP.net for free. With certain other languages, you need to go out and buy the docs as books, but not with PHP.”

9. Maggie Nelson: Read Up on Data Storage



Nelson is a PHP developer currently employed by Flickr.
She tells PHP newbies to start leanring about data storage early in their careers.
“In many cases, you’ll use PHP for web applications. Compelling web apps tend to be the ones that use data in unexpected ways or in ways that solve everyday problems. If you’re just starting with PHP and this is your first language ever, spend a day or two reading up on data storage and perhaps learn some SQL along the way as well. PHP is known for playing very well with databases. Check out MySQL, other relational databases and venture out to a few NoSQL data storage solutions.
“Write all the code ‘from scratch’ for at least one application. The PHP world offers many great frameworks that can easily abstract away data access, but always be sure that you really understand how the data is actually manipulated behind the scenes!”

10. Michael Maclean: Learn about Security



Maclean is a PHP and Python developer based in the Outer Hebrides in Scotland.
He says, “PHP’s pretty easy to get going with, which is why so many people use it, but I think it’s important to have a look at what people who’ve been using it for a while are doing. Rather than writing everything from scratch, check out a couple of frameworks, which will probably give you a bit of a head start.
“The other thing to do is learn about security. PHP’s got a bit of a bad rep for that in the past, which is a bit of a side-effect of its ease of use. There are many resources online and in print on how to avoid security problems. Check out the books by Chris Shiflett and Ilia Alshanetsky who also have information about that online.”

{ 0 comments... read them below or add one }

Post a Comment