Basic interview questions for junior webdev / dev
code, webdev, interview
September 2nd 2015 (3 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:

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.
  1. [COMMON] Describe MVC model
  2. [COMMON]What Is Obfuscation and why we’re using it?
  3. [WEB] What are sprites and and what is the alternative to sprites? (to support more mobile devices)
  4. [JAVASCRIPT] What Is hoisting?
  5. [JAVASCRIPT] What is bubbling
  6. [JAVASCRIPT] What is “Strict Mode” and why do we use it?
  7. [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?
  8. What is Closure?
  9. 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).
  10. [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

  1. Some info about MCV Model
  2. Obfuscation on Wiki
  3. 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
  4. W3C Rules!
  5. W3C Rules!
  6. W3C Rules!
  7. MDN Also Rules! (checkout both this.apply and this.call, and see the differrence)
  8. W3C Rules!
  9. 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>
    
    
  10. 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

Conclusion