Basic interview questions for junior webdev / dev
September 2nd 2015 (8 years ago)
Since i was kind of ‘transferring’ to additional company (as a consultant) there was a need to find an additional personal for one of my most trusted client, to help him with smaller problems/modifications of the code.
Basically, a guy who "can do a lot in all tech’s!"… Which means for me, a guy with some Javascript/php/mysql and OOP knowledge.
As it was first time for me to be on the other side of the table – as i were “the guy with strange questions”, I come up with some questions, that are realtively simple, but hard enough to know, who actually have any kind of knowledge in the field I needed. So I came up:
1. Giving a piece of paper to a developer and telling him to “write the code” – this is stupid, i understand to tell someone to write the “pseudocode”, jsut to see how he/she is thinking, but actually checking on a PIECE OF PAPER if the someone misses “;” or any other small mistake?
We have powerful IDE’s,logs and even compiling errors just for that.
2. Being the “guru” type – In development, there are many (and i really mean many) ways to solve some common problems, some are better than the others, BUT, very rarely there is only one solution to a problem. I’ve met a lot of developers who actually thinks, that “this way is the one! The only one to do that!”, i’ve you’re reveiwing someone – please don’t do that, it’s kinda unprofessional in my opinion.
Basically, a guy who "can do a lot in all tech’s!"… Which means for me, a guy with some Javascript/php/mysql and OOP knowledge.
As it was first time for me to be on the other side of the table – as i were “the guy with strange questions”, I come up with some questions, that are realtively simple, but hard enough to know, who actually have any kind of knowledge in the field I needed. So I came up:
List of questions worth asking on interview for junior webdev. / dev.
But first, there are two things i really didnt like, when I was going to interviews:1. Giving a piece of paper to a developer and telling him to “write the code” – this is stupid, i understand to tell someone to write the “pseudocode”, jsut to see how he/she is thinking, but actually checking on a PIECE OF PAPER if the someone misses “;” or any other small mistake?
We have powerful IDE’s,logs and even compiling errors just for that.
2. Being the “guru” type – In development, there are many (and i really mean many) ways to solve some common problems, some are better than the others, BUT, very rarely there is only one solution to a problem. I’ve met a lot of developers who actually thinks, that “this way is the one! The only one to do that!”, i’ve you’re reveiwing someone – please don’t do that, it’s kinda unprofessional in my opinion.
- [COMMON] Describe MVC model
- [COMMON]What Is Obfuscation and why we’re using it?
- [WEB] What are sprites and and what is the alternative to sprites? (to support more mobile devices)
- [JAVASCRIPT] What Is hoisting?
- [JAVASCRIPT] What is bubbling
- [JAVASCRIPT] What is “Strict Mode” and why do we use it?
- [JAVASCRIPT] Let’s say you have two scopes (A – higher Scope, B- Lower Scope), How can you get the data/values from higher scope to lower scope?
- What is Closure?
- There is a simple index.html file given:
I agree the Terms: <input type="checkbox" id="acceptCheckbox" value="Accept agreements"> <p id="accepted" style="display:none"> This text should show after clicking the Agreement Acceptance </p>
Show two solutions of making the #accepted showing after the checkbox is selected (one in Javacript, second one with using Jquery). - [PHP] You have a class:
class MyClass { public $prop1 = "this is prop1"; protected $prop2 = "this is prop2"; private $prop3 = "this is prop3"; } class MyClass2 extends MyClass { protected $prop2 = 'this is changed prop2'; } $obj = new MyClass; $obj2 = new MyClass2;
A) What needs to be done to have read and modify to all 3 values (the most common way)?
B) what is the value in w $obj2 -> $prop2 ?
C) What’s the differrence between private and protected type?
Answers
- Some info about MCV Model
- Obfuscation on Wiki
- Yup, Sprites explained. Also, good alternative to Sprites it to use… fonts – you can create a font with any symbols you need, in modern design tehre is a lot of icons/symbols, which makes it more scalable, faster to load and easier to manage the quality on differrent devices
- W3C Rules!
- W3C Rules!
- W3C Rules!
- MDN Also Rules! (checkout both this.apply and this.call, and see the differrence)
- W3C Rules!
-
Javascript:
I agree the Terms: <input type="checkbox" id="acceptCheckbox" value="Accept agreements" onclick="javascript:Checker()"> <p id="accepted" style="display:none"> This text should show after clicking the Agreement Acceptance </p> <script type="text/javascript"> function Checker() { var checkbox = document.getElementById("acceptCheckbox").checked; if (checkbox) { document.getElementById("accepted").style.display="block"; } else { document.getElementById("accepted").style.display="none"; } } </script>
Jquery Solution:I agree the Terms: <input type="checkbox" id="acceptCheckbox" value="Accept agreements"> <p id="accepted" style="display:none"> This text should show after clicking the Agreement Acceptance </p> <script type="text/javascript"> jQuery(document).ready(function($) { $("#acceptCheckbox").on("change", function() { if($("#acceptCheckbox").is(":checked")) { $("#accepted").show(); } else { $("#accepted").hide(); } }) }); </script>
-
A) set up getters and setters, why to us it you ask? Read this(no matter which language you write in)
B) the value is “this is changed prop2” and it was overwritten from “this is prop2” C) PHP.NET is your friend