<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Omer Farad on Medium]]></title>
        <description><![CDATA[Stories by Omer Farad on Medium]]></description>
        <link>https://medium.com/@omerfarad?source=rss-b2c0e267c342------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*i4TCkUksEVnSzz_w</url>
            <title>Stories by Omer Farad on Medium</title>
            <link>https://medium.com/@omerfarad?source=rss-b2c0e267c342------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 02 Dec 2026 13:15:19 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@omerfarad/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[How synchronous JavaScript works asynchronously..?]]></title>
            <link>https://medium.com/@omerfarad/how-synchronous-javascript-works-asynchronously-c24d1c48a654?source=rss-b2c0e267c342------2</link>
            <guid isPermaLink="false">https://medium.com/p/c24d1c48a654</guid>
            <category><![CDATA[synchronous]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[asynchronous]]></category>
            <dc:creator><![CDATA[Omer Farad]]></dc:creator>
            <pubDate>Tue, 22 Oct 2019 16:34:44 GMT</pubDate>
            <atom:updated>2019-10-22T16:34:44.595Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ag4A-g_RZEmHN7g76wadcw.jpeg" /></figure><p><strong>JavaScript</strong> is a</p><p><em>Synchronous,</em></p><p><em>Blocking,</em></p><p><em>Single threaded</em> <em>language</em></p><p><strong>what blocking,synchronous,single threaded all these means?</strong></p><p>Let me tell you in simple, first we will go in the same order. it’s synchronous which means JavaScript can read a code line by line as we read a book. it cannot make two or more work at a time,so another work has to wait for JavaScript to complete the present one which is called blocking. JavaScript can do only single work at a time so it needs a single space only to do that work,the space called single call stack or single threaded.</p><p>if we are making any request or response to network, or delay functions, our code is not supposed to be freeze until we get those response from the network or the delay functions to complete. In order to work JavaScript simultaneously, it has to change its behavior like,</p><p><em>Non-blocking,</em></p><p><em>Asynchronous,</em></p><p><em>Multi-threaded language</em>.</p><p>To achieve that, Web API are being used behind with JavaScript, which is provided by the Default Browser.</p><p>e.g.: Google chrome browser engine called “V8” made of C++ and JavaScript. This provides a multi-threaded action through Web API.</p><p>Web API is nothing but the context of the Browser. It offers many interfaces including AJAX calls, Fetch API, Event Functions, setTimeout, Promise, Async/Await, etc… This interfaces can be seen in the browser by typing “window” on console .</p><p>Whenever JavaScript faces these (Asynchronous)functions, it simply pushes to the Web API and moves to the next line without caring. But nothing to worry, Web API will take of that, since it is a multi-threaded pool, it can handle all such functions and passes to the place called callback queues. This Web API makes some priority for the callback queues of what order the functions to be queued.</p><p>The orders are:</p><ol><li><strong>Main tasks</strong> from JavaScript, e.g.: console.log();,functions,variable declarations.</li></ol><p>2. <strong>Event functions</strong>, e.g.: onclick, onmouseover, onmousemove, onload, onchange, etc..</p><p>3. <strong>Micro tasks</strong>, are usually scheduled for things that should happen straight after the currently executing JS script. e.g.: Promises, process.nextTick, Object.observe, MutationObserver.</p><p>4.<strong>Macro tasks</strong>, which execute right after Micro tasks get completed. e.g.: setTimeout, setInterval, setImmediate, requestAnimationFrame, I/O, UI rendering.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1023/1*YNHo5a0ozz5igugf_l8h4w.jpeg" /><figcaption>This is how JavaScript works</figcaption></figure><p>In the above image, the output is not the same as we coded in JavaScript block. Here the setTimeout function are considered as a macro task which will be strictly executed after Micro tasks like promise, async/await. So it maintaining the order as we listed above.</p><p>To understand the above image in practical check out this, <a href="http://latentflip.com/loupe/?code=ZnVuY3Rpb24gZnVuYygpewogICAgc2V0VGltZW91dChmdW5jdGlvbigpe2NvbnNvbGUubG9nKCJnZSIpfSwyMDAwKQogICAgfQpmdW5jKCk7!!!PGJ1dHRvbj5DbGljayBtZSE8L2J1dHRvbj4%3D">http://latentflip.com/loupe/?code=ZnVuY3Rpb24gZnVuYygpewogICAgc2V0VGltZW91dChmdW5jdGlvbigpe2NvbnNvbGUubG9nKCJnZSIpfSwyMDAwKQogICAgfQpmdW5jKCk7!!!PGJ1dHRvbj5DbGljayBtZSE8L2J1dHRvbj4%3D</a></p><p>I guess it sparks some insight…, Good luck</p><p>if you got something informative in this page, don’t forget to click the clap button below.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c24d1c48a654" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Glimpse of JavaScript behaviors: Scope, Hoisting, Closures, Stack and Heap memory.]]></title>
            <link>https://medium.com/@omerfarad/glimpse-of-javascript-behaviors-scope-hoisting-closures-stack-and-heap-memory-9d8f758e0a77?source=rss-b2c0e267c342------2</link>
            <guid isPermaLink="false">https://medium.com/p/9d8f758e0a77</guid>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[scopes]]></category>
            <category><![CDATA[hoisting]]></category>
            <category><![CDATA[memories]]></category>
            <category><![CDATA[closure]]></category>
            <dc:creator><![CDATA[Omer Farad]]></dc:creator>
            <pubDate>Sun, 18 Aug 2019 08:09:50 GMT</pubDate>
            <atom:updated>2019-08-19T17:19:28.958Z</atom:updated>
            <content:encoded><![CDATA[<p>Unlike Java, JavaScript is a scripting language which only runs in the users browser and computer. A static web page can be created by using HTML and CSS - <a href="https://medium.com/@omerfarad/first-step-to-coding-world-as-a-full-stack-developer-32860dc2b715">https://medium.com/@omerfarad/first-step-to-coding-world-as-a-full-stack-developer-32860dc2b715</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/650/1*EQkNUfckuBYxMg_u8w7Sgg.jpeg" /></figure><p>But simply we can’t use a static page, it’s like an image. It need some action or interaction with the user. So in order to make the page user friendly, java script comes in place.</p><p>The platforms where we can create JavaScript coding are, notepad++,sublime 3,visual studio code. Major web browsers have a dedicated JavaScript engines to execute it.</p><p>Structure of JavaScript: Generally JavaScript can be written in 3 ways,</p><p>1. we can simply code in a separate sheet with extension “.js” and link to the parent html sheet.</p><p>2.scripting can be done in the same parent html page either in head section or body section using script tag. e.g:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/394/1*JHeayZlf_DWHcmq6Ix7a5g.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/386/1*z9CnwUQoaV38JGG_Zbu_JQ.png" /><figcaption>scripting in head and body section</figcaption></figure><p><strong>Paradigm of JavaScript</strong>: This is nothing but the way or style of making a program, before knowing some syntax or logic it is mandatory to know the pattern of programming structure, JavaScript is a multiple paradigm language which supporting,</p><p>1. Object oriented programming</p><p>2 Functional</p><p>3. Imperative.</p><p>Brendan Eich (the creator of JavaScript) always listed Self, Scheme,Java and C as the main influences for the language.</p><p><strong>HOISTING:</strong></p><p>This is one of the behaviors of JavaScript, which moves all the variable declarations to the top of current scope. The value assignments are left in place.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/487/1*6QepA-RV24gBZ9ZVQmRZDQ.jpeg" /><figcaption>variable declared before it is used</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/454/1*cClrVKrUTukEKg-6E8qFDw.jpeg" /><figcaption>variables declaration hoisted but the initialization left beneath</figcaption></figure><p>this is how the interpreter looks the above code,</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/414/1*IRSWH3Ho8o9E6UhVF3cvvg.jpeg" /></figure><p>this is because of hoisting,the variable x is declared before it is used. But JavaScript hoists only declaration not initialization, because of that value of x is undefined.</p><p>Assigning value to the variables without declaring are considered as a global variables even if it is in different scope, because of hoisting e.g:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/771/1*OjQh6zlJQo5eeo713PesgA.jpeg" /></figure><p>As a developer make sure all the variables declared at the top of the scope for avoiding bugs and simplicity.</p><p><strong>SCOPE:</strong></p><p>Like a commercial container, Scope is the accessibility area of variables. there are two types of scope</p><p><em>1.global scope:</em></p><p>The variables which are declared outside a function are considered global scope. these variables can be accessed by all the functions. e.g:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/359/1*vL9tk_yk4ZJhR11ys6LSNw.jpeg" /></figure><p><em>2.local scope:</em></p><p>The variables which are declared inside the function are considered local scope. Since local variables are only recognized inside their functions, variables with the same name can be used in different functions. Local variables are created when a function starts, and deleted when the function is completed.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/731/1*0n9LmRJUWxYYgTtgw_iBDQ.jpeg" /></figure><p><em>Lexical scoping:</em></p><p>Lexical scope is the ability of an inner function to access the scope of an outer function. That is we can access the declared variables and functions of parent or global scope from the inner function.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/520/1*v_UQTg7Hf6OfIKtQSqYYCQ.jpeg" /></figure><p><strong>CLOSURES:</strong></p><p>Closure mechanism is the combination of multiple function one into another and the surrounding where the functions created. It gives the access to the outer function from inner function .This closure gives the data privacy,that the local variables or data can be accessed only from the particular function.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/561/1*3uj2ngdor2Fv6GT5ksUk_Q.jpeg" /></figure><p><strong>STACK &amp; HEAP MEMORY:</strong></p><p>In JavaScript the data will be stored in two ways.</p><p><em>1.Stack are static memory or primitive type</em> which means the value are arranged like stack and that can be accessed in LIFO order. This memory is faster and easy to access. JavaScript provides 6 primitive type:</p><p>a)number b)string c)Boolean d)undefined e)null f)symbol</p><p>2. <em>Heap are dynamic memory or reference type</em> where the data are stored like an object. these objects can be called through reference from the stack memory. Element of the heap have no dependencies with each other and can always be accessed randomly at any time. You can allocate a block at any time and free it at any time. This makes it much more complex to keep track of which parts of the heap are allocated or free at any given time.</p><p>3 minutes clear visualization of stack and heap memory video down below..</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FIX3fDYz0WyM%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DIX3fDYz0WyM&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FIX3fDYz0WyM%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/2e5d94903a9dbcd549dcfa596ab7db5e/href">https://medium.com/media/2e5d94903a9dbcd549dcfa596ab7db5e/href</a></iframe><p>before starting to code or learning syntax, we must know the behaviors and the patterns of JavaScript which gives a clear understanding of how to code and to reduce bugs.</p><p><strong><em>“know it before do it”</em></strong></p><p>hope this brief words gave you some ideas about JavaScript behaviors.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9d8f758e0a77" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[FIRST STEP TO CODING WORLD AS A FULL STACK DEVELOPER!]]></title>
            <link>https://medium.com/@omerfarad/first-step-to-coding-world-as-a-full-stack-developer-32860dc2b715?source=rss-b2c0e267c342------2</link>
            <guid isPermaLink="false">https://medium.com/p/32860dc2b715</guid>
            <category><![CDATA[html]]></category>
            <category><![CDATA[front-end-development]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[bootstrap]]></category>
            <category><![CDATA[css]]></category>
            <dc:creator><![CDATA[Omer Farad]]></dc:creator>
            <pubDate>Thu, 08 Aug 2019 19:48:11 GMT</pubDate>
            <atom:updated>2019-08-09T04:08:22.170Z</atom:updated>
            <content:encoded><![CDATA[<p><em>New to coding…?</em></p><p>Come let me explain what I went through as a novice developer.</p><p>Before that you need to know what is the concept behind the coding world. Generally to create one application or a web page, the complete work is split into three tasks.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hMUW87V3k8_4iIOdCuOLQg.png" /></figure><ol><li><strong>Front end:</strong> This is the page where common users accessing normally e.g.: Amazon/Face book interface.</li></ol><p><em>so how to create that page? what tool I need? what I have to know?</em> here it comes the backbone of all the web pages called HTML(hyper text markup language). The advanced version is HTML 5.</p><p><em>Is HTML 5 only enough to make a static web page?</em>….yes but not completely. We need 3 things to know to make a complete static web page. which are,</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/336/1*NCWq3XHl-ydfJJuFyUGh0A.png" /></figure><p>1. HTML 5- It’s like a man without dress.</p><p>2. CSS- It’s like a dress.</p><p>3. Bootstrap- It’s like rental dress.</p><p>Don’t worry, these are not three different languages. In a single platform we will use these in similar language. let’s have a look into HTML,</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/265/1*dX9bKpWhNHOu3D0IsTmqWg.png" /></figure><ol><li><strong>HTML</strong> is used to make the front page of a website. we can make html file in (notepad ++,visual studio code). How the basic HTML program looks and what is it structure:</li></ol><p>so that’s all your html basic coding. save it as file_name.html, now run the file in any browser. you can see your own web page. save your file whenever making corrections and refresh your browser so that you can see your modification in web page.</p><p>If you want to know all the tags and its usage, go to: <a href="http://www.w3schools.com./"><em>www.w3schools.com</em>.</a> whatever you are writing in the body tag <em>&lt;body&gt;hello&lt;/body&gt;</em> that will be displayed in your web page. but it’s like a normal content in a book. so here the CSS comes in.</p><p>2. <strong>CSS(cascading style sheet):</strong></p><p>As I said already, it’s like a dress for a naked human. To make the page presentable, CSS is used. Generally saying, it is used to align, format, resize, position, coloring, bordering and all the visual aspects. this can be done in three different ways,</p><p><strong><em>a)Inline</em></strong></p><p>Designing can be made in the same html line itself.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/393/1*4faJIbE1YeWXczHRObLKEQ.png" /></figure><p><strong><em>b) Internal</em></strong></p><p>Designing can be made inside the html file in two types, which are,<strong><em> class &amp; ID</em></strong></p><p>it means the content in body tag can be designed from head tag through a function called class and ID. The difference is, class can be called many times from body tag. but Id is one time, same like our personal identity card, its unique right. here is, how it looks:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/625/1*vUvz7zfu_Lj950iXqNkZOw.png" /></figure><p>so here all the CSS activity can be done in between the style tags in head section.</p><p><strong><em>c) External</em></strong></p><p>All the designing will be done in a separate sheet as CSS file and that can be linked to the html file.</p><p>this is how it looks:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/721/1*NYau7875DSIYVuk3n21AYA.png" /></figure><p>that’s all about basic CSS. simple right!</p><p><strong>3.Bootstrap</strong></p><p>you can think, all the designs can be made in CSS then why need to waste time in bootstrap. You will change your mind after knowing bootstrap.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/804/1*EzyxXhd6LH0UWzR-m3wazg.png" /></figure><p>so what is bootstrap, it is a open source library. Instead of designing with lots of code in CSS, we can simply give the link of bootstrap file in header section and call the function from body section through class or ID. e.g.: getting dress for rental whenever needed.</p><p>The purpose of bootstrap is to reduce the designing and processing time. this is how it looks,</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/804/1*FwUYEjdbc0CFlx2yaG8RbA.png" /></figure><p><em>e.g.:&lt;div class=”jumbotron bg-dark ….”&gt;&lt;/div&gt;</em></p><p>To learn more about functions in bootstrap go to link: <a href="http://www.getbootstrap.com/"><em>www.getbootstrap.com</em></a></p><p>so that’s all about the front end. hope I shared some basic things which I learnt as of now.</p><p>small tip I wanted to share, start your web page design from the paper sketch. SEE YOU FOLKS…</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=32860dc2b715" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>