Friday, November 29, 2019

Explaining Data Structures for a 10 years old kid

data structure is a way to organize your toys so the will be reachable without any effort and they have multiple types

1. stack : so the stack method allows you to stak your toys on top of each other but the biggest flaw in this method is if you put a toy first and then put above it multiple toys but you want to get the first one you have to pull out all the toys in order to reach the first one.

2. Queue : this method also called (first one in first one out (FIFO) it's really self explanatory.

3. Tree: in this method you have a toy which has children of multiple toys and so on and so furth,

4. Linked List: it allows you to store your toys in an array like style with pointers pointing to the next toy, it has many flaws one of them if you wanted to add toys you have to add them at the end and when you search if  you miss the toy you are looking for then you have to start again.

5: sets: they are great but you cannot store the same toy twice.

the rest are too complicated for you to understand. data

Wednesday, November 27, 2019

What do you like or not like about yoga and would you like to try it again?

Yoga is a great mind and body exercise that allows you to get into the mood and relax and relife stress it makes you healthier, but i think Yoga should be practised alone in a peaceful palce, not with multiple people because you need to relax and ease the stress, as for would i like to try it?

 ofcourse but it should be alone.

Monday, November 25, 2019

what is SuperClass and what is SubClass and how do they work?

A SuperClass is a class that holds the properties that can be used by all the other SubClasses and holds all the SubClasses, also it has it's own methodes that sub classes can inherit.


The SubClass inherits methods and properties from the main class (SuperClass) and can modify them to suit thier requirment but the main class cannot inherit methods or properties from the sub Class and sub classes can inherit from from other subClass, when you inherit and connect you need to set the constructor to match this class other wise it would refer to the main class or return undefined.



so in conclusion SuperClasses can live without SubClasses but the oppesite cannot happen.

Friday, November 22, 2019

explaining the Hash Tables for a 6 years old kid.

So let's just say you want to store you toys in shelves so you want to make them organized, so and you have to assign something called hash which is a collection of numbers and strings which acts like an id so when you ask for the toy with that id it will bring it and it will help you ask others that don't know about your toys so you give them your toy hash and they will bring it to you without asking you how does it look or the shape and the colour.

So hash tables help you be more organized help others find the things that they are looking for.

Wednesday, November 20, 2019

why cats are the greatest animal in the world?

Cats are the greatest because they are unpredictable, they all lead double lives they could be the cutest animals in the world one second the other they could be criminals.

They are the funniest animals in the world especially when they ar scared just search youtube for cat videos and the are the most watched animal videos so that asserts my point that they are the funniest.


Monday, November 18, 2019

Define stringifyJSON & ParseJSON

So we shall start with JSON.stringify().

It's a function that converts an object or an array into strings in the case of the object it puts the entire object in between quotations and puts the keys of the object inside quotes as well and if there is an empty string, a function or a undefined it returns null this works with arrays too.



for arrays is much simpler it puts the whole array inside quotes and changes the numbers inside into strings.

in conclusion it adds the object or an array into a json string



as for JSON.parse it acts as the opposite of JSON.stringify() it changes the object from json string to a normal object or an array



Sofian Saleh

Friday, November 8, 2019

what did i learn in phase 1 (BootStrap)

Firstly, I arrived late in the second week so actually i spent four weeks in RBK,
 But they were one of the best four weeks of my life i made many great friendships that hopefully will last a lifetime, and i've learnt so much i've improved a lot nad still improving.

To be honest the first day i came here i was overwhelmed with the amount of knowledge that we were getting in the beginning especially for a pearson that doesn't have a great knowledge about programming, but the HIRs helped, having good pairs also gave me confidence to push my self.

 Also i'm a person who doesn't like the company of people, but being here allowed me to conquer this issue by talking to people more and building friendships without people judging each other .

 This 4 week experience has enhanced me significantly as a person and as a programmer. and will live with me forever without a shadow of a doubt

Monday, November 4, 2019

Explain your group Project to a 10 years old kid!

Our project is making a calculator but it's not as simple as it sounds.

when you want to create a simple calculator you need to have a knowledge of a programming language and designing language to make it satisfying to look at.

how does the calculator works?

In a simple way you have operating buttons and number buttons.

 The operating buttons cannot be pressed before the first number, they are use to choose which operation you want to do (+, -, *, /).

The number buttons they are used to choose the numbers you want to operate on for example
1 + 1.

Now we go to the equal sign (=) which takes two numbers and an operation and then acts upon them, after you finish the basics you can move to the harder things to implement (sin(x), cos(x)....).

but the tricky part is how to implement that to coding.

You need to be knowledgeable in HTML, CSS, Java Script and JQuery.

Friday, November 1, 2019

Explaining clousers and OOP

The main idea of clouser is a nested function which is a function inside a function useing only parameters and variables but that uses a lot of memory, but it's a way of using the local scope of the main function in a way that cannot be accessed outside of that function and it is very useful.

But OOP is a more optimal way to use memory and by storing values in attributes inside an object and writing functions outside the main function and altering and adding values without wasting memory.

how would you define closures for a 10 year old?

Well clouser is like having a box of candy that is in public everybody can access it but you want to make it for you.

 So you take it from the public to your house so you can access it with your family it's like neting it from the public.

but the bad point is that you use a lot of energy to get to the box of candy to get a piece.
so what will you do.

You use Object Oriented Programing (OOP).
you use OOP to reduce the energy lost in using the clouser methods so you stor the candy inside a place (object) and you can access it whitout losing energy anytime you want, you can add to it when ever you want.

Sofian Saleh