TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

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

31 pointsby grover_hartmannalmost 10 years ago
I have to admit I haven&#x27;t touched a single line of PHP code in more than 8 years.<p>I&#x27;ve been working with Rails remotely since 2008 (~7 years in total). However, remote work has died out and decreased dramatically.<p>Is there anything you guys could recommend? I haven&#x27;t worked with PHP in years so I&#x27;m worried about my performance with PHP on the new job.<p>I know how to program but I&#x27;m not familiar with PHP anymore, in fact I don&#x27;t recall anything about it.<p>The reason I&#x27;m going back to PHP? Sorry, it&#x27;s not my decision, and there aren&#x27;t many local jobs in my area, so I&#x27;m taking what I can, and that&#x27;s work with PHP at the moment.<p>Hopefully I&#x27;ll find other jobs with saner languages in the future.<p>One other thing I want to mention is that I&#x27;m a Linux person, I can&#x27;t use anything else. However, I&#x27;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).<p>Do you guys think it&#x27;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&#x27;m really used to tiling WM these days, so using Windows would be very painful.<p>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&#x27;t bring my own hardware.<p>I&#x27;ve been using Linux for 15 years and I currently use Arch Linux at home and on my laptop.<p>Suggestions welcome.

33 comments

akg_67almost 10 years ago
Based on your post, my concern is that you will stick out as a &quot;sore thumb&quot; insisting on using Arch Linux in a Windows shop. Basically, you are signaling to your employer and coworkers that you will be difficult to work with.<p>Please spend first 90 days building a good reputation and impression for yourself with your supervisor and coworkers and later use your reputation to drive any changes. By insisting on using Arch Linux, you will be wasting yours and others time in accommodating your preferences in recreating the workflow and tools that everyone else is used too.<p>You should focus on learning the tools and workflow used by your employer. You are no longer a freelancer who can chose their own tools and workflow, you are a cog in a machine now and learn how machine operates.<p>Your first priority should be to learn Windows and Development tools used by your coworkers. Find out what PHP framework and technology stack being used. And learning them is your next priority.
评论 #9677162 未加载
评论 #9677143 未加载
评论 #9679447 未加载
评论 #9680181 未加载
评论 #9677161 未加载
评论 #9678348 未加载
cholmonalmost 10 years ago
Start with <a href="http:&#x2F;&#x2F;www.phptherightway.com&#x2F;" rel="nofollow">http:&#x2F;&#x2F;www.phptherightway.com&#x2F;</a>
评论 #9677190 未加载
评论 #9688180 未加载
joemaller1almost 10 years ago
PHP isn&#x27;t as bad as it used to be. Yes fundamental operator order is erratic and I&#x27;m forever googling basic functions, but the ecosystem has produced some good stuff over the past couple years.<p>Read up on Composer and Packagist. It&#x27;s basically NPM, Gems, or PyPi for PHP. There are now solid interoperable libraries for most common tasks.<p>- <a href="https:&#x2F;&#x2F;getcomposer.org" rel="nofollow">https:&#x2F;&#x2F;getcomposer.org</a><p>- <a href="https:&#x2F;&#x2F;packagist.org" rel="nofollow">https:&#x2F;&#x2F;packagist.org</a><p>Laravel is a great framework, but quite a bit of what&#x27;s out there seems to be built on the Symfony foundation.<p>- <a href="http:&#x2F;&#x2F;laravel.com" rel="nofollow">http:&#x2F;&#x2F;laravel.com</a><p>- <a href="http:&#x2F;&#x2F;symfony.com" rel="nofollow">http:&#x2F;&#x2F;symfony.com</a><p>There are also great coding guidelines and tools that are evolving. The PHP Framework Interoperability Group has produced some solid coding standards and tooling has followed.<p>- <a href="http:&#x2F;&#x2F;www.php-fig.org" rel="nofollow">http:&#x2F;&#x2F;www.php-fig.org</a><p>WordPress...it makes me sad. But it&#x27;s ubiquitous. If you&#x27;re stuck doing WP work, take a look at the Roots project. It&#x27;s a sane, modern approach with good tooling.<p>- <a href="https:&#x2F;&#x2F;roots.io" rel="nofollow">https:&#x2F;&#x2F;roots.io</a>
评论 #9677069 未加载
评论 #9688178 未加载
vhbalmost 10 years ago
I did this mistake once... I&#x27;m also a linux guy, but I was working in a company where everyone was using Os X. I did install an arch on my laptop and used it for almost a year.<p>Now, with the hindsight, it was a big mistake : it did make me loose so much time ! I did had to fix one script out of 2, the build system was not working properly, etc... And linux and Os X are not that different !<p>Don&#x27;t do that... Use the tools that you company gives you, and try to fit in the company. Otherwise, you will be seen as the guy who does not want to do stuff the same way as the others. Even if everything goes well with your coworkers, you will end up waisting time every day.<p>You can install vim on windows (and sublime text does have quite a few almost decent vim plugins). You will miss i3wm a lot, but you don&#x27;t need it to do good work.<p>Learn how to use the most efficiently the tools your company gives you (Windows and PHP). If you want to change something (at least for your first couple of month), try to change something that will make everyone life easier, not more complicated.
评论 #9688184 未加载
bdgalmost 10 years ago
PHP is quite possibly one of <i>the</i> best languages to use for a project these days.<p>The community is massive and full of people who are deeply passionate about best practices. There are more quality frameworks than you can hope to keep up with (if your ranking of quality is the meager toy that rails is, you&#x27;ll be happy here). The frameworks are really good at abstracting away the awful API choices the language makes.<p>That said, if you&#x27;re writing in &quot;PHP&quot; instead of a given set of frameworks... you&#x27;re working at a company that hired someone who wrote a lot of code with no experience of what makes a good system... but you&#x27;ll soon find the JS looks exactly like that too, because that&#x27;s not a PHP problem.<p>For your OS: You can get windows analogues to all those things (in the case of vim, you can also just... use vim on windows). They offered me a mac or a windows machine where I work and I opted for mac because it&#x27;s just BSD4... but like... the WM is a pile, and I wish I was using Windows98 over mac. But none of that has stopped me from making huge contributions to the team.
评论 #9678576 未加载
deftnerdalmost 10 years ago
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.<p><a href="https:&#x2F;&#x2F;laracasts.com&#x2F;series&#x2F;laravel-5-fundamentals" rel="nofollow">https:&#x2F;&#x2F;laracasts.com&#x2F;series&#x2F;laravel-5-fundamentals</a>
joshstrangealmost 10 years ago
Quick rundown (in no particular order):<p>* The language has comes leaps and bounds since you last used it<p>* Install composer and learn how to use it (PHP package manager)<p>* Read up on Laravel, IMHO it&#x27;s the best PHP Framework out there right now. They guy behind it is a genius and has great vision for it.<p>* You&#x27;ll want to use nginx + php5-fpm (No more apache and php_mod)<p>* Check our PHPStorm, if you are going to use an IDE you can&#x27;t bear intelij IMHO and PHPStorm has support for a myriad of things<p>* ORM&#x27;s have greatly improved, even if you aren&#x27;t going to use Laravel read up on it&#x27;s ORM to see what is possible<p>* Much more OO now especially when it comes to interacting with the DB (no more mysql_connect&#x2F;mysql_query nonsense)
评论 #9677059 未加载
评论 #9681312 未加载
kijinalmost 10 years ago
&gt; <i>it&#x27;s not my decision, and there aren&#x27;t many local jobs in my area, so I&#x27;m taking what I can, and that&#x27;s work with PHP at the moment.</i><p>&gt; <i>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&#x27;t bring my own hardware.</i><p>Beggars can&#x27;t be choosers :(<p>Whether your Linux VM setup is acceptable will depend entirely on what the rest of the shop is used to. For example, if they develop on Windows desktops and deploy to Windows servers, you may need to use Windows scripts and test for Windows-specific corner cases, which would be difficult to do on a Linux VM. You may need to adjust all of your tools to use Windows line endings (CRLF). You may find that some of your tools don&#x27;t work correctly on a vboxsf or samba filesystem. Be prepared to make compromises where necessary.<p>On the other hand, if they deploy to Linux servers, your knowledge of Linux and your VM might end up being a valuable asset for the shop.<p>In any case, don&#x27;t say that you &quot;can&#x27;t use anything else&quot;. Of course you can. Learning to use a new OS or editor is not terribly different from learning a new language. If you can learn a new language, you can certainly learn to use Sublime Text or whatever.<p>Unwillingness to try a new tool just because it&#x27;s outside of your comfort zone could reflect poorly on you, no matter how well justified you think your choices are. Your employer has shown flexibility by letting you run a VM. Try to show some flexibility in return.
评论 #9677281 未加载
mmilanoalmost 10 years ago
Sounds like your ability to adapt is extremely low. If you&#x27;re truly stuck and there&#x27;s no other jobs available immediately for you, then this is a great opportunity to work on that problem.<p>Another thing you should consider is to stop apologizing for using PHP. That should only be coming from people with a fair bit of experience with it before they decide to hate it for themselves, and followers who express that opinion because they think it&#x27;s cool.
评论 #9681255 未加载
getsatalmost 10 years ago
&gt;They said I have to use a VM. They also mentioned I can&#x27;t bring my own hardware.<p>&gt;Suggestions welcome.<p>Keep looking for a new job. I guarantee this is the tip of the nightmare iceberg you&#x27;re about to hit.<p>I hope I am wrong, but I&#x27;ve seen this enough times before to know that I&#x27;m probably not.
评论 #9688229 未加载
bkanberalmost 10 years ago
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 &quot;taking what you can&quot; or not a sane language -- you&#x27;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.<p><a href="http:&#x2F;&#x2F;www.phptherightway.com&#x2F;" rel="nofollow">http:&#x2F;&#x2F;www.phptherightway.com&#x2F;</a> is a great resource for most things you&#x27;ll need to know when working with modern PHP. Definitely start here.<p>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&#x27;re structured: Zend, Symfony and Symfony Components, Laravel, Slim, Silex. Study WordPress, the &quot;stereotypically bad&quot; piece of software, for anti-patterns, but there&#x27;s also a lot of good stuff in there and some improvements on the roadmap.<p>Composer is the npm of PHP. Check out packagist (horrible UI though) or browse github&#x27;s PHP repos to find some of PHP&#x27;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&#x27;s a growing ecosystem for these tools now, it&#x27;s getting easier and easier to write quality software in PHP, and it&#x27;s actually a relatively pleasant experience.<p>Plus shipping and managing PHP in production is a breeze -- it&#x27;s the most widely supported web platform, after all. We&#x27;ve got support on great CI systems like circleci and scrutinizer-ci.<p>Anyways, start there and good luck!
blitialmost 10 years ago
Bringing your own hardware is not allowed in the majority of places (not located in SV). Its a security matter. Running a VM is fine. That shows they are flexible. you might run into issues if their whole development environment is built around windows and windows tools. Be open to it.<p>PHP is a language like any other. it has good and bad parts. what might prove useful is to focus on learning the codebase.<p>Good luck!
gargarplexalmost 10 years ago
I am shocked you can&#x27;t get remote work with 7 years exp. Rails.
评论 #9677188 未加载
评论 #9677063 未加载
grover_hartmannalmost 10 years ago
What about the fact that they all are using Windows on the desktop? I&#x27;m a Linux person and I can&#x27;t use anything else. I&#x27;ve been using Linux for 15 years.<p>I asked if they can let me install Linux on the computers, they said I have to use a VM.<p>I&#x27;m fine with a VM but I also need my window manager of choice (i3-wm) and so on.<p>Would it be okay if I install Arch Linux on VirtualBox and I fullscreen the VM? What about performance then?<p>All the other developers are using Windows and putty shells and Sublime Text as their editor.<p>I asked if I could bring my own laptop but they said I can&#x27;t.<p>Suggestions welcome.
评论 #9677144 未加载
评论 #9678363 未加载
评论 #9677108 未加载
fslothalmost 10 years ago
If it&#x27;s a small shop then depending on the atmosphere being the only linux-vm guy might cause undue friction? If you are really talented then sticking out of the crowd with odd stuff might be considered as a positive characteristic but since you are not yet a PHP god I would approach the job from the point of view of learning their tools first - it&#x27;s just me, though so I would not presume to give you any tactical advice.<p>A few things come to mind of Windows if you choose to give it a try. 1. Vim for windows works pretty well 2. It&#x27;s pretty fast to switch to a different application context on windows using win-key. On windows 7 still win + 1-9 switches to the cirresponding application on task bar - and the order of applications can be reordered by dragging a mouse.<p>Windows nowadays is pretty solid tech but it&#x27;s aimed at a general demographic so finding all the power user levers take a while. Of these:<p>-powershell ISE is a really nice command line (well, better than cmd) and it comes out of the box<p>- some people swear by automation through autohotkey scripting<p>- win-r is a fast way to start apps and scripts<p>- hitting win key and typing the name of an application is a fast way to start applucations by just the exe name<p>Good luck on the new job!
RossMalmost 10 years ago
Politically and practically, I&#x27;d suggest you use Windows and their tooling to start with. When you&#x27;re getting started they&#x27;ll likely need to help you get setup and that&#x27;s going to be difficult for them if you&#x27;re using other tools. Later on, you can make more informed decisions about switching tools after getting familiar with their applications.<p>If they run production on Windows as well, there are likely bits of the software that won&#x27;t be cross-platform (file paths, encodings are common ones). We have a mix at our shop (Windows, OSX and Linux) and I think we only get away with it due to everyone knowing what to avoid (through experience). We still step on each other&#x27;s toes occasionally. It wouldn&#x27;t look good if you spent a lot of time at the start fixing things just to get it to work on your platform.<p>I think Sublime has a vim mode (or plugin) that should give you similar keybindings and it has panes a bit like vim.<p>As to getting back to PHP, some good links have already been posted. Get up to date on Composer and PHPUnit, look at whatever framework they&#x27;re using and build some demo apps on it.
tomasienalmost 10 years ago
PHP is totally fine, it gets a bad rep it doesn&#x27;t deserve. It&#x27;s not as elegant as Python or Ruby but it&#x27;s acceptable and it&#x27;ll be more familiar than you think. If you&#x27;re looking for the Railsy-est thing in PHP it&#x27;s Laravel. If you can move them to Laravel (if it would be a good MVC fit) you&#x27;ll be happy you did. Otherwise, don&#x27;t stress about it too much.
评论 #9677283 未加载
twundealmost 10 years ago
I&#x27;m working at a PHP shop that also uses Windows and we&#x27;ve had a python developer with a strong linux background come in and make the same transition.<p>I&#x27;d strongly just using windows for the first month or two. Which would you rather spend time on? PHP (the code you&#x27;re being paid to build&#x2F;support) or getting Arch Linux set up and working seamlessly on your machine. Besides you&#x27;ll probably be running your PHP in a vm anyway. Also I&#x27;d suggest checking out fiddler, which is windows freeware.<p>PHP is a fairly sane language especially if you&#x27;re using something like Laravel which is very similar to Rails. That said be prepared to run into some PHP oddities. One of them is that PHP will die with uncatchable fatal errors if there is a syntax error. PHP -l is a linter that should catch that. Also it&#x27;s worth knowing that PHP is a wrapper over C, and really moved to OO in 5.3 so some build in functions will return an error code or true &#x2F;false instead of throwing an exception
评论 #9681910 未加载
jakejakealmost 10 years ago
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 <a href="http:&#x2F;&#x2F;www.php-fig.org&#x2F;psr&#x2F;" rel="nofollow">http:&#x2F;&#x2F;www.php-fig.org&#x2F;psr&#x2F;</a>
homulillyalmost 10 years ago
PHP and Windows seems like an odd combination to me, but definitely get a feel for how things are run, both in terms of workflow and interpersonal interaction before you start insisting on certain tools&#x2F;environments. I work at a company that&#x27;s a windows shop (it&#x27;s possible to use other operating systems but requires jumping through a bunch of hoops that make it not worth it) but I rolled with it until I got a better feel for things.<p>PHP 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&#x27;re sometimes done in a slightly awkward manner.
gremlinsincalmost 10 years ago
Sounds to me like you&#x27;re too needy and stuck in your ways, no offense.. I love my ubuntu desktop as much as anything, but there are PLENTY of ways to make windows into winux. gitbash for one, you can install vim, nano, and pretty much all the linux command-line tools onto windows. It&#x27;s not perfect, but doable...personally I don&#x27;t like the performance of VM&#x27;s, they&#x27;re slow and buggy from time to time. As for php, it&#x27;s not so bad, especially if you use Laravel as I found moving back and forth from rails to laravel and vice versa they&#x27;re very comparable frameworks, Laravel mirrors rails in lots of ways better than most php frameworks, if you&#x27;re doing wordpress God save you. lol
CamTinalmost 10 years ago
Don&#x27;t worry. PHP itself shouldn&#x27;t be an issue. It&#x27;s bog standard ALGOL-y syntax with some weird corner cases that aren&#x27;t that hard to avoid.<p>The bigger gotcha will be getting used to the execution model, if it&#x27;s standard LAMP-y type application hacking. Remember that, in this style of app, all of your state has to be either explicitly stored in a backend or in the browser cookies. The script begins not knowing anything, lives briefly, excreting HTML or JSON, and then dies, leaving behind only what it&#x27;s explicitly saved. In some ways it&#x27;s more complex than a Rails-type model, and in others it&#x27;s simpler.<p>In any case, you should be up to speed in a week or two of hacking at it full time.
评论 #9677098 未加载
syntropyalmost 10 years ago
If you want to run Windows 7 in a VM using a Linux box, I would recommend using KVM (<a href="http:&#x2F;&#x2F;www.linux-kvm.org&#x2F;page&#x2F;Main_Page" rel="nofollow">http:&#x2F;&#x2F;www.linux-kvm.org&#x2F;page&#x2F;Main_Page</a>) instead of using VirtualBox. I initially tried using Virtualbox to run Windows on Linux... but it had a hard time running multiple applications (multiple Visual Studio&#x27;s, etc...). When I switched to using KVM, it was light years faster. All performance&#x2F;reliability issues disappeared instantly. Never going back. So I now have all the goodness of Linux with an almost bare metal Windows VM.
评论 #9688200 未加载
imakesnowflakesalmost 10 years ago
&gt;Do you guys think it&#x27;s acceptable if I use Arch Linux on a VM (VirtualBox) and I fullscreen the VM?<p>Yes. This should work provided you have a system with memory &gt; 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.<p>I am not going into how bad of an idea is going back to php since you have already considered it. But I will just say that php is every bit as bad as it was. I recommend &#x2F;r&#x2F;lolphp for an updated list of php gotchas...
评论 #9677260 未加载
grover_hartmannalmost 10 years ago
I&#x27;ve just noticed the Windows machine I&#x27;m supposed to be using to write code doesn&#x27;t even have admin access.<p>So I&#x27;m limited to what is installed, I can&#x27;t even install anything on this machine.<p>This is bullshit.
crispy770almost 10 years ago
I work at a Windows shop and have a few coworkers who prefer linux. I run Debian at home and occassionally need to help the non windows guys with windows specific issues. What&#x27;s important is that you are able to produce as much on a non windows environment as a windows environment, and that you don&#x27;t have to tap resources in order to do so.<p>Whether you run in a vm, whether it&#x27;s windows, osx, arch-linux, gnome, mint, etc is really just semantic.
chrismcbalmost 10 years ago
Use the tools they provide you. It will be easier, otherwise you will be constantly fighting differences between your version and everyone else. As a professional using a different os shouldn&#x27;t be that big of a deal. There is a bit of a learning curve, but there always is when you join a new company. What editor do you use? You can probably find something similar on windows. Pretty much every other tool you need the company will provide
sparrishalmost 10 years ago
Your dev environment should ALWAYS run the exact same versions of the stack as production. With PHP, there are too many little gotchas between even minor versions.
评论 #9678380 未加载
tdy721almost 10 years ago
I would suggest you get a PHP server going right away. Install WordPress or another PHP framework. Make the server do something useful. Use PHP to receive POSTed CURL messages.<p>Use PHP... and you will become familiar with PHP.
grover_hartmannalmost 10 years ago
I&#x27;ve already got Arch Linux working on a VM and I have it on full screen now, I can&#x27;t notice the difference.<p>It took me 10 minutes to set up Arch this way. And this was on my first day at this job.<p>Why should I go back to Windows?
grover_hartmannalmost 10 years ago
I&#x27;ve just asked if they use Laravel here or another framework and they mentioned they don&#x27;t use any frameworks at all.<p>Other than AngularJS, they stick to plain PHP.
umrenalmost 10 years ago
are you trolling?<p>1) if you switching from ruby to php because there is no remote jobs.. well, there are plenty of them<p>2) you didn&#x27;t touched php for 8 years, so why go php?<p>3) they are locked to windows and you can&#x27;t install linux, well, don&#x27;t go there<p>4) you can&#x27;t even bring hardware! wtf! don&#x27;t go there x2
评论 #9688098 未加载
stephenralmost 10 years ago
This is why we can&#x27;t have nice things.