<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: min11benja</title>
    <description>The latest articles on DEV Community by min11benja (@min11benja).</description>
    <link>https://dev.to/min11benja</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F216975%2Fa010aaff-8675-4fe1-a8f3-fbc9d358c87c.png</url>
      <title>DEV Community: min11benja</title>
      <link>https://dev.to/min11benja</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/min11benja"/>
    <language>en</language>
    <item>
      <title>How to make a horizontal moving carousel with Vanilla JS &amp; TS</title>
      <dc:creator>min11benja</dc:creator>
      <pubDate>Mon, 14 Aug 2023 18:52:01 +0000</pubDate>
      <link>https://dev.to/min11benja/how-to-make-a-horizontal-moving-carousel-with-vanilla-js-ts-elc</link>
      <guid>https://dev.to/min11benja/how-to-make-a-horizontal-moving-carousel-with-vanilla-js-ts-elc</guid>
      <description>&lt;p&gt;**&lt;/p&gt;

&lt;h2&gt;
  
  
  PROBLEM
&lt;/h2&gt;

&lt;p&gt;**&lt;br&gt;
There is no doubt that carousels are essential components in a website’s design. When you are limited in space but still want to display a lot of information, carousels come in very handy as they are perfect for displaying groups of related or unrelated content in a limited width size.&lt;/p&gt;

&lt;p&gt;There are so many Carousel libraries out there with so much functionality but when looking for a simple version of one that actually moves the cards horizontally I could not find any. Most of them just overlap them one on top of the other or toggle their visibility on and off. &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Swiper &lt;/li&gt;
&lt;li&gt;Owl Carousel 2&lt;/li&gt;
&lt;li&gt;Slick Slider&lt;/li&gt;
&lt;li&gt;ItemSlider&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Not to mention that all of them use jQuery, I'm not going to go too deep into why we should avoid libraries like jQuery, everything JQuery can do, VanillaJS can do better and faster.  In the past when we needed to update a jQuery library it almost always breaks something. So for small stuff like this I rather just work with plain javascript code, no libraries. &lt;/p&gt;

&lt;p&gt;**&lt;/p&gt;
&lt;h2&gt;
  
  
  MY APPROACH
&lt;/h2&gt;

&lt;p&gt;**&lt;br&gt;
So I decided to make my own from scratch. Here is how I did it.  I first made a list of requirements. &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;It needs navigation arrows to move one card left or right at a time.&lt;/li&gt;
&lt;li&gt;It also needs dots for navigation to move more than one dot at a time.&lt;/li&gt;
&lt;li&gt;The cards need to be horizontal on desktop and vertical on mobile. &lt;/li&gt;
&lt;li&gt;The cards need a squared image on the left and a title, subtitle and a link on the right hand side&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Then I got help from Tom, our TI designer, to make a quick mockup on how it should look. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;On desktop&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F3bo6r5ttocpvktsf9dqk.JPG" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F3bo6r5ttocpvktsf9dqk.JPG" alt="Image description" width="590" height="307"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;On mobile&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fmgcmp42eog7d97bgxa55.JPG" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fmgcmp42eog7d97bgxa55.JPG" alt="Image description" width="420" height="555"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;**&lt;/p&gt;
&lt;h2&gt;
  
  
  Creating the HTML markup for the carousel
&lt;/h2&gt;

&lt;p&gt;**&lt;br&gt;
We will start by making the HTML markup structure of the carousel. &lt;br&gt;
A main container DIV with a class of carousel-wrapper&lt;br&gt;
A wrapper div for each slide and the navigation arrows with a class called  carousel&lt;br&gt;
Four slides with placeholder images and Lorem ipsum title, subtitle and text for the link with a class of carousel_&lt;em&gt;card&lt;br&gt;
The first of the slides with an extra class of active&lt;br&gt;
A wrapper div for the each arrow buttons elements for left and right navigation with a class carousel&lt;/em&gt;&lt;em&gt;button--next and carousel&lt;/em&gt;_button--prev&lt;br&gt;
Another wrapper div for the dots for each slide&lt;/p&gt;

&lt;p&gt;Starting with the carousel-wrapper DIV, we use this to size our carousel and hide any overflow content from inside it. The carousel DIV will hold all of our elements like each slide card and both navigation arrow icons acting as buttons.&lt;/p&gt;

&lt;p&gt;Then the DIV witt  carousel__card  will hold the card image, title, subtitle and link. We will add two more divs with separate unique id with the next and prev flag so we can give each of them their own click event.&lt;/p&gt;

&lt;p&gt;The DIV for carousel__dots will hold the list of dots that will act as a second navigation for more than one carousel slide transition.  One of them will contain the class active that will look different from the rest.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;div class="carousel-wrapper"&amp;gt;
    &amp;lt;div class="carousel"&amp;gt;
        &amp;lt;div class="carousel__card active"&amp;gt;
            &amp;lt;div&amp;gt;
                &amp;lt;img alt="blog-image-1" src="https://dummyimage.com/142x142/cccccc/999999"/&amp;gt;
            &amp;lt;/div&amp;gt;
            &amp;lt;div&amp;gt;
                &amp;lt;p&amp;gt;Fans Love These 5 Features of the TI-84 Plus CE Graphing Calculator&amp;lt;/p&amp;gt;
                &amp;lt;br /&amp;gt;
                &amp;lt;a target="_blank" alt="Link" class="cta-arrows" href="#"&amp;gt;Read more&amp;lt;/a&amp;gt;
            &amp;lt;/div&amp;gt;
        &amp;lt;/div&amp;gt;&amp;lt;!--.carousel__card--&amp;gt;
        &amp;lt;div class="carousel__card "&amp;gt;
            &amp;lt;div&amp;gt;
                &amp;lt;img alt="blog-image-2" src="https://dummyimage.com/142x142/cccccc/999999"/&amp;gt;
            &amp;lt;/div&amp;gt;
            &amp;lt;div&amp;gt;
                &amp;lt;p&amp;gt;Fans Love These 5 Features of the TI-84 Plus CE Graphing Calculator&amp;lt;/p&amp;gt;
                &amp;lt;br /&amp;gt;
                &amp;lt;a target="_blank" alt="Link" class="cta-arrows" href="#"&amp;gt;Read more&amp;lt;/a&amp;gt;
            &amp;lt;/div&amp;gt;
        &amp;lt;/div&amp;gt;&amp;lt;!--.carousel__card--&amp;gt;
        &amp;lt;div class="carousel__card "&amp;gt;
            &amp;lt;div&amp;gt;
                &amp;lt;img alt="blog-image-3" src="https://dummyimage.com/142x142/cccccc/999999"/&amp;gt;
            &amp;lt;/div&amp;gt;
            &amp;lt;div&amp;gt;
                &amp;lt;p&amp;gt;Fans Love These 5 Features of the TI-84 Plus CE Graphing Calculator&amp;lt;/p&amp;gt;
                &amp;lt;br /&amp;gt;
                &amp;lt;a target="_blank" alt="Link" class="cta-arrows" href="#"&amp;gt;Read more&amp;lt;/a&amp;gt;
            &amp;lt;/div&amp;gt;
        &amp;lt;/div&amp;gt;&amp;lt;!--.carousel__card--&amp;gt;


        &amp;lt;div id="next" class="carousel__button--next"&amp;gt;&amp;lt;/div&amp;gt;
      &amp;lt;div id="prev" class="carousel__button--prev"&amp;gt;&amp;lt;/div&amp;gt;

    &amp;lt;/div&amp;gt;&amp;lt;!--.carousel--&amp;gt;
      &amp;lt;div class="carousel__dots"&amp;gt;
        &amp;lt;ul id="dotList"&amp;gt;
          &amp;lt;li class="dot active"&amp;gt;&amp;lt;/li&amp;gt;
          &amp;lt;li class="dot"&amp;gt;&amp;lt;/li&amp;gt;
          &amp;lt;li class="dot"&amp;gt;&amp;lt;/li&amp;gt;
        &amp;lt;/ul&amp;gt;
      &amp;lt;/div&amp;gt;&amp;lt;!--.carousel__dots--&amp;gt;
&amp;lt;/div&amp;gt;&amp;lt;!--.carousel-wrapper--&amp;gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;**&lt;/p&gt;

&lt;h2&gt;
  
  
  Creating the CSS styles for the carousel
&lt;/h2&gt;

&lt;p&gt;**&lt;br&gt;
Ok so with this we have our HTML done. Up next, the CSS. &lt;br&gt;
First we will add a font family called Lato from the google fonts page, we will add the normal and bold 700 variations. We will make the Title H3 tag Lato bold and the rest of the text Lato normal. &lt;/p&gt;

&lt;p&gt;When navigating through the carousels, we’ll want JS to dynamically set classes to pre-position the prev and next item cards by translating them with the transform property.&lt;/p&gt;

&lt;p&gt;Diving in with .carousel-wrapper, nothing special here, just overflow, and width. The idea here is that the width can be changed to suit your content and everything inside it will scale to fit. We will add some margin to the left and right hand side and for the inside padding, for proper spacing. We’ll also want to apply border-box to the box-sizing property so any padding and border are included in our elements’ total width and height.&lt;/p&gt;

&lt;p&gt;So to make the cards not be stacked like a hamburger but placed horizontally we will add the display property of FLEx to the .carousel div. We will add the justify and align items property to the center to get the cards aligned correctly. &lt;/p&gt;

&lt;p&gt;Now for the carousel__card we will make it have a white background color and add the property of grid and make it two columns with the property of grid-template-columns: auto 300px; &lt;/p&gt;

&lt;p&gt;We’ll be using the transform property to move our carousel’s items, so setting the transform-style to preserve-3d will make sure our nested elements are rendered properly in 3D space.&lt;br&gt;
The CSS for the carousel is done, all that’s left is the navigation buttons which will sit in the middle, either side of the carousel with arrows inside. Instead of adding more HTML, we’ll add the arrows using the ::after pseudo element.&lt;/p&gt;

&lt;p&gt;Now we will style the dots so they are horizontal and greyed out except for the one with the class active&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;.section-wrapper {
  background-color:#ebebeb;
  padding:30px;
  margin-top:10rem;
}
h3 {
  font-size: 34px;
  color: #525252;
  text-align: center;
  font-family: "Lato", sans-serif;
  font-weigth: 700;
}
.carousel-wrapper {
  font-family: "Lato", sans-serif;
  overflow: hidden;
  width: 90%;    
  margin-left: 30px;
  margin-right: 30px;
}
.carousel-wrapper * {
  box-sizing: border-box;
}
.carousel {
    border: solid 3px rgba(0,0,0,.25);
    display: flex;
    justify-content: flex-start;
    align-items: center;
}
.carousel {
  transform-style: preserve-3d;
}
.carousel__card {
  opacity: 0.4;
}
.carousel__card.active {
  opacity: 1;
}
.carousel__card {
  background-color: #fff;
  padding: 20px;
  margin-right: 10px;
  border: #fff solid 5px;
  display: grid;
  grid-template-columns: auto 200px;
  grid-gap: 30px;
  align-items: center;
}
.carousel__card {
  transition: transform 0.5s, opacity 0.5s, z-index 0.5s;
}
.carousel__button--prev, .carousel__button--next {
    position: absolute;
    top: 50%;
    width: 3rem;
    height: 3rem;
    background-color: rgb(0 0 0 / 24%);
    transform: translateY(-50%);
    border-radius: 50%;
    cursor: pointer;
    z-index: 1001;        
}
.carousel__button--prev {
  left: 0;
}
.carousel__button--next {
  right: 0;
}
.carousel__button--prev::after,
.carousel__button--next::after {
  content: " ";
  position: absolute;
  width: 10px;
  height: 10px;
  top: 50%;
  left: 54%;
  border-right: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: translate(-50%, -50%) rotate(135deg);
}
.carousel__button--next::after {
  left: 47%;
  transform: translate(-50%, -50%) rotate(-45deg);
}
li.dot {
  height: 10px;
  width: 10px;
  background-color: #bbb;
  border-radius: 50%;
  display: inline-block;
  margin: 0px 5px;
}
ul#dotList {
  margin-top: 20px;
  text-align: center;
}
li.dot.active {
  background-color: #525252;
}

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;So now you should have something like this.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fcl0ezjqyrk4sgw9099h5.JPG" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fcl0ezjqyrk4sgw9099h5.JPG" alt="Image description" width="800" height="234"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;**&lt;/p&gt;

