Live data from Hacker News

Ask HN: I'm starting a new job as a PHP developer tomorrow

news.ycombinator.com

1–10 of 96 posts

Ask HN: I'm starting a new job as a PHP developer tomorrow

#1
I have to admit I haven't touched a single line of PHP code in more than 8 years.

I've been working with Rails remotely since 2008 (~7 years in total). However, remote work has died out and decreased dramatically.

Is there anything you guys could recommend? I haven't worked with PHP in years so I'm worried about my performance with PHP on the new job.

I know how to program but I'm not familiar with PHP anymore, in fact I don't recall anything about it.

The reason I'm going back to PHP? Sorry, it's not my decision, and there aren't many local jobs in my area, so I'm taking what I can, and that's work with PHP at the moment.

Hopefully I'll find other jobs with saner languages in the future.

One other thing I want to mention is that I'm a Linux person, I can't use anything else. However, I've noticed that the company that wants to hire me is a Windows shop, they use Windows mostly (Windows desktops, Sublime Text, and so on).

Do you guys think it's acceptable if I use Arch Linux on a VM (VirtualBox) and I fullscreen the VM? I use things like i3-wm and vim and I'm really used to tiling WM these days, so using Windows would be very painful.

I asked if I could install Arch Linux on bare metal but they said no. They said I have to use a VM. They also mentioned I can't bring my own hardware.

I've been using Linux for 15 years and I currently use Arch Linux at home and on my laptop.

Suggestions welcome.

Re: Ask HN: I'm starting a new job as a PHP developer tomorrow

#6
Modern PHP is a sane language. A lot has changed in 8 years. I second Cholmon with his recommendation for phptherightway. I also highly recommend using a modern and developer friendly framework like Laravel. You can learn about it quickly by watching some tutorials at LaraCasts.com. Check out the Laravel 5 Fundamentals series which is free.

https://laracasts.com/series/laravel-5-fundamentals

Re: Ask HN: I'm starting a new job as a PHP developer tomorrow

#7
PHP is totally fine, it gets a bad rep it doesn't deserve. It's not as elegant as Python or Ruby but it's acceptable and it'll be more familiar than you think. If you're looking for the Railsy-est thing in PHP it's Laravel. If you can move them to Laravel (if it would be a good MVC fit) you'll be happy you did. Otherwise, don't stress about it too much.

Re: Ask HN: I'm starting a new job as a PHP developer tomorrow

#8
If you look into composer and start writing code using and contributing packages, you may be surprised at how similar modern PHP development is to other popular languages. Also look at the PSR standards, especially for auto loading at http://www.php-fig.org/psr/

Re: Ask HN: I'm starting a new job as a PHP developer tomorrow

#9
PHP is a decent language and ecosystem these days. Perhaps one of the minority of ecosystems that are actually on the rise rather than on the decline. It still has lots of warts, but whatever. Forget the idea that PHP is "taking what you can" or not a sane language -- you're in it now so might as well get up to speed with best practices and use it the best you can. I promise you can build compelling software in PHP.

http://www.phptherightway.com/ is a great resource for most things you'll need to know when working with modern PHP. Definitely start here.

Familiarize yourself with the ecosystem by poking at the most popular frameworks, at least skimming the docs to understand the types of things they provide and how they're structured: Zend, Symfony and Symfony Components, Laravel, Slim, Silex. Study WordPress, the "stereotypically bad" piece of software, for anti-patterns, but there's also a lot of good stuff in there and some improvements on the roadmap.

Composer is the npm of PHP. Check out packagist (horrible UI though) or browse github's PHP repos to find some of PHP's commonly used packages, like Monolog and phpunit. You can build a simple app in minutes in Laravel, and even put together a small product MVP using 90% boilerplate code within a matter of days on Laravel. Since there's a growing ecosystem for these tools now, it's getting easier and easier to write quality software in PHP, and it's actually a relatively pleasant experience.

Plus shipping and managing PHP in production is a breeze -- it's the most widely supported web platform, after all. We've got support on great CI systems like circleci and scrutinizer-ci.

Anyways, start there and good luck!

Re: Ask HN: I'm starting a new job as a PHP developer tomorrow

#10
Quick rundown (in no particular order):

* The language has comes leaps and bounds since you last used it

* Install composer and learn how to use it (PHP package manager)

* Read up on Laravel, IMHO it's the best PHP Framework out there right now. They guy behind it is a genius and has great vision for it.

* You'll want to use nginx + php5-fpm (No more apache and php_mod)

* Check our PHPStorm, if you are going to use an IDE you can't bear intelij IMHO and PHPStorm has support for a myriad of things

* ORM's have greatly improved, even if you aren't going to use Laravel read up on it's ORM to see what is possible

* Much more OO now especially when it comes to interacting with the DB (no more mysql_connect/mysql_query nonsense)

Post reply on HN