Internet Explorer 11 (IE11) :

Internet Explorer 11 is a version of Internet Explorer, a web browser, by Microsoft. It was officially released on 17 October 2013 for Windows 8.1 and on 7 November 2013 for Windows 7. I am going to explain two issues usually face developers.

The First issue is about Internet Explorer updated version 11.0.9600.16476, and the second problem is faced on all versions of IE11.

First issue on Internet Explorer 11.0.9600.16476:

First download and setup Internet Explorer 11 for windows 7. After setup, you will find that IE is of the following version 11.0.9600.16428. This is the original release of IE; however, if you do any machine updates or your automatic updater is on, your browser will be updated to 11.0.9600.16476.

This version of internet explorer has very big problem with JQuery ajax request; it sends the request without parameters. This might cause serious problems like null pointer exception or error 500 Internal server error due to null parameters.

Note: this issue happened with $.ajax or $.post and this is experimented on Facebook "see more" and messages and w3schools :http://www.w3schools.com/jquery/tryit.asp?filename=tryjquery_ajax_ajax_async 

Solution: you have two solution and I recommend the second one:

  1.  Pass parameters in URL like : /index.html?id=5&name=Bob instead of sent it in json data:{id:5,name:’Bob’}. But this solution is not effective because if you make post request you don’t need to send parameters in URL, also imagine you work on a website that work 100 ajax post you will find yourself in great need to change your post URL like: /index.html?id=5&name=Bob
  2. Update your machine so that your IE version will become 11.0.9600.16476IS. This version works properly without problems.

Second issue on Internet Explorer 11.0:

Starting with IE11, the navigator object supports plugins and mimeTypesproperties. In addition, the window.ActiveXObject property is hidden from the DOM (This means you can no longer use the property to detect IE11.) http://msdn.microsoft.com/en-us/library/ie/dn423948%28v=vs.85%29.aspx .

As we know in old versions of IE we use something like this to detect if browser is IE

if (window.ActiveXObject){

this.isIEBrowser = true;

}

This statement will return undefined due to window.ActiveXObject property being hidden from the DOM .

Solution:

To detect Internet Explorer, condition must be changed to

if (window.ActiveXObject !== undefined){

this.isIEBrowser = true;

}

Msamir

Delegation is the partnership of authority and not responsibility to another person to carry out specific activities. (Definition by Wikipedia)

Delegation is a very important skill. All team members, from managers to executives need to know what delegation means and how they can delegate task effectively. It is not about passing tasks, it’s how to give responsibilities to others and monitor them at the same time to save money, time, build people and team skills and motivates people.

Some people fear delegation simply because they don’t trust their team members. But I want to tell you that if you don’t trust them because they need more experience, you have to work on them to improve their skills instead of doing all things by yourself.

But if your fears of delegation is because you want to control everything in your hand, I want to tell you don’t blame anyone else than yourself as “You will be stuck on details forever”

There is a golden rule for delegation, which guarantee you delegate effectively: To enable someone else to do the job for you, you must ensure that:

  • they know what you want: to delegate a task to someone, it requires clear communication on what is the task in details, and what is the expected output from this task.
  • they have the authority to achieve it: delegating a task implies delegating authority; if you just delegated a task to others without authority, you are just bothering yourself and the other person more and more, as they will refer back to you in each details which means poor delegation!
  • they know how to do it: one of most important benefits of delegation is building people capacity, so the person who will handle the task should be able to do it or at least know how to start in it and what is requested exactly.

When you first start to delegate to someone, you may notice that he or she takes longer than you do to complete tasks. This is because you are an expert in the field and the person you have delegated to is still learning. Be patient: if you have chosen the right person to delegate to, and you are delegating correctly, you will find that he or she quickly becomes competent and reliable.

Remember: True leaders are so curious of building other layers of leaders by delegation and mentoring, but fake leaders only care about controlling everything themselves, not caring about their teams or companies.

Marco

Liskov Substitution Principle (LSP) states that every super type T can be replaced with one of its sub-types S without affecting the correctness of the program. In other words, sub-types of a super type should not alter the super type default behavior.

To explain this more; let’s have a look at the following code that violates LSP:

public class Rectangle {

    protected int width;

    protected int height;

    public int getWidth() {

        return width;

    }

    public void setWidth(int width) {

        this.width = width;

    }

    public int getHeight() {

        return height;

    }

    public void setHeight(int height) {

        this.height = height;

    }

    public int calculateArea() {

        return width * height;

    }

}

public class Square extends Rectangle {

    public void setHeight(int height) {

        this.height = height;

        this.width = height;

    }

    public void setWidth(int width) {

        this.height = width;

        this.width = width;

    }

}

Note: The Square class is altering its parent class default behavior by overriding both of its setWidth and setHeight methods; and that’s to always make sure that both of the Square width and height are equal!

Now, we can create a new Rectangle object and set its width and height, then calculate its area, and we can do the same with the Square.

 

From the first sight, everything looks ok; but actually it is not! Let’s see the following code:

// Test 1

Rectangle r1 = new Rectangle();

r1.setHeight(2);

r1.setWidth(3);

System.out.println("R1 area is: " + r1.calculateArea()); // R1 area is: 6

// Test 2

Rectangle r2 = new Square();

r2.setHeight(2);

r2.setWidth(3);

System.out.println("R2 area is: " + r2.calculateArea()); // R2 area is: 9

The second test shows that the above code violates Liskov Substitution Principle, because when we tried to substitute the Rectangle object r2 with a Square sub-type, it produced undesired area output of 9.

Ok then, knowing that the Square is an equal sided Rectangle, what we’re going to do to model this correctly without violating LSP!

The key here is to modify the super type (base class) a little bit, by removing both of the width and height setter methods, and provide both of their values when instantiating (constructing) a new Rectangle object. See the following code:

public class Rectangle {

    private int width;

    private int height;

    public Rectangle(int width, int height)

    {

        this.width = width;

        this.height = height;

    }

    public int getWidth() {

        return width;

    }

    public int getHeight() {

        return height;

    }

    public int calculateArea() {

        return width * height;

    }

}

public class Square extends Rectangle {

    public Square(int width)

    {

        super(width,width);

    }   

}

 

// Test 1

Rectangle r1 = new Rectangle(2,3);

System.out.println("R1 area is: " + r1.calculateArea()); // R1 area is: 6

// Test 2

Rectangle r2 = new Square(2);

System.out.println("R2 area is: " + r2.calculateArea()); // R2 area is: 4

Now, with this simple modification, the area of the Rectangle in both tests is calculated correctly, whether the actual object was a Rectangle or a Square, and without violating Liskov Substitution Principle.