Era of Modern Marketing

By- Umer Khalid

Internet has changed the way people work, shop, research & interact. Most Companies these days wish to have their own websites & social media pages to reach maximum potential customers. A business card doesn’t considered presentable if you don’t have an email ID and website URL on it. To satisfy the reason to be on search engines is quite obvious as there are millions of websites out there showcasing their products/services and focusing to reach more and more users applying different queries. This is how the idea of creating “Google – one of the most commonly used search engine with market share over 60%” came into the mind of its creators Sergey Brin & Larry Page when they had to search from huge data for a project during their PHD program. With major share among the most renowned search engines like Google, Yahoo & MSN, there are more than 400 million searches are being done daily on world wide web. Keeping that huge figure in mind almost every other company tries to come up in search engine rankings for all the relevant queries related to their business. The more they show up in search results, the maximum are the chances that people will click on their listings and will eventually perform the desired action they want from them i.e. buying a product or fill their form to contact them back.
Search engines are supposed to be the entry point for most of the online businesses exist in today’s world. Statistics show that people from all walks of life use search engines quite frequently to find whatever they want which eventually enables all online businesses to compete for those “search queries” in order to reach those people. By building a strong existence on search engines, any web business can live the dream of “earn while you sleep” very effectively. Your website is up and running where people can come and browse 24/7.
Once the online companies realize the importance of search rankings and the amount of huge business they can get through search engines, they then try to have professional internet marketers work with them. Those people understand & analyze the business first and then create an appropriate plan to target the business on search engines in order to get best possible exposure for the website. On many occasions, companies target both natural search listings as well as paid marketing (PPC) especially on Google.

Software Engineer Interview Questions

Q.  What is an Interface? How does it differ from a Class?
A. An interface is a contract only. It only contains method description, no concrete method. It can’t be instantiated.

Q. Explain the basic functionality of garbage collector.
A. It manages the allocation and release of memory. It automatically releases the orphan objects from memory. It can’t be controlled. Sometime it can be executed by force.

Q. When re-throwing exceptions should you use throw ex; or throw;?
A. The good technique is to use throw ; to keep the stack trace intact.

Q. If a method is marked as protected internal who can access it?
A. This method can be accessed in derived classes and in the same assembly.

Q. What is a delegate?
A. The delegate is the pointer to function and is often used for callback events.

Q. What is the difference between a process and a thread?
A. A process is the program unit and there can be more than one processes in an application. The process in turn can have multiple threads which are allocated a processing time.

Q. What is Encapsulation?
A. Encapsulation is the term of OOP which has the same purpose as the literal meanings. Using encapsulation means keeping the object and its properties and behavior in single boundary.

Q. Describe a strategy for designing and building components that minimizes recompiling of client applications when the component is updated.
A. It can be handled by using distributed mechanism. In past it was done using DCOM and COM+ and recently it is achieved by WCF services.

Q. What are javascript events? What are they used for?
A. Javascripts events are triggers which are invoked by the user action in browser. They are used to facilitate the user by formulating the immediate response without consulting the server.

Q. What is a postback?
A. Postback is an event of sending a pre-loaded page back to server. Like writing the URL on browser loads the page for the first time and when user clicks to some button or do some operation and submits the form back to server, it is called postback.

Q. What is a cookie?
A. A cookie is client side mechanism to store state. The data is stored on client machine.

Q. If you had the opportunity to change your current software development processes what would you change and why?
A. It all depends on the circumstances. First of the all I would be looking into the problem areas (if there is any) and solve them first according to requirement.
If I would need to change the architecture, I would be moving towards scalable, reusable, optimized, maintainable type of approach.

Q. What do you find most frustrating about software development?
A. Talking about my previous experience, I feel frustrated when the things are done in chaotic manner like no process, no rule, not enough time as these all contribute to the poor quality product.

Q. What are the important items that should be defined in a Functional Design Specification (document to capture high level design to be signed off with a client)?
A. The functional design specification contains all the functional requirements of the system, so it should be focused on What approach rather than How. The requirement should be clear and precise. If required (according to the User), it should include Use Case diagrams and some cases the GUIs to clearly portray the requirement and get them vet.