&lt;h2&gt;
  
  
  Creating the JS functionality for the carousel
&lt;/h2&gt;

&lt;p&gt;**&lt;/p&gt;

&lt;p&gt;To begin, we’ll declare our variables. We need to grab all of our card items and place them inside an array.  Then get the array length and save it in a separate variable for later. We will also need a variable to know the current slide and another boolean variable to know if the slide is moving or not.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;/*variables*/
const itemClassName = "carousel__card";
let items = document.getElementsByClassName(itemClassName);
let totalItems = items.length;
let activeSlide = 0;
let moving = false;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If you console log these values you should get the following&lt;/p&gt;

&lt;p&gt;We first need to add an event listener to the arrow icons, so we can move all of the cards horizontally, either to the right or left depending on wich one is clicked.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// Set event listeners
const nextbtn = document.getElementById("next");
const prevbtn = document.getElementById("prev");
nextbtn.onclick = function () {
  console.log("next button clicked");
};
prevbtn.onclick = function () {
  console.log("prev button clicked");
};
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now when you click on these arrows you should get a console log&lt;/p&gt;

&lt;p&gt;To move the cards we will use the transform css property to move them to the left with negative pixels or to the left and positive pixels to the right.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;items[0].style.transform = `translate(-400px)`;//move card to the right
items[0].style.transform = `translate(400px)`;//move card to the left
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now we need to do this for each card so we will add this statement inside a for each loop under each event listener for each arrow.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;nextbtn.onclick = function () {
  console.log("next button clicked");
  moveCardsHorizontally(-400);
};
prevbtn.onclick = function () {
  console.log("prev button clicked");
  moveCardsHorizontally(400);
};
function moveCardsHorizontally(amountToMove) {
  for (let key in items) {
    if (items.hasOwnProperty(key)) {
      value = items[key];
      console.log(`items[${key}] = ${value}`);
      items[key].style.transform = `translate(${amountToMove}px)`;
    }
  }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Ideally we need to get this amount depending on the amount of cards. We will need to get the containers total width and divide that by the amount of slide to get the amount of pixels we will need to move each card.  &lt;/p&gt;

&lt;p&gt;We will add a new function called getNewPosition with the parameter of direction. Here we will calculate the total width of the items array parent container and save it to the totalWidth variable. Then we will divide that by the amount of slides in the items array and save it to the singleamountToMovehorizontally variable. We need to check if the direction is to the right or left, because to the right we need the amount of pixels to be the total of multiplying the number of the active slide by the singleamountToMovehorizontally, and if it's from the left we need to take the current positionX and subtract one singleamountToMovehorizontally. I decided to handle this logic of left or right direction in the onclick events below. So if the next button is triggered it's to the right and if the prev button is triggered the direction is to the left. I also added some logic to test if we were on the start or end of the slides so as to not trigger the move moveCardsHorizontally() function if that is the case.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;function getNewPosition(direction){
    totalWidth = items[0].parentElement.parentElement.parentElement.clientWidth; //1188
    singleAmountToMoveHorizontally = Math.floor(totalWidth / totalItems);//292  
    console.log(`singleAmountToMoveHorizontally = totalWidth:${totalWidth} / totalItems:${totalItems} = ${singleAmountToMoveHorizontally}`);

    if(direction === "right"){
        console.log("parameter -&amp;gt;move right");                    
        positionX = Math.floor(singleAmountToMoveHorizontally * activeSlide);//
        console.log(`positionX =  singleAmountToMoveHorizontally:${singleAmountToMoveHorizontally} * activeSlide:${activeSlide} = ${positionX}`);  
    }else if(direction === "left"){
        console.log("parameter &amp;lt;- move left");
        //We need to add one because the array index is 0 to n            
        positionX = Math.floor(singleAmountToMoveHorizontally * activeSlide+1);//
        console.log(`positionX = positionX - singleAmountToMoveHorizontally:${singleAmountToMoveHorizontally} = ${positionX}`);  
    }    
  return positionX;
}
nextbtn.onclick = function () {
    console.log("next button clicked");  
//total 5 but array starts at 0 so 4
    if(activeSlide === totalItems-1){
      console.log(`active slide is activeSlide:${activeSlide} = totalItems:${totalItems} can't go more to the right`);  
    }else{
      moveCardsHorizontally(-getNewPosition("right"));  
      activeSlide = activeSlide + 1;
      console.log(`activeSlide + 1 = ${activeSlide}`);
    }        
};
prevbtn.onclick = function () {
        console.log("prev button clicked");  
        if(activeSlide === 0){
          console.log("active slide is 0 cant go more to the left");  
        }else{
          moveCardsHorizontally(-getNewPosition("left"));
          activeSlide = activeSlide-1;
          console.log(`activeSlide - 1 = ${activeSlide}`);         
    }  
};

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;To avoid people over-clicking the buttons, we’ll disable interactivity while the carousel is animating, and enable it again once it’s finished. I added this function called disableInteraction() and an if statement to check this boolean inside the event listeners.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;function disableInteraction() {
    // Set 'moving' to true for the same duration as our transition.
    // (0.5s = 500ms)    
    moving = true;
    // setTimeout runs its function once after the given time
    setTimeout(function(){
      moving = false
    }, 500);
  }
nextbtn.onclick = function () {
    // Check if carousel is moving, if not, allow interaction
  if(!moving) {
    console.log("next button clicked");  
    // temporarily disable interactivity
    disableInteraction();
    //total 5 but array starts at 0 so 4
    if(activeSlide === totalItems-1){
      console.log(`active slide is activeSlide:${activeSlide} = totalItems:${totalItems} cant go more to the right`);  
    }else{
      moveCardsHorizontally(-getNewPosition("right"));  
      activeSlide = activeSlide + 1;
      console.log(`activeSlide + 1 = ${activeSlide}`);
    }  

  }  
};
prevbtn.onclick = function () {
    if(!moving) {
        console.log("prev button clicked");  
        // temporarily disable interactivity
        disableInteraction();
        if(activeSlide === 0){
          console.log("active slide is 0 cant go more to the left");  
        }else{
          moveCardsHorizontally(-getNewPosition("left"));
          activeSlide = activeSlide-1;
          console.log(`activeSlide - 1 = ${activeSlide}`);
        }  
    }  
};
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;So now you should have your cards move left and right when clicking on the arrow icons like so. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fapekw7zt67fab3xi1cdt.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fapekw7zt67fab3xi1cdt.gif" alt="Image description" width="600" height="338"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Then we need to remove the active class from the current card and assign it to the next or previous card depending on which arrow was clicked. We will make a new function called toggleActiveClass and send two parameters one for the oldIndex and another for the newIndex. Since we will already know what the active slide is and what the news or previous slide will be we can just send them as parameters here and remove and add the active class. We also need to update the list of dots by removing the active class and assigning it to the next or previous element. So we need to make a new constant called dots with the elements with .dot class on them.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const dots = document.querySelectorAll('.dot');

  function toggleActiveClass(oldIndex, newIndex){
    //remove all active class    
    items[oldIndex].classList.remove('active');
    dots[oldIndex].classList.remove('active');      
    //add active class to the one passed in by parameter
    items[newIndex].classList.add('active');  
    dots[newIndex].classList.add('active');        
  }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Lets add this function in the event listeners for the next and previous onclick events. We will need to make a separate variable to store the old index and then add it just below the line where we increment or decrease the index and send both variables as parameters.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;let storeOldIndex = "";
nextbtn.onclick = function () {
    // Check if carousel is moving, if not, allow interaction
  if(!moving) {
    console.log("next button clicked");  
    // temporarily disable interactivity
    disableInteraction();    
    //total 5 but array starts at 0 so 4
    if(activeSlide === totalItems-1){
      console.log(`active slide is activeSlide:${activeSlide} = totalItems:${totalItems} can't go more to the right`);  
    }else{
      storeOldIndex = activeSlide;
      moveCardsHorizontally(-getNewPosition("right"));  
      activeSlide = activeSlide + 1;
      console.log(`activeSlide + 1 = ${activeSlide}`);
      toggleActiveClass(storeOldIndex, activeSlide);
    }      
  }  
};
prevbtn.onclick = function () {
    if(!moving) {
        console.log("prev button clicked");  
        // temporarily disable interactivity
        disableInteraction();
        if(activeSlide === 0){
          console.log("active slide is 0 cant go more to the left");  
        }else{
          moveCardsHorizontally(-getNewPosition("left"));
          storeOldIndex = activeSlide;
          activeSlide = activeSlide-1;
          console.log(`activeSlide - 1 = ${activeSlide}`);
          toggleActiveClass(storeOldIndex, activeSlide);
        }  
    }  
};
function toggleActiveClass(oldIndex, newIndex){
    //remove all active class    
    items[oldIndex].classList.remove('active');
    dots[oldIndex].classList.remove('active');      
    //add active class to the one passed in by parameter
    items[newIndex].classList.add('active');  
    dots[newIndex].classList.add('active');        
  }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;So now when we click on the arrow icons the active class switches from one to the next on both the cards and the dots. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fp6i7i68xt56azudhsw7n.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fp6i7i68xt56azudhsw7n.gif" alt="Image description" width="600" height="338"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Ok so that takes care of the arrow navigation actions, now we need to add an event listener to all of the dots so depending on which one is clicked we call the moveNext or MovePrev functions n amount of times.&lt;/p&gt;

&lt;p&gt;So we need to determine depending on the dot clicked if we need to call move left or move right. We will do this by comparing if the index obtained from the eventlistener is greater than or less than the activeSlide variable. &lt;/p&gt;

&lt;p&gt;I made a separate function to take care of the logic for moving the cards left or right since I saw this was getting repeated all over.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;/*DON'T REPEAT YOURSELF*/            
              moveCardsHorizontally(-getNewPosition("left"));          
              storeOldIndex = activeSlide;
              console.log(`storeOldIndex= ${storeOldIndex}`);
              activeSlide = activeSlide-1;
              console.log(`activeSlide - 1 = ${activeSlide}`);
              toggleActiveClass(storeOldIndex, activeSlide);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;So I made it into its own function and replaced it in all 3 event listeners.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;document.querySelectorAll('.dot').forEach((item, index) =&amp;gt; {
  item.addEventListener('click', e =&amp;gt; {      
    console.log('clicked on dot');
    //check what index was selected
    console.log(`index:${index} and item:${item}`);          
    //get current slide and determine if the difference is greater or less than
    if(index &amp;gt;  activeSlide){
      console.log(`index:${index} &amp;gt; activeSlide:${activeSlide} move right`);
      moveCardsDotsHorizontally("right");
    }else{
      console.log(`index:${index} &amp;lt; activeSlide:${activeSlide} move left`);
      moveCardsDotsHorizontally("left");
    }
  })
});
  function moveCardsDotsHorizontally(dir){
    moveCardsHorizontally(-getNewPosition(dir));
    storeOldIndex = activeSlide;
    console.log(`storeOldIndex= ${storeOldIndex}`);
    if(dir === "left"){    
      activeSlide = activeSlide-1;
      console.log(`activeSlide - 1 = ${activeSlide}`);
    }else{
      activeSlide = activeSlide+1;
      console.log(`activeSlide + 1 = ${activeSlide}`);
    }
    toggleActiveClass(storeOldIndex, activeSlide);  
  }
nextbtn.onclick = function () {
    // Check if carousel is moving, if not, allow interaction
  if(!moving) {
    console.log("next button clicked");  
    // temporarily disable interactivity
    disableInteraction();    
    //total 5 but array starts at 0 so 4
    if(activeSlide === totalItems-1){
      console.log(`active slide is activeSlide:${activeSlide} = totalItems:${totalItems} cant go more to the right`);  
    }else{      
      moveCardsDotsHorizontally("right");
    }      
  }  
};
prevbtn.onclick = function () {  
    if(!moving) {
        console.log("prev button clicked");  
        // temporarily disable interactivity
        disableInteraction();
        if(activeSlide === 0){
          console.log("active slide is 1 cant go more to the left");  
        }else{
          moveCardsDotsHorizontally("left");            
        }  
    }  
};
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This lets us navigate using the dots from left to right like in the arrows, but it only lets us move one at a time, if we try to select the last dot from the first dot it only moves once since we are only calling the function once. We need to determine the difference and call this function the amount of times to the right or left so that these dots help users move faster through each card.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;let differenceToMove = "";
let amountOfTimesToLoopLeft = 0;
let amountOfTimesToLoopRight = 0;


function determineDifference(initial, final) {  
  differenceToMove = Math.floor(final - initial);
  console.log(`differenceToMove = final:${final} - initial:${initial} = ${differenceToMove}`);
  return differenceToMove;
}
document.querySelectorAll(".dot").forEach((item, index) =&amp;gt; {
  item.addEventListener("click", (e) =&amp;gt; {
    console.log("clicked on dot");
    //check what index was selected
    console.log(`index:${index} and item:${item}`);
    //get current slide and determine if the difference is greater or less than
    if (index &amp;gt; activeSlide) {
      console.log(`index:${index} &amp;gt; activeSlide:${activeSlide} move right`);      
      amountOfTimesToLoopRight = Math.floor(determineDifference(index, activeSlide) * -1);
      console.log(`amountOfTimesToLoopRight=${amountOfTimesToLoopRight}`);
      for(var i=0;i&amp;lt;amountOfTimesToLoopRight;i++){
        moveCardsDotsHorizontally("right");
      }
    } else {
      console.log(`index:${index} &amp;lt; activeSlide:${activeSlide} move left`);
      amountOfTimesToLoopLeft = determineDifference(index, activeSlide);  
      console.log(`amountOfTimesToLoopLeft=${amountOfTimesToLoopLeft}`);    
      for(var j=0;j&amp;lt;amountOfTimesToLoopLeft;j++){
        moveCardsDotsHorizontally("left");
      }      
    }    
  });
});
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now that we have gotten the direction let's get the amount of times we need to call the next or prev function.  &lt;/p&gt;

&lt;p&gt;**&lt;/p&gt;

&lt;h2&gt;
  
  
  Our result
&lt;/h2&gt;

&lt;p&gt;**&lt;br&gt;
&lt;a href="https://codepen.io/Min11Benja/pen/MWzMMXO?editors=0010" rel="noopener noreferrer"&gt;https://codepen.io/Min11Benja/pen/MWzMMXO?editors=0010&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;We have a slick carousel with no jQuery or external libraries, with single and multiple navigation options. &lt;/p&gt;

&lt;p&gt;**&lt;/p&gt;
&lt;h2&gt;
  
  
  Challanges faced
&lt;/h2&gt;

&lt;p&gt;**&lt;/p&gt;

&lt;p&gt;So initially I was calculating the total amount of pixels to move the cards right or left by getting the parent elements width and dividing it up by the amount of slides&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;singleAmountToMoveHorizontally = Math.floor(totalWidth / totalItems); //292
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;But this kept giving me poor results in terms of the card showing too much to the left or right.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fq8qeq4y9zzle0wrh05o7.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fq8qeq4y9zzle0wrh05o7.gif" alt="Image description" width="600" height="338"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;So then I started poking around the items object to see if I could find the real width, and I found something called the offsetWidth&lt;/p&gt;

&lt;p&gt;I replaced the previous instruction with this one and I got a more reliable result in terms of the amount of pixels that the carousel moved the cards left or right, on different viewports.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;singleAmountToMoveHorizontally = items[0].offsetWidth;  //422
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fot92k1uxpa8q1wzwa1l4.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fot92k1uxpa8q1wzwa1l4.gif" alt="Image description" width="600" height="338"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;**&lt;/p&gt;

&lt;h2&gt;
  
  
  What I would do different
&lt;/h2&gt;

&lt;p&gt;**&lt;/p&gt;

&lt;p&gt;Now let's refactor this code, remove all of the console logs, add a couple of safeguard rules so as to not get undefined, and add TypeScript to all the variables. &lt;/p&gt;

&lt;p&gt;To avoid conflicts and to make this as portable as possible, it’ll be in our best interest to shield our code from the global scope, so we’ll wrap it up in an IIFE.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;!(function(d){
  // All code will go in here. We've renamed 'document' to 'd'.
}(document));
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;I'm not sure if I should redo this using functional programming or not. Other than removing the console logs and adding some if statements to check for undefined variables I could not think of how else I could make this any better, so let's see what CHAT GPT can do to help us improve this code.&lt;/p&gt;

&lt;p&gt;I copied and pasted all of the functions on this code and asked it to help me refactor them. This is what it suggested. &lt;/p&gt;

&lt;p&gt;CHAT GPT - “I added TypeScript annotations to improve readability and maintainability. I've also made some structural changes to make the code more organised. Please note that I added type annotations to variables and functions, and cleaned up the code where needed.“&lt;/p&gt;

&lt;p&gt;I think CHAT GPT did a great job at reducing the code size and removing extra stuff. Here is a link to that version in CodePen. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://codepen.io/Min11Benja/pen/BaGXQdq?editors=0010" rel="noopener noreferrer"&gt;https://codepen.io/Min11Benja/pen/BaGXQdq?editors=0010&lt;/a&gt;&lt;br&gt;
I'm curious how you would have done this carousel any differently? Let me know what you think in the comments below please.&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>tutorial</category>
      <category>css</category>
      <category>html</category>
    </item>
    <item>
      <title>Did Ethereum merge solve the Blockchain Trilemma?</title>
      <dc:creator>min11benja</dc:creator>
      <pubDate>Tue, 10 Jan 2023 01:43:17 +0000</pubDate>
      <link>https://dev.to/min11benja/did-ethereum-merge-solve-the-blockchain-trilemma-5bkk</link>
      <guid>https://dev.to/min11benja/did-ethereum-merge-solve-the-blockchain-trilemma-5bkk</guid>
      <description>&lt;p&gt;In this blog post we will take a look at &lt;br&gt;
• What Ethereum is&lt;br&gt;
• How it’s different from Bitcoin &lt;br&gt;
• The recent Ethereum Merge&lt;br&gt;
• Does it solve the Blockchain Trilemma?&lt;/p&gt;

&lt;p&gt;What is Ethereum? What is Ether? What are dApps? What is Solidity? What is the EVM? &lt;br&gt;
Ethereum is a peer-to-peer platform where users write code to develop applications and control money without the presence of a third party, created by Russian-Canadian programmer Vitalik Buterin in 2015 with an initial supply of 72 million Ether (the platform’s currency, or fuel).&lt;br&gt;
It is designed to be a flexible, modular, and general-purpose blockchain platform, with a focus on enabling the development of Decentralized Aplications (dApps) by that I mean open sourced aplications that are not controlled by a single entity or authority.&lt;br&gt;&lt;br&gt;
To achieve this, Ethereum has a built-in programming language, Solidity, which allows developers to write and deploy smart contracts on the Ethereum platform through the use of a virtual machine, The EVM provides a run-time environment for smart contracts to run on top of the Ethereum network.&lt;br&gt;
What are Smart Contracts?&lt;br&gt;
Smart contracts are self-executing contracts with the terms of the agreement between buyer and seller being directly written into lines of code. Think of these as electronic vending machines - programs that automatically execute when certain conditions are met.&lt;br&gt;
This enables developers to create markets, store registries of debts or promises, move funds in accordance with instructions given long in the past (like a will or a futures contract) and many other things that have not been invented yet, all without a middleman or counterparty risk.&lt;br&gt;
They typically are used to automate the execution of an agreement so that all participants can be immediately certain of the outcome, without any intermediary's involvement or time loss.&lt;br&gt;
What are Gas Fees? &lt;br&gt;
Are these Smart Contracts Free? No they are insanely expensive. The Ethereum network charges you a gas fee, payed in Ether its native currency. This gas fee is used to pay for the computation time needed to run smart contracts on the Ethereum Virtual Machine (EVM) These don’t have a fixed price, they are bids and fluctuate depending on the networks demand. &lt;br&gt;
How is it different from Bitcoin?&lt;br&gt;
As the world’s biggest programmable blockchain, Ethereum is like Bitcoin in some ways.&lt;br&gt;
• It’s also an open sourced decentralized platform through which users can connect with each other and exchange crypto-currencies and new applications without governments or corporations controlling the infrastructure. &lt;br&gt;
• Both used a proof of work consensus algorithm (Add titles as of this date Eth uses PoS)&lt;br&gt;
• Both produce their own crypto-currency, &lt;br&gt;
But unlike Bitcoin that was created solely to enable online transactions without the need for a central authority. Ethereum, was designed to be a decentralized platform that runs smart contracts.&lt;br&gt;
Think of Bitcoin as a Desktop App for money transfers, and Ethereum ir more like an App Store, of Bitcoin like applications that run exactly as programmed without any possibility of downtime, censorship, fraud, or third-party interference. &lt;br&gt;
Does Ethereum solve the Blockchain Trilemma?&lt;br&gt;
The ‘blockchain trilemma’ described the challenges developers face in creating a blockchain that is decentralized, scalable and secure, without compromising on any element. Blockchains are forced to make trade-offs that prevent them from achieving all three aspects. It is said that whichever blockchain project achieves an ideal balance of all 3 will win it all. &lt;br&gt;
Needless to say Ethereum does not currently have a great balance of these 3 traits. Since its inception seven years ago, the Ethereum blockchain has grappled with security and scalability issues.&lt;br&gt;&lt;br&gt;
Smart contracts are the foundational blocks of web3. They enable applications built on top of blockchains and power DeFi, NFTs, DAOs, and any other decentralized solutions you can think of. Since smart contracts are the cornerstone of blockchain applications, when they fail, the applications built with those contracts fail, and the entire ecosystem suffers.&lt;br&gt;
Lacking Security - The DAO Hack?&lt;br&gt;
DAO, launched in 2016 was an early decentralized autonomous organization (DAO) intended to act as an investor-directed venture capital firm. &lt;br&gt;
The DAO raised $150 million USD worth of ether (ETH) and was one of the earliest crowdfunding efforts and high-profile projects built on the Ethereum blockchain — which at the time was only one year old. Less than three months after its launch, The DAO was hacked and $60 million of ether was stolen. &lt;br&gt;
The Ethereum community debated heavily on how to respond to the attack. The DAO’s failure would not only mean financial loss for investors, but it also bore dire repercussions for the nascent Ethereum network who was planning on moving to a Proof of Stake system. The Ethereum blockchain ended up issuing a hard fork of the project to restore the stolen funds, and stop the hacker from having an unfair power over the future network. &lt;br&gt;
So now there is an Ethereum classic (The version where the Hacker still has those stolen funds) and Ethereum the Hard Forked network. The situation not only presented technical challenges, but questioned the moral and philosophical underpinnings of the technology — and the resilience of the Ethereum project’s leadership. smart contracts are only as secure as their underlying blockchain platform&lt;br&gt;
Ethereums Scalibility Issues&lt;br&gt;
Besides Security the Ethereum blockchain has an inherent scalability issue, which limits it to around 30 transactions per second. Network congestion arising from the sheer volume of transactions often results in delays and skyrocketing fees.&lt;br&gt;
Gas fees are simply bids for including a set of transactions in the limited block space. In case of high demand, these bids go up as users attempt to fast-track their transactions to gain an edge. This results in extremely high transaction costs. Vitalik Buterin claims that Ethereum's gas fees should be around $0.05, ideally. During the DeFi boom and the gas wars that followed, average gas fees on Ethereum soared to around $70 and some even reaching the thousands.&lt;br&gt;
Ethereum 2.0 - What is Proof of Stake?&lt;br&gt;
Theses issues have been plagging Ethereum for years but as of the date of September 15 2022, the long-awaited software revision, termed the Merge, was complete. This update shifted the blockchain from a so-called proof-of-work system to a more energy efficient proof-of-stake method for securing the network.&lt;br&gt;
Proof-of-work (PoW) and proof-of-stake (PoS) are two different consensus algorithms.&lt;br&gt;
In a proof-of-work system, miners compete to solve a cryptographic puzzle in order to create a new block and earn a reward. This process requires a significant amount of computing power, and the miner that is able to solve the puzzle and create the new block first is able to add it to the blockchain and claim the reward. The key feature of PoW is that it requires miners to perform a certain amount of work in order to create new blocks and earn a reward.&lt;br&gt;
In a proof-of-stake system, the creator of a new block is chosen in a deterministic way, depending on their stake in the network. The stake can be thought of as the amount of cryptocurrency that a validator holds or has "locked up" in the network. The higher the stake, the higher the probability that a validator will be chosen to create the next block. In PoS, the validator is not required to perform any computational work, but they do have to show ownership of a certain number of tokens in order to participate in the validation process.&lt;br&gt;
This model, some argue, reduces the possibility of a 51% attack because it makes an attack more costly. Adding security to the Network and reducing its energy consumption. &lt;br&gt;
The new arrangement has phased out the miners, replacing them with validators who staked Ether (ETH). More centralization fears have emerged as institutional capital and large exchanges vie for a large chunk of ETH staking power.&lt;br&gt;
The ultimate aim for all these upgrades is to make Ethereum more scalable, faster and cheaper to use.&lt;br&gt;
Does the Merge Fix Ethereum?&lt;br&gt;
Even thought Ethereum has made significant progress in improving its scalability and security through the implementation of various upgrades, it is still broken.&lt;br&gt;
Completing the upgrade without any software downtime is a brilliant engineering feat, but there was no changes related to network crazy high transaction costs or crippling low speed. These are set to be fixed I future updates. &lt;br&gt;
The Merge was the first step toward a series of upgrades on Ethereum to solve the scalability trilemma.&lt;br&gt;
• The second step called the surge: Implementation of sharding, a scaling solution which will lower the cost of bundled transactions on Ethereum.&lt;br&gt;
• The third step named The Verge: Introduction of ‘verkle trees,’ an update which will make the network more decentralized by making it easier for users to become validators.&lt;br&gt;
• The fourth Step named The Purge: Elimination of historical data and technical debt.&lt;br&gt;
• The last step The Splurge: Miscellaneous updates after the first four stages to ensure smooth functioning of the network.&lt;/p&gt;

&lt;p&gt;Its estimated that these following steps will happened in around 3 more years. &lt;/p&gt;

&lt;p&gt;Conclusion&lt;/p&gt;

&lt;p&gt;So we saw What Ethereum is, how its different from Bitcoin, its current limitations and future plans to fix them. &lt;br&gt;
Over the next years, we should see how Ethereum performs as a Proof-of-Stake network with full sharding abilities. In the meantime, no one can discard the sudden emergence of a qualified player to (either temporarily or permanently) contend for the top spots in Layer-1 adoption.&lt;/p&gt;

&lt;p&gt;As a Blockchain developer you should definitely learn Solidity and have some experience working in the Ethereum platform. &lt;br&gt;
If you have any questions, please let me know in the comments below.&lt;/p&gt;

</description>
      <category>ethereum</category>
      <category>blockchain</category>
    </item>
    <item>
      <title>What problems does Bitcoin solve?</title>
      <dc:creator>min11benja</dc:creator>
      <pubDate>Fri, 23 Dec 2022 15:05:14 +0000</pubDate>
      <link>https://dev.to/min11benja/what-problems-does-bitcoin-solve-3ei1</link>
      <guid>https://dev.to/min11benja/what-problems-does-bitcoin-solve-3ei1</guid>
      <description>&lt;p&gt;Something I learned along the way in an ever-changing field of web development, where you have a new JavaScript Framework every other week, is that in a sea of free resources, it doesn’t matter how many tools you have if you don’t know how to use them, they will never be enough. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--mC5dOQQE--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/a08yf9b08c7zzfdpc1n6.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--mC5dOQQE--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/a08yf9b08c7zzfdpc1n6.jpg" alt="Image description" width="800" height="798"&gt;&lt;/a&gt;&lt;br&gt;
When the problem is not well understood, “fancy solutions” only create other new problems, these new problems only end up deviating you away from what you intended to do in the first place. This is why I think it’s a good idea to approach a new technology like Bitcoin through the lenses of the problem it was made to solve. To filter out the signal from all the noise. &lt;/p&gt;

&lt;p&gt;So in today’s lesson we will take a look at &lt;br&gt;
1 ) Why Bitcoin was created&lt;br&gt;
2) What technical problems Bitcoin had to solve&lt;br&gt;
3) The drawbacks of this type of solution&lt;br&gt;
Why Bitcoin was created?&lt;br&gt;
As you may know, Bitcoin is a decentralized digital currency that allows users to make transactions directly with one another, without the need for a central authority like a bank. But did you know that Bitcoin was actually created in response to a major economic crisis?&lt;br&gt;
In 2008, the global economy was hit by a financial crisis that was caused by the collapse of the housing market in the United States. This crisis, known as the Great Recession, had a ripple effect on the rest of the world, leading to high levels of unemployment, bankruptcy, and overall economic instability.&lt;/p&gt;

