<?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 Ishaal Ali on Medium]]></title>
        <description><![CDATA[Stories by Ishaal Ali on Medium]]></description>
        <link>https://medium.com/@ishaalali?source=rss-99f2b3c28c5d------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*Zn8_poMYoklwkcQN</url>
            <title>Stories by Ishaal Ali on Medium</title>
            <link>https://medium.com/@ishaalali?source=rss-99f2b3c28c5d------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 21 Nov 2026 05:24:49 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@ishaalali/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[The Misconceptions of Nuclear Energy]]></title>
            <link>https://studentsxstudents.com/the-misconceptions-of-nuclear-energy-81419117584?source=rss-99f2b3c28c5d------2</link>
            <guid isPermaLink="false">https://medium.com/p/81419117584</guid>
            <category><![CDATA[enjoy-writing]]></category>
            <category><![CDATA[world]]></category>
            <dc:creator><![CDATA[Ishaal Ali]]></dc:creator>
            <pubDate>Tue, 22 Nov 2022 13:08:31 GMT</pubDate>
            <atom:updated>2022-11-22T13:08:31.663Z</atom:updated>
            <content:encoded><![CDATA[<p><strong><em>Nuclear.</em></strong></p><p>Take a couple seconds to think about the word.</p><p>What image comes to your head?</p><p>An eruption of fire burning cities to the ground? Or maybe an explosion destroying families?</p><p>When most people think of the word nuclear, the first things that come to mind are ‘<strong><em>explosion</em></strong>’ and ‘<strong><em>dangerous</em></strong>’. And while these thoughts may be justified, nuclear can be used to create something a lot more beautiful: <strong>energy</strong>.</p><p>In this article I’ll be explaining everything about nuclear energy; from the process used to generate it, to debunking the myths surrounding it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*HwdypDC4Lzal4c9e.jpeg" /><figcaption>Source: <a href="http://unsplash.com/">unsplash.com</a>, Jeff Kingma</figcaption></figure><p><strong>Article Outline</strong></p><ul><li>What is Nuclear Energy?</li><li>Debunking Myths on Nuclear Energy</li><li>Why Isn’t it Already Widespread?</li><li>Future of Nuclear Energy</li><li>Key Takeaways</li><li>Resources</li></ul><h3>What is Nuclear Energy?</h3><p>All matter is made up of atoms. Atoms consist of neutrons, protons, and electrons. Electrons are negatively charged, protons are positively charged and neutrons do not have any charge. Neutrons and protons are found in the centre of the atom forming the nucleus. When the nucleus of an atom is excited by a neutron colliding with it at slow speed, the nucleus splits into smaller nuclei, releasing some energy in the process.</p><p>The process of breaking up the nucleus of an atom is called fission, and the energy generated in this process is called nuclear energy. This nuclear energy can be used to generate electricity. Many things can be done with this electricity, from powering homes to hospitals to schools.</p><p>Using nuclear energy to generate electricity isn’t new; in fact many countries are trying to harness nuclear energy to turn into electricity right now. According to <em>National Geographic</em>, the first nuclear reactor to produce electricity was built in Idaho, in 1951. The first nuclear power plant designed to power a community was located in Russia, in 1945. The process from converting atoms to energy is quite intriguing, and worth mentioning.</p><h4>How Does it Work?</h4><p>As stated earlier, Nuclear energy comes from a process called <strong>fission</strong>. To generate energy using fission, atoms are split in a nuclear reactor to generate heat (or small amounts of energy in general). The number of neutrons being released in the process and their speed need to be controlled in the nuclear reactor. If the process is not controlled, the chain reaction could release a very large amount of energy in a short amount of time — which is what happens in a nuclear bomb!</p><p>The image below shows a simplified process of Nuclear Fission. This image does not show the process being controlled by a moderator that controls the speed of the reaction, but in reality, a moderator is used in the reactor. In many cases, the moderator is water.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*yrF9DIRBx1uniLXH" /><figcaption>Source: IAEA, What is Nuclear Energy?</figcaption></figure><p>This fission process eventually creates steam, which can then be used by a generator to <strong>create electricity. </strong>This electricity, in turn, can then be used to power large communities. A huge benefit from the steam being used in this process, is how it can be recycled by being cooled down and turned into water. This water can then be recycled and turned into steam again in the next cycle. Any extra steam can evaporate back into the atmosphere, with <strong>little harmful effect on the environment</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*_rXMxeHZnaCKHSYm.jpg" /><figcaption>Source: IAEA, What is Nuclear Energy?</figcaption></figure><h4>How Efficient Would This Be?</h4><p>Hypothetically, if nuclear power was where most of the world got their main source of energy from, we would save more than 470 million metric tonnes of carbon dioxide emissions every year. That’s the same as taking about <strong>100 million passenger vehicles </strong>off the road!</p><p>To put it into comparison, nuclear power plants reach <strong>35</strong>% accuracy on average, which is the same amount as coal powered energy. However, using higher temperatures with nuclear plants could mean better efficiency, with up to an increase of 10%, meaning they could reach up to <strong>45</strong>% accuracy!</p><p>Thus, new research and experiments must be done to look more into the sustainability of this energy source.</p><h3>Debunking Myths on Nuclear Energy</h3><p>Let’s look into some misconceptions of nuclear energy.</p><h4>Nuclear Energy Creates Carbon Emissions</h4><p>Because the nuclear energy into electricity process doesn’t burn any fuel, it does not release any carbon emissions, and therefore is mostly <strong>not</strong> harmful towards the environment. In fact, this is exactly why nuclear power plants would be able to thrive near communities, in both rural and urban areas.</p><h4>Nuclear Energy Isn’t Safe</h4><p>Many people assume working in a nuclear power plant isn’t safe because of the radiation, because it may explode (which we’ll get into later), but recent studies have shown that working in a nuclear power plant can be safer than working in an office! The risk of working in such a workspace has been declining steadily for the past few years and will continue to do so over time.</p><p>There have been two major nuclear power plant related explosions over the years, but they both had flaws with the safety regulations, from lack of containment for provisions, to severe testing of containment. Both these event released amounts of radiation, but they were an odd case out, rather than a regular occurrence as many people seem to think.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*85sNSaUV7mFPUEVy.jpeg" /></figure><p><strong>Countries Aren’t Already Using Nuclear Energy</strong></p><p>As I mentioned before, countries have been using nuclear energy for a long time now. The United States, France, China, and Russia are among some of the leading countries using nuclear energy right now. In fact the U.S., (which is said to be the country currently using the most nuclear energy) started the Vogtle Project, which includes building the first new nuclear units in over 30 years! Two more reactors are being built in Georgia as part of this project, and should be up by the end of this year.</p><p>The reason why nuclear power is currently being used in developing countries is because of the high costs associated with building a power plant.</p><h4>Nuclear Power Plants are Expensive to Run</h4><p>While power plants are expensive to build, they are cheaper to run in comparison to fossil fuels. This is partly because a lot less fuel is needed for generating electricity compared to coal or gas. Nuclear energy is also a reliable source, which means it can be worth spending the money to ensure a consistent energy source.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*BwC4WlW83K2tA_iq.jpeg" /></figure><h4>Nuclear Energy Releases a Lot of Radiation</h4><p>Many people think nuclear energy would release a lot of radiation because of events like Chernobyl or Fukushima, but these events were the exception, not an expectation. Right now, almost anything gives you radiation. Microwave ovens, tanning beds, lamps, even bananas emit a small amount of radiation. Now I’m not trying to diminish the effect of these huge events in any way, but in comparison to other ways to get energy, nuclear releases a lot less radiation- about <strong>100 times less than coal</strong>.</p><p>If we took care of the toxic waste left after the nuclear power process properly, it would be a lot more accepted and safe process overall.</p><h3>Why Isn’t it Already Widespread?</h3><p>If nuclear energy is so great, why isn’t everyone using it?</p><h4>Expenses</h4><p>While nuclear power plants can be worth the money, sometimes the cost outweighs any benefits. Around 60 million dollars are needed per reactor, and that’s just the regulator fee! Nuclear plants usually cost this much because of the unique materials needed, but also because of safety measures that have to be in place, as well as the need to have backup equipment ready.</p><p>It would cost countries hundreds of millions of dollars to start up power plants, and many areas, especially developing countries, simply don’t have the funds initially required.</p><h4>Public Opinion</h4><p>If you refer back to the beginning of this article, you’ll understand what I mean. Many countries and their people are scared of using something that has created so much chaos in the past, for something good. Especially countries that have directly been affected by nuclear disasters (Japan for example) are wary of using nuclear power. It’s not only the thought of destruction and explosion going through their heads, it’s a thought of radiation being harmful to the country and the people living in it.</p><p>Even if the government of a country like Japan was okay with using nuclear energy, it’s people would most likely not be on board with the idea- at least not at first, which is why tackling misinformation is so important.</p><h4>Waste Management Issues</h4><p>Another concern related to nuclear power, is the creation of radioactive waste. This waste can be produced by many things, from used nuclear reactor fuel, to tools. This waste can remain radioactive for hundreds of years, which can be fatal to humans if not disposed of carefully and properly.</p><p>The waste that is left after the nuclear energy process has different levels of radioactivity. This waste has to be dealt with in different ways, depending in the severity and level of radioactivity of each type of waste. If the waste has a short half-life (meaning it takes a shorter time for it to decrease to half its radioactive level), it can be stored temporarily until it gets to its half-life to make the disposal process safer for transport workers and anyone else involved in that process.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*_gKxflkLHhUE7EE-.jpeg" /></figure><p>Luckily, a new version of nuclear power plants is currently being developed, and this one is said to release a lot less waste than present versions, but nothing has been confirmed yet.</p><h4>Nuclear Proliferation</h4><p>It is possible to enrich the raw material needed for Nuclear Power generation — Uranium 235 — to make nuclear bombs. Some countries have been prevented from getting the necessary raw material out of the fear that they may use it to make nuclear bombs instead. While there is no way to conclusively determine if this may or may not have happened, those countries have not been able to build nuclear power plants.</p><h3>Future of Nuclear Energy</h3><p>In this article we looked some of the benefits of nuclear power, who currently uses them, and what the process looks like. While it’s going to take time for developing country to get their hands on the means to use nuclear energy, many developed countries have already been using nuclear power for years.</p><p>Many people think nuclear power is dangerous; and it can be, but if the right precautions are taken, nuclear energy can be a great asset to communities without being harmful. I, for one, hope to see more mention of nuclear energy being used in the future.</p><h3>Key Takeaways</h3><ul><li>Many people associate danger with the word ‘nuclear’, and although nuclear energy has its faults, there’s an array of misconceptions out there about it</li><li>Nuclear energy is being used by many developed countries, but it’s hard for third-world countries to use it because of the initial cost of building power plants, even if the money can make itself after a while</li><li>There are many misconceptions towards nuclear power, but some are justified, like the high expense behind building a power plant, public opinion, and waste management issues</li></ul><h3>Resources</h3><p>Here are some of the articles/websites I used to make this article. Feel free to take a look!</p><ol><li><a href="https://www.nei.org/fundamentals/what-is-nuclear-energy">What is Nuclear Energy?</a></li><li><a href="https://medium.com/generation-atomic/how-much-would-a-100-nuclear-energy-system-cost-3dd7703dd5d3">How much would a 100% nuclear energy system cost?</a></li><li><a href="https://www.duke-energy.com/energy-education/how-energy-works/nuclear-power#:~:text=Nuclear%20energy%20originates%20from%20the,not%20produce%20greenhouse%20gas%20emissions.">Nuclear Energy</a></li><li><a href="https://education.nationalgeographic.org/resource/nuclear-energy">National Geographic- Nuclear Energy</a></li><li><a href="https://world-nuclear.org/information-library/safety-and-security/safety-of-plants/safety-of-nuclear-power-reactors.aspx#:~:text=The%20risk%20of%20accidents%20in,radioactive%20releases%20can%20be%20avoided.">World Nuclear Association</a></li><li><a href="https://energyeducation.ca/encyclopedia/Nuclear_power_plant#:~:text=Typical%20nuclear%20power%20plants%20achieve,potentially%20reach%20above%2045%25%20efficiency.">Energy Education</a></li><li><a href="https://www.power-technology.com/analysis/top-ten-nuclear-energy-producing-countries/">Top Ten Countries Using Nuclear Energy</a></li></ol><p>If you enjoyed reading this article, feel free to connect with me on LinkedIn <a href="http://www.linkedin.com/in/ishaal-ali-669019221">here</a>, I’d love some feedback!</p><p>Thanks for reading this article, see you next time!</p><p><strong><em>We’re providing opportunities for the next generation of student thinkers, inventors, and learners, to publish their thoughts, ideas, and innovation through writing.</em></strong></p><p><em>Our writers span from all areas of topics — from </em><a href="https://studentsxstudents.com/"><em>Growth to Tech, all the way to Future and World</em></a><em>.</em></p><p><em>So if you feel like you’re about to jump into a rabbit hole of reading these incredible articles, don’t worry, we feel the same way. ;)</em></p><p><em>That’s why </em><a href="https://studentsxstudents.com/"><em>studentsxstudents</em></a><em> is the place for getting your voice heard!</em></p><p><em>Sounds interesting? </em><a href="https://studentsxstudents.com/for-students-by-students-becoming-a-contributor-and-expanding-your-impact-f6da9189fa78"><em>Why not join us on this epic journey</em></a>?</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=81419117584" width="1" height="1" alt=""><hr><p><a href="https://studentsxstudents.com/the-misconceptions-of-nuclear-energy-81419117584">The Misconceptions of Nuclear Energy</a> was originally published in <a href="https://studentsxstudents.com/">students x students</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Decentralized Voting; How to Create a New System]]></title>
            <link>https://medium.com/cryptostars/decentralized-voting-how-to-create-a-new-system-9877dccb7cae?source=rss-99f2b3c28c5d------2</link>
            <guid isPermaLink="false">https://medium.com/p/9877dccb7cae</guid>
            <dc:creator><![CDATA[Ishaal Ali]]></dc:creator>
            <pubDate>Tue, 02 Aug 2022 04:03:11 GMT</pubDate>
            <atom:updated>2022-08-02T09:17:26.794Z</atom:updated>
            <content:encoded><![CDATA[<p>Current voting systems suffer from many security threats, such as malware attacks, manipulation, and polling booth capturing (which is when legitimate voters are prevented by voting genuinely by either party loyalists, or hired criminals).</p><p>Decentralized voting is a way to prevent this.</p><p>Every voter has their own identification, and the system would be able to detect if that voter had already voted.</p><p>There are a couple countries that have tested out decentralized voting, such as Japan, the United States (yes, really), and Sierra Leone.</p><p>I’ve made an easy to follow proof-of-concept to show how this would work. For anyone who wants to try this out, here is a step by step explanation of the code. To build this, I used the program <strong>Solidity</strong>.</p><p>Let’s get into it!</p><h4>Step 1</h4><p><strong><em>// SPDX-License-Identifier: MIT</em></strong></p><p>As I mentioned in my article on building an Ether wallet, any line that begins with two forward slashes in Solidity (and many other high level languages like C++ and Java), signals to the compiler to ignore that line. They are usually used for adding comments in the code. The first line in my code is a comment, but an important one.</p><p>It indicates the Software Package Data Exchange (SPDX) license the code can be used under. In my case, it is the MIT license which is free software license originating at the Massachusetts Institute of Technology (MIT). MIT is one of the many free licenses available in the SPDX license list.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*7P87Dmaji0FmPCl1.png" /></figure><h4>Step 2</h4><p><strong><em>pragma solidity ^0.4.20;</em></strong></p><p>The next line in the code tells the compiler the version of Solidity to use for compiling the code. This is important because each version of Solidity might deprecate some functionality and may introduce new built-in functions. Using the right version of Solidity allows the programmer to use these functionalities in their code.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Oru_Ss7iz1CEpws1.png" /></figure><h4>Step 3</h4><p><strong><em>contract Election {</em></strong></p><p>The first line of real solidity code declares a contract and gives it a name. This name is used as an identifier when compiling and deploying code. A solidity contract can be considered like a service. The public components of the contract can be called from outside the contract and may result in some value being returned to the caller.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*r9HAXu25nitruzkXHvU4zA.png" /></figure><h4>Step 4</h4><p><strong><em>// Model a Candidate<br> struct Candidate {<br> uint id;<br> string name;<br> uint voteCount;<br> }</em></strong></p><p>Just like in many other high-level languages, complex variables can be defined in Solidity that may include variables on “primitive” data types. These “primitive” data types are defined by the language and have built-in capabilities and constraints. For example, a variable of type “uint”<br>can store unsigned integers, which means, it cannot store negative integer values.</p><p>In the definition above, a “Candidate” is being defined as a structure (struct). Each Candidate will have an ID, a name, and a vote count. Later in this article, you will see how each of these variables within a Candidate may be accessed.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9RLLekwLs5uSgbbKG72ZlQ.png" /></figure><h4><strong>Step 5</strong></h4><p><strong><em>mapping(address =&amp;gt; bool) public voters;</em></strong></p><p>This line creates a variable that can store a mapping of addresses and Boolean (true/false) values. Each entry in this mapping called “voters” will be a pair of an address and a Boolean value. The purpose of this mapping is to store the voters (addresses) who have already voted so they cannot vote again.</p><p>In solidity, the addresses are what interacts with the contract, so if a vote is recorded from a particular address, another vote cannot be recorded from the same address. The code will prevent multiple voting.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MsBvTvqWyDCsV1CqZ2cZWw.png" /></figure><h4>Step 6</h4><p><strong><em>mapping(uint =&amp;gt; Candidate) public candidates;</em></strong></p><p>This is another mapping of unsigned integers and the Candidate structure defined above. This mapping will contain pairs of unsigned integers (IDs of the candidates) and Candidates. As voters vote for a candidate, the voteCount for that candidate will be incremented.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*RJXgcU36sy1n67VfJ1sZiw.png" /></figure><h4>Step 7</h4><p><strong><em>uint public candidatesCount;</em></strong></p><p>A variable to store the total number of candidates and work as the index in the candidates mapping. This is used in the addCandidate function explained later.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tGxsyWrx2BAID8e5Q5mMyg.png" /></figure><h4>Step 8</h4><p><strong><em>// voted event<br>event votedEvent (<br> uint indexed _candidateId<br>);</em></strong></p><p>An “event” is being declared here. An event in Solidity is used to let the application know the current state of the contract. The arguments passed to the event are available in the log. This code is just declaring the event here. It will occur (emit) later in the code.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*oTVwfTN6ypWCMKtIZtRqBQ.png" /></figure><h4>Step 9</h4><p><strong><em>constructor () public {<br> addCandidate(&amp;quot;Candidate 1&amp;quot;);<br> addCandidate(&amp;quot;Candidate 2&amp;quot;);<br>}</em></strong></p><p>The constructor is the function that gets called when an instance of the contract is created. It generally includes statements that initialize variables or sets them up with valid values. Here, the addCandidate function is being called to add three candidates to the list of candidates. The actual addition is being done in the addCandidate function, which I will be explaining next.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Zo6DPlx5ursle5McG6WLGQ.png" /></figure><h4>Step 10</h4><p><strong><em>function addCandidate (string _name) private {<br> candidatesCount ++;<br> candidates[candidatesCount] = Candidate(candidatesCount,<br>_name, 0);<br> }</em></strong></p><p>This is a very simple function. It fills up the candidates mapping with candidates when a name is passed to it. Before it adds each candidate, it increments the candidatesCount variable, which serves as the total count of candidates as well as the index in the candidates mapping.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*B16viBKMSYinLGpYWGA27w.png" /></figure><h4>Step 11</h4><p><strong><em>function vote (uint _candidateId) public {<br> // require that they haven&amp;#39;t voted before<br> require(!voters[msg.sender]);<br> // require a valid candidate<br> require(_candidateId &amp;gt; 0 &amp;amp;&amp;amp; _candidateId &amp;lt;=<br>candidatesCount);<br> // record that voter has voted<br> voters[msg.sender] = true;<br> // update candidate vote Count<br> candidates[_candidateId].voteCount ++;<br> // trigger voted event<br> emit votedEvent(_candidateId);<br>}</em></strong></p><p>I’ll explain this function line by line. The function accepts one argument, which is the candidateId of the candidate to whom the vote is being given to.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MGCP11Y796eHwdakPUExrg.png" /></figure><h4>Action 1</h4><p><strong><em>require(!voters[msg.sender]);</em></strong></p><p>The first action it takes is to confirm if this voter (the address of the sender) is allowed to vote. This is ascertained by confirming if this address is already in the voters list. Consider this like an ID check. When someone comes to vote, their ID is checked and it is ensured they have not already voted.</p><p>Similar to that, this check prevents duplicate voting by the same voter (address). The require function facilitates the check.</p><h4>Action 2</h4><p><strong><em>require(_candidateId &amp;gt; 0 &amp;amp;&amp;amp; _candidateId &amp;lt;=</em></strong> <strong><em>candidatesCount);</em></strong></p><p>The second action does the next important check. It checks to make sure that the candidate being voted for is indeed a valid candidate. Since the ID of the candidate is passed to the function, it is checked if this ID exists within the candidates list.</p><p>If you remember from above, the candidatesCount is being used both as a count of candidates and the index into the candidates mapping. If the received ID is not between 0 and total number of candidates, the candidate is not valid. Again, the require function facilitates this check.</p><h4>Action 3</h4><p><strong><em>voters[msg.sender] = true;</em></strong></p><p>Once the basic checks are completed, and are successful, the vote is registered by adding the address of the sender to the voters list. The next time, a vote is received from the same sender, the first require clause will fail because this address would already be in the voters mapping. Notice the smart use of the<br>address as the index into the voters list. This will make searches quick because it eliminates the need to traverse the entire mapping to look if an address exists within it or not.</p><h4>Action 4</h4><p><strong><em>candidates[_candidateId].voteCount ++;</em></strong></p><p>Next, the vote count of the candidate for whom the vote was received is incremented. The candidate ID is the index into the candidates mapping. Each variable for each candidate can be accessed using the “.” operator. In this case, the voteCount variable is being accessed and incremented.</p><h4>Action 5</h4><p><strong><em>emit votedEvent(_candidateId);</em></strong></p><p>Lastly, the contract “emits” the event that a vote was received for a candidate. As a result of this “emitting”, the log would show the following (considering a vote was given to Candidate 3):</p><h3>Bonus Step</h3><p>To run this code you need to compile and deploy it. You can use <strong>Remix</strong> to do so. I will be covering those steps in my follow up video. Once I’ve created that video, I’ll link it <a href="https://www.loom.com/share/8d2ddb7c98c64cb582bea5f4009c8a59">here</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XNtetuRx1coZiNtDz07vqg.png" /></figure><p>And that brings us to the end of this article. Hope you liked this tutorial, please feel free to reach out if you have questions!</p><p>Be sure to connect with me through <a href="http://www.linkedin.com/in/ishaal-ali-669019221">LinkedIn</a>.</p><h3>References</h3><p><a href="http://Decentralized Voting System using Blockchain">Decentralized Voting System using Blockchain</a></p><p><a href="https://medium.com/@rikardsaqe/decentralized-voting-one-vote-might-not-make-a-difference-but-the-whole-system-will-4fa6a994c436">Decentralized Voting- One Vote Might Not Make A Difference, But The Whole System Will</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9877dccb7cae" width="1" height="1" alt=""><hr><p><a href="https://medium.com/cryptostars/decentralized-voting-how-to-create-a-new-system-9877dccb7cae">Decentralized Voting; How to Create a New System</a> was originally published in <a href="https://medium.com/cryptostars">CryptoStars</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to Skim an Article Effectively]]></title>
            <link>https://studentsxstudents.com/how-to-skim-an-article-effectively-5f42bd7961f2?source=rss-99f2b3c28c5d------2</link>
            <guid isPermaLink="false">https://medium.com/p/5f42bd7961f2</guid>
            <category><![CDATA[reading]]></category>
            <category><![CDATA[articles]]></category>
            <category><![CDATA[miscellaneous]]></category>
            <category><![CDATA[skimming]]></category>
            <category><![CDATA[enjoy-writing]]></category>
            <dc:creator><![CDATA[Ishaal Ali]]></dc:creator>
            <pubDate>Wed, 27 Apr 2022 01:32:24 GMT</pubDate>
            <atom:updated>2022-04-27T01:32:24.220Z</atom:updated>
            <content:encoded><![CDATA[<p>Imagine this.</p><p>You’re scrolling through Google, desperately trying to find someone, <em>anyone </em>who can give you an explanation on whatever topic you’ve discovered and are looking to become obsessed with this month.</p><p>You just want a basic understanding of the topic, but all you can find are 20 minute reads, with unnecessary examples and filler sentences (filler-whaa?).</p><p>You’ve found some articles you think may be useful but can never find the time to go to your bookmarked websites and click on them, mostly because looking at their length makes you want to climb into bed and take a nap.</p><p>Remember those articles that you put in the Reading List to read later?</p><p>Exactly!</p><p>This scenario is relatable for most, including myself. But it’s not a time management problem, or even a laziness one (for the most part at least).</p><p>Here are 4 tips on skimming an article effectively, no matter what topic they cover. Hopefully by the time you’re done reading it, you’ll know why you should’ve skipped the last 3 paragraphs.</p><h3>Tip #1: Know what you want</h3><p>If you went inside a grocery store, you’d have some idea of what you’d be walking out with, right? Even if you didn’t have a lengthy list, you’d most likely have some idea of where you wanted to go after walking in.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*C-M6X50e1lJ4F_OYxhOLig.jpeg" /><figcaption>Source: unsplash.com</figcaption></figure><p>The same thing applies when going through articles. If you don’t want to make a list, at least have an idea of what you want from the articles you’re browsing.</p><p>It will make it much easier to scroll through an article and find the information you’re looking for if you have specific words or phrases in mind. You can also use CTRL+F to search up those specific words and highlight them in the document.</p><p>Be intentional, save lives (or in this case, time).</p><h3>Tip #2: Skim before you skim</h3><p>Wait.. what?</p><p>Before attempting to skim an article, try pre-reading. Pre-reading is very similar to skimming, in the sense that they both help you do the same thing, which is, finding the parts of the text you’re reading that are most important to understanding the overall topic.</p><p>When pre-reading, you’re looking for only keywords remotely related to your topic. When you find a paragraph pertaining to those keywords, you skim it, looking for the specific definition or lesson you want to obtain.</p><p>This is mostly useful when you don’t know what you want out of an article other than a basic understanding of the topic.</p><h3>Tip #3: Follow the bold</h3><p>A tactic to find the important parts of an article is to see what the writer has in bold or highlighted.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*oAnEThncJ7w_mpjNvLq56Q.jpeg" /><figcaption>Source: unsplash.com</figcaption></figure><p>Most a times, the writer wants to bring your attention to the key messages of their writing, to help the reader find what they’re looking for.</p><p>Anything <strong>italicized, in bold, or underlined</strong> is probably worth looking over to see if it can be of use.</p><p>Keep an eye out for <strong>diagrams</strong> as well, if you’re searching for an in-depth explanation of the topic, diagrams will be an easy way to absorb an idea.</p><h3>Tip #4: Head right to the end</h3><p>Last but not least, most articles have <strong>TL;DR’s</strong>, or a series of <strong>bullet points</strong> either at the beginning or at the end, which will sum up the important parts of the article.</p><p>If you don’t see a TL;DR at the beginning, scroll to the end to see if it’s there.</p><p>If an article doesn’t have something like this, you can use the subheadings of the article to figure out the main message, and therefore take another look at the parts that will be useful to you.</p><h3>Key Takeaways</h3><ul><li>Have an idea of what you want from an article before reading</li><li>Pre-read before skimming. Examine the article to find where you want to skim</li><li>Look at the beginning or end to see if the writer has put something like a TL;DR where you can find the key takeaways of the post</li><li>Look for things like bullet points, bold or italicized text, and diagrams as a starter point to skim</li></ul><h3>Final Thoughts</h3><p>Skimming is a great way to find vital information that will help you understand your topic a lot better and faster. There are strategies to use while skimming, many more than the four listed above.</p><p>You can use skimming tactics for almost any piece of writing you want to absorb, which is my favorite part about it.</p><h3>Further Resources</h3><p>Here are some of the resources I used to make this article. If you would like to dive deeper into the world of skimming, be sure to check them out!</p><ol><li><a href="https://www.dummies.com/article/academics-the-arts/language-language-arts/reading/how-to-skim-text-193387/">How to Skim Text</a></li><li><a href="https://www.umassd.edu/dss/resources/students/classroom-strategies/how-to-skim/">How to Skim</a></li><li><a href="https://www.youtube.com/watch?v=ZOS1NzVsHxI">READING STRATEGY- scanning</a></li></ol><p>If you enjoyed reading this article, feel free to connect with me on LinkedIn <a href="http://www.linkedin.com/in/ishaal-ali-669019221">here</a>.</p><p>I also have a newsletter which gets a new edition every month. I would love for you to <a href="https://ishaal.substack.com/publish?utm_source=menu">join my journey</a>!</p><p>Thanks for reading this article, see you next time!</p><p><strong><em>We’re providing opportunities for the next generation of student thinkers, inventors, and learners, to publish their thoughts, ideas, and innovation through writing.</em></strong><br><em>Our writers span from all areas of topics — from </em><a href="https://studentsxstudents.com/"><em>Growth to Tech, all the way to Future and World</em></a><em>.</em><br><em>So if you feel like you’re about to jump into a rabbit hole of reading these incredible articles, don’t worry, we feel the same way. ;)</em><br><em>That’s why </em><a href="https://studentsxstudents.com/"><em>studentsxstudents</em></a><em> is the place for getting your voice heard!</em><br><em>Sounds interesting? </em><a href="https://studentsxstudents.com/for-students-by-students-becoming-a-contributor-and-expanding-your-impact-f6da9189fa78"><em>Why not join us on this epic journey</em></a>?</p><p><a href="https://studentsxstudents.com/">students x students</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5f42bd7961f2" width="1" height="1" alt=""><hr><p><a href="https://studentsxstudents.com/how-to-skim-an-article-effectively-5f42bd7961f2">How to Skim an Article Effectively</a> was originally published in <a href="https://studentsxstudents.com/">students x students</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to Build a Simple Ethereum Wallet]]></title>
            <link>https://studentsxstudents.com/how-to-build-a-simple-ethereum-wallet-d23f163976ab?source=rss-99f2b3c28c5d------2</link>
            <guid isPermaLink="false">https://medium.com/p/d23f163976ab</guid>
            <category><![CDATA[tech]]></category>
            <category><![CDATA[ethereum]]></category>
            <category><![CDATA[enjoy-writing]]></category>
            <category><![CDATA[computer-sc]]></category>
            <category><![CDATA[science]]></category>
            <dc:creator><![CDATA[Ishaal Ali]]></dc:creator>
            <pubDate>Tue, 08 Mar 2022 16:48:36 GMT</pubDate>
            <atom:updated>2022-03-08T16:48:36.004Z</atom:updated>
            <content:encoded><![CDATA[<p>From the time money was invented, people have been using all types of ways to carry it. For precious metal based coins, people used small leather pouches.</p><p>When paper money came into being, people started carrying money in what can be called wallets — well, unless you were a drug lord from movies in the 1970s, in which case, you would carry money in large black suitcases.</p><p>Nowadays, wallets come in all different shapes, sizes, and features, and are used to carry bills, cards, and coins.</p><p>With the advent of digital and cryptocurrencies, wallets no longer need to be physical. You can carry your information on your cards, on your phones and watches, and your cryptocurrency wallets live in the cloud.</p><p>One example of this, is the <strong>Ethereum wallet</strong>, which is what this article is about.</p><p>Article Outline:</p><ul><li>What is an Ethereum wallet?</li><li>Steps- code for building a wallet</li><li>Conclusion</li><li>Sources</li></ul><h3>What is an Ethereum Wallet</h3><p>Soooo… what <em>is </em>an Ethereum wallet? Ethereum wallets are <strong>“applications that let you interact with your Ethereum account”</strong>. It lets you check your balance and send transactions.</p><p>Some popular wallets include Coinbase, ZenGo, and Binance. You need an Ethereum wallet to receive* Ether.</p><h3>Steps</h3><p>So now that you know what an Ethereum wallet is, let’s learn how to build a simple one! To build ours, we will use Solidity. Solidity is an object-oriented, high-level language for implementing smart contracts. Smart contracts are programs which govern the behaviour of accounts within the Ethereum state.</p><p>Now let’s get to it! Each line in the code is explained <strong>below</strong>.</p><h4><strong><em>Step 1</em></strong></h4><p><strong><em>// SPDX-License-Identifier: MIT</em></strong></p><p>Any line that begins with two forward slashes in Solidity (and many other high level languages like C++ and Java, signals to the compiler to ignore that line. They are usually used for adding comments in the code. The first line in my code is a comment, but an important one.</p><p>It indicates the Software Package Data Exchange (SPDX) license the code can be used under. In my case, it is the MIT license which is free software license originating at the Massachusetts Institute of Technology (MIT). MIT is one of the many free licenses available in the SPDX license list.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vco69vwcB0SlwPm1tmkOXQ.png" /></figure><h4><strong>Step 2</strong></h4><p><strong><em>pragma solidity ^0.8.10;</em></strong></p><p>The next line in the code tells the compiler the version of Solidity to use for compiling the code. This is important because each version of Solidity might deprecate some functionality and may introduce new build-in functions. Using the right version of Solidity allows the user to use these functionalities in their code.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BqZ5KXeCtR-ijt6Rcjldwg.png" /></figure><h4><strong>Step 3</strong></h4><p><strong><em>contract EtherWallet {</em></strong></p><p>The first line of real Solidity code declares a contract and gives it a name. This name is used as an identifier when compiling and deploying code. A Solidity contract can be considered like a service. The public components of the contract can be called from outside the contract and may result in some value being returned to the caller.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vzjy2dcCtKFiDeLPe3KH2g.png" /></figure><h4><strong>Step 4</strong></h4><p><strong><em>address payable public owner;</em></strong></p><p>A lot needs to be explained about this line. First of all, the type “address”. On the Ethereum blockchain, every account and smart contract has an address. The address is needed to send and receiver “Ether” from another account.</p><p>This address identifies the contract on the blockchain. It is like a bank account for a user. Just like a person needs bank account information of another person to send money to their account (unless you use Interac e-transfer), an address is needed to send Ether to a contract. An address is assigned to a contract when the contract is deployed on the blockchain.</p><p>Next comes the “payable” keyword. This keyword makes it possible for the address to receive Ether. If this keyword is not used, the contract won’t be able to receive Ether and anyone trying to send Ether to the contract will receive and Exception.</p><p>Next on the line is the keyword “public”. This keyword makes a variable or a function accessible from outside the contract, or in other words, public.</p><p>The last word on this line, “owner”, is the name of the variable.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*19HwLgHjEKMxyMQTMYCJZQ.png" /></figure><h4><strong>Step 5</strong></h4><p><strong><em>constructor() {</em></strong></p><p><strong><em>owner = payable(msg.sender);</em></strong></p><p><strong><em>}</em></strong></p><p>The constructor is the function that gets called when an instance of the contract is created. It generally includes statements that initialize variables or sets them up with valid values.</p><p>In Solidity, there are certain globally available special variables that can be accessed to extract useful information. One such variable is “msg”. The “msg” variable has a property called “sender”. This property can be accessed to derive the address that called this contract.</p><p>When a contract is deployed, the sender property is the address of the deployer. Hence setting the address in the msg.sender, stores the address of the deployer in the owner variable. This a smart way of storing the address of the deployer (or the owner) of the contract so it can later be used to compare with addresses calling this contract.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*var6wCSTIZZe3vATEtNudw.png" /></figure><h4><strong>Step 6</strong></h4><p><strong><em>receive() external payable {}</em></strong></p><p>In order for a contract to receive Ether, the contract must have one of two type of functions:</p><p>1. A receive() external payable function; or</p><p>2. A fallback function</p><p>The receive() external payable function is called when a contract is sent Ether, but no call data. In the case of this wallet, it will be called each time the contract is sent Ether. The Ether will get added to the address where this contract is deployed. An “external” function is a part of the contract interface. An external function cannot be called internally from within the contract.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ewOn2HzTSm6mzj1HQJsOTg.png" /></figure><h4><strong><em>Step 7</em></strong></h4><p><strong><em>function withdraw(uint _amount) external {</em></strong></p><p><strong><em>require(msg.sender == owner, “caller is not owner”);</em></strong></p><p><strong><em>payable(msg.sender).transfer(_amount);</em></strong></p><p><strong><em>}</em></strong></p><p>This “external” function can be called from outside this contract to withdraw “Ether” and send it from this wallet to the recipient. The first line of this function checks to make sure the sender of this message is the owner of the contract. Obviously, it would not be appropriate to allow just anybody to withdraw from a wallet. Only the owner of the wallet should be able to withdraw. The second line is what makes the transfer.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_jMjLm3abn7_uBHJuQTWog.png" /></figure><h4><strong><em>Step 8</em></strong></h4><p><strong><em>function getBalance() external view returns (uint) {</em></strong></p><p><strong><em>return address(this).balance;</em></strong></p><p><strong><em>}</em></strong></p><p>Last but not the least, there is a function in the contract to check the balance. This function can be called from outside the contract only due to the “external” keyword. It returns the current balance of the contract. Technically, it returns the balance of the address at which the contract is deployed, but conceptually, it’s the balance of the contract.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*V9xLHVvD6_JKKz1QL096gw.png" /></figure><h4>Bonus Step</h4><p>To run this code you need to compile and deploy it. You can use <strong>Remix</strong> to do so. I will be covering those steps in my follow up video. Once I’ve created that video, I’ll link it here.</p><p>And that step brings us to the end of this article. Hope you liked this tutorial, please feel free to reach out if you have questions!</p><p>Be sure to connect with me through <a href="http://www.linkedin.com/in/ishaal-ali-669019221">LinkedIn</a>.</p><h3>Sources</h3><p><a href="https://ethereum.org/en/wallets/">What is an Ethereum wallet?</a></p><p><a href="http://youtube.com/watch?v=hsIWJpuxNj0">Remix Tutorial with Kent</a></p><p><a href="https://cointelegraph.com/ethereum-for-beginners/ethereum-wallets-a-beginners-guide-to-storing-eth">Ethereum wallets: A beginners guide to storing ETH</a></p><p><strong><em>We’re providing opportunities for the next generation of student thinkers, inventors, and learners, to publish their thoughts, ideas, and innovation through writing.</em></strong><br><em>Our writers span from all areas of topics — from </em><a href="https://studentsxstudents.com/"><em>Growth to Tech, all the way to Future and World</em></a><em>.</em><br><em>So if you feel like you’re about to jump into a rabbit hole of reading these incredible articles, don’t worry, we feel the same way. ;)</em><br><em>That’s why </em><a href="https://studentsxstudents.com/"><em>studentsxstudents</em></a><em> is the place for getting your voice heard!</em><br><em>Sounds interesting? </em><a href="https://studentsxstudents.com/for-students-by-students-becoming-a-contributor-and-expanding-your-impact-f6da9189fa78"><em>Why not join us on this epic journey</em></a>?</p><p><a href="https://studentsxstudents.com/">students x students</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d23f163976ab" width="1" height="1" alt=""><hr><p><a href="https://studentsxstudents.com/how-to-build-a-simple-ethereum-wallet-d23f163976ab">How to Build a Simple Ethereum Wallet</a> was originally published in <a href="https://studentsxstudents.com/">students x students</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[What’s Sharding and Why is it Important in the Blockchain World?]]></title>
            <link>https://medium.com/cryptostars/whats-sharding-and-why-is-it-important-in-the-blockchain-world-2dfbcf509627?source=rss-99f2b3c28c5d------2</link>
            <guid isPermaLink="false">https://medium.com/p/2dfbcf509627</guid>
            <category><![CDATA[cryptocurrency]]></category>
            <category><![CDATA[blockchain]]></category>
            <category><![CDATA[sharding]]></category>
            <dc:creator><![CDATA[Ishaal Ali]]></dc:creator>
            <pubDate>Sat, 01 Jan 2022 04:02:53 GMT</pubDate>
            <atom:updated>2022-01-10T08:38:11.208Z</atom:updated>
            <content:encoded><![CDATA[<p>You must be hiding under a rock on <em>Mars</em> if you haven’t heard the words Cryptocurrency, Bitcoin or Blockchain by now. Stories of people retiring on the money they made owning and selling bitcoins are inspirational for some, and envious for most. But what are some of the technological pieces that make cryptocurrencies work? What are some of the strategies used to make the massive number of transactions manageable? There are many pieces that make the cryptocurrency world work, but one that makes the large number of transactions possible is sharding, which is the focus of this article.</p><p>Article Outline:</p><ul><li>Overview of Blockchain</li><li>Sharding- How it Works</li><li>Safety Concerns with Sharding</li><li>Why is Sharding Beneficial?</li><li>Common Strategies used when Sharding</li></ul><p><em>For anyone getting started in blockchain, this may not be the best article for you, as it focuses more on a sharding as a strategy rather than blockchain itself.</em></p><p>With that being said, let’s get into it!</p><h3>What is Blockchain?</h3><p>Because one of the major uses of sharding is in blockchain, I think it’s beneficial to give an overview of what blockchain is. It’s essentially <strong>a shared ledger, an online database</strong>. What makes this database unique is the use of three concepts: Blocks, Hash, and Distribution, which I’ll explain further below.</p><h4>Blocks</h4><p>A blockchain is a growing list of records, called blocks, which are linked together. Each block has a hash, and also has the hash of the previous block. All the blocks are stored in a distributed way that makes it very difficult to alter any block of data without others realizing that the data has changed, thus preventing unauthorized changes to the data.</p><h4>Hash</h4><p>A hash is a calculated key in each block. It’s like a fingerprint; <strong>no two blocks have the same hash</strong>. You can think of the hash and block as two parts of a whole; tampering with anything inside the block will cause the hash to change as well. This will make the chain invalid because then the “Previous hash” of the next block won’t match with the hash of this block.</p><p>For example, in the picture below, if Block 2 was changed, the hash of Block 2 won’t be 6BQ1 anymore and Block 3’s “Previous hash” won’t match with the hash of Block 2 anymore. This mismatch of hash will make the whole chain invalid.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/850/1*Aj4pBymdTvA_qJUIhtp3bA.png" /><figcaption>Image Source: How does a Blockchain work- Simply Explained (YouTube Channel)</figcaption></figure><h4>Distributed Ledger</h4><p>A distributed ledger is any database which can be replicated and shared among the members of a decentralized network. It’s a highly secure database, and eliminates the need for a third party (like a bank for example) that can validate the authenticity of the data. Blockchain is<em> </em>a <em>type</em> of distributed ledger.</p><p>To further prevent unauthorized alteration, blockchain uses proof-of-work (POW) or proof-of-stake (POS) — a delay in the calculation of hash of any block of data that changes — to validate transactions as well as to issue new blocks. This delay prevents fraudulent changes to data since any fraudulent change can be detected and eliminated before they get replicated to all copies of the data in the distributed network.</p><p>Blockchain is usually used in places with high possibility of theft/fraud, as an intermediary or middleman, and in environments with high throughput. It’s also the technology behind cryptocurrencies, which is an online medium of exchange. In simple words, it’s money with real value that can be traded digitally without having a third party, like a bank, involved in the transaction.</p><p>Blockchain was launched over 10 years ago, under the pseudonym <strong>Satoshi Nakamoto</strong>, the same person(s) who developed Bitcoin, one of the biggest cryptocurrencies in the world.</p><h3>Sharding- What is it?</h3><p>Now that we know what blockchain is, let’s get into sharding. The word shard itself means “a small part of a whole”. Sharding is just that, splitting a lone database and separating and storing it into smaller databases.</p><p>Say you needed to find the information of someone in your Book Club, which had 20,000 people in it. Instead of searching through 20,000 people by yourself, it would be much faster if you got 5 people to search through 4000 people.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/401/1*Hjr0QmleV4ojq6Ew48K6SA.png" /><figcaption>Image Source: Database, Oracle Sharding Adventure (Website)</figcaption></figure><p>It’s the same thing with sharding, where each database only has a subset of the total number of records, making it easier to sort though.</p><h4>Why is it beneficial?</h4><ul><li>If a dataset is too large to fit in one base, sharding can fix that problem by splitting the data up in other databases</li><li>It can give you an almost <strong>unlimited</strong> storage capacity</li><li>Processes more transactions per second (can reduce the slowness of a database)</li></ul><h4>Concerns with sharding</h4><p>Though sharding <em>sounds </em>great (and for the most part it is), the idea of using sharding in blockchain is relatively new. Although sharding can help with the speed and workload of a database, there is the risk of being hacked. It’s very difficult to hack into a blockchain, but not as hard to hack a shard. A hacker could potentially introduce false or fake transactions, which would ruin the authenticity of the blockchain.</p><p>Blockchains using proof-of-stake could potentially fix this problem by randomly assigning nodes (a data point in a larger network) to each shard and then re-assigning them after a certain time period.</p><h3>Common Sharding Strategies</h3><p>Like most things, there are common strategies people like to use while sharding. I’ll explain three of these strategies below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/782/1*0j0DLUHN8EeykY-XxVSzJA.png" /><figcaption>Image Source: “What is Sharding” — Hazelcast.com</figcaption></figure><h4>Horizontal Based Sharding</h4><p>This strategy is probably the most common, and includes splitting a table in a single database into smaller tables in multiple databases. Let me explain what this means. Say we had information about 20,000 customers in a single table on a database server. Sharding would split this one table, and put information of the customers into different databases on different servers. This is also called <strong>horizontal-based sharding</strong> or <strong>horizontal-partitioning</strong>. In the picture above, the original table has all the rows, whereas in tables HS1 and HS2, the rows have been split into two different tables.</p><p>However, this strategy may not be work if the data split horizontally leads to different number of rows in different databases. For example, if customer data was divided into different databases based on the first letter of their last names, with data from customers with last names beginning with letters A-H going to database 1, data from customers with last names beginning with letters I- P going to database 2 and the rest going to database 3, each database could end up getting unequal numbers of rows.</p><h4>Vertical Based Sharding</h4><p><strong>Vertical-based sharding</strong> splits the data by columns rather than rows. Say you wanted to split up the data for each book club member. Database 1 could have their identification number (to identify them) along with their position in the club, while Database 2 could have their ID and full name, and Database 3 could have their ID and phone number. This way you would be able to split all the data equally and would have an equal amount of columns. In the picture above, the original table has all the columns, whereas, in tables VS1 and VS2, the columns have been split into two different tables.</p><p>The catch is that if you had too many columns on too many databases, you would have to go to each database for each piece of information. Say I wanted to contact the Vice-President of the book club. I would first have to go to Database 1 to find the ID number of the VP. Then I would have to go to Database 2 to match the ID with the name. Lastly, I’d have to go to Database 3 to find their phone number. This whole process would be very time consuming, especially if you wanted the information for more than one person.</p><h4>Hash Based Sharding</h4><p>Another common strategy is <strong>hash based sharding</strong>. Hash based sharding splits the data based on a calculated hash. First, the data is split evenly among all the available databases, and each a method of deciding the server that any new data should be added to is created.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1017/1*6mwfLtPRy-L_SSLvDR1VgA.jpeg" /><figcaption>Image Source: System Design Interview Concepts — Database Sharding (Deb Haldar)</figcaption></figure><p>In the photo above, we have 4 database servers. Let’s assume that each time a request to add new data is accompanied by a key that gets incremented by 1 with each new request. A simple mathematical modulo function on the key with the number 4 will give a result of 0 to 3. This result can be used to direct the new request to the appropriate database. Database 0 will be chosen to keep any data that has been given the number 0 or 4. Database 1 will be chosen to keep any data given the number 1 and 5. It’s the same with the other two with the numbers 2 and 6 for Database 2 and 3 and 7 for Database 3. This way, new data can continue to be evenly distributed to the different database servers.</p><p>A disadvantage of this is that if we wanted to add another database, let’s call it Server 4. We would have to re-number and reorganize all the data to ensure Server 4 has a purpose. Also, the method of assigning new data to the servers will have to be altered. And if you wanted to add two more databases, well I can only imagine how time-consuming that would be.</p><h3>Key Takeaways</h3><ul><li>Blockchain is the technology behind cryptocurrencies. It’s an online database, and it’s a type of shared ledger</li><li>Sharding means to split a single database into many smaller ones, giving you unlimited storage</li><li>It’s much easier to hack into a shard than a blockchain, and there aren’t too many options to prevent this at the moment</li><li>There are many strategies you can use to shard, some of these being horizontal based sharding, vertical based sharing, and hash based sharding</li></ul><h3>Conclusion</h3><p>Blockchain and cryptocurrency are today’s buzzwords that can turn people’s attention toward you as soon as you say them. They could also be great ice breakers if you have sufficient knowledge to talk about them and are surrounded by people interested in them. However, the technologies that make them possible are not entirely new.</p><p>One of the key concepts used to make blockchains work is sharding. There are several strategies to “shard” data. Each of the strategies have their pros and cons. The specific strategy used is dependent on the application and must be carefully selected based on the usage scenario of the application. While it is not easy to fraudulently alter data in a blockchain, it might be easier to do so in a smaller shard.</p><p>It is also important to note that while there are many people in the world now who mine for miniature pieces of bitcoins or other cryptocurrencies because of the exponential growth in their value in the last couple of years, the technologies that make all of this possible is simple enough for anyone to understand.</p><p>What excites me more though, is that cryptocurrencies are not the only application of this technology. I am confident that in the near future, we will see other interesting applications of these — hopefully ones that are not just used for material gains but can also improve the quality of life of us humans!</p><h3>Extra Resources</h3><p>Here are some of the articles/websites I used to make this article. Check them out!</p><ol><li><a href="https://www.simplilearn.com/tutorials/blockchain-tutorial/why-is-blockchain-important">Why is Blockchain Important and Why Does it Matters?</a></li><li><a href="https://www.nasdaq.com/articles/sharding-and-future-blockchains-2018-06-26">Sharding and the Future of Blockchain</a></li><li><a href="https://medium.com/@jeeyoungk/how-sharding-works-b4dec46b3f6">How Sharding Works</a></li><li><a href="https://www.geeksforgeeks.org/what-is-sharding/">What is Sharding?</a></li><li><a href="https://www.acodersjourney.com/database-sharding/">System Design Interview Concepts — Database Sharding</a></li></ol><p>If you enjoyed reading this article, feel free to connect with me on LinkedIn <a href="http://www.linkedin.com/in/ishaal-ali-669019221">here</a>.</p><p>I also have a newsletter which gets a new edition every month. I would love for you to <a href="https://ishaal.substack.com/publish?utm_source=menu">join my journey</a>!</p><p>Thanks for reading this article, see you next time!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2dfbcf509627" width="1" height="1" alt=""><hr><p><a href="https://medium.com/cryptostars/whats-sharding-and-why-is-it-important-in-the-blockchain-world-2dfbcf509627">What’s Sharding and Why is it Important in the Blockchain World?</a> was originally published in <a href="https://medium.com/cryptostars">CryptoStars</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>