Ask HN: I'm starting a new job as a PHP developer tomorrow
41–50 of 96 posts
Re: Ask HN: I'm starting a new job as a PHP developer tomorrow
#42PHP is honestly a pretty swell language despite its irregularities and reputation amongst people who work with newer, more trendy language. It has a great community, and the language its self keeps getting updated with modern features, even if they're sometimes done in a slightly awkward manner.
Re: Ask HN: I'm starting a new job as a PHP developer tomorrow
#43What about the fact that they all are using Windows on the desktop? I'm a Linux person and I can't use anything else. I've been using Linux for 15 years. I asked if they can let me install Linux on the computers, they said I have to use a VM. I'm fine with a VM but I also need my window manager of choice (i3-wm) and so on. Would it be okay if I install Arch Linux on VirtualBox and I fullscreen the VM? What about perf…
Have you actually tried VirtualBox? Depending on the underlying hardware, the performance really might not be an issue.
Changing from Linux to Windows is indeed rather painful. As others have mentioned, depending on deployment/process etc -- you might still be better off trying to live on the windows side.
I'm not a windows dev, but from what I've seen mentioned by others -- running php on windows w/IIS and SQL server works fine -- but you'll want to have a test/dev environment that matches prod -- or you'll just constantly run in to pain points -- especially if the team isn't on board/interested in investing in a full heterogeneous environment.
For a small example with node, see eg:
https://github.com/keithamus/npm-scripts-example/issues/5
Hopefully your new team has some automation in place -- it's unlikely it'll work out of the box under linux if it's never been tested/linux has never been a requirement.
On the bright side, vim works fine under windows, and with some mingw32/64[2], things aren't entirely painful. If you're used to script things with ruby, that should be even easier. Having to work with cmd.exe and it's nasty find.exe rather than grep, feels like running with one leg tied behind your back.
Lack of proper tabbed/keyboard-friendly window manager is probably the biggest productivity drain -- thought there are some alternatives for that too[3].
[1] http://www.hanselman.com/blog/SwitchEasilyBetweenVirtualBoxA...
Re: Ask HN: I'm starting a new job as a PHP developer tomorrow
#44> 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. > 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. Beggars can't be choosers :( Whether your Linux VM setup is acceptable will depend entirely on what the rest of the shop is used to.…
Re: Ask HN: I'm starting a new job as a PHP developer tomorrow
#45PHP 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.
It wasn't OOP at the start and had weird warts.
As PHP mature it's much better than its past and have fixed some complaints but unfortunately the bad rep still stuck. Plus there are some fundamental warts that you can't just fix.
In general, I'm happy that PHP is thriving and continue to improve. It looked bleak for a while and I regretted choosing PHP over Python or Ruby for web dev.
I find that it doesn't matter much if you're using MVC frameworks such as Laravel. You hardly need to memorize or use crazy stuff with PHP and most of the time you're just googling framework stuff how to grab param from route, etc...
I've done Scala Play framework that that language get in the way a lot on top of googling how to do stuff with play framework.
But I suspect that this observation is because more of dynamic language vs type language more than PHP vs Scala.
--
I think in general it's just language evolve and got better.
Perl started web dev and then PHP was better then Python came along and after that Ruby. With each subsequent programming languages the languages got prettier and had more thoughts into the design.
Re: Ask HN: I'm starting a new job as a PHP developer tomorrow
#461) if you switching from ruby to php because there is no remote jobs.. well, there are plenty of them
2) you didn't touched php for 8 years, so why go php?
3) they are locked to windows and you can't install linux, well, don't go there
4) you can't even bring hardware! wtf! don't go there x2
Re: Ask HN: I'm starting a new job as a PHP developer tomorrow
#47PHP isn't as bad as it used to be. Yes fundamental operator order is erratic and I'm forever googling basic functions, but the ecosystem has produced some good stuff over the past couple years. Read up on Composer and Packagist. It's basically NPM, Gems, or PyPi for PHP. There are now solid interoperable libraries for most common tasks. - https://getcomposer.org - https://packagist.org Laravel is a great framework, b…
I've been called a few times to troubleshoot slow PHP websites only to discover they were using Symfony and could not sustain 5req/sec on fairly beefy hardware. All kinds of PHP optimizations couldn't make it run much faster (which complicated the infrastructure a lot later on). The last time was 1 year ago so unless something impressive happened since then, I would suggest against it.
Re: Ask HN: I'm starting a new job as a PHP developer tomorrow
#48Earlier quoted context omitted.
I stuck out at my job using Emacs with C# and did just fine. A lot of experienced developers have their favorite dev environment. I've never seen it used against them. I spent my own time, i.e. lunch breaks, adopting the company workflows to my dev environment.
Do you use Resharper at all?
Re: Ask HN: I'm starting a new job as a PHP developer tomorrow
#49>Do you guys think it's acceptable if I use Arch Linux on a VM (VirtualBox) and I fullscreen the VM? Yes. This should work provided you have a system with memory > 8GB, but you might face some issues when using a folder shared from windows. If something involves symlinks, then tread carefully. And file access to a shared folder is pretty slow too. I am not going into how bad of an idea is going back to php since you…
I wouldn't say that php is every bit as bad as it was 8 years ago, its certainly made a lot of progress. There are now namespaces, generators/iterators, closures, traits, interfaces, type hinting, and with composer theres even a dependency manager. The zend engine rework coming later this year in php7 gives really promising performance boosts and some other niceties like ASTs. Granted some (most?) of these modern php…
> Once you're aware of the gotchas (and keep your head stuffed with this useless info the whole time you are working with PHP) its not as bad as everyone makes it out to be..
First, you need to be aware of the gotchas. But this is not possible because,
1. We are still counting (take a look at /r/lolphp).
2. Even experienced (8+ years) php programmers know a very small percentage of the php gotchas. See this http://www.reddit.com/r/PHP/comments/2zhg6z/how_true_is_this.... You can see one commenter. who is an experienced php programmer who was not aware of that at the time. I myself had 8 years of experience when I was bitten by this bug..ahem..feature. So unless you haven't gone through all of /r/lolphp and commited the relavent ones to your memory and check them for every single line of code you write, you are bound to be bitten by one of those.
3. And documentation does not help. Even php core develpers agree that some of the important parts of documentation is incorrect but NO ONE CARES about things like that. Every one is out to implement flashy new stuff that fanboy can brag about. Even the existing documentation is does not go much deep into details. eg this is the php.net page regarding exception handling
http://php.net/manual/en/language.exceptions.php
compare this to Pythons documentation
https://docs.python.org/3/tutorial/errors.html
https://docs.python.org/3/reference/compound_stmts.html#try
If you want to find how a return statement behaves inside of a finally block, the info simple isn't present in the php's documentation. Because "who cares because we copy stuff from java, so we probably does not not what is important to document anyway."..
I mean, it is very subtle and the recent 'facelift' that php received makes it hard to see its truly shitty nature for newcomers. When they look, they see all the shinny new features (often half assed) and think that php is on the same level as Python or whatever....