&lt;p&gt;One of the key factors that contributed to the crisis was the fact that many banks and financial institutions had engaged in irresponsibly risky lending practices, so when the housing market crashed, these institutions were left with large amounts of bad debt. This led to a credit freeze, where banks were unwilling to lend money to individuals and businesses, which further exacerbated the economic downturn. Right now, you might be thinking. Pff serves them right for gambling, how does that affect me? Let them go bankrupt. &lt;/p&gt;

&lt;p&gt;The politicians decided to bail out the banks during the 2008 financial crisis because they believed that it was necessary to prevent a complete collapse of the financial system. The banks were considered "too big to fail," meaning that their failure would have had catastrophic consequences for the economy as a whole.&lt;br&gt;
The bailouts were controversial at the time, and remain so to this day. Another option would have been for the government to allow some of the banks to fail and be taken over by healthier institutions, in order to allow the market to correct itself, but no, they just printed away all that debt diluting the value of the US Dollar. &lt;/p&gt;

&lt;p&gt;Inflation can be seen as a form of modern slavery in some ways because it can erode the purchasing power of people's wages and savings over time. When the prices of goods and services rise due to inflation, it means that the same amount of money will buy less than it did previously. This can make it difficult for people to afford the things they need to live, and can leave them feeling financially trapped.&lt;br&gt;
In the midst of all this, a mysterious person or group using the pseudonym "Satoshi Nakamoto" published a white paper detailing a new kind of digital currency called Bitcoin. According to Nakamoto, Bitcoin was designed in such a way that it would be resistant to inflation and immune to the kind of financial manipulation and interference that had contributed to the 2008 crisis. &lt;/p&gt;

