<?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 Amy T on Medium]]></title>
        <description><![CDATA[Stories by Amy T on Medium]]></description>
        <link>https://medium.com/@amy.tai0120?source=rss-41861d901135------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*12ijnBy0Vkz5NsSV.</url>
            <title>Stories by Amy T on Medium</title>
            <link>https://medium.com/@amy.tai0120?source=rss-41861d901135------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 24 Nov 2026 11:14:12 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@amy.tai0120/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[Demystifying the Internet]]></title>
            <link>https://medium.com/@amy.tai0120/demystifying-the-internet-262183cd161e?source=rss-41861d901135------2</link>
            <guid isPermaLink="false">https://medium.com/p/262183cd161e</guid>
            <category><![CDATA[internet]]></category>
            <category><![CDATA[web-development]]></category>
            <dc:creator><![CDATA[Amy T]]></dc:creator>
            <pubDate>Sun, 05 Aug 2018 19:58:42 GMT</pubDate>
            <atom:updated>2022-02-12T07:48:44.620Z</atom:updated>
            <content:encoded><![CDATA[<h4>What happens when you type google.com in your browser and press Enter</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/0*3U8K7S7twS5Lpg-O.gif" /><figcaption>Image credit <a href="https://www.canadiangeographic.ca/article/mesmerizing-map-lets-you-visualize-flow-global-trade"><strong><em>canadiangeographic.ca</em></strong></a></figcaption></figure><p>With almost 2 billion people using the internet around the world, it seems fair to say that the internet is an indispensable tool for serving everyday needs and desires. But the internet is also fairly complicated and requires many moving pieces to work together, even for the seemingly mundane tasks. For example, what happens when you type a URL and type enter? This article will help clarify some of the confusions by walking through step-by-step process.</p><p>In summary, the internet is a global system of interconnected computer networks that can serve contents to one another. All computers can be generally categorized as two types: servers and clients. The computer that holds the information about a website and provides services to other computers are called <strong>servers</strong>. Computers of personal use are generally known as <strong>clients</strong>.</p><p>Each computer has a unique address called <strong>Internet Protocol (IP) address</strong> that computers uses to help identify each other on the internet. A typical IP Address, for example, would be 13.33.148.227. Each IP address is associated with a sitename, making it so that we don’t have to memorize the set of numeric digits. However, the server needs access to a site’s IP address in order to serve the content. So how does the internet find the appropriate IP address before making the request to the server?</p><h3><strong>Find the IP Address</strong></h3><p>First off, the browser will check its cache to see the IP for the domain name is already stored. If it isn’t present, it will then check the cache in the OS before proceeding to call the <strong>DNS resolver</strong>. Whenever a resolver is called, it will initiate a chain of protocol that involves contacting multiple authoritative nameservers to locate the correct IP address (which we will step through in the following paragraphs). Generally speaking, a client’s ISP, or Internet Service Provider acts as the resolver (Verizon, Cricket, AT&amp;T, to name a few).</p><p>The resolver will first check its cache for any existing entry of the IP. If nothing is found, it will query the root server. The root server contains the addresses of the Top-Level Domain (TLD). The TLD is the last portion immediately following the dot in a domain name. A few popular TLDs are .COM, .GOV, .EDU, .NET, and .ORG. All coordination and management of TLDs fall under the responsibility of the Internet Corporation for Assigned Names and Numbers (ICANN). Other types of TLDs include country code TLDs (.NZ, .JP, .SE) and infrastructure TLDs (.ARPA).</p><p>Because the domain name ends with a .COM, the root server will direct the resolver to that particular domain server, where all the records of .COM are located. The resolver will once again cache the address of the TLD (.COM) name servers. The .COM TLD server will provide the domain’s authoritative nameservers, which will finally provide the IP address for the domain name.</p><p>The resolver will send the information back to the OS, where it will be saved in a cache before passing it on the browser and finally resolving the domain name. The browser will likewise save the IP address in its own cache.</p><p>As you may have notice, with each visit to another external nameserver, the resolver cache the results. That means that in the future, if the client wants to access the same webpage again, the resolver can immediately produce the associated IP address without having to repeat the protocol. This helps decrease redundant visits to nameservers and improve efficiency for the network.</p><h3><strong>Making the Request</strong></h3><p>With the IP address in hand, a connection between the client and the servers will initiate. The responsibility of establishing that connection falls under the jurisdiction of the <strong>TCP/IP</strong>, which stands for Transmission Control Protocol/Internet Protocol. This underlying network protocol dictates how machines should communicate and how to package, transfer, send, and receive messages to one another.</p><p>The TCP three-way handshake is a mechanism that is designed so that the machines in question can negotiate the parameters of their connection. This gentleman’s agreement happens between the SYN, SYN-ACK, ACK. To simply the process:</p><ul><li>Host A sends a TCP SYNchronize packet to Host B</li><li>Host B receives A’s SYN</li><li>Host B sends a SYNchronize-ACKnowledgement</li><li>Host A receives B’s SYN-ACK</li><li>Host A sends ACKnowledge</li><li>Host B receives ACK.</li><li>TCP socket connection is now established</li></ul><p>Once the website has been connected, the request will be transmitted using Hypertext Transfer Protocol, or HTTP. This is easily the most commonly used application protocol, although there are many others available.</p><p>We can see though that <a href="https://www.holbertonschool.com/"><em>https://www.google.com</em></a> is an HTTPS. The ‘S’ in the end means that the HTTP will connect with a Secure Sockets Layer (SSL), which will provide an encryption of the data being passed between the network. Without data encryption, the information can easily be intercepted by third parties. This is especially important true for highly sensitive data, such as bank card information, social security numbers, and login credentials.</p><p>As the HTTPs continue its journey towards making an official request for the webpage, it must first bypass the load balancer. The <strong>load balancer </strong>is a special server that help manage all the incoming traffic amongst servers. This may not sound necessary for domains that have small to moderate traffic load, but for websites that have greater rates of traffic, it will prevent overload on any one particular server. In addition, the client’s SSL certificate will be verified by the load balancer before decryption ensues.</p><p>Given that each request must make its way through the load balancer, it’s important to provide proper security from potential hackers. Therefore, most load balancers have a firewall installed. A <strong>firewall</strong> is a network security system that help establish a barrier between incoming and outgoing traffic. Firewalls are often characterized as either network firewalls or host-based firewalls. In our case, the load balancer for this particular server will have a network firewall, because the traffic is between two or more networks. It will validate that our request is legitimate and without malicious intentions.</p><h3><strong>The Home Stretch</strong></h3><p>Once the load balancer make security checks and redirects the request, it will reach a web server. The <strong>web-server</strong> is hardware or software system that deliver static web contents to clients, which can consist of text files, images, videos, and etc. It works in tandem with an <strong>application server</strong>, which provides dynamic contents — data that is processed on the fly based on user-specific information. Usually, the application server queries from the <strong>database</strong>, where all the contents are stored.</p><p>Once the web-server have properly packaged the website contents, it will be sent back to the client’s browser, where it will be gloriously displayed for the client to behold.</p><p>All this in matters of seconds!</p><p>Resources:<br><a href="https://www.vox.com/cards/the-internet/what-is-the-internet">https://www.vox.com/cards/the-internet/what-is-the-internet</a><br><a href="https://howdns.works/">https://howdns.works/</a><br><a href="https://smallbusiness.chron.com/domain-name-system-dns-resolvers-work-76639.html">https://smallbusiness.chron.com/domain-name-system-dns-resolvers-work-76639.html</a><br><a href="https://en.wikipedia.org/wiki/Internet_protocol_suite">https://en.wikipedia.org/wiki/Internet_protocol_suite</a><br><a href="https://www.inetdaemon.com/tutorials/internet/tcp/3-way_handshake.shtml">https://www.inetdaemon.com/tutorials/internet/tcp/3-way_handshake.shtml</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=262183cd161e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Internet of Things in a Nutshell]]></title>
            <link>https://medium.com/@amy.tai0120/internet-of-things-in-a-nutshell-3dd842f3107f?source=rss-41861d901135------2</link>
            <guid isPermaLink="false">https://medium.com/p/3dd842f3107f</guid>
            <category><![CDATA[internet-of-things]]></category>
            <dc:creator><![CDATA[Amy T]]></dc:creator>
            <pubDate>Tue, 26 Jun 2018 03:52:11 GMT</pubDate>
            <atom:updated>2018-06-26T03:52:11.862Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/800/0*Bo7LG-MqC-7PbogD" /><figcaption>It’s coming.</figcaption></figure><h3>What is Internet of Things?</h3><p>IOT is a concept that takes objects from the tangible world and merge it with the digital world. These physical objects will collect and share intelligent data with one another to form a vast, interconnected network.</p><p>To imagine how that will work, let’s take Jenny on a typical day.</p><p>Jenny wakes up to the alarm sounding at 6am. The coffee immediately starts brewing, but it notices that Jenny is running low on coffee beans. It looks for the specific coffee brand in a few stores and puts an order. Jenny gets into her car at 7:00am and starts driving to work. Her car is informed of an accident on her usual route, and recommends to Jenny that she take an alternative route to work today. Seeing that she is scheduled for a meeting at 8:00am, a message is automatically sent to inform everyone that it will be pushed to 8:30am instead.</p><p>Jenny likes to monitor her health and ensure a balance in her diet. The device around her wrist senses that she haven’t had sufficient source of omega-3 in awhile — and highly recommends having salmon for lunch. The closest restaurant with salmon on the menu will be pinpointed and have sent to Jenny. If she likes it, directions will be sent to her phone.</p><p>As she has a big project with a client, Jenny decides to stay later than normal. She’s the last to leave her office building-as she exits through the door, the building senses no other personnel left and immediately shuts off all light and activate the security system. It will remain as such until the following morning.</p><p>As she steadily approach the garage of her house, the built-in home security instantly recognizes her presence and prepares by unlocking the door and starting up the thermostat to a warm, inviting temperature. The lights will dim itself to an atmospheric glow to soothe Jenny to a sleepy state and completely turn off the minute she lays in bed.</p><h3>Where are we at now?</h3><p>The scenario above, as most of us knows it, is far from implausible. We are already embracing the blooming of IOT, with numerous technologies pioneering the beginnings of the IOT trend.</p><p>The NEST thermostat, for example, controls the central heating based on observed behaviors and changes — whether the user is at home during the day, away, sleeping, and etc, the NEST will react accordingly. It will even react differently per room — the living room can be a tad warmer to the senses, but the baby room would benefit having a cooler environment.</p><p>In the apparel industry, Ralph Lauren has launched a Polotech Shirt that can track biometric readings related to heart rate, calories burned, O2 expenditure, activity levels, and even max efforts. The shirt will help curtail fitness goals and give recommendations on potential areas of improvements.</p><p>Within the healthcare industry, the Lively system is created to help monitor people with medical problems and at risk for various functional disabilities such as falls and medication mismanagement. Sensors around the home will help track movement, enable medication reminders, and send out warnings for inconsistent habits (missed meal, irregular bathroom activity, etc).</p><p>There are also some extension of attempted intelligence to the industrial domain, a few of which doesn’t intuitively scream “smart”. Oceanit Laboratories, for example, are trying to change cements by embedding nanosensors in the material, allowing it to transmit information and respond to mechanical, acoustic and magnetic signals. This sort of technology can help, say, oil drilling, where the cement surround the oil well will pass information back to better help understand the integrity of the well. City planning can also adopt this technology for sidewalk and road maintenance.</p><h3>Steps to achieve IOT</h3><p>In order for IOT to be fully integrate into society and become a true reality, we must undergo three steps.</p><p>The first step is to take our current everyday objects and integrate it with technological capabilities. This will allow the first generation of data collection, but confined to the the specific object. When enough objects are properly converted, the second step is build a functioning network. This means transmitting data from individual objects and coordinating it with data from other objects. Unfortunately, this is also the most difficult step, as objects must be capable of “communicating” and allowing weight of external data to influence its own behaviors, with little to no intervention from humans. When connections between all objects become more ubiquitous, the last step is to manipulate the network to output desired results. That means adding software programming to bring the internet of things to life — and start shaping the world to cooperate extensively with humans, and allow full automation to our everyday activities.</p><p>At the heart of it, data is only useful if we can rationalize and apply it. Given the enormous amount of data transmitted and stored at a given moment, it will be cumbersome to review and understand everything with human effort alone. Even if we cut down the sample size, it will still simply take too much time. We will require technological aid to help process these data.</p><h3>In Comes AI</h3><p><a href="https://en.wikipedia.org/wiki/Machine_learning">Machine learning</a> can be described as “a subfield of computer science (CS) and artificial intelligence (AI) that deals with the construction and study of systems that can learn from data, rather than follow only explicitly programmed instructions.”.</p><p>AI is not foreign either. In fact, you are constantly interacting with something that is ran by AI. For example, Netflix and Youtube makes some recommendation of what to watch based on your previous viewing history. It is then refined over time with each new instance.</p><p>Machine learning plays two distinct roles — first, it enables real-time responses. An example is facial recognition, where a camera will collect features of your face and make comparisons with the large dataset of other people before making a conclusion — all within a short amount of time. The other large contribution that AI lends to IoT is the post-event processing. If IOT is to serve the society, it needs to learn specific proclivities and apply it to future considerations. AI will be able to translate the treasure trove of data from these intelligent devices into distinct patterns, improve its predictive analytics and help make better decisions.</p><h3>Utopia or 1984?</h3><p>Our current use of technology feels mostly within the realm of whether it serves our interest — we can, for example, choose to opt out of the latest social media platform or refuse to disclose certain medical information.</p><p>As the IOT becomes more widespread, our data will be constantly collected and monitored — and therefore at risk of having an audience to view and act on it. Whether the personal health tracker will be used by the health insurance to make a more informed choice about raising your premium, or whether the contents of your smart fridge inspires companies to target you for specific ads.</p><p>From 2026 and onward, the connectivity will become widespread, deeply ingrained everything, and simply unavoidable. It’s so unavoidable that according to Judith Donath of Harvard University’s Berkman Klein Center for Internet &amp; Society, whether you like it or not, opting out of the IOT movement won’t be a choice you’ll get.</p><blockquote>“People will move more deeply into connected life — and they also will be moved there whether they want to be or not,” she says. “The connection of the physical world to information networks enables the collection of an unimaginably vast amount of data about each of us, making it possible to closely model how we think and to devise increasingly effective ways of influencing how we act and what we believe. Attaining this ability is extraordinarily valuable to anyone with something to sell or promote.”</blockquote><p>Security is also a huge concern. If an attacker is savvy enough, what is to stop him from accessing the control network of most modern cars and disabling the vehicle’s safety features, such as its brakes, steering wheels, and locks? Or if patients are fitted with a particular connected pacemaker that have some hardware deficiency, potentially leading to the device being exploited, how much of the patient’s health will be at imminent risk? Already, there has been a few major cyber attacks, such as the <a href="https://en.wikipedia.org/wiki/WannaCry_ransomware_attack">WannaCry</a> attack in 2017, which have shown the looming risk of being intelligently connected to a network.</p><p>And what’s to stop higher authorities from hacking into our cameras and our devices and tracking our every movements? The National Security Agency (NSA) already collects billions of records a day to monitor the whereabouts of users in the States and around the world using just the positioning system on cell phones (GPS, wifi, etc).</p><p>At the end, we cannot stop the advancement of technology. We’re too deep into the drenches, and the only effective way to prevent against attacks and misuse is to extend valiant efforts in combating unjustified mistreatment and making effective and strict laws that will inspire adherence.</p><p>What are your thoughts about the incoming waves of IOT?</p><h3>Citation:</h3><p><a href="https://www.wired.com/2013/05/internet-of-things-2/">https://www.wired.com/2013/05/internet-of-things-2/</a></p><p><a href="https://www.wired.com/insights/2014/11/iot-wont-work-without-artificial-intelligence/">https://www.wired.com/insights/2014/11/iot-wont-work-without-artificial-intelligence/</a></p><p><a href="https://www.npr.org/sections/alltechconsidered/2017/06/06/531747037/the-internet-of-things-is-becoming-more-difficult-to-escape">https://www.npr.org/sections/alltechconsidered/2017/06/06/531747037/the-internet-of-things-is-becoming-more-difficult-to-escape</a></p><p><a href="https://www.washingtonpost.com/apps/g/page/world/how-the-nsa-is-tracking-people-right-now/634/?noredirect=on">https://www.washingtonpost.com/apps/g/page/world/how-the-nsa-is-tracking-people-right-now/634/?noredirect=on</a></p><p><a href="http://www.ioti.com/security/wannacry-aftermath-iot-ransomware-our-future">http://www.ioti.com/security/wannacry-aftermath-iot-ransomware-our-future</a></p><p><a href="https://beebom.com/examples-of-internet-of-things-technology/">https://beebom.com/examples-of-internet-of-things-technology/</a></p><p><a href="http://www.information-age.com/future-internet-things-security-issues-123470014/">http://www.information-age.com/future-internet-things-security-issues-123470014/</a></p><p><a href="https://www.pcmag.com/article2/0,2817,2493326,00.asp">https://www.pcmag.com/article2/0,2817,2493326,00.asp</a></p><p><a href="https://venturebeat.com/2017/06/28/how-ai-and-iot-must-work-together/">https://venturebeat.com/2017/06/28/how-ai-and-iot-must-work-together/</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3dd842f3107f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Bare Basic Breakdown of Machine Learning]]></title>
            <link>https://medium.com/@amy.tai0120/the-bare-basic-breakdown-of-machine-learning-365807346774?source=rss-41861d901135------2</link>
            <guid isPermaLink="false">https://medium.com/p/365807346774</guid>
            <category><![CDATA[machine-learning]]></category>
            <dc:creator><![CDATA[Amy T]]></dc:creator>
            <pubDate>Sun, 27 May 2018 18:27:57 GMT</pubDate>
            <atom:updated>2018-06-24T07:04:09.991Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/730/0*6F3uFfP68zAfaJOX." /></figure><p>Unless you live under a metaphorical rock, you’ve probably heard a bit about this machine learning business. Maybe <a href="https://deepmind.com/blog/alphago-zero-learning-scratch/">Alphago Zero</a> has wildly intrigued you. Or you’re curious how Youtube have an uncanny ability to serve you endless buffet of interesting and relevant videos. Today, we’ll discuss some basic ideas of machine learning in the simplest format possible.</p><h3>What is Machine Learning?</h3><p>Have you ever watched a baby play with a shape sorting cube? When he first encounters the puzzle, he is not likely to be familiar with neither the cubes nor the blocks themselves. But over time, as he experiments with cramming the blocks against the cubes, the baby finds that specific blocks can successfully bypass specific surface frames. After some time, he would have attempted with the cube enough to eventually secure an intuitive understanding of shape, which helps him successfully solve the challenge.</p><p>Machine learning operates in a similar manner — without relying on explicit instructions from a human programmer, machines are cable of teaching themselves how to “learn” using the input data.</p><p>Just how can it do that? Just like the baby with the cube, the codes (aka algorithms) are set up so that the machine are taking each data and making predictions and decisions. The machine generally starts off doing poorly, but once it undergoes enough training, it starts to recognize patterns, which leads to better predictions and thus greater accuracy in data interpretation.</p><p>There are two widely popular categories of learning methods — supervised and unsupervised learning.</p><h3>Supervised Learning</h3><p>Supervised learning is learning in which we train the machine to use data that has already been labeled with a correct answer. After the training period, with each new data set, the machine compares the unknown label of the new data with the data it already knows and tries to identify it.</p><p>We can break supervised learning into two popular categories: classification and regression. Both problems have as goal the construction of a succinct model that can predict the value of the output attribute from the variables. The difference between the two tasks is the fact that the output attribute is mainly numerical for regression and categorical for classification. Let’s look at different examples to better understand the contrast.</p><h3><strong>Classification</strong></h3><p>Let’s say we want our machine to differentiate between fruits. In order to train it, we will first have to show it all types of fruit and label each one with defining features.</p><p>If the fruit is a long, cylindrical shape with a slight curvature, and possess a yellow and/or greenish color, the machine should identify it as a <strong>banana</strong>.</p><p>If the fruit is small, oval shape that is light browned on the outer skin and bright green in the inner flesh, the machine should identify it as a <strong>kiwi</strong>.</p><p>Suppose we present this piece of fruit:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/276/0*Hs4Ma03AcXljox2a." /></figure><p>It will take note of the yellow color and long, cylindrical shape and based off its previous samples, will interpret the likelihood of this piece of fruit to be a banana. If we tell the machine that it is correct, the machine will reinforce its current predictive model, and make appropriate adjustments otherwise.</p><h3><strong>Regression</strong></h3><p>Let us look at an examples for supervised regression learning.</p><p>Say you have a house you want to sell, but you don’t know what it should be sold for. We don’t want it too low or too high, so we should find the median market value based on properties in the neighborhood with similar attributes.</p><p>We can take the existing house prices of your neighborhood and the total square footage of the house and and plot it on a graph.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/278/0*Ji51CHzf5ey_OHKo." /><figcaption>Graph of houses based on square feet. Photo credit by <a href="https://finalagito.github.io/2016/08/17/The-Linar-Regression-The-First-Step-Of-Machine-Learning/">https://finalagito.github.io/2016/08/17/The-Linar-Regression-The-First-Step-Of-Machine-Learning/</a></figcaption></figure><p>Calculate the median value and draw a line through the graph. Once you train the machine enough, it will be able to look at the square footage of your house and predict the best value for it.</p><h3>Unsupervised Learning</h3><p>In this form of machine learning, the machine is given data that has no label attached. Whereas in supervised learning we knew the “right answer”, the data in unsupervised are not as clear or simply unfeasible to label as correct or incorrect. The goal for the machine is to see if it can discover an informative pattern amongst different variables and observations.</p><p>The largest subclass of unsupervised learning is clustering, where a set of observations are put into subsets of one another, so that each cluster are similar in some sense. Let’s take a look at an example of clustering.</p><h3><strong>Clustering</strong></h3><p>You are planning to adopt a dog from the local shelter. As you prepare to welcome your new canine friend home, you go on an online retail store to browse for leashes, toys, and dog training book. The machine will take notice of your shopping behavior, and then based off existing customers in its database, it concluded that you probably own a dog. It will then recommend some additional dog products, including a crate and collar.</p><p>Say that on the same online retail store, you begin browsing for furnitures, such as accent chairs, under bed storage, pop art, and narrow bookcases. Based on these additional browsing habits, it may conclude that you are a young, urban professional, who will own a dog soon. It will cluster you with other people with similar backgrounds, and then recommend products that people within your cluster group will normally buy.</p><p>Originally, the machine had no concept of who you are and what are your attributes. But as it continues its observation, it becomes better at categorizing you and targeting specific campaigns.</p><h3>What is Neural Network</h3><p>Neural network is a popular methodology that is used to train the machine. It mimics the neural patterns of our own human brains. A basic artificial neural network consist of many neurons, which are microscopic units containing information. These neurons are arranged in a series of many layers, all connected to layers on either side of them — specially, the three main layers are the input units, output units, and hidden units.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/305/0*lc9imE9Fny6C64HL." /><figcaption>Anatomy of Neural Network. Photo credit by <a href="http://pacte-contre-hulot.info/?o=Recurrent+neural+network++Wikipedia">http://pacte-contre-hulot.info/?o=Recurrent+neural+network++Wikipedia</a></figcaption></figure><p>On one side is the <strong>input units</strong>, which are designed to receive various forms of information from the outside world that the network will attempt to learn about, recognize, or otherwise process.</p><p>On the opposite side of the network are the <strong>output units</strong>, which signals how it responds to the information it’s learned.</p><p>In between the input units and output units are one or more layers of <strong>hidden units</strong>, which, together, form the majority of the artificial brain.</p><p>To illustrate how these are all connected, let’s say that you are trying to analyze a handwritten number. For humans, we are pretty adept at recognizing the number, even if was sloppily written. The goal of the machine is to mimic that ability. But how?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/373/0*dWkeFM6HfkqTGLHl." /></figure><p>In the input layer, we have many neurons that will represent a single pixel in a 28x28 image of the number. Each neuron can hold a number between 0 to 1 corresponding to a grayscale gradient, with 0 as white and 1 as black. The connections between one unit and another are represented by a number called a <strong>weight</strong>. If one unit excites another, it will be considered positive. Otherwise, if one unit suppresses another, it will be considered negative. How sensitive the units are to the weight depends on many factors, including <strong>biases</strong>, which is the user’s gauge on how low the threshold is to reach a positive weight.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/788/1*AUNceFlU181XqYfWV6849w.png" /></figure><p>So if the input layer have activated positive weight, it will cascade to the next layer (in the hidden layer). There can be any number of hidden layers — it depends on what we’re training our machine to do. In this instance, it helps identify the different strokes that defines specific numbers — for example, two stacked loops of a number 8 can be broken down into smaller stroke patterns. The bias in this first hidden layer will help funnel out only positive weights that will activate these tiny stroke patterns in next hidden layer. This hidden layer will activate the next hidden layer … and so on and so forth. Since the nodes are aggregating and recombining features from all the previous layers, the further we advance into the neural net, the more capability of recognizing complex features.</p><p>Eventually, it will reach the output layer. In this neural network, there are only 10 neurons — numbers ranging from 0 to 9. When enough positive weight has been added up, it will form a number. The machine can then make conclusion about the number it thinks the image represents.</p><p>And that’s it! You’ve learned a few basics about machine learning — hope you enjoyed!</p><p>Sources:</p><p><a href="https://www.youtube.com/watch?v=aircAruvnKk">https://www.youtube.com/watch?v=aircAruvnKk</a></p><p><a href="http://www.explainthatstuff.com/introduction-to-neural-networks.html">http://www.explainthatstuff.com/introduction-to-neural-networks.html</a></p><p><a href="https://www.digitalocean.com/community/tutorials/an-introduction-to-machine-learning">https://www.digitalocean.com/community/tutorials/an-introduction-to-machine-learning</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=365807346774" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Python: Mutable vs Immutable object]]></title>
            <link>https://medium.com/@amy.tai0120/python-mutable-vs-immutable-object-d325303c409d?source=rss-41861d901135------2</link>
            <guid isPermaLink="false">https://medium.com/p/d325303c409d</guid>
            <category><![CDATA[programming]]></category>
            <dc:creator><![CDATA[Amy T]]></dc:creator>
            <pubDate>Thu, 10 May 2018 06:23:12 GMT</pubDate>
            <atom:updated>2018-05-10T16:07:44.737Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/750/1*bxOfMDpXbrn5BRx7LbRbqQ.png" /></figure><h3><strong>“Everything is an object.”</strong></h3><p>Though this may sound odd, it will make sense by the end of this article.</p><p>What the above phrase effectively mean is that all constructs of Python — whether it is classes, functions, values, modules — are objects.</p><p>Generally speaking, all objects can be passed as an argument to a function, or assigned to variables. They also have properties such as methods and attributes.</p><p>Normally, we think of variable as as containing a value. In Python, it is much more accurate to say that a ‘name’ is associated with a value. In other words, we are binding a name to an object.</p><pre>&gt;&gt;&gt; foo = 42</pre><p>In the above code, by assigning foo to 42, we are merely referring the object ‘42’ with the name ‘foo’.</p><h3><strong>Id and Type</strong></h3><pre>&gt;&gt;&gt; foo = 42<br>&gt;&gt;&gt; boo = 42</pre><p>What if we want to see whether two names are bound to the same object? On one hand, we can use the built-in method <strong>id() </strong>on name variable to check the identity, which is a unique and constant integer (conceptually similar to memory addresses in C).</p><pre>&gt;&gt;&gt; id(foo) = 10089600<br>&gt;&gt;&gt; id(boo) = 10089600</pre><p>We can also use the is operator to do a quick comparison — if it comes out True, they’re bound to the same object. If not, it’ll be False.</p><pre>&gt;&gt;&gt; foo is boo<br>True</pre><p>The built-in function <strong>type() </strong>returns the type of an object. Passing an object as the only parameter will return the type object of that object:</p><pre>&gt;&gt;&gt; coo = “beans”<br>&gt;&gt;&gt; type(coo)<br>&lt;class ‘str’&gt;</pre><h3><strong>What is a mutable object?</strong></h3><p>A mutable object simply refers to an object that can change its state, even after its creation.</p><p>The following are common mutable objects:</p><ul><li>List</li><li>Set</li><li>Dictionary</li><li>Bytearray</li><li>User-defined classes (unless specifically made immutable)</li></ul><p>Think of mutable objects like a person — he may have aged, got a nose job, and learnt to juggle professionally, but he is still nonetheless the same person. Given that logic, let say we make a list containing some food items.</p><pre>&gt;&gt;&gt; food = [‘sushi’, ‘burrito’, ‘avocado’]<br>&gt;&gt;&gt; id(food)<br>140711482234440</pre><p>Individually printing each item in the food list will show that they all point to different objects, and therefore have different object ids.</p><pre>&gt;&gt;&gt; id(food[0]), id(food[1]), id(food[2])<br>(140711474989408, 140711442663552, 140711442663608)</pre><p>Lets try adding another item to the list.</p><pre>&gt;&gt;&gt; food.append(‘mango’)<br>&gt;&gt;&gt; print(food)<br>[‘sushi’, ‘burrito’, ‘avocado’, ‘mango’]<br>&gt;&gt;&gt; id(food)<br>140711482234440 </pre><p>Here, we can see that the id of food did not change — it’s still the same list, but with reference to an extra object.</p><h3><strong>And Immutable Object?</strong></h3><p>Simply the opposite: an object whose state cannot be modified after it is created.</p><p>The following are common immutable objects:</p><ul><li>String</li><li>Integer</li><li>Float</li><li>Tuples</li><li>Complex</li><li>Bool</li><li>Frozenset</li><li>Bytes</li><li>Ranges</li></ul><p>Let us use the food list again, but this time, we’re going to refer to the first object in the list (in this case, “sushi”). We’re also going to create another name variable pointing to “sushi” as well.</p><pre>&gt;&gt; print(food[0])<br>‘sushi’<br>&gt;&gt;&gt; japan = ‘sushi’<br>&gt;&gt;&gt; print(japan)<br>‘sushi’<br>&gt;&gt;&gt; food[0] is japan<br>True</pre><p>But if we do this:</p><pre>&gt;&gt;&gt; japan += ‘ time’<br>&gt;&gt;&gt; print(japan)<br>‘sushi time’</pre><p>We have effectively change the object that japan was once pointing to a completely new object. Therefore, the id has also changed — and therefore should not be equal to food[0] anymore.</p><pre>&gt;&gt;&gt; food[0] is japan<br>False</pre><p>Because the string in the above example must allocate space for a new object, it is fundamentally more expensive than its mutable counterparts, which generally doesn’t require new allocation.</p><p>It is important to note that while tuples (amongst other containers in Python) are immutable, it may hold objects that are mutable. Conceptually, a tuple’s “value” is a sequence of names with unalterable bindings — we can’t alter the binding, but we can still alter the objects themselves.</p><h3><strong>Why does this matter?</strong></h3><p>Knowing when to use mutable objects and immutable objects is key to understanding data manipulation in Python. If we have a growing data set, it would be much easier to use mutable objects. However, the inflexibility of immutable types can be helpful if we know that we never want the object to change (unless of course, we use an operation on it).</p><h3><strong>How are objects passed to functions?</strong></h3><p>In Python, arguments are always passed to functions by reference. What this means though is that if the value of a name variable changes inside the scope of the function, it can affect the value of the caller. The nature of this behavior is different between the mutable and immutable object.</p><p>In immutable objects, a local copy of a name variable will be created and pointed to the same object as the caller, where it will then be manipulated to the function’s liking. After the function resolution, the local copy will be disposed. Any changes inside the function scope will not be reflected on the caller name variable.</p><pre>&gt;&gt;&gt; def increment(n):<br>        n += 1</pre><pre>&gt;&gt;&gt; a = 9<br>&gt;&gt;&gt; increment(a)<br>&gt;&gt;&gt; a<br>9</pre><p>In mutable objects, if the value of a mutable object changes within the function scope, it will reflect on the caller variable directly.</p><pre>&gt;&gt;&gt; def listy(l1, l2):<br>        l1.append(l2)</pre><pre>&gt;&gt;&gt; a = [1, 2]<br>&gt;&gt;&gt; b = [3, 4]<br>&gt;&gt;&gt; listy(a, b)<br>&gt;&gt;&gt; print(a)<br>[1, 2, [3, 4]]<br>&gt;&gt;&gt; print(b)<br>[3, 4]</pre><p>In the code above, we defined name variable a and b to lists. After we called the function listy, b was appended onto a. The second index of list a is now pointing to the values of b.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d325303c409d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Differences Between Static and Dynamic Libraries in C]]></title>
            <link>https://medium.com/@amy.tai0120/the-differences-between-static-and-dynamic-libraries-in-c-22dc070333d?source=rss-41861d901135------2</link>
            <guid isPermaLink="false">https://medium.com/p/22dc070333d</guid>
            <category><![CDATA[programming]]></category>
            <dc:creator><![CDATA[Amy T]]></dc:creator>
            <pubDate>Wed, 18 Apr 2018 07:43:52 GMT</pubDate>
            <atom:updated>2018-04-18T07:43:52.893Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hilg22gEBjZ9_8LoIwhaYg.jpeg" /></figure><p>Libraries are an essential part of programming — without it, we would have to write similar functions repetitively. But there is a difference between <strong>static</strong> and <strong>dynamic</strong> libraries.</p><p>Static linking will copy all the codes used in the program from the library modules into the compiling program. The actual linking is performed by programs called linkers as the last step in compiling a program.</p><p>In dynamic linking, the name of shared libraries are placed into an executable file while the actual linking happens at run time.</p><p>One of the advantage of using a dynamic library involves memory space — the shared library has but one copy kept in memory, which reduces the size of executable programs.</p><p>It is not uncommon for external programs to be changed — if that is the case, then static library would require recompilation and re-linking in order for it to update in the current executable file. With shared libraries, this is unnecessary.</p><p>Static libraries also have its own advantages: for one, programs using static libraries are arguably faster than programs using dynamic libraries. In addition, static libraries are less likely to run into compatibility issues.</p><h3>How to create a Dynamic Library?</h3><pre>gcc -c -fPIC *.c</pre><p>The above code will compile all .c files with the flag <strong>-fPIC (P</strong>osition <strong>I</strong>ndependent <strong>C</strong>ode), which means that the generated machine code will not be dependent on a specific address in order to work.</p><pre>gcc -shared -o liball.so *.o</pre><p>The object files can now be compiled into a dynamic library by taking all of the <strong>.o</strong> files and using the <strong>-shared</strong> flag to make it a shared object. The compiler identifies a library by looking for files beginning with ‘lib’ and ending with a library extension.</p><pre>nm -D liball.so</pre><p>We can use <strong>nm -D</strong> if we want to see the list of functions.</p><pre>export LD_LIBRARY_PATH=:$LD_LIBRARY_PATH</pre><p>In order for the program to successfully find the custom library, we need to add <strong>LD_LIBRARY_PATH</strong> as an environmental variable.</p><pre>$ gcc -L. -lall -o myfile.c main.c</pre><p>The above code compiles the shared library — ‘-L.’ indicates that the shared library is in the current directory, -lall to include all library files and to look for liball specifically.</p><h3>How to create a Static Library?</h3><pre>$ gcc -Wall -Werror -Wextra -pedantic -c *.c</pre><p>With this above command, all the .c extension files in the current working directory will be converted to object files. Only once we have the respective object files, we use then use the below command to create the library.</p><pre>$ ar -rc libname.a *.o</pre><p><em>The </em><strong><em>archiver</em></strong><em>, aka </em><strong><em>ar</em></strong><em>, creates, modifies, and extracts from archives. An archive is a single file holding a collection of other files in a structure that makes it possible to retrieve the original individual file.</em></p><p>The flag -c tells ar to create an archive. The flag -r inserts the member files and replaces older files where needed (in this particular case, the *.o files).</p><p>It may look as if we’re done, but wait! We still need to index our library with the command below.</p><pre>$ ranlib libname.a</pre><p><em>The index is necessary for listing each symbol and defining a member of an archive that is a relocatable object file. </em>This allows the library, which may have hundreds of of symbols, quickly find the respective reference symbol for your particular program.</p><p>Depending on the computer system, you may or may not need ranlib.</p><pre>$ gcc main.c -L. -lholberton -o main</pre><p>Once the command above is established, you can execute it by running ./main.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=22dc070333d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Static Libraries]]></title>
            <link>https://medium.com/@amy.tai0120/static-libraries-1c7d9c1bff6b?source=rss-41861d901135------2</link>
            <guid isPermaLink="false">https://medium.com/p/1c7d9c1bff6b</guid>
            <category><![CDATA[ios]]></category>
            <dc:creator><![CDATA[Amy T]]></dc:creator>
            <pubDate>Sun, 11 Feb 2018 19:15:49 GMT</pubDate>
            <atom:updated>2018-02-11T19:15:49.866Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/600/0*OWXfT6cXeXK20qdj.jpg" /></figure><p>One of the main jobs of linkers during compilation is to make certain functions available to your program to draw reference from. While there are two main methods of accomplishing this, we’ll only be talking about static libraries.</p><p>Static libraries, at the basic foundation, are a collection of object files that can be used as a single entity in a linking phase of a program. However, by taking pre-existing files and bundling them together, we are less likely to make redundant errors. This can help save time if you and your teammates are all working on a different portion of a project, but needs the same functions.</p><p><strong>Creating a Static Library</strong></p><pre>$ gcc -Wall -Werror -Wextra -pedantic -c *.c</pre><p>With this above command , all the .c extension files in the current working directory will be converted to object files. Only once we have the respective object files, we use then use the below command to create the library.</p><pre>$ ar -rc libname.a *.o</pre><p><em>The </em><strong><em>archiver</em></strong><em>, aka </em><strong><em>ar</em></strong><em>, creates, modifies, and extracts from archives. An archive is a single file holding a collection of other files in a structure that makes it possible to retrieve the original individual file.</em></p><p>The flag -c tells ar to create an archive. The flag -r inserts the member files and replaces older files where needed (in this particular case, the *.o files).</p><p>It may look as if we’re done, but wait! We still need to index our library with the command below.</p><pre>$ ranlib libname.a</pre><p><em>The index is necessary for listing each symbol and defining a member of an archive that is a relocatable object file. </em>This allows the library, which may have hundreds of of symbols, quickly find the respective reference symbol for your particular program.</p><p>Depending on the computer system, you may or may not need ranlib.</p><p>Now that our library is official, we can see the contents of the library by using the following command.</p><pre>$ ar -t libname.a</pre><p>This should get us something like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/453/1*VvKQOPejYSp0x-HUYslf7Q.png" /></figure><p>We can also see the symbols in the library by using the command nm. Once we run this command, it will lists each object file’s symbol value and symbol name.</p><pre>$ nm lib_test.a</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/681/1*QlonLDXRI-wpWhWqwrfgsA.png" /></figure><p>We have now successfully created and viewed the static library! Now how do we use it? In comes the next command!</p><pre>$ gcc main.c -L. -lholberton -o main</pre><p>Here, we use the flag -l&lt;libname&gt;, which adds the library’s name to the list of object file names passed to by the linker. The -L flag tells the linker the linker that the library might be found in the given directory. This is in addition to looking in the /home/tmp directory.</p><p>All we have to do now is run the executable program ‘main’…</p><pre>$./main</pre><p>… and we’re done! Thanks for reading!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1c7d9c1bff6b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Four Stages of Compilation]]></title>
            <link>https://medium.com/@amy.tai0120/the-four-stages-of-compilation-4f4c5691e7d2?source=rss-41861d901135------2</link>
            <guid isPermaLink="false">https://medium.com/p/4f4c5691e7d2</guid>
            <category><![CDATA[programming]]></category>
            <dc:creator><![CDATA[Amy T]]></dc:creator>
            <pubDate>Thu, 18 Jan 2018 07:19:11 GMT</pubDate>
            <atom:updated>2018-01-18T07:19:11.543Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/325/1*Umvg26qHme4G8hWjhxEUog.png" /></figure><p>It’s easy to simply run gcc and not bat an eyelid. However, under the hood, gcc is a complex process that provides a deep insight as to how the computer processor interprets source codes.</p><p>A compiler system that takes various programing languages and converts their respective codes into machine-readable codes. GCC — or GNU Compiler Collection — is the most commonly used compiler for C.</p><p>There are four main stages for a C program to become an executable file.</p><ol><li>Preprocessing</li><li>Compilation</li><li>Assembly</li><li>Linking</li></ol><h3><strong>1. Preprocessing</strong></h3><p>In this stage, the following tasks are performed:</p><ul><li>Process any preprocessor derivatives, which are lines included in a program that begin with ‘#’.</li><li>Remove comments and replace with space</li><li>Replace all macro names with its value</li></ul><p>Lets first look at the <em>main.c</em> file, which contains the following:</p><pre>#include &lt;stdio.h&gt;<br>#define STR &quot;C is fun!&quot;</pre><pre>int main(void)<br>{<br>/* Using macro to print the string */<br>   printf(STR);<br>   return (0);<br>}</pre><p>… and do the following command.</p><pre>$ gcc -E main.c</pre><p>The file <em>hello </em>will likely show the following:</p><pre>......<br>......<br>......<br>......</pre><pre>extern char *ctermid (char *__s) __attribute__ ((__nothrow__ , __leaf__));<br># 913 &quot;/usr/include/stdio.h&quot; 3 4<br>extern void flockfile (FILE *__stream) __attribute__ ((__nothrow__ , __leaf__));</pre><pre>extern int ftrylockfile (FILE *__stream) __attribute__ ((__nothrow__ , __leaf__)) ;</pre><pre>extern void funlockfile (FILE *__stream) __attribute__ ((__nothrow__ , __leaf__));<br># 943 &quot;/usr/include/stdio.h&quot; 3 4</pre><pre># 2 &quot;main.c&quot; 2</pre><pre>int main(void)<br>{</pre><pre>printf(&quot;C is fun!&quot;);<br> return (0);<br>}</pre><p>Although there is a plethora of information, the original codes are still present. Few other things have happened:</p><ul><li>Both the macro definition and usage has disappeared and replaced with the string it represented.</li><li>The comments have also disappeared.</li><li>#include has been expanded and included into the source file (hence the vomit of information prior to the main codes).</li></ul><h3><strong>2. Compilation Stage</strong></h3><p>In this stage, both the output of the preprocessor and the source codes are translated to assembly instructions. This steps makes the code so that it tailors to the user’s architecture.</p><p>When you write the command …</p><pre>$ gcc -S main.c</pre><p>… it will create a <em>main.o</em> file, which would look like the following:</p><pre>.file   &quot;main.c&quot;<br>        .section        .rodata<br>.LC0:<br>        .string &quot;C is fun!&quot;<br>        .text<br>        .globl  main<br>        .type   main, <a href="http://twitter.com/function">@function</a><br>main:<br>.LFB0:<br>        .cfi_startproc<br>        pushq   %rbp<br>        .cfi_def_cfa_offset 16<br>        .cfi_offset 6, -16<br>        movq    %rsp, %rbp<br>        .cfi_def_cfa_register 6<br>        movl    $.LC0, %edi<br>        movl    $0, %eax<br>        call    printf<br>        movl    $0, %eax<br>        popq    %rbp<br>        .cfi_def_cfa 7, 8<br>        ret<br>        .cfi_endproc<br>.LFE0:<br>        .size   main, .-main<br>        .ident  &quot;GCC: (Ubuntu 4.8.4-2ubuntu1~14.04.3) 4.8.4&quot;<br>        .section        .note.GNU-stack,&quot;&quot;,<a href="http://twitter.com/progbits">@progbits</a><br>...skipping...<br>        .file   &quot;main.c&quot;<br>        .section        .rodata<br>.LC0:<br>        .string &quot;C is fun!&quot;<br>        .text<br>        .globl  main<br>        .type   main, <a href="http://twitter.com/function">@function</a><br>main:<br>.LFB0:<br>        .cfi_startproc<br>        pushq   %rbp<br>        .cfi_def_cfa_offset 16<br>        .cfi_offset 6, -16<br>        movq    %rsp, %rbp<br>        .cfi_def_cfa_register 6<br>        movl    $.LC0, %edi<br>        movl    $0, %eax<br>        call    printf<br>        movl    $0, %eax<br>        popq    %rbp<br>        .cfi_def_cfa 7, 8<br>        ret<br>        .cfi_endproc<br>.LFE0:<br>        .size   main, .-main<br>        .ident  &quot;GCC: (Ubuntu 4.8.4-2ubuntu1~14.04.3) 4.8.4&quot;<br>        .section        .note.GNU-stack,&quot;&quot;,<a href="http://twitter.com/progbits">@progbits</a></pre><h3><strong>3. Assembly</strong></h3><p>During this stage, the assembler is used to translate the assembly instructions to machine code, or <em>object code</em>. While it is relatively unreadable to humans, it is perfectly comprehensible to a standard computer.</p><p>When you write the following command …</p><pre>$ gcc -c main.c</pre><p>… a file named <em>main.o </em>will be created. The contents of this file will be in binary format, therefore, it can only be inspected either of the following commands:</p><pre>$ hexdump main.o<br>$ od -c main.o </pre><p>The resulting file will look like this:</p><pre>......<br>......<br>......<br>......<br>0000000 457f 464c 0102 0001 0000 0000 0000 0000<br>0000010 0001 003e 0001 0000 0000 0000 0000 0000<br>0000020 0000 0000 0000 0000 0130 0000 0000 0000<br>0000030 0000 0000 0040 0000 0000 0040 000d 000a<br>0000040 4855 e589 00bf 0000 b800 0000 0000 00e8<br>0000050 0000 b800 0000 0000 c35d 2043 7369 6620<br>0000060 6e75 0021 4700 4343 203a 5528 7562 746e<br>0000070 2075 2e34 2e38 2d34 7532 7562 746e 3175<br>0000080 317e 2e34 3430 332e 2029 2e34 2e38 0034<br>0000090 0014 0000 0000 0000 7a01 0052 7801 0110<br>00000a0 0c1b 0807 0190 0000 001c 0000 001c 0000<br>00000b0 0000 0000 001a 0000 4100 100e 0286 0d43<br>00000c0 5506 070c 0008 0000 2e00 7973 746d 6261<br>00000d0 2e00 7473 7472 6261 2e00 6873 7473 7472<br>00000e0 6261 2e00 6572 616c 742e 7865 0074 642e<br>00000f0 7461 0061 622e 7373 2e00 6f72 6164 6174<br>0000100 2e00 6f63 6d6d 6e65 0074 6e2e 746f 2e65<br>0000110 4e47 2d55 7473 6361 006b 722e 6c65 2e61<br>0000120 6865 665f 6172 656d 0000 0000 0000 0000<br>0000130 0000 0000 0000 0000 0000 0000 0000 0000<br>*<br>......<br>......<br>......<br>......</pre><h3><strong>4. Linking</strong></h3><p>In this final step, the object files and libraries are combined together to produce a single, executable file. Any functions that have not been defined will be done in this stage.</p><p>When the command below is run…</p><pre>$ gcc main.c</pre><p>… a file <em>a.out</em> is created. This is now ready to be loaded into memory and executed by the computer system.</p><p>It is important to note that there are a difference between static libraries and dynamic libraries.</p><p>Static libraries are statically linked by making copy of all the library functions over to the object code, where it will be used to build the executable file.</p><p>Dynamic libraries are dynamically linked when the program is run. This is possible because the library is not hardwired into code, but instead are loaded into memory when the file is executed.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4f4c5691e7d2" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Hard Link vs Soft Link]]></title>
            <link>https://medium.com/@amy.tai0120/hard-link-vs-soft-link-d292e6b9a4dd?source=rss-41861d901135------2</link>
            <guid isPermaLink="false">https://medium.com/p/d292e6b9a4dd</guid>
            <category><![CDATA[design]]></category>
            <dc:creator><![CDATA[Amy T]]></dc:creator>
            <pubDate>Tue, 16 Jan 2018 05:08:25 GMT</pubDate>
            <atom:updated>2018-01-16T05:08:25.825Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/250/1*xabUoNMxUawpv-ZtLP1KsQ.png" /></figure><p>Hard Link acts like the mirror copy of the original file. When a hard link is created, both copies will have the same inode — a data structure that describes a filesytem object. Any changes that the user makes on the hard link will reflect on the original file, and vice versa.</p><p>Soft Link, on the other hand, is like a shortcut. It is, in essence, it brings the user to the original file. If the original file is deleted, than the soft link will fail. But because they share different inode, nothing will happen to the file if the soft link is deleted.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d292e6b9a4dd" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>