<?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 Harshana Samarasinghe on Medium]]></title>
        <description><![CDATA[Stories by Harshana Samarasinghe on Medium]]></description>
        <link>https://medium.com/@hsamarasinghe1998?source=rss-37c1ce87ea0------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*s_1rLwVHjr65keG2GrOSQQ.jpeg</url>
            <title>Stories by Harshana Samarasinghe on Medium</title>
            <link>https://medium.com/@hsamarasinghe1998?source=rss-37c1ce87ea0------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 06 Dec 2026 17:41:15 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@hsamarasinghe1998/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[Manual message acknowledge on kafka]]></title>
            <link>https://medium.com/@hsamarasinghe1998/manual-message-acknowledge-on-kafka-4083d4c4eaf7?source=rss-37c1ce87ea0------2</link>
            <guid isPermaLink="false">https://medium.com/p/4083d4c4eaf7</guid>
            <category><![CDATA[kafka]]></category>
            <category><![CDATA[java]]></category>
            <dc:creator><![CDATA[Harshana Samarasinghe]]></dc:creator>
            <pubDate>Wed, 06 Jul 2022 09:41:55 GMT</pubDate>
            <atom:updated>2022-07-06T09:41:55.766Z</atom:updated>
            <content:encoded><![CDATA[<p>AutoCommitThreshold: It sends the commit offset back to the server after ten messages have been received.</p><p>autoCommitInterval: Once every minute, the server commits.</p><p>When the auto commit setting is set to false, Kafka will not perform the commitment component, which immediately transmits. It has to be done manually.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/776/0*lWHopuw44hh9ayZL" /></figure><p>If this message is successful, the subject, the partition, and the offset will be obtained and sent back to the server.</p><p>If we insert the code below, all it does is receive the message and process it for one second.</p><p>When this is executed, all 10 messages are printed.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/650/0*tsodRa2BnbF5TlP6" /></figure><p>If we stop at message number six, Kafka will start over with message number five, print message number six, and then read, write, and print message number five again. The code has been modified as shown below in order to prevent displaying the last read message and printing from the break point.</p><p>Reprocessing will be avoided by doing this.</p><p>The server won’t get your heartbeat signal if our procedure takes longer than the session timeout. You’ll therefore be taken out of the cluster. The session timeout can be increased to resolve this, however there is a drawback if a consumer becomes dead since rebalancing will not occur until the session duration expires. Alternately, we may alter the code as follows.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/703/0*mWEUUI5SQ8Q3-UDM" /></figure><p>Heartbeat may be entered as an input, and then it can be called. It confirms the server’s existence. We can keep this alive without extending the session if we refer to it as a heartbeat during the procedure.</p><p>You should prepare yourself for receiving the same batch of messages repeatedly while using manual offset commits. You can fix this by turning off read/write access for that, however doing so causes the same notice to persist. If you keep receiving the same message, the latency will increase.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4083d4c4eaf7" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Async REST services with messaging]]></title>
            <link>https://medium.com/codex/async-rest-services-with-messaging-eaf4fc51a2e4?source=rss-37c1ce87ea0------2</link>
            <guid isPermaLink="false">https://medium.com/p/eaf4fc51a2e4</guid>
            <category><![CDATA[java]]></category>
            <category><![CDATA[kafka-consumer]]></category>
            <category><![CDATA[asynchronous]]></category>
            <dc:creator><![CDATA[Harshana Samarasinghe]]></dc:creator>
            <pubDate>Tue, 05 Jul 2022 12:31:48 GMT</pubDate>
            <atom:updated>2022-07-05T13:09:27.355Z</atom:updated>
            <content:encoded><![CDATA[<h4>Why do we need a messaging system?</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*ZwUrPMVgtUwmQfIu" /><figcaption>Photo by <a href="https://unsplash.com/@ninjason?utm_source=medium&amp;utm_medium=referral">Jason Leung</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>The majority of the time, we use asynchronous REST to create microservices. But HTTP, a synchronous protocol, is what we employed in this case. So, REST becomes synchronous when we use microservices. We employ a message method to get around this problem.</p><p>RabbitMQ</p><blockquote>Using que management protocol<br>Smart Broker-Routing, content-based routing in the broker</blockquote><p>Kafka</p><blockquote>Similar as the RabbitMQ but consider as stream processing system<br>Dumb Broker</blockquote><p>For routine queue management, as when we submit something to the queue, take the item that arrived first, process it, provide an output, and take the item that comes next, RabbitMQ is ideal.</p><p>When a message arrives at a queue used by Kafka, it copies the message to each queue in the set and can be directed to a specific queue. We choose the queue from the broker based on a few message attributes.</p><p>If anything happens, we may apply Kafka to notify others.</p><p>We have more data in the queue when we have a processing capacity of 10 messages per minute and a consumer processing speed of 15 seconds per message.</p><p>RabbitMQ — Circularly spread these messages to many customers. By expanding the number of consumers, we can accelerate this. If we have certain communications that take longer to process than others, the messages for lower consumers will require less time. Because it must wait for one message to be processed before processing the next, upper consumers form a queue. RabbitMQ will continue sending messages and building a queue even after your process is complete. Due to this, lesser consumers in this case become idle. When prefetch is set to 2, RabbitMQ’s fair dispatch feature, which uses prefetch, will delay sending messages until the first two messages are processed.</p><p>If a message is received by a consumer and cannot be processed right away, it is not in a queue and is not anywhere. In order to avoid using ACK, RabbitMQ tells when to delete the message and notifies the other party that they can remove the message since the message has finished processing.</p><p>Kafka — Kafka has a consumer group when taking into account the identical scenario as previously. Within a single topic, we can divide it into several sections. whenever we post a message on the subject. We start with a key, multiply it by the number of partitions, and then check to see which partition appears. We can ensure that the same customer’s message is sent into the same partition if we use our customer number as the key. This order is guaranteed to be in the division and not the subject. To make sure that each partition has its own consumer, we may take a consumer and direct it to listen to the partitions. Configuring a consumer group is what it is called. No should have fewer customers than or equal to the number of partitions. If we provide a message from a certain point, Kafka has a consumer offset and knows to give the following message from that point on.</p><p>We may utilize Kafka when RabbitMQ is required.</p><p>In Kafka, there is typically one topic and several partitions.</p><p>Each consumer in this setup is listening to each partition, but if we add more, the additional consumers will be idle. The number of consumers in a consumer group must be equal to or fewer than the number of partitions in a subject, according to a regulation. If we remove one active consumer, the additional partition begins to hear the partition.</p><p>There is no assurance of order between partitions in Kafka.</p><p>If we provide the producer the key, it will apply the mod algorithm to determine what to do depending on the key. The use of the same key ensured that all went to the same partition. The round robin method used by Kafka if the key is not provided is undesirable since it does not ensure that orders will be fulfilled for the same customer and across messages. We must define the key in order to ensure the order, but there is no order guarantee within the partition.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=eaf4fc51a2e4" width="1" height="1" alt=""><hr><p><a href="https://medium.com/codex/async-rest-services-with-messaging-eaf4fc51a2e4">Async REST services with messaging</a> was originally published in <a href="https://medium.com/codex">CodeX</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Modern JavaScript]]></title>
            <link>https://medium.com/codex/modern-javascript-e78bfae8bea5?source=rss-37c1ce87ea0------2</link>
            <guid isPermaLink="false">https://medium.com/p/e78bfae8bea5</guid>
            <category><![CDATA[destruction]]></category>
            <category><![CDATA[nodejs]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[programming-languages]]></category>
            <category><![CDATA[template]]></category>
            <dc:creator><![CDATA[Harshana Samarasinghe]]></dc:creator>
            <pubDate>Tue, 05 Jul 2022 10:41:08 GMT</pubDate>
            <atom:updated>2022-07-05T13:15:36.789Z</atom:updated>
            <content:encoded><![CDATA[<p>Let’s say that a variable is hidden outside of its defined boundaries. The k variable’s scope, in this case, is limited to the for a loop. Accessing variable k results in the error shown below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*j_rYSxaR9gFgSbsb" /></figure><p>If we use var in this case, it will print correctly without any errors, however, the scope of var makes it difficult to see errors in long pieces of code. Let ensures that an effect will occur inside of that {} code.</p><p>If const is used in place of var, the identical problem will occur if the variable is declared inside a for loop. When using const outside of a loop, we must initialize the const variable there in the declaration row in order to avoid errors.</p><p>Because const is initialized twice, once in line 1 and again in line 3, the code following produces an error.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*ZGxN3qa7ou2FTuQK" /></figure><p>Since scope affects the whole code from lines 1 through 8, using allow outside of the loop won’t result in an error.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*cy92mS-4vxuCWl88" /></figure><p><strong>Const only provides protection for variables that aren’t objects or arrays.</strong></p><p>As you can see below, after a const variable has been assigned, we are unable to give it a new value.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*whor8rEUFNiJjK65" /></figure><p>But we can use an array that is constant and add 2 or more values.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*tz1id-jSad_PcURT" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*VdELZunJ9yL2qWeF" /></figure><p>It doesn’t matter if it’s an object or an array; it can add to or modify the value of the constant variable.</p><p><strong>Arrow function in JavaScript</strong></p><p>Using an arrow, we can make a function simpler. If we are passing two arguments, then brackets are required; if we are just passing one parameter, then there is no need for brackets.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*zUJYsa89B2jG_Wvv" /></figure><p>This keyword inside a regular function represents the calling function if one is written. However, if we are using an arrow function, this term does not indicate the caller.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*PTXMQGzR6ZYvzfQ4" /></figure><p>Hint -: this doesn’t represent the caller.</p><p><strong>Object handling</strong></p><p>If we are unsure about the key at the time of execution, we may use a placeholder as the key thanks to dynamic properties.</p><p>Key is sometimes quite lively. When we transmit an item through service, we are unsure of what the key would be. Any content that is provided by the service can be assigned to the placeholder as shown below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*BDplJ8ECXQbcL_Jo" /></figure><p>As you can see, line 1 already has a value, hence SQRT2 doesn’t require a value. When the dynamic property is enabled, an error message appears.</p><p>If we are unsure of the value at the time of execution, we can use a placeholder as a key, as seen below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*v4Fh1WVcLZ8qoh4c" /></figure><p><strong>Freezing objects</strong></p><p>We may easily reassign a value to an object as seen below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*aPM6Z2iJx6ydRs9Q" /></figure><p>However, if we use the freeze method, the value of the second object does not change since, after freezing, the object retains its original value.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*NEJbs-7qbqhQodvH" /></figure><p>The item will get frozen as a result, rendering it unchangeable.</p><p>Use the freeze method if you want an object that moves from service to service or function to function but you don’t want to modify its value.</p><p>This freeze only affects first-level values; it has no effect on objects at inner levels.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*M2h6SxDOdFvNTFv_" /></figure><p>Name is the first-level variable, while t1 and t2 are second-level variables, as you can see. Only first-level variables, such as names, are subject to freezing. Thus, the name has not been altered. T1 alters since the freeze approach has no impact there.</p><p><strong>Template</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*WJjGaGK-p_qVFy2J" /></figure><p><strong>Override functions</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*UEtqqXCZnKpRr9QJ" /></figure><p>When the function is called through an object, we may override it with anything. Classes may have functions, but at runtime, we may choose to override them in overriding functions, for example.</p><p><strong>Destruct</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Nn34Pp2jp7Ev-CS_" /></figure><p>Instead of demonstrating here, we could just write PI and SQRT2 the same way we learned to do it in math class.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*NaG9u83Z2rO6WHJO" /></figure><p>When calculating area, we simply need a basis; no additional variables are required. We pass the object while supplying parameters, yet it calculates the area without any issues.</p><p>As you can see, when this is executed, two text files are created. Here, we have the option to disregard fs and just write it when using destruct.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/935/0*NAMBTaUutSfi5aaL" /></figure><p><strong>Promise</strong></p><p>Http GET occasionally connects to the server and requests a response, the code must be wrapped in a promise as seen below. This will trigger the promise when it is completed if it is wrapped in a promise.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*AGRJNJ09IMmex_fP" /></figure><p>This will result in undefined if the below function is used in place of the catch finally block. This is included within a promise object, but we first declare the length. Typically, we don’t wait for the outcome in this situation. This does not await the fulfillment of the promise.</p><p>This will return a promise object and wait until the promise is resolved by using the fetch web page. Once the promise was fulfilled, it moved on to the next one. If the await keyword is removed, it will become undefined.</p><p>The term “await” is only valid inside an async function. Removing the async keyword makes await ineffectively.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e78bfae8bea5" width="1" height="1" alt=""><hr><p><a href="https://medium.com/codex/modern-javascript-e78bfae8bea5">Modern JavaScript</a> was originally published in <a href="https://medium.com/codex">CodeX</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Garbage Collection Algorithms]]></title>
            <link>https://medium.com/codex/garbage-collection-algorithms-f7fa5df3eea?source=rss-37c1ce87ea0------2</link>
            <guid isPermaLink="false">https://medium.com/p/f7fa5df3eea</guid>
            <category><![CDATA[garbage-collector]]></category>
            <category><![CDATA[garbage-collection]]></category>
            <category><![CDATA[java]]></category>
            <dc:creator><![CDATA[Harshana Samarasinghe]]></dc:creator>
            <pubDate>Sat, 02 Jul 2022 06:33:25 GMT</pubDate>
            <atom:updated>2022-07-02T13:49:01.753Z</atom:updated>
            <content:encoded><![CDATA[<p>Garbage Collection means Automatic memory management is accomplished by garbage collection (GC). The garbage collector makes an effort to recover memory that the application allocated but is no longer referenced — also known as garbage.</p><p><strong>Mark</strong> — This shows which parts of the memory are being utilized and which parts are being left unused.</p><p><strong>Sweep</strong>: Removes the items that were marked in the Mark phase.</p><p>There are mainly 5 types of GC implementations.</p><ul><li>Serial Garbage Collector</li></ul><p>The garbage collection process is done here using a single thread. This serial garbage collection is enabled by default in a few modest hardware and operating system setups.</p><blockquote>The -XX:+UseSerialGC command can be used to explicitly activate this.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NMLs5b6UHyp_uEmllosyFA.png" /></figure><ul><li>Parallel Garbage Collector</li></ul><p>This accelerates garbage collection by using many threads. In Java 8 or previous versions, this GC is the default for server class computers.</p><blockquote>The command -XX:+UseParallelGC makes this possible.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JgDF1PfsxDTLyKck_ODJQQ.png" /></figure><ul><li>CMS Garbage Collector</li></ul><p>This works on certain pricey tasks alongside the application. By removing the lengthy delay that comes with a complete GC of parallel and serial collectors, this GC is optimized for low latency. This GC is no longer present in Java 14.</p><blockquote>-XX:+UseConcMarkSweepGC may get rid of the CMS collector.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qJyRVUUha5ukAAFCmybcmg.png" /></figure><ul><li>G1 Garbage Collector</li><li>Z Garbage Collector</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f7fa5df3eea" width="1" height="1" alt=""><hr><p><a href="https://medium.com/codex/garbage-collection-algorithms-f7fa5df3eea">Garbage Collection Algorithms</a> was originally published in <a href="https://medium.com/codex">CodeX</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Status Codes & HTTP headers]]></title>
            <link>https://medium.com/codex/status-codes-http-headers-b8af2b8f8d45?source=rss-37c1ce87ea0------2</link>
            <guid isPermaLink="false">https://medium.com/p/b8af2b8f8d45</guid>
            <category><![CDATA[java]]></category>
            <category><![CDATA[status-codes]]></category>
            <category><![CDATA[http-request]]></category>
            <dc:creator><![CDATA[Harshana Samarasinghe]]></dc:creator>
            <pubDate>Mon, 27 Jun 2022 06:22:18 GMT</pubDate>
            <atom:updated>2022-06-27T14:31:24.526Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*HujMQswBQ8nyMbJc" /><figcaption>Photo by <a href="https://unsplash.com/@suicide_chewbacca?utm_source=medium&amp;utm_medium=referral">Ashwini Chaudhary(Monty)</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p><strong>Status Code 101 (Switching Protocols)</strong></p><p>The requester has asked the server to switch protocols and the server has agreed to do so.</p><p><strong>Status Code 102 (Processing (WebDAV; RFC 2518))</strong></p><p>A WebDAV request may have several file operation-related sub-requests, which would take a while to finish. This code signifies that the request has been received and is being processed by the server. As a result, the client won’t time out and think the request was unsuccessful.</p><p><strong>Status Code 200 (OK)</strong></p><p>Depending on the request method used, the actual answer will vary. A response to a GET request will include an entity corresponding to the resource that was asked for. An entity describing or containing the action’s outcome will be included in the response to a POST request.</p><p><strong>Status Code 201 (Created)</strong></p><p>A new resource has been developed as a function of the request being approved.</p><p><strong>Status Code 207 Multi-Status (WebDAV; RFC 4918)</strong></p><p>According to how many sub-requests were made, the message body that follows by default is an XML message and may contain a number of separate response codes.</p><p><strong>Status Code 301 (Moved Permanently)</strong></p><p>Send this and any upcoming requests to the provided URI.</p><p><strong>Status Code 303 (See Other (since HTTP/1.1))</strong></p><p>By using GET technique, the response to the request can be retrieved under a different URI. The client should assume that the server has received the data when it is returned in response to a POST (or PUT/DELETE) and should send a new GET request to the specified URI.</p><p><strong>Status Code 305 (Use Proxy (since HTTP/1.1))</strong></p><p>The result contains the proxy’s address because that is the only way to access the requested resource. Many HTTP clients (including Mozilla Firefox and Internet Explorer) reject this status code for security concerns.The result contains the proxy’s address because that is the only way to access the requested resource. Many HTTP clients (including Mozilla Firefox and Internet Explorer) reject this status code for security concerns.</p><p><strong>Status Code 306 (Switch Proxy)</strong></p><p>Subsequent requests should utilize the chosen proxy, as was the original intent.</p><p><strong>Status Code 307 (Temporary Redirect (since HTTP/1.1))</strong></p><p>The request should be sent again with a different URI, but subsequent requests should continue to utilize the first URI. When republishing the original request, the request method cannot be modified, in contrast to how 302 was previously done. Using another POST request as an illustration, a POST request should be repeated.</p><p><strong>Status Code 403 (Forbidden)</strong></p><p>The server verified the request’s validity and that it made sense, but it is delaying taking any further action. This may be as a result of the user not having the required rights for a resource, needing some form of account, or doing an illegal action (e.g. creating a duplicate record where only one is allowed). This number is also frequently used when the server rejects authentication that was supplied in response to the WWW-Authenticate header field challenge. Don’t make the request again.</p><p><strong>Status Code 404 (Not Found)</strong></p><p>The requested resource was not found, but it could become available later. The user is free to make further requirements.</p><p><strong>Status Code 505 (HTTP Version Not Supported)</strong></p><p>The HTTP protocol version that was used in the request is not supported by the server.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b8af2b8f8d45" width="1" height="1" alt=""><hr><p><a href="https://medium.com/codex/status-codes-http-headers-b8af2b8f8d45">Status Codes &amp; HTTP headers</a> was originally published in <a href="https://medium.com/codex">CodeX</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Floating Point Error]]></title>
            <link>https://medium.com/@hsamarasinghe1998/floating-point-error-631386597dbc?source=rss-37c1ce87ea0------2</link>
            <guid isPermaLink="false">https://medium.com/p/631386597dbc</guid>
            <category><![CDATA[java]]></category>
            <category><![CDATA[floating-points]]></category>
            <category><![CDATA[floating-point-error]]></category>
            <dc:creator><![CDATA[Harshana Samarasinghe]]></dc:creator>
            <pubDate>Fri, 24 Jun 2022 09:56:27 GMT</pubDate>
            <atom:updated>2022-06-24T09:56:27.352Z</atom:updated>
            <content:encoded><![CDATA[<p>Computers use IEEE 754 standard to represent the floating point.</p><p>In the IEEE standard, the first bit represents the sign bit, with 0 denoting plus and 1 denoting negative.</p><p>The exponent in this case is 2 to the power 3.</p><p>Normally, this exponent is represented by 8 bits. Its possible values are -128 to +127. Exponent bias is the +127 in question.</p><p>The outcome of adding these 3 (2 to the power of 3) for 127 is 130. The 8 bits that now represent 130.</p><p>If you convert 130 to binary, you get 10000010</p><p>Put the sign bit (plus, which signifies 0) first.</p><p>then enter 10000010 for the exponent.</p><p>After that, add the scientific notation. We enter what is on the left side of the decimal point instead of 1 because SN always begins with 1.</p><p>Using the notation 01000001000100011001100110011001 in IEEE 9.1,</p><p>This 9.1 in this format will run on all current CPUs.</p><p>However, if we convert this 9.1 to binary using an IEEE 754 standard calculator, the final six digits will appear as 011010 rather than 011001. The floating point rounding issue is the name given to this mistake. This may result in significant calculating and relationship issues.</p><p>Floating point rounding error</p><p>As an example (00100011001100110011001), the computer searches for the 24th bit when it has 23 bits. A 1 is added at the end if the value of 24 is 1, and 0 is ignored. Technically, 1 is 24 in the previous pattern. (001000110011001100110011) As a result, we must multiply 11001 by 1 to get 11010.</p><blockquote>11001 + 1 = 11010</blockquote><p>Fix the floating point issue and restore the value to its original state.</p><p>By multiplying it by the following, we must determine the value of mantissa (the final 23 bits).</p><blockquote>2^-1 to 2^-23</blockquote><p>Add the mantissa value to each 1 and multiply. The value of 0.137500048 will be shown at the conclusion. We must add that 1 to this value after removing 1 from the beginning of the scientific notation.</p><blockquote>0.137500048 + 1 = 1.137500048 x 2³</blockquote><p>-The result of 9.10000038. 9.1 was the initial amount that we translated, however this time it gave us 9.10000038. This is the result of the rounding we performed.-</p><p>As the solution uses an appropriate data type and uses BigDecimal in Java.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=631386597dbc" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[JAVA Virtual Machine]]></title>
            <link>https://medium.com/codex/java-virtual-machine-e3098cb18b7b?source=rss-37c1ce87ea0------2</link>
            <guid isPermaLink="false">https://medium.com/p/e3098cb18b7b</guid>
            <category><![CDATA[jvm]]></category>
            <category><![CDATA[jav]]></category>
            <dc:creator><![CDATA[Harshana Samarasinghe]]></dc:creator>
            <pubDate>Thu, 16 Jun 2022 04:57:50 GMT</pubDate>
            <atom:updated>2022-06-24T14:52:40.611Z</atom:updated>
            <content:encoded><![CDATA[<p>Virtual is not in reality, so it is a simulation of an environment that appears to be real to the user.</p><p>Virtual machines are computer architectures that give the same functionality as a physical computer. Specialized hardware, software, or a combination of both may be used in their implementations.</p><p>A Java virtual machine is a virtual machine that allows a computer to run Java applications as well as other languages that have been compiled to Java bytecode.</p><p>In the Virtual Machines we can describe it as two parts;</p><p><strong>1.SVM — System Based Virtual Machine</strong></p><p>SVM contains real hardware that creates an environment that allows numerous users or instances to operate at the same time. Because there are several environments, each one is self-contained.</p><p>Ex-: VMWare, Xen.</p><p><strong>2.AVM — Application Based Virtual Machine</strong></p><p>There is no physical hardware in these Virtual Machines, unlike SVMs. Instead, it has a practical use. This application aids in the creation of a platform that allows other apps to operate. This platform takes some inputs and converts them into a variety of outputs or a language that everybody can comprehend. Approach Based Virtual Machine is the name given to it as a result of this process.</p><p>Ex:- JVM, PVM</p><p>This Application Based Virtual Machine includes JVM. It is a specification that explains how things should be done.</p><p>We can’t get this JVM directly from the internet since it doesn’t exist in the real world, but it comes with the JAVA Runtime Environment(JRE), which we can readily get from the internet. When we install the JRE on our computer, it installs the essential code to set up the JVM.</p><p>Platform independence is a feature of JAVA, however platform dependency is a feature of JRE.</p><p>When we launch a JAVA program, the JVM reads the class files and converts them into a language that the operating system understands.</p><p><strong>Creating of JVM</strong></p><p>When we start a program, it creates a JVM instance on the computer, and when we exit the application, the JVM instance dies.</p><p>When we execute two or more applications at the same time, each of them has its own Java Virtual Machine (JVM).</p><p>It creates a non-demon thread once the JVM instance is created. A public static main method exists in every Java application. This previously constructed JVM instance continues to execute the Java application using this main function. We now have a demon thread with the ability to create non-demon threads.</p><p><strong>Ways of destroy the JVM instance</strong></p><p>If there are no non-demon threads in the program, it signifies that we have killed all of the non-demon threads we have produced. After that, the JVM instance will expire on its own.</p><p>The system exit mechanism is invoked.</p><p><strong>JDK — Java Development Kit</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/636/0*nepfdGEQI2gAVWxO" /></figure><p>JVM is a component of the Java Runtime Environment (JRE). There are three key components in this JVM.</p><ul><li>Class Loader — load</li><li>Memory Area — store</li><li>Execution Engine — execute</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/960/0*dYJ-psf6NDHBi-Zx" /></figure><p>Memory has 5 main parts;</p><p>Method Area — When loading in a JVM, this loads the class information.</p><p>Heap Area — After loading in a JVM This is where all of the object data is collected..</p><p>Stack — It maintains the method information as well as the local variables in a thread.</p><p>PC register — If a non-native method is executed, this will save information about the next execution in a thread.</p><p>Native Method area — This allows native methods to be stored in a thread.</p><p><strong>JVM data types</strong></p><p>Types in Java are divided into two categories;</p><ul><li>primitive types</li></ul><p>Ex-: boolean , byte , char , short , int , long , float and double</p><ul><li>reference types</li></ul><p>Ex-:classes, which specify the types of objects and all others.</p><p><strong>Word Size</strong></p><p>In the JVM, a word size is 32 bits long. There are just a few primitive data types in the JVM: byte (8 bits), short (16 bits), int (32 bits), long (64 bits), float (32 bits), double (64 bits), and char (32 bits) (16 bits).</p><p><strong>Class Loader</strong></p><p>Class loaders are in charge of dynamically loading Java classes into the JVM at runtime. They’re also included in the JRE (Java Runtime Environment). As a result, owing to class loaders, the JVM doesn’t need to know about the underlying files or file systems in order to run Java programs.</p><p><strong>There are 4 ways which java initialize a class</strong></p><p>Use a new keyword — To assign a value to each variable.</p><p>Use clone method from existing object — To duplicate an existing object.</p><p>Use reflection API (getInstance() method) — After you complete the setup, the variables will be assigned an initial value.</p><p>IO.ObjectInputStream() with this class and can get an object — Assign a value for the non-transient variable from the input stream.</p><p><strong>How java go through constructor and instantiating parent class</strong></p><p>When this code is compiled, the JVM generates an init() function for each constructor. What happens inside the constructor determines(depends) what happens inside the init() procedure. If the constructor(child class) contains nothing, the init method has the authority to call the default constructor of the parent class(human).</p><p><strong>This init function might include three different types of code.</strong></p><ul><li>Invoke some other constructors init method</li><li>Initialize instance variables.</li><li>has bytecodes to particular implementation</li></ul><p><strong>JVM Arguments/ JAVA Classpath</strong></p><p>JVM arguments are flags that are passed to the Java Virtual Machine at the time the application is launched. On Linux or Mac machines, they can be provided through the JAVA_OPTS setting in the whd.conf file.</p><p><strong>output — prints the content in a/Application.java</strong></p><p>If we change the class path by putting Application.java in the “b” directory and then putting Application.java in the “a” directory, we will get the desired result.</p><p><strong>Conclusion</strong></p><p>If we have two identical classes on the classpath, JVM takes the first one into account. The first class in the classpath is the one that the JVM will run. When we are provided JVM Arguments, this changes; in such cases, JVM takes the final class on the class path.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e3098cb18b7b" width="1" height="1" alt=""><hr><p><a href="https://medium.com/codex/java-virtual-machine-e3098cb18b7b">JAVA Virtual Machine</a> was originally published in <a href="https://medium.com/codex">CodeX</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Chapter 15]]></title>
            <link>https://medium.com/codex/chapter-15-3fc57dde2a58?source=rss-37c1ce87ea0------2</link>
            <guid isPermaLink="false">https://medium.com/p/3fc57dde2a58</guid>
            <category><![CDATA[threading-in-java]]></category>
            <category><![CDATA[networking]]></category>
            <category><![CDATA[java]]></category>
            <dc:creator><![CDATA[Harshana Samarasinghe]]></dc:creator>
            <pubDate>Mon, 13 Jun 2022 07:31:54 GMT</pubDate>
            <atom:updated>2022-06-24T14:52:46.451Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>Networking and Threads Networking and Threads</strong></p><p><strong>-Connecting, Sending, and Receiving-</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/582/0*otZIeBSA39wqW9ue" /></figure><p>We need a socket connection to join two computers together. A socket is a network object that represents a connection between two computers. The class is Java.net.socket. To build a socket connection, we need to know two things: the IP address, which tells us who we’re talking to, and the TCP port numbers, which tell us which port we’re talking to.</p><p>1. The client establishes a socket connection with the server.</p><p>2. The client communicates with the server.</p><p>3. The client receives a message from the server.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/633/0*3WYI9MirU0KgBNaG" /></figure><p>The TCP port number is a 16-bit number that identifies a certain server software. Some critical services use TCP ports 0 through 1023. As a chat server, we can use any port number between 1024 and 65535.</p><p><strong>To read data from a socket.</strong></p><p><strong>1.Make a Socket connection to the server</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/740/0*0twCcjnUGzyJm0_f" /></figure><p><strong>2.Make an Input Stream Reader chained to the Socket’s low-level (connection) input stream.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/779/0*_YvFjLH9Q5pNa-K7" /></figure><p><strong>3.Make a Buffered Reader and read!</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/781/0*YbVJKx_KuNsKDEPK" /></figure><p>Input stream reader acts like a bridge which takes in bytes and converts them into text data.</p><p><strong>To write data to a socket.</strong></p><p><strong>1.Make a Socket connection to the server</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/732/0*qW4APRVaquUFAvaF" /></figure><p><strong>2.Make a Print Writer chained to the Socket’s low-level (connection) output stream</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/699/0*kP2uzRxlDKKocAns" /></figure><p><strong>3.Write (print) something</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/680/0*jF4LTvxhfk5NfFZA" /></figure><p><strong>Writing a simple server</strong></p><p><strong>-Working Process-</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/749/0*X6J4AeeU81c5NftQ" /></figure><p><strong>Multithreading in Java</strong></p><p>Multiple threading is embedded into the structure of the Java language. It’s also simple to start a new execution thread.</p><blockquote><strong>Thread t = new Thread();</strong></blockquote><blockquote><strong>t.start();</strong></blockquote><p><strong>Except for one problem.</strong></p><p>Because the thread doesn’t actually perform anything, it “dies” almost as soon as it is created. When a thread dies, the new stack it created vanishes. The narrative comes to a close.</p><p>Runnable to a thread denotes the possibility of completing a task. The work that a thread is expected to do is called a runnable. The methods that go at the bottom of the new thread stack are stored in Runnable.</p><p>The thread scheduler’s job is to decide which threads should run and which should not. After then, one thread will be allowed to operate while the other is starved.</p><p>Other threads can get a chance to run if a thread is put to sleep. When the thread returns to a runnable state, the thread scheduler will pick it to run again.</p><p>The synchronized keyword indicates that a key is required for a thread to access the synchronized code.</p><p>A lock and a key are both present in a Java object. Objects are frequently unlocked without anyone being aware of it. If an object has synchronized methods, a thread can only access one of those methods if the object’s key is accessible. It will not function if the key has been seized by another thread.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*WS47yo6NfGaaBoUy" /></figure><p>The set name method may be used to name a thread.</p><p>Data corruption occurs when two or more threads access the same item. This may be avoided by using synchronized keywords.</p><p>There is only one key, even if an object contains several synchronized methods. No thread can enter another synchronized method on the same object once it has entered a synchronized method on it. This limitation allows you to safeguard your data by synchronizing any data manipulation methods.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3fc57dde2a58" width="1" height="1" alt=""><hr><p><a href="https://medium.com/codex/chapter-15-3fc57dde2a58">Chapter 15</a> was originally published in <a href="https://medium.com/codex">CodeX</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Chapter 14]]></title>
            <link>https://medium.com/codex/chapter-14-d54f1e7eb9df?source=rss-37c1ce87ea0------2</link>
            <guid isPermaLink="false">https://medium.com/p/d54f1e7eb9df</guid>
            <category><![CDATA[file-io]]></category>
            <category><![CDATA[file-handling]]></category>
            <category><![CDATA[serialization]]></category>
            <category><![CDATA[java]]></category>
            <dc:creator><![CDATA[Harshana Samarasinghe]]></dc:creator>
            <pubDate>Mon, 25 Apr 2022 23:21:11 GMT</pubDate>
            <atom:updated>2022-06-24T14:52:50.735Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>Serialization and File I/O</strong></p><p><strong>-Capture the Pattern-</strong></p><p><strong>If your data is simply going to be used by the Java application that created it:</strong></p><p><strong>01. Use serialization</strong></p><p>Create a file with flattened (serialized) objects in it. Then have your software read the serialized objects from the file and inflate them back into heap-inhabiting objects.</p><p><strong>If your data will be used by other programs:</strong></p><p><strong>02.Write a plain text file</strong></p><p>Create a file with delimiters that can be parsed by other applications. For instance, a tab-delimited file that may be read by a spreadsheet or database program.</p><p><strong>Writing a serialized object to a file</strong></p><p><strong>1. Make a File Output Stream</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/731/0*fZYfLG4Gu6sgOoro" /></figure><p><strong>2.Make an Object Output Stream</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/614/0*APIb3USRo0OIdfh7" /></figure><p><strong>3.Write the object</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/678/0*RCl5Ze1nP5MVOs1p" /></figure><p><strong>4.Close the Object Output Stream</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/464/0*ucdKv2t_UbgXnjc_" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/786/0*Tuw6fsTES2hqRp_s" /><figcaption>Data moves in streams from one place to another.</figcaption></figure><ul><li>Objects in a heap have a state and a value for the object’s instance variable. As a result, instances of the same class are different.</li><li>The value of instance variables is saved in serialized objects. As a result, equal objects can be added to the heap.</li><li>When an item is serialized, it refers to objects that are stored in the instance variables. Those objects, as well as the objects to which they refer, are both serialized.</li></ul><p>We can create a class serializable by implementing serializable in it.</p><p>If a superclass is serializable, the subclasses will be serialized or implement serializable automatically.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/774/0*qV5gy8LdEj4TyuPq" /></figure><ul><li>If the state of certain objects was not stored properly because the full object graph was serialized correctly or serialization failed.</li><li>If you can’t save an instance variable because it’s not serializable, use the transitory keyword. By using a serializable process, you may avoid having to deal with that variable.</li></ul><p><strong>Deserialization: restoring an object</strong></p><p><strong>1.Make a File Input Stream</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/728/0*xY-IIoXUhlM9lR8K" /></figure><p><strong>2.Make an Object Input Stream</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/580/0*g-qMdq3OFYGO32ao" /></figure><p><strong>3.Read the objects</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/667/0*tg0fEf11ZiDOwM-A" /></figure><p><strong>4.Cast the objects</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/675/0*p4e7yUh5mBXnpYtq" /></figure><p><strong>5.Close the Object Input Stream</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/445/0*l-AuicGcB5_hXnQs" /></figure><p>When an object is deserialized, the JVM attempts to re-serialize it by creating a new object on the heap with the same state as the original serialized object.</p><p>1. Object is read from stream</p><p>2. JVM determine object class type</p><p>3. Then it try to find and load object class if not then jvm throws an exception</p><p>4. A new object is given space on the heap.</p><p>5. If an object has a non serializable class in the inheritance tree then the constructor for that will run along with the constructors that above it. After constructor chaining happens then all super classes which are non serialized will reinitialize their state.</p><p>6. Object instance variables are given the value from the serialized state.</p><p>Static variables are not serialized.</p><p><strong>-The java.io.File class-</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/0*i62X0N3DnPRP9Sw5" /></figure><p><strong>Quiz Card Builder (code outline)</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/764/0*LumwlWPvjPiWF4O7" /></figure><p>The file on the disk is represented by the Java.io.file class. It represents the file directory’s name and path, and it prevents access to the data in that file. The following are some of the things we can perform with a file object.</p><p><strong>Writing a String to a Text File</strong></p><p><strong>1.Make a File object representing an existing file</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/246/0*KvxgRqQ5dzOdEYDR" /></figure><p><strong>2.Make a new directory</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/242/0*uC7Sr0Y9y7XO4A8K" /></figure><p><strong>3.List the contents of a directory</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/379/0*wplHNYKuXIQs_xqz" /></figure><p><strong>4.Get the absolute path of a file or directory</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/315/0*om60d47JbvDLiw3-" /></figure><p><strong>5.Delete a file or directory (returns true if successful)</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/237/0*zrtlixTc-7vy1xDi" /></figure><ul><li>We may start reading a text file by using a file reader connection stream.</li><li>To split a string into separate tokens, use the String split() function.</li><li>When an object is serialized, the object’s class is assigned a version id number. Serial Version UID is the name of this id.</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d54f1e7eb9df" width="1" height="1" alt=""><hr><p><a href="https://medium.com/codex/chapter-14-d54f1e7eb9df">Chapter 14</a> was originally published in <a href="https://medium.com/codex">CodeX</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Chapter 13]]></title>
            <link>https://medium.com/codex/chapter-13-e008000dfd7d?source=rss-37c1ce87ea0------2</link>
            <guid isPermaLink="false">https://medium.com/p/e008000dfd7d</guid>
            <category><![CDATA[java-swing]]></category>
            <category><![CDATA[java]]></category>
            <category><![CDATA[gui]]></category>
            <category><![CDATA[event-handlers]]></category>
            <category><![CDATA[jframe]]></category>
            <dc:creator><![CDATA[Harshana Samarasinghe]]></dc:creator>
            <pubDate>Sat, 23 Apr 2022 11:14:55 GMT</pubDate>
            <atom:updated>2022-06-24T14:55:32.308Z</atom:updated>
            <content:encoded><![CDATA[<h3>Using Swing</h3><p>A swing component is a widget. Components that extend from javax.swing.Jcomponent include text fields, buttons, scrollable lists, and radio buttons.</p><p>The components contained within the component with which the layout manager is linked are controlled by the layout manager. The frame’s layout manager controls the panel’s size and positioning.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/740/0*7bIUEzbTzFUBK8bt" /></figure><p><strong>How does the layout manager decide?</strong></p><p><strong>A layout scenario:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/432/0*XsreAEcBHs-PNepy" /></figure><p><strong>Let’s add a button to the east region:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/545/0*fSIEV4MgZ_V84w2e" /></figure><p>Divide the background into five parts using the border layout. Each area can have one component. Components in the north and south are given preference for height rather than width. Components in the east and west are prioritized for width rather than height. Whatever is left goes to the component in the middle. Divide the backdrop into five parts using the border layout. Each area can have one component. Components in the north and south are given preference for height rather than width. Components in the east and west are prioritized for width rather than height. Whatever is left goes to the component in the middle. Divide the background into five parts using the border layout. Each area can have one component. Components in the north and south are given preference for height rather than width. Components in the east and west are prioritized for width rather than height. Whatever is left goes to the component in the middle. Divide the backdrop into five parts using the border layout. Each area can have one component. Components in the north and south are given preference for height rather than width. Components in the east and west are prioritized for width rather than height. Whatever is left goes to the component in the middle.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/604/0*QKPCTVXzIoh2O0ek" /></figure><p><strong>Flow layout:</strong> arrange components from left to right, top to bottom, in the order in which they were introduced. If the components don’t fit horizontally, wrap them into a new line.</p><p><strong>Box layout:</strong> Components may be stacked vertically using a box layout. You may use this to create a kind of component return key, forcing components to start a new line. You may force a component to be in a new line even if there is space.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/783/0*l1fiZbXWyfs96ygW" /></figure><p><strong>BoxLayout forces a ‘newline’ to make the components wrap to the next line.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/707/0*FI-dl3YJmCQtBYLY" /></figure><p><strong>Swing components</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/646/0*CqhgAwUJp2TvpB7Z" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/593/0*a885SNNeha6rD3Tg" /></figure><h4><strong>JTextArea</strong></h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/662/0*jsyGYr7HoDhe245e" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/783/0*wIRZJNfqOxH87mlR" /></figure><h4><strong>JCheckBox</strong></h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/486/0*Whxb7NLyXGOLTsRK" /></figure><h4><strong>JList</strong></h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/742/0*MCS2ltftpejToaZG" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/776/0*nguzO9raOlGjmtuG" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e008000dfd7d" width="1" height="1" alt=""><hr><p><a href="https://medium.com/codex/chapter-13-e008000dfd7d">Chapter 13</a> was originally published in <a href="https://medium.com/codex">CodeX</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>