&lt;p&gt;What technical problems did Bitcoin Solve?&lt;br&gt;
When Satoshi created Bitcoin, he really created two distinctly valuable products that by necessity are joined at the hip: the first ever Blockchain ( a ledger – a record of time-stamped transactions), and the first ever cryptocurrency (a digital currency made with the use of encryption technologies to function both as a currency and as a virtual accounting system).&lt;br&gt;
If the blockchain was created to get rid of the necessity of trusting a middleman &amp;amp; the problem of them abusing that power, then bitcoin was created to solve the blockchain’s incentive problem. Without a middle man to pay for all the bills of keeping a network up and running, the network needs to be self suficient. &lt;br&gt;
To achieve this Satoshi and his early collaborators had to solve two specific technical issues. The Byzantines general problem, and the Double spend problem. Let’s dive into each problem and how it was solved. &lt;/p&gt;

&lt;p&gt;1 ) The Byzantine Generals problem&lt;br&gt;
Is a thought experiment that illustrates the challenges of achieving consensus in a distributed network? By consensus I mean how multiple computers agree on what is true. &lt;/p&gt;

&lt;p&gt;If you have seen the movie brave heart, with actor Mel Gibson plays William Wallace, a medieval Scottish patriot who is spurred into revolt against the English when the love of his life is slaughtered. In that movie,&lt;br&gt;
There is a specific scene where there is a great battle with the potential to end it all and where Scotland not only could have regained the land they lost but also bring down one of the biggest armies of that time, just by winning this one single battle. but it would only work if all 3 bands united and attacked at the same time.&lt;br&gt;
Long story short, the Scottish army who had beforehand agreed to unite, ends up betraying Wallace in the middle of the battle they walk out on him, and the rebels loose. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--mBCAVTVu--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4m3el98o19oyptynrd4k.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--mBCAVTVu--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4m3el98o19oyptynrd4k.gif" alt="Image description" width="480" height="270"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This is the Byzantines general’s problem, in a nutshell. How can you be sure all 3 bands come to an agreement and none of them have colluded against you before you make a decision that could very well cost you your life? This is at its core a trust problem. &lt;/p&gt;

&lt;p&gt;The 2008 financial crisis caused huge and lasting damage to a lot of people’s trust in the banking system. People trusted banks to do responsible, safe, socially productive things, and it turned out they were doing incompetent checking in the name of profit that caused an economic crisis.&lt;br&gt;
Bitcoin solves the Byzantine Generals Problem by being distributed: The computer’s data aren’t kept on any one particular machine but spread out among lots of computers. Using a Proof-of-Work consensus algorithm it syncs up all of these machines. By consensus I mean the method a network of computers use to know what is true. In place of a trusted third party, Nakamoto used a chain of cryptographically-signed transactions secured by proof-of-work to order and validate payments. And thus, the blockchain was born.&lt;/p&gt;

&lt;p&gt;What is proof of work?&lt;br&gt;
In Bitcoin, proof of work is a mechanism that is used to secure the network and ensure that consensus is reached on the state of the blockchain. It is the process by which transactions are validated and new blocks are added to the blockchain.&lt;br&gt;
Proof of work involves miners, who are individuals or groups of individuals that use specialized computers to solve complex mathematical problems. These problems are designed to be difficult to solve, but easy to verify once a solution has been found.&lt;/p&gt;

&lt;p&gt;When a miner solves one of these problems, they are able to create a new block and add it to the blockchain. This process is called mining. In order to create a new block, the miner must include a list of all the transactions that have occurred on the network since the last block was added, as well as a reference to the previous block in the chain.&lt;br&gt;
Proof of work not only make the network self-sustainable but it also creates the needed transparency to eliminate the need for a trusted third party that could willingly or unwillingly reverse transactions or in the case of William Wallace’s battle, change their minds all of a sudden &amp;amp; betray him. If only William Wallace had Bitcoin back then, maybe he could have conquered England. &lt;/p&gt;

&lt;p&gt;2) Double spend problem&lt;br&gt;
Now going back to the cryptocurrency called Bitcoin, that enables the network to be self-sustainable. This is a digital coin, issued by the network, and you can only get this coin by mining it (ponying up your computers resources, electricity and internet bandwidth) or buying it from another person. &lt;br&gt;
Digital money had been thought up for a lot of years but it was difficult to implement, in a world where you can simply copy and paste stuff, costless duplication is not a desirable trait you want in money.&lt;br&gt;
The Double Spend Problem describes the difficulty of ensuring digital money is not easily duplicated.&lt;/p&gt;

&lt;p&gt;When money is physical, the Double Spend Problem is of no concern. The same physical bill or coin cannot be in two places at once. The Double Spend Problem only occurs in digital systems, where the same file or data can be present in two places at once. Trusted third parties such as banks prevent double spends by privately verifying each transaction. They make sure you don’t spend the same dollar twice, but we don’t want middle man so how can we check this?&lt;br&gt;
Bitcoin solves the double spend problem by using a decentralized ledger, which all users can access. Because all members of the Bitcoin network can examine the full history of transactions, they can be sure that neither their coins nor any other coins have been double spent. When one user sends bitcoin to another, they destroy the coin they own and create a new coin owned by the receiver. The destruction of the sender’s coin is recorded for all to see, so that they can never send it to someone else.&lt;/p&gt;

&lt;p&gt;Imagine that you have 1 BTC and you attempt to spend it twice in two separate transactions. You could attempt to do this by sending the same BTC to two separate bitcoin wallet addresses. Both of these transactions will then go into the pool of unconfirmed transactions. The first transaction would be approved via the confirmation mechanism and then verified into the subsequent block. However, the second transaction would be recognized as invalid by the confirmation process and would not be verified. If both transactions are pulled from the pool for confirmation simultaneously, the transaction with the highest number of confirmations will be included in the blockchain, while the other one will be discarded.&lt;br&gt;
While this effectively deals with the issue of double spending, it is not without its issues.&lt;br&gt;&lt;br&gt;
For example, the intended recipient of the second (failed) transaction would not have part in the transaction itself failing, and yet that person would not receive the bitcoin they had anticipated. Many merchants wait for at least 6 confirmations of a transaction (meaning that six subsequent blocks of transactions were added to the blockchain after the transaction in question). At this point, the merchant can safely assume that the transaction is valid but he can never be 100% sure, just as time goes by he is more confident but this system does not have an absolute finality. I guess Satoshi was a Fan of Star Wars&lt;br&gt;
(only Sith deal in absolutes) &lt;br&gt;
The problem with Proof of work?&lt;br&gt;
Blockchain is basically a trust machine, it helps you trade with people you do not trust. That trust is made possible by duplicating and verifying the information across multiple computers in a network, for this reason alone, many original blockchains can’t process more transactions than a single computer in the network can handle.&lt;br&gt;
As of this date, Bitcoin was unable to handle more than about seven transactions per second and Ethereum, the second-most popular crypto network, was limited to about 15 per second. &lt;br&gt;
In contrast Visa what we currently use for credit cards worldwide, handles around 20k transactions per second. &lt;br&gt;
VisaNet, the card network's payment processing system, handles an average of 150 million transactions per day and the firm claims it is capable of processing more than 24,000 Visa transactions per second.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--2oPT2T1S--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/kpqpv5zo405b8v3tkrol.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--2oPT2T1S--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/kpqpv5zo405b8v3tkrol.gif" alt="Image description" width="420" height="315"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Imagine an Internet service provider, that gets slower and more expensive the more you use it, its insane, it should be the total opposite. Technology innovation is all about speed and making things cheaper at scale. No one in their right mind would pay for internet that gets laggier and more costly by the minute, why would you do the same for Bitcoin?&lt;/p&gt;