Q. I want to store my compact disk collection in a database and I want to store the following information for each compact disk:-

  • Artist’s name
  • Album title
  • Date acquired
  • Genre or type of music
  • The name of each track
  • The duration of each track
  • If it is a single or a double CD
  • If I own the CD or I’ve “borrowed” it from a friend

Could you please create a normalised database design that will enable me to store this information? Please limit your answer to the tables and columns required including the data type of each column and if it is a primary or foreign key.

CaptureQ. Assuming the database has been created and the data has been populated. Write an SQL statement to find all the “Pink Floyd” albums I own.
A. Select Album.* from Album inner join Artist
On Album.ArtistID = Artist.ID
         Where ArtistName = ‘Pick Floyd’

Q. Write an SQL statement to count how many albums of each genre I have in my collection
A. Select Count(AlbumID) From Album Group by Genre

OOP Interview Questions

What is Encapsulation in OOPS?

  • Encapsulation is one of the fundamental principles of object-oriented programming.
  • Encapsulation is a process of hiding all the internal details of an object from the outside world
  • Encapsulation is the ability to hide its data and methods from outside the world and only expose data and methods that are required
  • Encapsulation is a protective barrier that prevents the code and data being randomly accessed by other code or by outside the class
  • Encapsulation gives us maintainability, flexibility and extensibility to our code.
  • Encapsulation makes implementation inaccessible to other parts of the program and protect from whatever actions might be taken outside the function or class.
  • Encapsulation provides a way to protect data from accidental corruption
  • Encapsulation hides information within an object
  • Encapsulation is the technique or process of making the fields in a class private and providing access to the fields using public methods
  • Encapsulation gives you the ability to validate the values before the object user change or obtain the value
  • Encapsulation allows us to create a “black box” and protects an objects internal state from corruption by its clients

What is Inheritance in OOPS?

  • Inheritance, together with encapsulation and polymorphism, is one of the three primary characteristics (concept) of object-oriented programming
  • Inheritance enables you to create new classes that reuse, extend, and modify the behavior that is defined in other classes
  • The Class whose methods and variables are defined is called super class or base class
  • The Class that inherits methods and variables are defined is called sub class or derived class
  • Sometimes base class known as generalized class and derived class known as specialized class
  • Keyword to declare inheritance is “:” (colon) in visual c#

Benefits of using Inheritance

  • Once a behavior (method) or property is defined in a super class(base class),that behavior or property is automatically inherited by all subclasses (derived class).
  • Code reusability increased through inheritance
  • Inheritance provide a clear model structure which is easy to understand without much complexity
  • Using inheritance, classes become grouped together in a hierarchical tree structure
  • Code are easy to manage and divided into parent and child classes

What is Polymorphism in OOPS?

  • Polymorphism is one of the primary characteristics (concept) of object-oriented programming
  • Poly means many and morph means form. Thus, polymorphism refers to being able to use many forms of a type without regard to the details
  • Polymorphism is the characteristic of being able to assign a different meaning specifically, to allow an entity such as a variable, a function, or an object to have more than one form
  • Polymorphism is the ability to process objects differently depending on their data types
  • Polymorphism is the ability to redefine methods for derived classes.

Types of Polymorphism

  • Compile time Polymorphism
    •  Compile time Polymorphism also known as method overloading
  • Run time Polymorphism
    • Run time Polymorphism also known as method overriding

What is Access Modifier in OOPS?

Access modifiers determine the extent to which a variable or method can be accessed from another class or object

The following five accessibility levels can be specified using the access modifiers
• Private
• Protected
• Internal
• Protected internal
• Public

What is Abstract Class?

An abstract class is a class that cannot be instantiated and is always used as a base class.

