r/PHPhelp • u/AneurysmInstigator • Dec 10 '18
[Advice, no code]OOP PHP job interview
Hey, i hope this is the right subreddit to post my question.
So tomorrow i've got a second meeting with the owner of a small company (3 employees + boss) that makes modules for online stores using Magento.
The first interview went smooth they asked me basic questions to see if i actually was a programmer such as "Can you tell us the difference between a foreach and a for loop?" and "what is the difference between public, private and protected classes?".
Since i'm not doing any "fake it 'till you make it" applying to this job, these were obviously easy questions and i got planned in for a second meeting.
He told me i would speak to their best programmer who would ask me more in depth questions to see if i was up for the task or not.
Even though i'm confident in my PHP, MySQL and JSON/ XML skills, this is really getting me more worried than it should, as such i was wondering if any of you guys who are employed in the field know what kind of questions i should expect?
TL;DR
If you were going to hire a "Junior PHP developer", what type of questions would you ask them to test their knowledge?
2
u/blankman0230 Dec 10 '18
Not much tbho. Basics like design patterns and general best practices. Maybe brush up on some security tips too, since that's something I think, backend devs should definitely be aware of. Otherwise. Take a good night's sleep. You should be looking forward to the interview. Maybe their "Rockstar" can teach you something even before your first day. And if it doesn't work out. Don't take it personally. Sometimes, especially very small groups tend to have rather unrealistic expectations :) I hope yours don't and you'll find a good place to learn and improve on your craft.
1
u/AneurysmInstigator Dec 10 '18
Security is probably something i should look into as i haven't given that aspect much thought.
I appreciate the tips!
And thanks for the kind words.
3
u/evilmaus Dec 10 '18
Security is the kind of thing that's full of tripping hazards. It just takes a while to become aware of all of the potential issues and how they're mitigated. Definitely learn what you can now, but be aware that you'll be repeatedly bumping into it over the years.
2
Dec 10 '18
Whenever I've hired junior developers, I haven't really cared if they know anything or not. I'll expect the basics of programming and web knowledge. Anything else is a bonus.
What I do look for in them is:
Are they someone I actually want to work with? Can you hold a conversation with them? Did they turn up to the interview on time? Just basic stuff like that.
Are they able to learn? Can they demonstrate that they've learnt things for themselves? When they run into something they don't know, do they react well? IE do they try to figure out the problem without giving up or asking for the answer straight away? Can they break down a big problem into smaller ones to make it possible to solve? Will they admit they don't know things, or pretend they do?
Can they communicate well? I usually ask candidates to do a real-world programming exercise during the interview. I'll leave them alone for a bit with a problem and see what they've done after half an hour or so. It's usually a pretty open-ended problem like implementing a feature on a site, and I don't expect them to finish it. Once the time's up, I'll ask them to show me what they did. Usually how they talk about what they did, and the aspects of it that they chose to work on are more interesting than the code they wrote.
For mid level roles, I'd expect a candidate to know things, and I'd question them accordingly, but for me, junior level interviews are pretty much all about assessing someone's attitude and gauging their potential.
1
2
u/innerspirit Dec 10 '18
I haven't used Magento but it looks like an over-engineered OOP CMS, so I would venture a guess that they will ask questions about design patterns such as MVC or Observer. Maybe brush up on those a bit before the interview, but I don't think this is junior level stuff anyway.
1
3
u/cyrusol Dec 10 '18 edited Dec 10 '18
Magento is not over-engineered, it has the right amount of engineering for an ecommerce platform. It's an absolutely fucking complicated task to honor all the differences between the various product types different people want to sell (hence EAV), or the currencies, taxes, shipping costs, units and other i18n factors of different languages, or the complete separation of models and their representation (templates/views) for maintainability, or the feature to easily integrate existing payment service providers or other typically useful features like different caching backends, geocoding, tracking etc. There is also the separation of core, community and local code so that everything can be kept up to date with basically
composer update(or modman in the old days). It all makes sense, even though it's just much that went into the system.1
u/disembarkedone Dec 10 '18
I also think people make the mistake of working with magento2 on Windows. I know I did for a while..
1
u/cyrusol Dec 10 '18
I think if you consider Magento for a real project you should already have the infrastructure running (or the time and funds to realize it) to have streamlined dev environments through some combination of Vagrant, Puppet and Docker, or at least start with puphpet or something like this. It's simply more effort to get such a project up and running than installing Wordpress. Especially considering all the different DBMS, LRU caches, search engines, MTUs etc. Magento can work with.
0
u/innerspirit Dec 10 '18
I did not mean to offend the pride of Magento developers, sorry about that, I did mention I've never used it. From a quick look it seemed excessively OOP with some interfaces named after design patterns themselves but I am probably wrong.
3
u/disembarkedone Dec 10 '18
Dependency injection
Observers
I think if you can explain those well then magneto2 will be much easier for you to understand
Edit: also mention the PHP cli You'll be working alot with the Magento CLI so throw that in somewhere
And read up on Magento 2 migrations :)
3
u/zorndyuke Dec 11 '18
Junior PHP developer
Don't worry my friend. I got asked Senior questions containing in-depth MySQL knowledge, things that I never heard of and I at this point of my life I thought that I probally know the most things.
They already expecting that a Junior won't know everything. The best you can do is to read, learn and git gut as best you can. Try to really "understand" PHP best practices, basic knowledge, common pitfalls, maybe some design patterns (it's ok if you don't know any, just know they exists and maybe you try to learn 1-2 and can remember what problem they exactly try to solve).
fake it 'till you make it
This is development and not manipulating your self esteem ;D You may manipulate your self and one day become what you "fake", but in the developer world you either know or don't know how to code probally. It's simply boolean true or false.
I code for over 15+ years and I am still far away from knowing everything. Even I do stupid mistakes, don't know every single theoretical names/wordings, all design patterns, all best practices..
The amount of things I learned just this year is like a crazy amount!
The internet won't get smaller. It's like the universe.. it will become bigger and bigger and is already limitless! Your task is to soak as much experience as possible each day.. best case would be if it makes fun for you and it really interests you, so you can keep stay on the way ;)
In the end you will be nervous no matter what you do. Even a Senior who is in a Junior interview gets nervous. The moment there is something to lose, you will automatically feel nervous.
The trick is to think positive and BREATHING! One of the most valueable skills I learned from martial arts is simply breathing instead of holding your breathe in!
If you ever get nervous, first make sure that you probally breathe. Breath slowly deep in and then slowly out. Take your time, try relaxing even if it's hard. Take a few breaths and then think and then continue what you wanted to do.
2
Dec 10 '18
testing (unit, integration), OOP (interfaces, abstract classes), design patterns (builder, singleton, etc), php app structure and frameworks (MVC, ORMs), source control (git, pull requests, code reviews). if you brush up on those things i think that covers a lot of bases
also, unfortunately, it'll be good to know your sorting algorithms. unfortunately that's kind of a meme interview question that you should know just in case
2
Dec 10 '18
Yes, drop security into the conversation whenever you can. Eg, if you're asked how to store stuff in a database, mention that you'd also stop to consider what sort of data it was, and whether it would be sensible to hash or encrypt it before storing it. And to check the ACL before subsequently displaying it.
5
u/RandyHoward Dec 10 '18
Can't really tell you what to expect, I've had interviews that were very extensive in testing your knowledge, and I've had interviews that asked the most basic questions ever. I'm actually starting a new job today as a senior level programmer - want to know what my interview tasks were to prove my knowledge to the employer? First one was simply taking an array of prices, adding them all up, and returning the sum. Second one was loop through an array of data and output a readable table. They told me I beat out 400 candidates for this position, and those are the most basic kind of questions they could have possibly asked. Another job I interviewed for during this process sent me through a rigorous third-party test, which I scored about 60% on and never heard from again. So yeah, can't really tell you what to expect. Just be confident in yourself, and if you don't know the answer to something then state as much - confidence in the fact that you don't know things is as important as being confident in the things you do know. If you don't know something, be clear on what your process might be to figure it out. Otherwise just have confidence and be yourself and you'll do fine.