&lt;p&gt;This wasn’t a problem back when crypto was a niche technology used by a core of enthusiasts. Now that traditional finance and other mainstream industries are turning to blockchains as a hedge against inflation, and a trusted environment for exchange and collaboration, these limitations are crippling to say the least.&lt;br&gt;
Did anyone see this coming?&lt;/p&gt;

&lt;p&gt;Yes. Computer scientist Hal Finney, who received the very first Bitcoin transaction from the token’s pseudonymous founder Satoshi Nakamoto, flagged early on that blockchains in their original design can’t scale on their own. He proposed adding a simpler, more efficient secondary system on top of the main blockchain. “Bitcoin itself cannot scale to have every single financial transaction in the world be broadcast to everyone and included in the block chain,” Finney wrote in a forum back in 2010.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--ig5XvccW--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/oqq25jcsyvk3370osdot.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--ig5XvccW--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/oqq25jcsyvk3370osdot.jpg" alt="Image description" width="800" height="589"&gt;&lt;/a&gt;&lt;br&gt;
Later Ethereum co-founder Vitalik Buterin coined the term “Blockchain trilemma” in 2017, laying out the trade-offs required to achieve “scalability.”&lt;br&gt;
Because expanding a blockchain beyond a certain point inevitably compromises two of its fundamental characteristics: its decentralized structure, which confers the transparency and user trust for it to function independently of third parties and governments, and its security (protecting the data from hackers). In short, you can have “scalability,” and decentralization or “scalability” and security, but you cannot have all three at the same time. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--YEM0hE4J--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/la857f8pg93yb2h7j4kv.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--YEM0hE4J--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/la857f8pg93yb2h7j4kv.jpg" alt="Image description" width="800" height="450"&gt;&lt;/a&gt;&lt;br&gt;
Is there a solution?&lt;/p&gt;

&lt;p&gt;There have been several innovations to improve the performance of blockchains, but a closer look shows that they all water down decentralization or security for the sake of scalability. Here are some approaches: &lt;/p&gt;

&lt;p&gt;• Bigger blocks: a blockchain is altered to bundle transactions into larger packets before they are validated and added to the network, improving its performance. This can be achieved by splitting a new blockchain off from the original one in a process known as “forking.” Bitcoin Cash is among the most prominent of these offshoots.&lt;/p&gt;

&lt;p&gt;• New layers: A protocol built on top of an existing blockchain that can manage transactions independently -- something more akin to what Finney was suggesting. Some examples of these so-called “Layer-2” protocols are Ethereum’s Polygon and Bitcoin’s Lightning Network&lt;/p&gt;

&lt;p&gt;• Sharding: Splitting chunks of data into smaller parts to spread the computational and storage workload across the network. The information in one shard can still be shared, helping to keep the network relatively decentralized and secure.&lt;/p&gt;

&lt;p&gt;Conclusion&lt;br&gt;
So, we saw why Bitcoin was created, the problem it tried to solve and the technical challenges it had to overcome. We also saw that Bitcoins proof of work is a double ended sword that makes BTC incredibly resilient but at a cost of speed. I hope this video helps you explain to others what Bitcoin is for and see its limitations. &lt;/p&gt;

</description>
      <category>bitcoin</category>
      <category>blockchain</category>
      <category>mining</category>
    </item>
    <item>
      <title>Why YouTube can't survive without ADS</title>
      <dc:creator>min11benja</dc:creator>
      <pubDate>Mon, 21 Nov 2022 17:35:18 +0000</pubDate>
      <link>https://dev.to/min11benja/why-youtube-cant-survive-without-ads-2boa</link>
      <guid>https://dev.to/min11benja/why-youtube-cant-survive-without-ads-2boa</guid>
      <description>&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--yOqlpSf7--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/mppvzvlfdbaqi9r526yo.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--yOqlpSf7--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/mppvzvlfdbaqi9r526yo.png" alt="Image description" width="800" height="452"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;“The internet runs on ads” - Marques Brownlee&lt;/p&gt;

&lt;p&gt;Yeah it does &amp;amp; it sucks, people hate them so much that they are willing to pay not to see them. But ADS are everywhere on the internet, they have been around forever and they seem like a necessary evil. &lt;/p&gt;

&lt;p&gt;But what if it didn't have to? What would the internet be like without advertising? Can you imagine that? An ad-free utopia; &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--o0B819n2--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/bjnn5bevs17tuv66ulif.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--o0B819n2--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/bjnn5bevs17tuv66ulif.gif" alt="Image description" width="500" height="361"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Ugh, we can't go back to 90s style websites, but maybe we can do something about YouTube.&lt;/p&gt;

&lt;h2&gt;
  
  
  CAN YOUTUBE WORK WITHOUT ADS? WHAT WOULD THAT LOOK LIKE?
&lt;/h2&gt;

&lt;p&gt;It's not hard to imagine a YoutTube Without ads, because that's how it originally was when youtube started out. They were growing tremendously quickly and the Ex Paypal employees had no way of making money so they quickly burned through the cash they got from angel investors, and the only reason the whole entire project did not die, was because a Google Employee begged Google to buy the platform from them for 1.6 billion usd. &lt;/p&gt;

&lt;p&gt;In hindsight It seems stupid to have to convince the #1 largest search engine in the world that buying the 2nd largest search engine in the world that makes them 28 billion usd a year, would be a good idea, but at the time Google was not big on ads. &lt;/p&gt;

&lt;p&gt;In fact Google originally thought that most of their money was going to come from licensing their search engine to corporate clients &amp;amp; maybe 15 percent of their revenue was going to come from ads; Nobody really thought much of ads at that time and This is ironic; because their search algorithm was the origin of programmatic ads which would usher in LUDACRIS AMOUNTS OF MONEY from big companies. &lt;/p&gt;

&lt;p&gt;Programmatic advertising is a system that automates the processes and transactions involved with purchasing and dynamically placing ads on websites or apps. &lt;/p&gt;

&lt;p&gt;In the old days, ads were sold the same way they’re sold by a newspaper: you got a call from someone who wanted to buy a banner ad on your website and it was placed and removed manually there by a programmer.  Now this process could take weeks, and Google crunched it down to less than a second, because of this now everything in the internet relies on ads. &lt;/p&gt;

&lt;p&gt;It's just the simplest and sure fire way to make money on the internet, with enough traffic you can earn ridiculous amounts of money. &lt;/p&gt;

&lt;p&gt;The real trouble came when this business model was applied to social media sites such as Facebook, Instagram and YouTube. With that, a chain of unfortunate events was set in motion.&lt;br&gt;
TIME ON SITE : the metric to rule them all&lt;br&gt;
In order to make money &amp;amp; stay free, the user of the social media platforms must be shown ads. And unlike Google who can only suggest stuff to other websites with tools, these Social Media platforms can collect data on their users to hone in on one single metric over all: time-on-site. &lt;br&gt;
The longer you remain on YouTube, the more ads they can show you. More ads = more money. Whichever video succeeds at trapping the audience the advertisers want for the longest makes YouTUbe the most AMOUNT OF money, the channels that make the most money get recommended the most &amp;amp; grow quicker &lt;/p&gt;

&lt;p&gt;This means that discoverability for new channels or channels with an audience that Advertisers don't look for, goes out the drain. &lt;/p&gt;

&lt;p&gt;This mostly affects the content creators, who have gotten their VIDEOS DEMONETIZED, OR EVEN their whole channel cancelled. To make the amount of money that they were making before, Most of them have had to shift from a creative high quality type of content, to whatever trend or audience the algorithm is optimising for. &lt;/p&gt;

&lt;h2&gt;
  
  
  So in short ADS BAD!
&lt;/h2&gt;

&lt;p&gt;But without them, YouTube would quickly go BankRupt because who is going to pay for all the video hosting?&lt;/p&gt;

&lt;p&gt;&lt;a href="https://everysecond.io/youtube"&gt;Everysecond.io&lt;/a&gt; says that 400 hours of video get uploaded every minute to YouTube. This site estimates that YouTube makes around 35k per minute, if this metric is somewhat correct, I would only imagine their hosting and other costs would have to be much less than that. That is still a lot of money. &lt;/p&gt;

&lt;h2&gt;
  
  
  BUT BENJAMIN, WHAT ABOUT SUBSCRIPTIONS?
&lt;/h2&gt;

&lt;p&gt;Youtube has implemented many other monetization options to reduce its dependency on ads, one of them is its monthly Subscription, but according to &lt;a href="https://www.businessofapps.com/"&gt;businessofapps.com&lt;/a&gt; &lt;br&gt;
YouTube premium has only managed to reach 50 million subscribers as of 2021, that's a lot of subs but if you compare it with its 2.5 billion monthly active users, it's barely 2%. &lt;/p&gt;

&lt;p&gt;The global online advertising market size reached US$ 186.6 Billion in 2021. Looking forward, &lt;a href="https://www.imarcgroup.com/"&gt;IMARC Group&lt;/a&gt; expects the market to reach US$ 349.6 Billion by 2027. There is just so much money being thrown at ads by big companies that subscriptions are nowhere near what a platform can make with ads. This is something that even Netflix has had to come to terms with, they are now offering an ad supported tier to grow its user base.&lt;/p&gt;

&lt;p&gt;Now content creators have brand deals, and Patreon to help them monetize their videos without having to sacrifice THEIR REAL INTEREST in order to make whatever the algorithm promotes best. But that doesnt help small channels that have not yet amassed a big enough audience and following to get brand deals and patreon donations. They have to suck it up and grind their way to enough subscribers to start making any amount of money at all and that if Google can fit ads in their videos. &lt;/p&gt;

&lt;p&gt;And that's an ok system, most of those channels, myself included, are bad initially at making videos, so grinding out a lot of videos helps them get better at making videos but not necessarily at making better, or unique kinds of content. Most of the cases they deviate towards what makes them money and not to what they are passionate about or creatively want to express. &lt;/p&gt;

&lt;p&gt;Ad revenue mostly benefit big channels that work best with what advertisers want to sell&lt;/p&gt;

&lt;p&gt;And that's a bummer because the opposite of those channels are the kinds of channels I would like to make, and knowing that I will most likely get treated as a financial burden to the platform, is sad. &lt;/p&gt;

&lt;p&gt;Advertisers want to sell people stuff, I get it, they want their ads to be shown in channels that a lot of people that could buy their stuff watch. It makes perfect sense. &lt;/p&gt;

&lt;p&gt;But What if we could inject more money into the YouTube platform in a way that newly created channels and channels that don't fit well into the advertising business model could receive income from the get go?&lt;/p&gt;

&lt;h2&gt;
  
  
  INTRODUCING MICROPAYMENTS
&lt;/h2&gt;

&lt;p&gt;A **micropayment **is a small transaction amount that is usually spent on digital products over the internet. &lt;/p&gt;

&lt;p&gt;Micropayments can work in one of two ways: &lt;br&gt;
through a prepaid system or &lt;br&gt;
at the point of sale.&lt;/p&gt;

&lt;p&gt;A micropayment can RANGE FROM A few pennies UP TO several dollars, or even as small as a fraction of a penny. &lt;/p&gt;