The following are the characteristics of an abstract class:

  • You cannot instantiate an abstract class directly. This implies that you cannot create an object of the abstract class; it must be inherited.
  • You can have abstract as well as non-abstract members in an abstract class.
  • You must declare at least one abstract method in the abstract class.
  • An abstract class is always public.
  • An abstract class is declared using the abstract keyword.

The basic purpose of an abstract class is to provide a common definition of the base class that multiple derived classes can share. Static, Value Types & interface doesn’t support abstract modifiers. Static members cannot be abstract. Classes with abstract member must also be abstract.

 

What is Instantiation?

When you make a new instance the process is called instantiation and is typically done using the new keyword. A pure virtual function or pure virtual method is a virtual function that is required to be implemented by a derived class, if that class is not abstract By default, C++ matches a function call with the correct function definition at compile time. This is called static binding. You can specify that the compiler match a function call with the correct function definition at run time; this is called dynamic binding. You declare a function with the keyword virtual if you want the compiler to use dynamic binding for that specific function.

Static classes and class members are used to create data and functions that can be accessed without creating an instance of the class. Static class members can be used to separate data and behavior that is independent of any object identity: the data and functions do not change regardless of what happens to the object. Static classes can be used when there is no data or behavior in the class that depends on object identity. When applied to a class, the sealed modifier prevents other classes from inheriting from it. In the following example, class B inherits from class A, but no class can inherit from class B.

class A {}
sealed class B : A {}

You can also use the sealed modifier on a method or property that overrides a virtual method or property in a base class. This enables you to allow classes to derive from your class and prevent them from overriding specific virtual methods or properties.

Delegate:Any method that matches the delegate’s signature, which consists of the return type and parameters, can be assigned to the delegate. This makes is possible to programmatically change method calls, and also plug new code into existing classes. As long as you know the delegate’s signature, you can assign your own delegated method.
Composition is “Has a” relation (objects contained in it destroys when the main object is destroyed)
Aggregation is also “Has a” relation but objects contained is it .. has their own identity

Usually, when using composition, the object instantiates the objects it has. Look at the Chair class above. You can see that Back , Seat , and Leg are instantiated in the Chair class. When using aggregation, the object does not instantiate the objects it has. Look at the code below. The DinnerChair class has a Person , but it does not instantiate Person .

Overriding is in Inheritance while Overloading is same function name with different signature (in the same scope or in derived class).
The signature of a method is the combination of the method’s name along with the number and types of the parameters (and their order).

Is-a relationship is called inheritance i.e. Pepperoni is a pizza
Has-a relationship defined already where One objects contains other objects.

This is object-oriented programming and UML terminology, not Java-specific. There are actually three cases you should be aware of:
1. A House is a Building (inheritance);
2. A House has a Room (composition);
3. A House has an occupant (aggregation).

The difference between (2) and (3) is subtle yet important to differentiate. Together they are forms of association. What’s the difference? Composition implies the child object cannot live out of the context of the parent (destroy the house and rooms disappear) whereas aggregation implies the child can exist on its own (destroy the house and the occupant goes elsewhere).

Can you specify the accessibility modifier for methods inside the interface?
All the methods inside an interface are always public, by default. You cannot specify any other access modifier for them.

Is it possible for a class to inherit the constructor of its base class?
No, a class cannot inherit the constructor of its base class.

An element with id ‘form1’ could not be found. Script error on page load

When you use Jquery and AJAX on the same form and you included the jQuery file with the <script /> this error will be thrown by VS (specially VS 2010).  To solve this issue just replace the <script /> with <script><script/> tag and it will solve your problem.

Note: This error will only come when you use IE, with every other browser this error will not come, but the thing common on all browsers is that design view is corrupted and the events will not fire as expected or not fire at all

The project type is not supported by this installation?

If you develop a website on one machine using Visual Studio and on other machine it gives an error something like the following.

 

The project file ‘E:\test\SOURCE\test_Web.csproj’ cannot be opened.
The project type is not supported by this installation.

Then we need to install the following 2 things to make it work again

1. Microsoft Visual Studio 2005 – Update to Support Web Application Projects

2. Web Application Project Setup

This will solve the problem