Monday, December 30, 2019

What is the difference between Ajax, Fetch, Axios?

Ajax is an asynchronous request initiate by browse that does not directly result in page transition, one of it's main attractions is that you can use it to update parts of the web page without reloading.

Axios is a Javascript library you can use to perform HTTP requests that works in both the browser and node.js and it's widley supported and it's easy to use.


The Fetch API is a simple interface for fetching resources. Fetch makes it easier to make web requests and handle responses than with the older XMLHttpRequest, which often requires additional logic

Friday, December 27, 2019

explain Deployment to a 10 years old kid .

Okay deployment for a 10 year old.

Let's assume that you are working on a project that the teacher in school gave you and you worked hard on it and  feel like you can make other people benefit from it so you hang it on the school board so anyone that is walking past it can read it and benefit from it.

so deployment is the same thing except it's on a larger scale you deploy it on the internet as a website instead of hanging it on the school board you deploy it to the world to see it and benefit from it.

Wednesday, December 25, 2019

SQL vs NoSQL?

SQL ( Standard Query Language )is a "language" that is used to deal with relational databases relational databases defines the relations in the form of tables, it uses the commands insert, delete, search and update.

noSQL ( Not Only SQL ) doesn't use relations (that's why it's referred to as non relational database) and doesn't require a fixed schema and easy to scale it's used to store a large amount of data and real time web apps companies like Facebook and Twitter uses them.

It uses key-value pair unlike SQL which use tables, and it's schema is dynamic unlike SQL which is fixed.

but SQL is used for complex databases unlike noSQL and it's a mix of open source on the contrary noSQL is an open source.

Monday, December 23, 2019

What is the difference between Restful API & Web API?

A restful API is an application program interface that uses HTTP requests to GET, POST, PUT and DELETE data.

REST technology is generally preferred to the more robust Simple Object Access Protocol (SOAP) technology because REST leverages less bandwidth, making it more suitable for internet usage.

The name says it all it's API over the web which can be accessed using HTTP protocol.  We can build Web API using different technologies.

Friday, December 20, 2019

One day presidency you are a president for one day only, what would you doo??



One day presidency


      Firstly, I would ban every diesel car in the country because they are for the weak, ban buses because they are the source of most of the pollution in cities in the world.

      I would declare war on Turkey because it's the source of all the bad things happening in the world.

       Eat dinner with Bill gates, Marshall Mathers and my brother.

        Give poor people some resources and a kick start so the proceed in life

      At night i would play cards with Kim Jong-Un, Jeremy Clarkson, Teodoro Obiang Nguema Mbasogo and Boris Johnson just to see Jeremy Clarkson make fun of  these presidents.

      And then i wake up and realize it was all a dream.

SOFIAN SALEH
     
     

Wednesday, December 18, 2019

Explain Relationship in Database?

So relationships in database is divided into three or four  relations.

1. One to one relationships: is like the relation between you and your wife (if you were a christian).

2. One to many: it's like the relation between a mother and her children you only have one mother but your mother may have many children.

3. Many to many: it's like the relationship between the classes and students a class have many students and the students have many classes.

4. Self referencing relationship: This is used when the table needs to reference it self . This actually can also be similar to 'one to many' relationship

Monday, December 16, 2019

My Passion !!

Honestly i'm passionate about a lot of things here are some of them.

Making my family proud, everything i did and doing in my life is because of them so i tried my best not to let them down, that's what keeps me going

Football (especially Chelsea Football Club) i started supporting them in 2003 and since that day each time they lose is like a relative dying and each time they win i feel like I've on the lottery, and let's put it this way if i had to chose between food or Chelsea FC, you know what i'm going to chose.

Friday, December 13, 2019

Asynchronous vs Synchronous in NodeJS

Firstly you need to know that node js uses v8 engine which is used in google chrome but its changed a bit it simply translates the js code to c++ gets the result and then send it back, one more point it's a forever looping function.

in an Asynchronous it loops the first time and puts them in the event listener and when its time for it to be invoked it goes to the queue and then it gets invoked and if we have multiple functions the work at the same time.

Synchronous is the oppisite of  Asynchronous it goes line by line and excutes the function waits for the result and then moves on to the next function
.

Wednesday, December 11, 2019

What is the difference between Reactjs & Angularjs ?

When comparing ReactJS Vs AngularJS, it is important to know that ReactJS is an open-source JavasScript library.
AngularJS is a framework that provides a large number of native options and features.  which makes it possible to start a project faster without being intimidated by the choices to be made at startup.
Data Binding:
AngularJS uses a two-way data binding which connects the (DOM) values to model data. It means, if for user interaction with the field a new value is provided to the app it will result in the update of both the view and the model.
ReactJS supports one-way binding. 

Architecture
AngularJS is based on the MVW (Model-View-Whatever).
AngularJS’s MVW offers the advantage to reduce the loading speed of the web pages considerably. Further, the communication is in the asynchronous mode.
ReactJS creates its own virtual DOM where components are attached. It brings the comfort of navigation within a web site since all the data get displayed without refreshing the page. 

Monday, December 9, 2019

MVC - Is it a Design Pattern or an architecture?

MVC is an architectural pattern that splits the application into three main parts.
  1. The Modal: is the part that is correspondent for all the logic that the user interacts with, for example, the data transferred from the view to the modal or from the controller to the modal
  2. The view: Is the part that deals with the User Interface (UI), represents the things that the user will interact with.
  3. The Controller: acts as the interface between what transpires in the view and the Modal, and processes all the business logic and requests.

Friday, December 6, 2019

Algorithms.

What is an Algorithm?

Algorithms are  steps that are used to solve a problem the word algorithm has it's roots  Latinizing the name of Persian mathematician " Muḥammad ibn Mūsā al-Khwārizmī " a famous mathematician.

An example of using an algorithm?

One of the most famous examples about algorithms is recipes if you have ever tried to cook you'll find yourself following a certain rules or steps so that's an algorithm.

My steps to build an algorithm?

1. I need to understand 80% of the question.
2. I will try to write some notes to remind me of what am i supposed to do.
3. I will try to write a code as simple as possible and implement it if it works then i try to refactor it.

The challenges to create an algorithm?

Understanding the question is the most important step to implement an algorithm because you cannot build an algorithm about a thing you don't understand.

Wednesday, December 4, 2019

What is the difference between Linked List and Arrays ?

Well in my perspective linked lists have a pointer that points to the next element and if you are searching for a specific element in the middle or the end you have to start from the beginning and srarch.

In Arrays you can easily access the elements  by writing the array name and putting the index that you want and you will access it

In some languages arrays have a limited size but the linked lists are dynamic.

Elements in the array are stored consecutively  not as linked lists they are stored randomly.

Monday, December 2, 2019

How to boost self confidence?

You can boost your self confidence in multiple ways.

1. By helping someone else: helping someone else helps us forget  about ourselves and feel grateful for what we have.

2. Set small goals: this will help you regain your self confidence by getting small wins for a period of time you will regain your self confidence fully.

3. Get a hair cut: this will help you tremendously as Mario Balotelli said once "if you don't feel confident get a hair cut".

4. Get out of your comfort zone: But don't wander away but it's great to try new things it will help you grow and reach places you never thought you could reach.