&lt;p&gt;A number of micropayment systems were proposed and developed in the mid-to-late 1990s, all of which were ultimately unsuccessful because transaction fees often exceeded the payments themselves.&lt;/p&gt;

&lt;p&gt;Up until recently Micropayments were not ECONOMICALLY FEASIBLE, but recent technologies have opened the doors to this sort of payment. &lt;/p&gt;

&lt;p&gt;One example is &lt;a href="https://dropp.cc/"&gt;Dropp &lt;/a&gt; this is a micropayments platform that allows consumers and merchants to make and accept payments as small as a fraction of a cent for both physical and digital goods and services. &lt;/p&gt;

&lt;p&gt;Dropp is unique In that it accepts both FIAT and cryptocurrency, as well as maintains complete privacy of consumer transactions. They recently added a plugin in Shopify that lets its merchants charge fractions of a penny for digital goods. Check them out at &lt;a href="https://dropp.cc/merchants/shopify/"&gt;drop.cc shopify app&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  MAKE CONTENT CREATORS MORE MONEY WITH MICRO TRANSACTIONS
&lt;/h2&gt;

&lt;p&gt;What if we made all current vanity metrics on YouTube a micropayment?&lt;/p&gt;

&lt;p&gt;I made a list of all the desirable metrics inside YouTube and thought what if we added a fraction of a penny to each one. &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Likes&lt;/li&gt;
&lt;li&gt;Shares&lt;/li&gt;
&lt;li&gt;Comment likes&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;How much money would a small channel that gets likes make? &lt;/p&gt;

&lt;p&gt;Even its Audience could make money from a helpful, or witty comment&lt;/p&gt;

&lt;p&gt;What else can we add money to besides vanity metrics?&lt;/p&gt;

&lt;h2&gt;
  
  
  SO IN CONCLUSION
&lt;/h2&gt;

&lt;p&gt;Ads aren't going away anytime soon. There is just way too much money being poured in by big companies, that it wouldn't make economic sense to replace them.&lt;/p&gt;

&lt;p&gt;I think a YouTube without ADS would not be as big as it is, but maybe adding Micro Payments can help small channels, users, and YouTube inject more money into what elevates the value of each video. &lt;/p&gt;

&lt;p&gt;I will be making a small demo of what a YouTUbe with Micropayments would look like, and later on adding real microtransactions to that demo to simulate real money being transferred around with each action. &lt;/p&gt;

&lt;p&gt;If this works, I will share this with people smarter than me, ask for their feedback, iterate and tweet to people that work at YouTube, and different content creators to hopefully push for this to get implemented.&lt;/p&gt;

&lt;p&gt;So what do you think? Can we make YouTUbe more money while helping out small content creators and channels that don't fit in with its advertisement model? &lt;/p&gt;

&lt;p&gt;Let me know what you think in the comments below, and if you do know someone who could make this happen, please share this video with them.&lt;/p&gt;

&lt;p&gt;Thank you for reading.  &lt;/p&gt;

</description>
    </item>
    <item>
      <title>How to convince people to change their mind about Hedera Hashgraph?</title>
      <dc:creator>min11benja</dc:creator>
      <pubDate>Wed, 17 Nov 2021 14:59:04 +0000</pubDate>
      <link>https://dev.to/min11benja/how-to-convince-people-to-change-their-mind-about-hedera-hashgraph-4bg9</link>
      <guid>https://dev.to/min11benja/how-to-convince-people-to-change-their-mind-about-hedera-hashgraph-4bg9</guid>
      <description>&lt;p&gt;How do you go about convincing someone who, for one reason or another, doesn’t see eye-to-eye with you? Someone who gives you a flat out “no”? It's hard but possible.&lt;/p&gt;

&lt;p&gt;Going against what they know and have emotionally and financially decided to invest in can be ridiculous at best and threatening/insulting at most, so be prepared to receive an emotional response and leave all logic out the window.&lt;/p&gt;

&lt;p&gt;It's no easy task, but the people who can consistently do this are very successful in businesses or leadership roles. It's a skill worth learning.&lt;/p&gt;

&lt;p&gt;For a more detailed guide, I would recommend reading this book and applying for a sales Job (nothing beats real-world experience)&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Laura’s book, Edge: Turning Adversity into Advantage&lt;/strong&gt;. It's a compilation of interviews to more than 60 leaders who were trying to convince business associates and other constituents to change their minds on a course of action that they initially disagreed with. The leaders who were most successful in overcoming others’ skepticism were those who diagnosed the root of the fundamental disagreement before trying to persuade.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Ok, so how do you go about doing this?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;These leaders often pinpointed which aspects of their arguments elicited the most pushback and the most emotional reactions. Then, depending on the answer, they approached the situation with one of the following three targeted strategies:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;The Cognitive Conversation&lt;/strong&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;When to use:&lt;/strong&gt; When you think the detractor may be opposed to your argument because of an objective reason. This strategy is most useful when the person you are trying to convince is a no, no-nonsense type of person, who sets asides emotions and favors logical and hard data over all.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How it works:&lt;/strong&gt; A successful cognitive conversation requires two things: sound arguments and good presentation. You want to prepare sound arguments that disprove the detractor’s objections. You also want to use a logical framework and clear storyline to force the detractor to reassess their thinking. Be very cautious about not introducing emotions into the discussion, which could give the impression that you and your detractor are not on common ground.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. The Champion Conversion&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;When to use:&lt;/strong&gt; When you see data and logical arguments are getting you nowhere.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How it works:&lt;/strong&gt; Don’t jump in and try to convince the other person. Instead, invest time in personally learning about and building rapport with them. Here, it’s not about arguments or presentation, at least initially, but understanding their perspective and why they might feel personally affronted. Once they feel you get them, and they trust you enough, they will open up to your proposal.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. The Credible Colleague Approach&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;When to use:&lt;/strong&gt; There are times when the detractor’s deeply-held personal beliefs make them fundamentally opposed to your proposal. It’s sometimes tough to pinpoint where these personal beliefs stem from, but some combination of the person’s upbringing, personal history, and unspoken biases will, at times, make it seemingly impossible for them to accept a decision, no matter what logical or emotional argument you throw their way.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How it works:&lt;/strong&gt; Unfortunately, in these situations, there isn’t much you can say or do in the short term to change their mind. You need a person they trust to vouch for you. If you have ever seen a mafia movie, this is exactly how undercover cops get in.&lt;/p&gt;

&lt;p&gt;Rather than trying to argue with someone who seems resistant, bring in a credible colleague. A champion of your position from another part of the organization, whether they are a peer or superior, may be better-suited to convince this detractor. This forces the detractor to disentangle who you are from what your argument might be and evaluate the idea based on its objective merits. If you and the detractor are at an impasse, the credible colleague might just tip the scales in your favor.&lt;/p&gt;

&lt;p&gt;I make a big emphasis on the 2nd Strategy, the Champion Conversion because it seems to be the type of situation you were in. They don't trust you enough, you need to build report with them and then once they open up you can show them the sound arguments.&lt;/p&gt;

&lt;p&gt;A great example of this situation is Michael's sale from the hit series "The Office" please watch this 5-minute video. It will explain this strategy way better than I can with words (&lt;a href="https://www.youtube.com/watch?v=vYWwfdb2A88"&gt;https://www.youtube.com/watch?v=vYWwfdb2A88&lt;/a&gt;)&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The catch:&lt;/strong&gt; No matter how much of a champion the other person becomes, don’t expect them to agree with a decision that’s fundamentally illogical. You can’t rely on relationship alone; your stance still requires to be backed by clear logic. Additionally, these types of detractors can easily sense if you’re trying to manipulate the situation to get them on your side. Authenticity is key: allow the other person to see who you are so that they can more fully understand your point of view.&lt;/p&gt;

&lt;p&gt;Make a list of possible excuses as to why they won't change or consider Bitcoin or Ethereum the better option, and address each one of them in your pitch after you feel they have opened up.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Empathy is key here.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;If you find out what their main incentives are, then you can generally pinpoint a list of objections. Usually there are 3 kinds of people who would be interested in Hedera. They generally fall into one of these aspects in terms of incentive:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Business people looking for a competitive Edge that gets them more sales, or a promotion/recognition&lt;/li&gt;
&lt;li&gt;Developers looking for easier, safer and best practice approach to building or improving a tool/software/app&lt;/li&gt;
&lt;li&gt;Retail investors looking for the next big thing to get in early and exponentially grow their investment for an early retirement&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I am willing to bet both you and them fall in slot 3. Retail Investors mostly interested in seeing quick short-term return on their investments.&lt;/p&gt;

&lt;p&gt;Remember, you are asking them to reconsider and sell off what they have seen to be proven and tested and get into an even riskier and unknowned territory. It's a big ask, but it's possible, since you went through it.&lt;/p&gt;

&lt;p&gt;Think what would make you sell off all your portfolio and go all in or partially with another new project? What's stopping you from doing that right now? Those might be their objections. If not, you need to listen to what they have to say or feel like you aren't getting. Once they trust you, they will tell you. Try it out, let me know what happened, and if you still don't succeed  I can help you. &lt;/p&gt;

</description>
    </item>
    <item>
      <title>Help me understand how Hedera (or any DLT) is integrated into the metaverse?</title>
      <dc:creator>min11benja</dc:creator>
      <pubDate>Mon, 08 Nov 2021 18:43:15 +0000</pubDate>
      <link>https://dev.to/min11benja/help-me-understand-how-hedera-or-any-dlt-is-integrated-into-the-metaverse-3edf</link>
      <guid>https://dev.to/min11benja/help-me-understand-how-hedera-or-any-dlt-is-integrated-into-the-metaverse-3edf</guid>
      <description>&lt;p&gt;Right now we have centralized 2d and 3d metaverses. These places are the new social network. Its where your kids friends are at, where they hang out play and escape.&lt;/p&gt;

&lt;p&gt;If you have a kid, or a nephew under 13 years old you can ask them and see just how they are already living out in the future and all of us boomers trying to play catch up.&lt;/p&gt;

&lt;p&gt;Just ask them "What do they want for this years birthday gift?"&lt;/p&gt;

&lt;p&gt;Its not toys, candy, video games. I can bets its either one of these three coins;&lt;/p&gt;

&lt;p&gt;Roblox's Rubox coins&lt;/p&gt;

&lt;p&gt;Minecraft's minecoins&lt;/p&gt;

&lt;p&gt;Fortnite's Vbucks&lt;/p&gt;

&lt;p&gt;Player Unknowned battleground's G-coins&lt;/p&gt;

&lt;p&gt;Etc.&lt;/p&gt;

&lt;p&gt;Most of these centralized metaverse places, have their own coin much like Hbars for Hedera.&lt;/p&gt;

&lt;p&gt;You buy these using InApp Google Play, or Apple pay, online with PayPal, or your Credit card with swipe or another third party payment procesor. Not only do they get a cut from each transaction but they are also the ones that can set the rules of who and how much your players can pay.&lt;/p&gt;

&lt;p&gt;One recent example of centralized gatekeepers getting backlash from the people that use them, was fortnite's lawsuit against apple. Epic Fortnites parent company sued Apple in August last year, after the iPhone maker removed Epic's popular game Fortnite from its app store. Epic, in its suit, said Apple violated antitrust laws by forcing developers to use its payment system to take a 30% cut and forbidding them from telling app users about alternative ways to pay.&lt;/p&gt;

&lt;p&gt;Basically Fortnite did not want to pay 30% of their yearly revenue to Apple and made it posible to buy their vbucks for cheaper in their website to its users, Apple removed them from their app store and Fortnite sued them.&lt;/p&gt;

&lt;p&gt;And thats nothing compared to what Roblox charges its developers (-75% cut)&lt;/p&gt;

&lt;p&gt;All of these metaverse users and creators are getting screwed left and right by the middleman gatekeepers.&lt;/p&gt;

&lt;p&gt;If you have seen the movie Ready player one Facebook, and all these companies are IOI the bad guys looking to monetize a great place.&lt;/p&gt;

&lt;p&gt;Decentralization is crucial to the metaverse. If an organization gains most of the control over the metaverse, it is likely to become another centralized operating system (just like the Internet giants we see today) and charge an unfair amount of money for what they bring in, or jus plain out abuse their power to jeopardize its users and benefit their shareholders like Facebook.&lt;/p&gt;

&lt;p&gt;I hope I could convince you on the need for decentralized governnace over the metaverse and talked a little about the horrors of middleman gatekeepers and their inevitable corruption into centralized Monopolies screwing the creators and users for their own benefit.&lt;/p&gt;

&lt;p&gt;So now on to the specifics.&lt;/p&gt;

&lt;p&gt;How would DLT better the metaverses that we have now?&lt;/p&gt;

&lt;p&gt;It would first and most important allow it to be decentralized in power. A metauniverse must be fair and decentralized before it can really thrive, rather than grow into another entity that controls. Only in this way can we embrace a real “oasis” like metaverse.&lt;/p&gt;

&lt;p&gt;The open-source code is available for all, so creators can focus on making unique works instead of wasting time on suing each other and reporting copyright infringement.&lt;/p&gt;

&lt;p&gt;Free to play as esential as Free to publish: If a creator needs to ask an operating system for permission to publish a product on it, and even worse pay them in order to get them seen he has to pay for his innovation and shift the focus of its creation from fun to Return on investment.&lt;/p&gt;

&lt;p&gt;Distributed computing: Cloud computing is just stepped one. As time goes by, more computing will be pushed to the edge, to the remote end, or even into the individual’s home. The hashrates will be more like utility programs on the grid, instead of a data center. The idle hashrates will be distributed to the computer network, so that creators can focus on the content without worries about building or accessing backend functions or the failure of a single node.&lt;/p&gt;

&lt;p&gt;P2P: Fewer servers mean fewer permissions and lower project complexity. Many projects including games and those involving multiverse experience can be built with a design that does not require the use of a server.&lt;/p&gt;

&lt;p&gt;Smart contracts: A smart contract is designed to automatically execute transactions on the blockchain. Removing middle man and avoiding scams.&lt;/p&gt;

&lt;p&gt;Microservices a smaller unit of service, that shifts from a large single backend and automatically scales in the cloud to reduce risk and complexity. One example would be Micropayments*&lt;/p&gt;

&lt;p&gt;Micropayments were envisioned to be small payments (from less than one cent to a couple dollars) to be used to sell online content, one link or download at a time, to consumers. This would be a model that replaced the more traditional subscription model. The idea is that users would have access to only those services or articles that they actually want, and the income from these micropayments would supplement the advertisement income so that providers could focus on content.&lt;/p&gt;

&lt;p&gt;Imagine a social ntwork where all the vanity metrics that are just for show, are actually money. Sending out a witty tweet and getting cents for every retweet. cents for every photo like or coment on a video. Cents for every Reddit Upvote, that would be nice.&lt;/p&gt;

&lt;p&gt;The reason that micropayments were never in widespread use is that they are not financially feasible unless a business model or system is developed to handle micropayments.&lt;/p&gt;

&lt;p&gt;Here is where Hederas crazy fast and cheap transactions can really shine. Its what Leemon designed Hedera for, enableling a virtual world.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Does Hedera solve the Blockchain Trilema?</title>
      <dc:creator>min11benja</dc:creator>
      <pubDate>Sun, 07 Nov 2021 00:40:00 +0000</pubDate>
      <link>https://dev.to/min11benja/does-hedera-solve-the-blockchain-trilema-41bb</link>
      <guid>https://dev.to/min11benja/does-hedera-solve-the-blockchain-trilema-41bb</guid>
      <description>&lt;p&gt;All Distributed ledger technologies have the potential to be the trust layer of the internet. Thats what makes them so revolutionary, but it turns out they cant do it at scale just yet. &lt;/p&gt;

&lt;p&gt;As I understand this, most Blockchains could solve the various trust issues in the internet without an intermediary somehow but they cant do it fast enough, cheap enough, or securly enough to replace what ever we are using that does require a middleman.&lt;/p&gt;

&lt;p&gt;Blockchain networks like Bitcoin have not replaced the current system because Bitcoin cant be fast enough to handle the current demand of transactions per second that Visa is doing without giving away either its decentralization or degree of security. Its a network that was design to get slower as it grows to avoid forks.&lt;/p&gt;

&lt;p&gt;If it could there would not be any need for anything else other than Bitcoin. No network can at the moment claim they have solved the &lt;strong&gt;Blockchain Trilemma;&lt;/strong&gt; A term coined by Ethereums creator Vitalik Buterin himself. A belief that a truly decentralized network can only be decentralized and safe or decentralized and fast but it can't be all 3 at the same time.&lt;/p&gt;

&lt;p&gt;Right now there is a race to setup a network that is faster, more secure, and scalable than Bitcoin and what ever Visa or any Bank could dream of offering.&lt;/p&gt;

&lt;p&gt;Thats what Hedera is trully after. Its a huge experiment trying to disproof this belief.&lt;/p&gt;

&lt;p&gt;Hederas Network is currently 2/3&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Its Secure aBFT secure, the most secure a network could get mathematically&lt;/li&gt;
&lt;li&gt;Its fast, 10k tps fast and its cheap, pennies on a dime cheap.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Its just missing the decentralization part, its getting there. But right now only Hedera councils can setup nodes and stake Hbar. When anyone can setup a node and steak their Hbars then we can trully claim Hedera has solved the Blockchain Trilemma. We can say that only Hedera has solved this problem AT SCALE! &lt;/p&gt;

&lt;p&gt;Untill then the trillion dollar problem is still up for graves. Im putting all my money on Hederas team.&lt;/p&gt;

&lt;p&gt;For more info on why its not decentralized form the getgo and how its going to get there please &lt;a href="https://youtu.be/QTNNYeSks-s"&gt;watch this video&lt;/a&gt;.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>What problem does Blockchain try to solve?</title>
      <dc:creator>min11benja</dc:creator>
      <pubDate>Sun, 07 Nov 2021 00:37:41 +0000</pubDate>
      <link>https://dev.to/min11benja/what-problem-does-blockchain-try-to-solve-49in</link>
      <guid>https://dev.to/min11benja/what-problem-does-blockchain-try-to-solve-49in</guid>
      <description>&lt;p&gt;The problem it solves is on the Bitcoin genesis block itself.&lt;/p&gt;

&lt;p&gt;"The Times 03/Jan/2009 Chancellor on brink of second bailout for banks."&lt;/p&gt;

&lt;p&gt;Satoshi Nakamoto, the pseudonymous inventor of Bitcoin, included this message from a Times newspaper article on the day the block was produced. It both timestamped the beginning or Bitcoin and the start of a new era.&lt;/p&gt;

&lt;p&gt;When the problem is not well understood, “fancy solutions” only create new problems. Conversely, the more we understand the problem, the more likely we understand the root cause and can create countermeasures so the problem won't recur.&lt;/p&gt;

&lt;p&gt;Bitcoin was invented to solve the problem of irresponsible monetary actions in the hands of short term idiot politicians and greedy to the bone bankers, abusing the trust we handed them and devaluating the money over the years to -99% of what it was worth when it was taken off the gold standard.&lt;/p&gt;

&lt;p&gt;Nothing has changed ever since, with the huge surges in money printing in the US and around the world anything you have of money is worth less than the paper it was printed on. Middleman still abuse their trust and most of the people are fine with it, they give away so much for a little short term convinience.&lt;/p&gt;

&lt;p&gt;The internet has a trust problem. And middle man like Bankers, corporations and politicians have explotited and abused that trust for far too long.&lt;/p&gt;

&lt;p&gt;Blockchain helps streamline the entire trust process by being transparent and inmutable, effectively cutting out any need for middlemen. Imagine a world without corruption, no hacks or scams. Where there is no need for institutions because its all automatically run by the Blockchain. A truly world inclusive market, with no need to know or trust others because the trust is built in the system you are using. Thats a world I woul like for myself and others.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>What is a Hashgraph, &amp; how is it different from a blockchain?</title>
      <dc:creator>min11benja</dc:creator>
      <pubDate>Tue, 20 Apr 2021 03:22:49 +0000</pubDate>
      <link>https://dev.to/min11benja/what-is-a-hashgraph-how-is-it-different-from-a-blockchain-32op</link>
      <guid>https://dev.to/min11benja/what-is-a-hashgraph-how-is-it-different-from-a-blockchain-32op</guid>
      <description>&lt;h2&gt;
  
  
  What is a Hashgraph?
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Hashgraph&lt;/strong&gt; is a Proof of stake distributed ledger technology and governing body built from the ground-up to support new and existing applications running at web scale. &lt;/p&gt;

&lt;p&gt;It is also a data structure which resembles a directed acrylic graph, based on two unique techniques, i.e., Virtual Voting and Gossip about Gossip. Hashgraph uses HBAR as its native cryptocurrency of the Hedera public network. &lt;/p&gt;

&lt;p&gt;What does Hbar Crypto do? &lt;br&gt;
Hbars are used to power decentralized applications and protect the network from malicious actors. Developers use hbars to pay for network services, such as transferring hbars, managing fungible and non-fungible tokens, and logging data. &lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;What is Gossip about Gossip?&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Gossip about Gossip means to spread a piece of information to another person who is not aware of it yet. It can be like a protocol to send information between nodes in a network. The nodes send data to random members in the network with the history of the previous transaction; this results in the circulation of all the information among all the members at a very fast speed.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;What is Virtual Voting?&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Virtual voting is a type of consensus algorithm defined as the way a node gets to know whether the transaction is valid or not. If any transaction has 2/3rd of the node as a witness in the network, then it is a valid transaction. No matter if a third node turns Byzantine, the algorithm would still perform its function because Hashgraph is based on Byzantine Fault Tolerant System. The voting takes place over plenty of rounds.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;How is Hashgraph different from a blockchain?&lt;/strong&gt;
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Open-source vs. Patented&lt;/strong&gt; - Blockchain technologies like bitcoin are open-source; its design is public, nobody owns or controls Bitcoin and everyone can take part of it. Hedera Hashgraph holds a patent over its unique consensus algorithm, but its services, mirror nodes, and various tools were all released as Open Source while the platform is released as Open Review.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Forkable vs unforkable DLT&lt;/strong&gt;- Blockchain being open sourced does allow for disputes to result in forking creating instability and uncertainty for those building on top of it. Hedera Hashgraph releases its code for review so that the community can understand what the code does, to build trust, and to allow suggestions for changes to the code. But it is limited to open review so that it will not be used to create a fork or split of the network. As a way of ensuring the ledger will be stable, without forking or splitting.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Different way of coming to consensus&lt;/strong&gt; - Blockchain based DLTs have numerous types of consensus algorithm. All with different pros and cons, suited for different use cases. Its most popular being &lt;strong&gt;proof of work&lt;/strong&gt; used by Bitcoin. Hedera Hashgraph uses a "virtual voting" consensus algorithm that sidesteps most of the Proof of work problems and bottlenecks, allowing it to provide low-cost and high performance without failure. Without the need for high computation power and electrical supply. &lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Mined coins vs minted coins&lt;/strong&gt; - Mining is the process of creating a new block with hashes and adding it to the blockchain. Generating just any hash for a set of bitcoin transactions would be trivial for any modern computer, so to turn the process into "&lt;strong&gt;work&lt;/strong&gt;," the bitcoin network sets a certain level of "&lt;em&gt;difficulty&lt;/em&gt;." This is what I understand as mining. A puzzle where a group of computers guess at a number until one guesses right. The one that guesses right gets to add a block to the blockchain and is rewarded with a Bitcoin. This hapends every 10 minutes on average. It makes the puzzle gradually harder and halves the reward every 4 years for reasons*. This seemed ok at first but as it turns out this makes the bitcoin network not scale at the level needed to replace visa as the network gradually gets slower &amp;amp; more expensive intentional to avoid forks and other reasons*. For more info on the bitcoin scaling problem look [here][1] Hashgraph sidesteps that scaling problem by removing mining entirely and using an entirely new ledger structure, the Hashgraph. That's why all the Hbar are already made. They are locked up and are to be gradually released for reasons*. But Hashgraph is still trying to become a decentralized network, and requires computers for it to validate transactions. Even thought Hashgraph native coin (Hbar) can't be mined since all coins were minted from day one, there is still an incentive to pony up your computer and electricity. You can't mine more Hbar, but soon you can set up a node and get transaction fees for it. Or you can own Hbar and lend them to nodes and get a transaction fee for that.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Cryptographic hash security vs aBFT&lt;/strong&gt; - A cryptographic hash function has provable security against collision attacks if finding collisions is provably polynomial-time reducible from problem P which is supposed to be unsolvable in polynomial time. The function is then called provably secure, or just provable. While a Hashgraph is asynchronous Byzantine Fault Tolerance (aBFT) - the highest degree of security a consensus algorithm can provide. ABFT means that finality of consensus will be reached with 100% probability if a) attackers control less than 1/3 of the voting power over consensus and b) we assume only that messages from an honest node will eventually get through, but make no assumptions about how long it will take to do so. Specifically, the attacker must control less than 1/3 of the stake in a proof-of-stake system, or less than 1/3 of the nodes in a system without proof-of-stake. The attacker can control the entire communication network in the sense that the attacker can delete messages, or delay messages for arbitrary amounts of time, with the only limitation being that if honest node Alice repeatedly tries to send messages to honest node Bob, eventually one will get through. The system is resilient to attacks on both network nodes and the communication network itself, as long as both types of attacks are within the limits above. The finality of consensus can be contrasted with the probabilistic confidence of proof-of-work systems, where there is always a chance (even if small) of a transaction being retroactively rolled back.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Centralized vs decentralized from the get go&lt;/strong&gt; - Hedera Hashgraph aims to be fully decentralized, but it's not that easy to get right. You see Bitcoin and Ethereum started out decentralized from the very beginning anyone could join and contribute to the network with mining, but with time a concentration of pools emerged where electricity was cheap and whales that got in early made up far too much of the majority making the network more and more centralized exposing it to attacks and giving those people leverage over the network. Hashgraph wanted to avoid this very outcome. They are trying a different approach where they will start centralized and slowly be opening it up to the public becoming more decentralized over time.&lt;/li&gt;
&lt;/ol&gt;


&lt;/li&gt;
&lt;/ol&gt;

&lt;h1&gt;
  
  
  19: Path to a Trusted, Empowered Digital Future with Co-founders Dr. Leemon Baird &amp;amp; Mance Harmon : &lt;a href="https://hedera.com/podcast"&gt;https://hedera.com/podcast&lt;/a&gt;
&lt;/h1&gt;

</description>
      <category>hashgraph</category>
      <category>hederahashgraph</category>
      <category>blockchain</category>
      <category>javascript</category>
    </item>
    <item>
      <title>Why is Hedera Hashgraph not fully decentralized from the start?</title>
      <dc:creator>min11benja</dc:creator>
      <pubDate>Tue, 20 Apr 2021 03:19:13 +0000</pubDate>
      <link>https://dev.to/min11benja/why-is-hedera-hashgraph-not-fully-decentralized-from-the-start-a0m</link>
      <guid>https://dev.to/min11benja/why-is-hedera-hashgraph-not-fully-decentralized-from-the-start-a0m</guid>
      <description>&lt;p&gt;In short: &lt;br&gt;
Same reason why we have had so many Bitcoin Forks, developers, miners, and regulators just can't come to an agreement. &lt;/p&gt;

&lt;p&gt;Like in any big project you need a very competent group of leaders or a diverse committee with a lot of knowledge and experience in the subject to evaluate and consider possibilities and take the big decisions. &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Mike Orcutt&lt;/strong&gt; "&lt;em&gt;In cryptocurrency circles, calling something “centralized” is an insult. The epithet stems from Bitcoin creator Satoshi Nakamoto’s revelation: a monetary system doesn’t need a central authority, like a government, to work. That’s such a potent idea that it’s morphed into a battle among crypto-enthusiasts between good—that is, “decentralized”— currencies and evil ones, or anything with a whiff of “centralization,” that are assumed to threaten the utopian view of cryptocurrencies as the vehicle for a new financial world order&lt;/em&gt;."&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Source: &lt;a href="https://www.google.com/amp/s/www.technologyreview.com/2018/01/18/146141/bitcoin-and-ethereum-have-a-hidden-power-structure-and-its-just-been-revealed/amp/"&gt;Bitcoin and Ethereum have a hidden power structure, and it’s just been revealed&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;It's not fully decentralized yet for an excellent reason. You see bitcoin and Ethereum started out decentralized because anyone could join and contribute to the network with mining,  but with time there were pools that got together or in case of Ethereum whales and made up way too much of the majority making the network centralized exposing it to attacks and giving those people leverage over the network.&lt;/p&gt;

&lt;p&gt;Hashgraph wanted to avoid this very outcome by starting out centralized and veting each node to make sure they don't have malicious intent and establishing a governance council of competing international entities to keep each other in check and replacing them from time to time.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://hiddenforces.io/podcasts/hedera-hashgraph-goes-public-leemon-baird-mance-harmon/"&gt;The ‘Hidden Forces’ podcast has a great episode on this - episode 100&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Leemon Baird 1:26:37&lt;/strong&gt; “&lt;em&gt;...Kabal implies some very close buddies that are very closely aligned. That’s why we have the decentralized council. They’re on different continents in different industries with different interests. So, they can collude with various things but to a large degree they are balancing each other with checks and balances. Plus we have the transparency. Even the meeting minutes get published. Total transparency, the code can be seen, you can see what they’re doing with the code base. If they do something truly nefarious like inflate the money supply, the backlash to them will hurt substantially.&lt;/em&gt;”&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The whole point of decentralized systems is to be more secured by having them spread out and avoiding a middle man by democratizing the consensus among each other. We have the opposite occurring with both bitcoin and Ethereum.&lt;/p&gt;

&lt;p&gt;Hedera Hashgraph aims to be fully decentralized, but it's not that easy to get. They will start centralized and slowly be opening it up to the public becoming more decentralized over time. Here is a video that explains this path way better than I can by Dr. Leemon himself I highly recommend you to watch it:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://youtu.be/QTNNYeSks-s"&gt;Hedera Hashgraph Webinar: Our path to decentralization by Dr. Leemon Baird&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;​&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Mike Orcutt&lt;/strong&gt; "&lt;em&gt;...the process of verifying transactions and securing a blockchain ledger against attack, called mining, is not actually that decentralized in either system. Bitcoin and Ethereum are open blockchain systems, meaning that in principle anyone can be a miner (see “What Bitcoin Is, and Why It Matters”). But organizations have formed to pool mining resources. The researchers found that the top four Bitcoin-mining operations had more than 53 percent of the system’s average mining capacity, measured on a weekly basis. Mining for Ethereum was even more consolidated: three miners accounted for 61 percent of the system’s average weekly capacity&lt;/em&gt;."  &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Mike Orcutt&lt;/strong&gt; "&lt;em&gt;They also found that 56 percent of Bitcoin’s “nodes,” the computers around the world running its software (not all of them engage in mining), are located in data centers, versus 28 percent for Ethereum. That might indicate that Bitcoin is more corporatized, Sirer says. Overall, the group concluded that neither network “has strictly better properties than the other&lt;/em&gt;"&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;For more info on the bitcoin and Ethereum being centralized check this article. &lt;a href="https://www.google.com/amp/s/www.technologyreview.com/2018/01/18/146141/bitcoin-and-ethereum-have-a-hidden-power-structure-and-its-just-been-revealed/amp/"&gt;Bitcoin and Ethereum have a hidden power structure, and it’s just been revealed&lt;/a&gt;&lt;/p&gt;

</description>
    </item>
    <item>
      <title>How are the Hbar tokens/coins mined or created?</title>
      <dc:creator>min11benja</dc:creator>
      <pubDate>Tue, 20 Apr 2021 03:19:05 +0000</pubDate>
      <link>https://dev.to/min11benja/how-are-the-hbar-tokens-coins-mined-or-created-58ci</link>
      <guid>https://dev.to/min11benja/how-are-the-hbar-tokens-coins-mined-or-created-58ci</guid>
      <description>&lt;p&gt;I don't know how HBARS are created. I think they were made from day 1 and all available bitcoins could also be made from day one, but to incentivize people to pony up their internet electricity and hardware for the network verification of transactions mining was thought up.&lt;/p&gt;

&lt;p&gt;Generating just any hash for a set of bitcoin transactions would be trivial for a modern computer, so to turn the process into "work," the bitcoin network sets a certain level of "difficulty." This is what I understand as mining. A puzzle where computers guess at it until one guesses right. This hap ends every 10 minutes on average.&lt;/p&gt;

&lt;p&gt;It makes the puzzle gradually harder and halves the reward every 4 years for reasons*. This seemed ok at first but as it turns out this makes the bitcoin network not scale at the level needed to replace Visa as the network gradually gets slower &amp;amp; more expensive intentionally to avoid forks and other reasons*. &lt;/p&gt;

&lt;p&gt;For more info on the bitcoin scaling problem look &lt;a href="https://en.m.wikipedia.org/wiki/Bitcoin_scalability_problem#:~:text=The%20bitcoin%20scalability%20problem%20is,transactions%20on%20the%20bitcoin%20network"&gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Hashgraph sidesteps that scaling problem by removing mining entirely and using an entirely new ledger structure, the Hashgraph. I am not certain if that is why all the HBARS are already made. They are locked up and are to be gradually released for reasons*.&lt;/p&gt;

&lt;p&gt;But Hashgraph is still aiming to become a decentralized network, and requires computers for it to validate transactions. Even thought HBAR can't be mined there is still an incentive to pony up your computer and electricity.&lt;/p&gt;

&lt;p&gt;You can't mine more HBAR, but soon you can set up a node and get transaction fees for it. Or you can own HBARS and lend them to nodes and get a transaction fee for that. &lt;/p&gt;

</description>
    </item>
    <item>
      <title>What do the Hedera Hashgraph council do? And who are all the current members in 2021?</title>
      <dc:creator>min11benja</dc:creator>
      <pubDate>Tue, 20 Apr 2021 03:18:49 +0000</pubDate>
      <link>https://dev.to/min11benja/what-do-the-hedera-hashgraph-council-do-and-who-are-all-the-current-members-in-2021-jba</link>
      <guid>https://dev.to/min11benja/what-do-the-hedera-hashgraph-council-do-and-who-are-all-the-current-members-in-2021-jba</guid>
      <description>&lt;p&gt;The Hedera Council are there to provide a decentralized governance model. They are an elected group of highly diversified leading global organizations committed to sporting the growth &amp;amp; development of the Hedera network. Who would have a lot to lose if they acted out of line or in Cajun with other organizations for their benefit. They are re elected now and then.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;“The goal was to make sure no single party has no more or less influence over the network than any single party,” said Harmon. All the 39 members are “on par with one another,” he explained.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;There are to be 39 total members, currently there are 21:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Avery Dennison&lt;/li&gt;
&lt;li&gt;Boeing&lt;/li&gt;
&lt;li&gt;Dentons&lt;/li&gt;
&lt;li&gt;Deutsche Telekom&lt;/li&gt;
&lt;li&gt;DLA Piper&lt;/li&gt;
&lt;li&gt;EDF (Électricité de France)&lt;/li&gt;
&lt;li&gt;eftpos&lt;/li&gt;
&lt;li&gt;FIS (WorldPay)&lt;/li&gt;
&lt;li&gt;Google&lt;/li&gt;
&lt;li&gt;IBM&lt;/li&gt;
&lt;li&gt;LG&lt;/li&gt;
&lt;li&gt;Magalu&lt;/li&gt;
&lt;li&gt;Nomura Holdings&lt;/li&gt;
&lt;li&gt;Shinhan Bank&lt;/li&gt;
&lt;li&gt;Standard Bank Group&lt;/li&gt;
&lt;li&gt;Swirlds&lt;/li&gt;
&lt;li&gt;Tata Communications&lt;/li&gt;
&lt;li&gt;University College London (UCL)&lt;/li&gt;
&lt;li&gt;Wipro&lt;/li&gt;
&lt;li&gt;Zain Group&lt;/li&gt;
&lt;li&gt;Chain Link&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Their responsibilities include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Hosting &amp;amp; maintaining initial nodes&lt;/li&gt;
&lt;li&gt;Establishing a governance framework for global markets&lt;/li&gt;
&lt;li&gt;Overseeing the software run by hundreds of thousands of nodes at scale&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Basically, govern software changes and overall direction, while bringing stability and continued decentralization to the public network.&lt;/p&gt;

&lt;p&gt;Source: YouTube &lt;a href="https://www.youtube.com/watch?v=dtVTtiTrdp4"&gt;Hedera Governing Council Overview&lt;/a&gt;&lt;/p&gt;

</description>
      <category>hashgraph</category>
      <category>hederahashgraph</category>
      <category>blockchain</category>
      <category>javascript</category>
    </item>
  </channel>
</rss>
