<?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: Niharika Singh ⛓</title>
    <description>The latest articles on DEV Community by Niharika Singh ⛓ (@niharrs).</description>
    <link>https://dev.to/niharrs</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%2F382126%2Fc4b1342e-743c-4b43-9bae-f98e27748491.jpg</url>
      <title>DEV Community: Niharika Singh ⛓</title>
      <link>https://dev.to/niharrs</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/niharrs"/>
    <language>en</language>
    <item>
      <title>Learn how to create a video summarizer using Whisper from OpenAI and BART from Meta on Hugging Face</title>
      <dc:creator>Niharika Singh ⛓</dc:creator>
      <pubDate>Wed, 13 Sep 2023 14:27:20 +0000</pubDate>
      <link>https://dev.to/niharrs/learn-how-to-create-a-video-summarizer-using-whisper-from-openai-and-bart-from-meta-on-hugging-face-3gn5</link>
      <guid>https://dev.to/niharrs/learn-how-to-create-a-video-summarizer-using-whisper-from-openai-and-bart-from-meta-on-hugging-face-3gn5</guid>
      <description>&lt;p&gt;Originally posted on: &lt;a href="https://writings.niharika.me/how-to-improve-youtube-with-llms"&gt;https://writings.niharika.me/how-to-improve-youtube-with-llms&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Last update: Wednesday, September 13, 2023&lt;/p&gt;

&lt;p&gt;The way humans interact with technology has come a long way. In the early days of computing, users had to input commands using punch cards. At this point, if you have to pause and consciously think about "punch cards," then I proved my point quite effectively;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Humans have indeed come a long long way in how we interact and navigate the digital world.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The story of the metaverse is shaping up rapidly becoming increasingly natural and intuitive. We are leveraging touch, voice, gestures, and probably direct brain connections in the near future.&lt;/p&gt;

&lt;p&gt;Lightning-fast advances in Natural Language Processing (NLP) have enabled us to engineer even better user experiences. Just when you think there is probably no more room left for optimization, there is. NLP effectively makes machines understand and generate human language. This creates a significant impact on how we communicate with technology.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;🎯 The purpose of this blog is to explore how YouTube can be improved by capitalizing on the latest groundbreaking advancements in LLMs and to create a video summarizer using Whisper from OpenAI and BART from Meta.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  How would I improve YouTube
&lt;/h2&gt;

&lt;p&gt;As a product manager, it is key for me to identify challenge areas in a product and strategically devise solutions that not only address these issues but also align with the larger product vision and goals. The product in question here is YouTube.&lt;/p&gt;

&lt;h2&gt;
  
  
  User groups
&lt;/h2&gt;

&lt;p&gt;I don't think I need to define what YouTube is. So I can skip this part and get to defining the key user segments of YouTube. Broadly speaking, they fall into two categories:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Creators&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Consumers&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;For the purpose of this blog, I will focus on the consumers. Without consumers, creators lose their value. Therefore, it is key to enhance the consumer's experience at every step of the way.&lt;/p&gt;

&lt;h2&gt;
  
  
  Potential pain points / challenges
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Misleading thumbnails and titles: Clickbaits. Extremely frustrating for viewers seeking relevant content.&lt;/li&gt;
&lt;li&gt;Inappropriate content: Despite YouTube's content moderation efforts, viewers may come across content containing offensive, harmful, or inappropriate content.&lt;/li&gt;
&lt;li&gt;Content duplication: What is more annoying than different creators uploading the same video repeatedly cluttering the search results and making it difficult to find the original video.&lt;/li&gt;
&lt;li&gt;Limited content discovery: If YouTube's recommendation algorithm doesn't align with the viewer's interest, it can be very difficult to discover new and relevant content.&lt;/li&gt;
&lt;li&gt;Limited content accessibility: Imagine not being able to understand a video just because you don't know the language it is in. Most of the content by top channels on YouTube is in English.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Ideas that may help improve UX of consumers
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Natural language interaction with the video: Viewers can read the text summary of the video before jumping into watching a video. Let's say the video is a 50-minute-long panel discussion. This improvement will also save a lot of time of the viewer, helping them make a more informed choice about the content they will consume. The user can also ask questions and get answers in text without necessarily watching the video.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Detect and flag inappropriate + duplicate content&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Enhanced recommendation algorithms&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Multilingual support and accessibility: Viewers can view the video in any language they like in the same voice as the narrator. This will enhance the reach of every video bringing down the language barriers.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Time to create a video summarizer
&lt;/h2&gt;

&lt;p&gt;Personally, for me clickbaits are annoying and sometimes before committing to watching a long video, I'd like to judge the video based on a text summary. At the moment, I rely on comments on the videos. However, there are instances when there are not many helpful comments or maybe commenting had been turned off.&lt;/p&gt;

&lt;p&gt;I will address this painpoint by leveraging LLMs that will generate a text summary of any YouTube video I give as an input.&lt;/p&gt;

&lt;h2&gt;
  
  
  In a nutshell...
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--8OFOI5Y3--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/hq4s96d0r3zqpccv7znj.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--8OFOI5Y3--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/hq4s96d0r3zqpccv7znj.png" alt="Image description" width="800" height="800"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Web interface
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--CoE5Kfni--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/fkwzotygjc8wahqxqk9k.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--CoE5Kfni--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/fkwzotygjc8wahqxqk9k.png" alt="Image description" width="800" height="350"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The user will enter the link to the YouTube video and click on 'Summarize Video' button.&lt;/p&gt;

&lt;p&gt;Let me enter &lt;a href="https://youtu.be/SHw5iZ0tI48"&gt;this YouTube video&lt;/a&gt; and see what comes out.&lt;/p&gt;

&lt;p&gt;Here's the output:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--MBQvOb31--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/akjakrevs0d8qqlrlbo6.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--MBQvOb31--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/akjakrevs0d8qqlrlbo6.png" alt="Image description" width="800" height="573"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Summary:&lt;/p&gt;

&lt;p&gt;"The original iPod was a pioneer in terms of the simple design and easy-to-use functionality. Apple credited the idea of the iPod to an obscure man by the name of Ken Kramer. The rise of the MP3 file format caused a lot of commotion in the music industry."&lt;/p&gt;

&lt;p&gt;Quite good, no?&lt;/p&gt;

&lt;p&gt;Here's the python script I'm using to do this magic:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import pytube
import requests
import os
from dotenv import find_dotenv, load_dotenv
import openai
import streamlit as st

st.title('YouTube Video Summarization')

load_dotenv(find_dotenv())
openai.api_key = os.getenv("OPENAI_API_KEY")
HUGGINGFACEHUB_API_TOKEN=os.getenv("HUGGINGFACE_API_TOKEN")

# Extract audio from YouTube
def get_audio(video_url):
    # Create a PyTube object for the video.
    youtube_video = pytube.YouTube(video_url)

    # Get the audio stream from the video.
    audio_stream = youtube_video.streams.filter(only_audio=True)

    # Get title
    st.write("Now summarizing: ", youtube_video.streams[0].title)

    # Download the audio stream to a file.
    audio_stream[0].download(output_path="audios", filename="audio.mp3")

# Audio to text
def get_text(filename):
    audio_file= open(filename, "rb")
    transcript = openai.Audio.transcribe("whisper-1", audio_file)
    return transcript

# Summarize
def summarize(transcript):
    API_URL = "https://api-inference.huggingface.co/models/facebook/bart-large-cnn"
    headers = {"Authorization": f"Bearer {HUGGINGFACEHUB_API_TOKEN}"}

    payload = {
        "inputs": transcript
    }

    response = requests.post(API_URL, headers=headers, json=payload)
    return response.json()


youtube_link = st.text_input('YouTube Video:', 'Enter URL here')

def process_input(youtube_link):
    get_audio(youtube_link)
    video_text = get_text("audios/audio.mp3")
    video_text = video_text.text
    summary = summarize(video_text)
    return summary[0]

# Create a button to trigger the function
if st.button("Summarize Video"):
    result = process_input(youtube_link)
    st.write("Summary", result)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Circling back
&lt;/h2&gt;

&lt;p&gt;Injecting LLMs into YouTube to enhance the UX and revolutionize the way we engage with videos on literally any platform is beyond awesome.&lt;/p&gt;

&lt;p&gt;By providing video summaries, improving search and discovery, and enhancing accessibility and convenience, YouTube can become an even more user-friendly and informative platform.&lt;/p&gt;

&lt;p&gt;As a product manager, I believe that exploring these possibilities and addressing the challenges will lead to a more enriched YouTube experience for everyone. It's time to harness the power of LLMs and take YouTube to the next level of user satisfaction and engagement.&lt;/p&gt;

</description>
      <category>tutorial</category>
      <category>python</category>
      <category>machinelearning</category>
      <category>nlp</category>
    </item>
    <item>
      <title>Demystifying Var, Let, and Const</title>
      <dc:creator>Niharika Singh ⛓</dc:creator>
      <pubDate>Sun, 06 Sep 2020 11:12:51 +0000</pubDate>
      <link>https://dev.to/niharrs/demystifying-var-let-and-const-1olf</link>
      <guid>https://dev.to/niharrs/demystifying-var-let-and-const-1olf</guid>
      <description>&lt;p&gt;I know that a lot of devs already know the difference between &lt;code&gt;var&lt;/code&gt;, &lt;code&gt;let&lt;/code&gt;, and &lt;code&gt;const&lt;/code&gt;. However, it is also true that many devs in the beginning of their learning journey might not know about the differences.&lt;/p&gt;




&lt;h3&gt;
  
  
  So...
&lt;/h3&gt;

&lt;p&gt;There are three ways of declaring variables in JavaScript:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;code&gt;var&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;let&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;const&lt;/code&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Today, most relevant browsers support &lt;code&gt;let&lt;/code&gt;, &lt;code&gt;var&lt;/code&gt;, and &lt;code&gt;const&lt;/code&gt;. &lt;code&gt;let&lt;/code&gt; keyword is still not supported in Opera Mini.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Nnw9Fs0n--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/qho5poxr6y1sn0epg4mt.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Nnw9Fs0n--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/qho5poxr6y1sn0epg4mt.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--3mdM6tib--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/d4pa3ay9gl1m2h8mwls3.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--3mdM6tib--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/d4pa3ay9gl1m2h8mwls3.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Su8PigQH--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/2kdxifwoxcy2w6uqfmcz.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Su8PigQH--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/2kdxifwoxcy2w6uqfmcz.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;let&lt;/code&gt; keyword is still not supported in Opera Mini.&lt;/p&gt;




&lt;h3&gt;
  
  
  Let's get started with &lt;code&gt;var&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;&lt;code&gt;var&lt;/code&gt; was the primary way to declare variables until 2015. In ES6, the concept of &lt;code&gt;let&lt;/code&gt; and &lt;code&gt;const&lt;/code&gt; were introduced.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;var&lt;/code&gt; is scoped to 'current execution context' i.e. it is scoped to the function enclosing the variable or the global scope.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;var&lt;/span&gt; &lt;span class="nx"&gt;x&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;hello world&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nx"&gt;hello&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="kd"&gt;var&lt;/span&gt; &lt;span class="nx"&gt;x&lt;/span&gt;  &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;hey there&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c1"&gt;// redeclared&lt;/span&gt;
    &lt;span class="nx"&gt;x&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;hola!&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c1"&gt;// reassigned&lt;/span&gt;
    &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;x&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="c1"&gt;// OUTPUT: hola!&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;x&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="c1"&gt;// OUTPUT: hello world&lt;/span&gt;
&lt;span class="nx"&gt;hello&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;This tells that variables declared using &lt;code&gt;var&lt;/code&gt; keyword can be reassigned as well as redeclared to a different value.&lt;/p&gt;




&lt;h3&gt;
  
  
  &lt;code&gt;let&lt;/code&gt; is &lt;em&gt;almost&lt;/em&gt; similar to &lt;code&gt;var&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;&lt;code&gt;let&lt;/code&gt; is block scoped. NOT context scope. This means that a variable declared with &lt;code&gt;let&lt;/code&gt; is only valid within &lt;code&gt;{ }&lt;/code&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;colour&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;red&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; 

&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nx"&gt;hello&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;colour&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;blue&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c1"&gt;//different variable&lt;/span&gt;
    &lt;span class="nx"&gt;colour&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;pink&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c1"&gt;// can reassign&lt;/span&gt;
    &lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;colour&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;orange&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c1"&gt;// can't redeclare&lt;/span&gt;
    &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;colour&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;colour&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="c1"&gt;// OUTPUT: red&lt;/span&gt;
&lt;span class="nx"&gt;hello&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;





&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;error: unknown: Identifier 'colour' has already been declared (6:8)

  4 |     let colour = "blue"; //different variable
  5 |     colour = "pink"; // can reassign
&amp;gt; 6 |     let colour = "orange"; // can't redeclare
    |         ^
  7 |     console.log(colour); // OUTPUT: pink
  8 | }
  9 | console.log(colour); // OUTPUT: red
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;This tells that &lt;code&gt;let&lt;/code&gt; is scoped within a &lt;code&gt;{ }&lt;/code&gt; block. It can be reassigned but can't be redeclared in the same scope. The variable &lt;code&gt;colour&lt;/code&gt; outside &lt;code&gt;hello()&lt;/code&gt; and inside &lt;code&gt;hello()&lt;/code&gt; are two different variables.&lt;/p&gt;

&lt;p&gt;Let's see what happens if we try to access a &lt;code&gt;let&lt;/code&gt; variable outside the &lt;code&gt;{ }&lt;/code&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;i&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nx"&gt;i&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nx"&gt;i&lt;/span&gt;&lt;span class="o"&gt;++&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;i&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;i&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;





&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;0
1
2
3
4
error: Uncaught ReferenceError: i is not defined
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;This means that &lt;code&gt;i&lt;/code&gt; is not defined beyond &lt;code&gt;{ }&lt;/code&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;code&gt;Const&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;&lt;code&gt;Const&lt;/code&gt; stands for constant. Like &lt;code&gt;let&lt;/code&gt;, &lt;code&gt;const&lt;/code&gt; is also scoped to a block. Like &lt;code&gt;let&lt;/code&gt;, &lt;code&gt;const&lt;/code&gt; can't be redeclared within the same block scope.&lt;/p&gt;

&lt;p&gt;The idea is that the reference of the &lt;code&gt;const&lt;/code&gt; variable can't change. This doesn't mean that the variable is immutable. It just means the memory reference can't change.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;x&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="nx"&gt;x&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;10&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c1"&gt;// error: Uncaught TypeError: Assignment to constant variable.&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;y&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;a&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;b&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;c&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;];&lt;/span&gt;
&lt;span class="nx"&gt;y&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;push&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;d&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="c1"&gt;// array can be manipulated&lt;/span&gt;
&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;y&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="c1"&gt;// OUTPUT: ["a", "b", "c", "d"]&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;Array declared with &lt;code&gt;const&lt;/code&gt; keyword can be manipulated because the memory reference the variable &lt;code&gt;y&lt;/code&gt; is NOT changing. &lt;code&gt;Const&lt;/code&gt; doesn't care about the value of the variable. It only cares about the variable reference.&lt;/p&gt;

&lt;p&gt;Unlike &lt;code&gt;let&lt;/code&gt; and &lt;code&gt;const&lt;/code&gt;, you can't initialise a &lt;code&gt;const&lt;/code&gt; variable without a value.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;var&lt;/span&gt; &lt;span class="nx"&gt;x&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c1"&gt;// OK&lt;/span&gt;
&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;y&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c1"&gt;// OK&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;z&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c1"&gt;// NOT OK&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;





&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;error: unknown: Unexpected token (3:7)

  1 | var x; 
  2 | let y;
&amp;gt; 3 | const z;
    |        ^
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;






&lt;p&gt;This pretty much sums up &lt;code&gt;var&lt;/code&gt;, &lt;code&gt;let&lt;/code&gt;, and &lt;code&gt;const&lt;/code&gt;. One thing I didn't touch upon in this post is variable hoisting.&lt;br&gt;
I think it would be a better idea to break it up in two parts. So in the next part, we will look at &lt;code&gt;var&lt;/code&gt;, &lt;code&gt;let&lt;/code&gt;, and &lt;code&gt;const&lt;/code&gt; from variable hoisting point of view.&lt;/p&gt;




&lt;p&gt;Cheers!&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>tutorial</category>
      <category>beginners</category>
    </item>
    <item>
      <title>10 Things To Know As A Fullstack Developer 👁️👄👁️</title>
      <dc:creator>Niharika Singh ⛓</dc:creator>
      <pubDate>Wed, 02 Sep 2020 10:46:35 +0000</pubDate>
      <link>https://dev.to/niharrs/10-things-to-know-as-a-fullstack-developer-2kip</link>
      <guid>https://dev.to/niharrs/10-things-to-know-as-a-fullstack-developer-2kip</guid>
      <description>&lt;p&gt;Being a fullstack developer is hard. What's even harder is to keep up with the ever changing dynamics of development.&lt;/p&gt;

&lt;p&gt;In this blog, I have outlined &lt;strong&gt;10 most important things every fullstack dev should keep in mind while honing their skills.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;This post is ideally for a developer who is just starting their journey to become an AWESOME fullstack dev.&lt;/em&gt;&lt;/p&gt;




&lt;h3&gt;
  
  
  1. Frontend first
&lt;/h3&gt;

&lt;p&gt;Mastering client side (frontend) before server side (backend) is a good strategy. You will see your actions getting manifested in real time on the browser. This will keep you motivated to build more.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Fundamentals
&lt;/h3&gt;

&lt;p&gt;It's VERY important to know the fundamentals of any framework by heart. If you claim to know the deeper intricacies of a framework and are unsure about the basics, then you need to revisit your learnings and probably also learning style. In a coding interview, this will be seen in a SUPER negative light. You'd want to avoid that.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. 5 hours of JS and 5 years of JS
&lt;/h3&gt;

&lt;p&gt;If you don't know JavaScript yet, then it will take you a few hours to know it enough to get started with basic web development. However, to understand the subtle nuances of JavaScript, it will take years of practice. Get ready for this kind of a commitment.&lt;/p&gt;

&lt;h3&gt;
  
  
  4. Basic web security is mandatory
&lt;/h3&gt;

&lt;p&gt;Fundamental knowledge about web security is expected from a fullstack dev. You should know the core of cryptography, HTTPS, application security, Virtual Private Networks (VPN), Firewalls, SSH, etc.&lt;/p&gt;

&lt;p&gt;💡 TIP: Ask yourself if you'd really use what you've build if it was a real service online. If the answer is no, then the application needs improvement.&lt;/p&gt;

&lt;h3&gt;
  
  
  5. SQL is as important as NoSQL
&lt;/h3&gt;

&lt;p&gt;Do not think NoSQL is better than SQL or vice versa. Know when to use which database. To be a good fullstack dev, you should know both.&lt;/p&gt;

&lt;h3&gt;
  
  
  6. Side projects 🔥
&lt;/h3&gt;

&lt;p&gt;The best way to learn is by doing it. Try to build about 10 side projects. Add them to your portfolio. Cloning already existing services is a good way to learn. It will save you a lot of planning time. You can create a YouTube / TikTok / Instagram clone.&lt;/p&gt;

&lt;h3&gt;
  
  
  7. Host them projects
&lt;/h3&gt;

&lt;p&gt;A rookie mistake you could make is to not host your project. Make sure you host it. &lt;a href="https://www.heroku.com/"&gt;Heroku&lt;/a&gt; is a good place to start. &lt;strong&gt;If your project isn't hosted, its as good as never made.&lt;/strong&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  8. CI/CD will make you stand out ⭐️
&lt;/h3&gt;

&lt;p&gt;To shine in a tech interview, make sure you know your CI/CD well. Have a structured GitHub repository and ensure CI/CD is working properly. Have proper unit tests in place. This will not only prove your competency in CI/CD but also show that you ship quality code and nothing else. &lt;/p&gt;

&lt;p&gt;If you're new to CI/CD, I'd recommend you to check out &lt;a href="https://github.com/features/actions"&gt;GitHub actions&lt;/a&gt; to create a CI/CD pipeline.&lt;/p&gt;

&lt;h3&gt;
  
  
  9. Basic DevOps is mandatory
&lt;/h3&gt;

&lt;p&gt;Nginx, load balancing, docker, caching is expected. There are no two thoughts about it. &lt;/p&gt;

&lt;p&gt;I've noticed that people who are truly in love with computer science have a knack for DevOps. 😉&lt;/p&gt;

&lt;h3&gt;
  
  
  10. Get comfortable with cloud ☁️
&lt;/h3&gt;

&lt;p&gt;If you are a cloud virgin, it can be daunting at first. But cloud is an acquired taste. Once you get into the groove, you will fall in love with it. &lt;/p&gt;

&lt;p&gt;Check out the services offered. If they fit well with your project, consider integrating them. They will fetch you brownie points.&lt;/p&gt;

&lt;h3&gt;
  
  
  BONUS: Smart goal setting
&lt;/h3&gt;

&lt;p&gt;Create a full fledged plan for your learning. I personally use &lt;a href="https://notion.so"&gt;Notion&lt;/a&gt; for this purpose. Make sure all the tasks are clearly defined so that you don't have to waste time planning it out while you're building. This can save you a lot of time. &lt;/p&gt;




&lt;p&gt;I hope this blog helped you align your learning goals.&lt;/p&gt;

&lt;p&gt;Cheers! &lt;/p&gt;

&lt;p&gt;👁️👄👁️&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>webdev</category>
      <category>beginners</category>
      <category>career</category>
    </item>
    <item>
      <title>Why should I learn JavaScript</title>
      <dc:creator>Niharika Singh ⛓</dc:creator>
      <pubDate>Thu, 27 Aug 2020 07:01:19 +0000</pubDate>
      <link>https://dev.to/niharrs/why-should-i-learn-javascript-2dif</link>
      <guid>https://dev.to/niharrs/why-should-i-learn-javascript-2dif</guid>
      <description>&lt;p&gt;There exists an extreme relationship between JavaScript and JavaScript developers. &lt;/p&gt;

&lt;p&gt;LOVE-HATE RELATIONSHIP.&lt;/p&gt;

&lt;p&gt;Sounds like a freakin’ dramatic roller coaster.&lt;/p&gt;

&lt;p&gt;Why are you still in this relationship? What makes you stay?&lt;/p&gt;

&lt;p&gt;Basically, why should I learn JavaScript? &lt;/p&gt;

&lt;p&gt;(Wrong answers are also welcome haha)&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>watercooler</category>
      <category>career</category>
    </item>
    <item>
      <title>Which CI/CD tool do you use? </title>
      <dc:creator>Niharika Singh ⛓</dc:creator>
      <pubDate>Wed, 26 Aug 2020 07:43:54 +0000</pubDate>
      <link>https://dev.to/niharrs/which-ci-cd-tool-do-you-use-53pk</link>
      <guid>https://dev.to/niharrs/which-ci-cd-tool-do-you-use-53pk</guid>
      <description>&lt;p&gt;I have been researching a lot on CI/CD tools lately. &lt;/p&gt;

&lt;p&gt;I have worked on TravisCI before, and recently with GitHub Actions.&lt;/p&gt;

&lt;p&gt;I'd love to know which ones do you use and why! &lt;/p&gt;

</description>
      <category>devops</category>
      <category>discuss</category>
      <category>career</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Get These In Place Before Starting Your Next Side Project 👀</title>
      <dc:creator>Niharika Singh ⛓</dc:creator>
      <pubDate>Tue, 25 Aug 2020 07:55:09 +0000</pubDate>
      <link>https://dev.to/niharrs/get-these-in-place-before-starting-your-next-side-project-38l8</link>
      <guid>https://dev.to/niharrs/get-these-in-place-before-starting-your-next-side-project-38l8</guid>
      <description>&lt;p&gt;Let me introduce you to something that you might already be familiar with— &lt;strong&gt;Side Project Hell&lt;/strong&gt; 😈&lt;/p&gt;

&lt;p&gt;Basically, you end up with like 747324856 side projects and not a single one is really complete.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--9F9XPyNZ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/70tzgomb0cqpv7db0wj5.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--9F9XPyNZ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/70tzgomb0cqpv7db0wj5.jpg" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I believe, this hell would be most common in the JavaScript world. Every other day you get a &lt;em&gt;kickass&lt;/em&gt; library and everyone wants to try it out by building their own something.&lt;/p&gt;

&lt;h3&gt;
  
  
  To save yourself from this horror, set the following items in place:
&lt;/h3&gt;

&lt;p&gt;⚠️ &lt;em&gt;This is just a list, no magic. If you still F it up, can't help you there.&lt;/em&gt; 🤷‍♀️&lt;/p&gt;




&lt;h3&gt;
  
  
  1. Announce your idea
&lt;/h3&gt;

&lt;p&gt;This is a bold step, but super effective. Tell the world you have started working on a side project. Describe it. Tell them by when will they be able to see/use it. &lt;/p&gt;

&lt;p&gt;Most likely, you will get a supporting response. This will motivate you to continue building whenever you feel like abandoning it.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Get a partner
&lt;/h3&gt;

&lt;p&gt;Find yourself a code buddy who complements your skills. If you're a good webdev, find yourself a good devops person.&lt;/p&gt;

&lt;p&gt;This will accelerate the building process and learning will be symbiotic.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Don't start coding right away! Align your vision.
&lt;/h3&gt;

&lt;p&gt;Many people mess it up by starting to code too early. &lt;/p&gt;

&lt;p&gt;First of all, put in place all the requirements. This could be in terms of features, or learning goals. Divide these features/modules in phases. In the first phase, keep it minimalistic. &lt;/p&gt;

&lt;h3&gt;
  
  
  4. No CSS in initial phases
&lt;/h3&gt;

&lt;p&gt;Do not think about beautifying the project in this phase. It will distract you from your actual goal. &lt;/p&gt;

&lt;p&gt;You will end up spending crazy amounts of time on HTMLing and CSSing.&lt;/p&gt;

&lt;p&gt;Set the building foundation first, then the building, then the paint.&lt;/p&gt;

&lt;h3&gt;
  
  
  5. Find a mentor
&lt;/h3&gt;

&lt;p&gt;If possible, get yourself a mentor who can guide you throughout your learning journey.&lt;/p&gt;

&lt;p&gt;This could be your college senior, or a friend who has been working since a while.&lt;/p&gt;

&lt;h3&gt;
  
  
  6. Set up Git
&lt;/h3&gt;

&lt;p&gt;It is SUPER FKN essential to commit at every milestone. No matter how small.&lt;/p&gt;

&lt;p&gt;Make sure you write good commit messages. Simply committing with &lt;code&gt;fix&lt;/code&gt; or &lt;code&gt;update&lt;/code&gt; or &lt;code&gt;finally&lt;/code&gt; is bad practice. &lt;/p&gt;

&lt;p&gt;We all do it, but should not.&lt;/p&gt;

&lt;h3&gt;
  
  
  7. Set up CI/CD pipeline
&lt;/h3&gt;

&lt;p&gt;This will make you shine among others. You will learn a hell lot. &lt;/p&gt;

&lt;p&gt;Even the tiniest of projects deserve CI/CD. You will fall in love with it eventually. It's more of an acquired taste. ;)&lt;/p&gt;

&lt;h3&gt;
  
  
  8. Stay hungry, stay foolish!
&lt;/h3&gt;

&lt;p&gt;Make sure you're always on a lookout for feedback. Take it seriously. &lt;/p&gt;

&lt;p&gt;You should also give feedback to people in your network. &lt;/p&gt;




&lt;p&gt;At the end of the day, don't forget what you really want. If you want to complete that side project, do it. There's no better time than now.&lt;/p&gt;

&lt;p&gt;Cheers!&lt;/p&gt;

</description>
      <category>beginners</category>
      <category>javascript</category>
      <category>productivity</category>
      <category>career</category>
    </item>
    <item>
      <title>Unravelling JavaScript Console API</title>
      <dc:creator>Niharika Singh ⛓</dc:creator>
      <pubDate>Mon, 24 Aug 2020 11:49:35 +0000</pubDate>
      <link>https://dev.to/niharrs/unravelling-javascript-console-api-26f7</link>
      <guid>https://dev.to/niharrs/unravelling-javascript-console-api-26f7</guid>
      <description>&lt;p&gt;Nights that end with &lt;code&gt;console.log()&lt;/code&gt; usually precede mornings that start with &lt;code&gt;console.log()&lt;/code&gt;. 😔&lt;/p&gt;

&lt;p&gt;Well, there's life beyond &lt;code&gt;console.log()&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Let's go over some JavaScript console methods that REALLY have the potential to make your life better.&lt;/p&gt;




&lt;h3&gt;
  
  
  0. &lt;code&gt;console.log()&lt;/code&gt;
&lt;/h3&gt;



&lt;div class="highlight"&gt;&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;You already know this!&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="c1"&gt;// This is used to output a message to the console.&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;Output:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--NZWV8dRC--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/06gek52ea90dmq9n36fx.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--NZWV8dRC--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/06gek52ea90dmq9n36fx.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  1. &lt;code&gt;console.table()&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;Sometimes we want to output a large object on the console. Using &lt;code&gt;console.log()&lt;/code&gt; can be a pain. &lt;/p&gt;

&lt;p&gt;&lt;code&gt;console.table()&lt;/code&gt; is a treat to sore eyes.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nx"&gt;Crypto&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;symbol&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;name&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;symbol&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;symbol&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;name&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;name&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;bitcoin&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nx"&gt;Crypto&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;$BTC&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Bitcoin&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;ethereum&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nx"&gt;Crypto&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;$ETH&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Ethereum&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;polkadot&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nx"&gt;Crypto&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;$DOT&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Polkadot&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;table&lt;/span&gt;&lt;span class="p"&gt;([&lt;/span&gt;&lt;span class="nx"&gt;bitcoin&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;ethereum&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;polkadot&lt;/span&gt;&lt;span class="p"&gt;]);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;Output:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--bjGnuJql--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/l76o8o0455nwzk1seyip.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--bjGnuJql--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/l76o8o0455nwzk1seyip.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;How beautiful and incredibly readable does that look!&lt;/p&gt;

&lt;p&gt;If you had used &lt;code&gt;console.log()&lt;/code&gt; here, this is what you would have seen instead:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--5V_5GUMm--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/iechi4r591emqgs2j1kn.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--5V_5GUMm--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/iechi4r591emqgs2j1kn.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  2. &lt;code&gt;console.info()&lt;/code&gt; / &lt;code&gt;console.error()&lt;/code&gt; / &lt;code&gt;console.warn()&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;The &lt;code&gt;console.info()&lt;/code&gt; method outputs an informational message.&lt;/p&gt;

&lt;p&gt;The &lt;code&gt;console.error()&lt;/code&gt; method outputs an error message.&lt;/p&gt;

&lt;p&gt;The &lt;code&gt;console.warn()&lt;/code&gt; method outputs a warning message.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;info&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;FYI: Today is Monday&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;error&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Today is not Friday&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;warn&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Get back to work!&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;Output:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--3Aicatkt--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/wtb0rczxqcamrc1sfxd9.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--3Aicatkt--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/wtb0rczxqcamrc1sfxd9.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;💡 It is a good practice to log messages on the console with appropriate formatting.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. &lt;code&gt;console.time()&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;This API method will tell you runtime in milliseconds. You can have multiple timers running at once in a JS program. (Maximum 10,000 timers.)&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;time&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;time taken&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="c1"&gt;//DO SOMETHING&lt;/span&gt;
&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;x&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;90&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;y&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;100&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;z&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;x&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="nx"&gt;y&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="mi"&gt;100&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;timeEnd&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;time taken&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;Output:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;time taken: 0ms - timer ended
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;






&lt;p&gt;These were some lesser known methods of console API in JavaScript. &lt;/p&gt;

&lt;p&gt;I am hopeful that these methods will help you! &lt;/p&gt;

&lt;p&gt;Cheers.&lt;/p&gt;

</description>
      <category>beginners</category>
      <category>javascript</category>
      <category>tutorial</category>
      <category>webdev</category>
    </item>
    <item>
      <title>How To Master A Programming Language Really Fast 🔥</title>
      <dc:creator>Niharika Singh ⛓</dc:creator>
      <pubDate>Sun, 23 Aug 2020 10:36:18 +0000</pubDate>
      <link>https://dev.to/niharrs/how-to-master-a-programming-language-really-fast-5a6c</link>
      <guid>https://dev.to/niharrs/how-to-master-a-programming-language-really-fast-5a6c</guid>
      <description>&lt;p&gt;Having competency in at least one programming language is SUPER important for a developer. Developing competency in more than one language gives you an edge.&lt;/p&gt;

&lt;p&gt;You might know some people who can pick up languages in no time. &lt;/p&gt;

&lt;h4&gt;
  
  
  When you know a language really well, you might think that the only thing that will change with other languages is the syntax.
&lt;/h4&gt;

&lt;h3&gt;
  
  
  You can't be more wrong.
&lt;/h3&gt;

&lt;p&gt;The only thing that changes when you move from JavaScript to Rust is NOT the syntax. &lt;/p&gt;

&lt;p&gt;Programming style also changes. Key fundamentals change.&lt;/p&gt;




&lt;p&gt;A couple months ago, I was learning to program in Rust by using the &lt;a href="https://doc.rust-lang.org/book/"&gt;docs&lt;/a&gt;. &lt;em&gt;(This is a really good resource for anyone who wants to get started with Rust)&lt;/em&gt; &lt;/p&gt;

&lt;p&gt;In my personal experience, learning curve of Rust lang 🦀 is really steep. No amount of books/documentation can conclude your learning.&lt;/p&gt;

&lt;p&gt;Luckily, around this time I was solving a lot of competitive programming questions on LeetCode.&lt;/p&gt;

&lt;p&gt;I decided that I'll take up a 30 day challenge: Solve 30 programming questions in Rust.&lt;/p&gt;

&lt;p&gt;THAT really made all the difference.&lt;/p&gt;




&lt;p&gt;Let's take &lt;a href="https://leetcode.com/problems/contiguous-array/"&gt;Contiguous Array&lt;/a&gt; as an example question.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Given a binary array, find the maximum length of a contiguous subarray with equal number of 0 and 1.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Example 1:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Input: [0,1]
Output: 2
Explanation: [0, 1] is the longest contiguous subarray with equal number of 0 and 1.
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Example 2:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Input: [0,1,0]
Output: 2
Explanation: [0, 1] (or [1, 0]) is a longest contiguous subarray with equal number of 0 and 1.
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Note: The length of the given binary array will not exceed 50,000.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Solving it in Java was quite simple:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight java"&gt;&lt;code&gt;&lt;span class="kd"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;Solution&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
    &lt;span class="kd"&gt;public&lt;/span&gt; &lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="nf"&gt;findMaxLength&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;int&lt;/span&gt;&lt;span class="o"&gt;[]&lt;/span&gt; &lt;span class="n"&gt;nums&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
        &lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="n"&gt;sum&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
        &lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="n"&gt;res&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
        &lt;span class="c1"&gt;// build a &amp;lt;sum, index&amp;gt; hashmap&lt;/span&gt;
        &lt;span class="nc"&gt;Map&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;Integer&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="nc"&gt;Integer&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;map&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;HashMap&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&amp;gt;();&lt;/span&gt;
        &lt;span class="n"&gt;map&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;put&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="o"&gt;);&lt;/span&gt;
        &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="n"&gt;nums&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;length&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt;&lt;span class="o"&gt;++)&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
            &lt;span class="nc"&gt;System&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;out&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;println&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="n"&gt;i&lt;/span&gt;&lt;span class="o"&gt;);&lt;/span&gt;  
            &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="n"&gt;nums&lt;/span&gt;&lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="n"&gt;i&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
                &lt;span class="n"&gt;sum&lt;/span&gt;&lt;span class="o"&gt;++;&lt;/span&gt;
            &lt;span class="o"&gt;}&lt;/span&gt; &lt;span class="k"&gt;else&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
                &lt;span class="n"&gt;sum&lt;/span&gt;&lt;span class="o"&gt;--;&lt;/span&gt;
            &lt;span class="o"&gt;}&lt;/span&gt;
            &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="n"&gt;map&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;containsKey&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="n"&gt;sum&lt;/span&gt;&lt;span class="o"&gt;))&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
                &lt;span class="n"&gt;res&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;Math&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;max&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="n"&gt;res&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="n"&gt;map&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;get&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="n"&gt;sum&lt;/span&gt;&lt;span class="o"&gt;));&lt;/span&gt;                
            &lt;span class="o"&gt;}&lt;/span&gt; &lt;span class="k"&gt;else&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
                &lt;span class="n"&gt;map&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;put&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="n"&gt;sum&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt;&lt;span class="o"&gt;);&lt;/span&gt;
            &lt;span class="o"&gt;}&lt;/span&gt;
        &lt;span class="o"&gt;}&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;res&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
    &lt;span class="o"&gt;}&lt;/span&gt;
&lt;span class="o"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;Also, in JavaScript it is simple:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="cm"&gt;/**
 * @param {number[]} nums
 * @return {number}
 */&lt;/span&gt;
&lt;span class="kd"&gt;var&lt;/span&gt; &lt;span class="nx"&gt;findMaxLength&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;nums&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;hash&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;};&lt;/span&gt;
    &lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;count&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;max&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;i&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;&lt;span class="nx"&gt;i&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;nums&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;length&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;&lt;span class="nx"&gt;i&lt;/span&gt;&lt;span class="o"&gt;++&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;nums&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;i&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="nx"&gt;count&lt;/span&gt;&lt;span class="o"&gt;--&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
        &lt;span class="k"&gt;else&lt;/span&gt; &lt;span class="nx"&gt;count&lt;/span&gt;&lt;span class="o"&gt;++&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

        &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;hash&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;count&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="o"&gt;!=&lt;/span&gt;&lt;span class="kc"&gt;null&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="nx"&gt;max&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;Math&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;max&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;max&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;i&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="nx"&gt;hash&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;count&lt;/span&gt;&lt;span class="p"&gt;]);&lt;/span&gt;
        &lt;span class="k"&gt;else&lt;/span&gt; &lt;span class="nx"&gt;hash&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;count&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;i&lt;/span&gt; 
    &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;max&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;};&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;But the real challenge was to solve it in Rust. You search and then you research until you finally learn.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight rust"&gt;&lt;code&gt;&lt;span class="k"&gt;use&lt;/span&gt; &lt;span class="nn"&gt;std&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="n"&gt;cmp&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;use&lt;/span&gt; &lt;span class="nn"&gt;std&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="nn"&gt;collections&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="n"&gt;HashMap&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="k"&gt;impl&lt;/span&gt; &lt;span class="n"&gt;Solution&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;pub&lt;/span&gt; &lt;span class="k"&gt;fn&lt;/span&gt; &lt;span class="nf"&gt;find_max_length&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;nums&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;Vec&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nb"&gt;i32&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;-&amp;gt;&lt;/span&gt; &lt;span class="nb"&gt;i32&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="k"&gt;let&lt;/span&gt; &lt;span class="k"&gt;mut&lt;/span&gt; &lt;span class="n"&gt;sum&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;i32&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
        &lt;span class="k"&gt;let&lt;/span&gt; &lt;span class="k"&gt;mut&lt;/span&gt; &lt;span class="n"&gt;len&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;i32&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

        &lt;span class="k"&gt;let&lt;/span&gt; &lt;span class="k"&gt;mut&lt;/span&gt; &lt;span class="n"&gt;map&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nn"&gt;HashMap&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="nf"&gt;new&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
        &lt;span class="n"&gt;map&lt;/span&gt;&lt;span class="nf"&gt;.insert&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

        &lt;span class="k"&gt;let&lt;/span&gt; &lt;span class="n"&gt;size&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&lt;/span&gt;&lt;span class="n"&gt;nums&lt;/span&gt;&lt;span class="nf"&gt;.len&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;

        &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt; &lt;span class="n"&gt;in&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="o"&gt;..*&lt;/span&gt;&lt;span class="n"&gt;size&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;nums&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;i&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="nb"&gt;usize&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
                &lt;span class="n"&gt;sum&lt;/span&gt; &lt;span class="o"&gt;-=&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
            &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;else&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
                &lt;span class="n"&gt;sum&lt;/span&gt; &lt;span class="o"&gt;+=&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
            &lt;span class="p"&gt;}&lt;/span&gt;
            &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;map&lt;/span&gt;&lt;span class="nf"&gt;.contains_key&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;&amp;amp;&lt;/span&gt;&lt;span class="n"&gt;sum&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
                &lt;span class="k"&gt;let&lt;/span&gt; &lt;span class="n"&gt;x&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;i32&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;match&lt;/span&gt; &lt;span class="n"&gt;map&lt;/span&gt;&lt;span class="nf"&gt;.get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;&amp;amp;&lt;/span&gt;&lt;span class="n"&gt;sum&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
                    &lt;span class="nf"&gt;Some&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;&amp;amp;&lt;/span&gt;&lt;span class="n"&gt;s&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;s&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                    &lt;span class="nb"&gt;None&lt;/span&gt; &lt;span class="k"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;
                &lt;span class="p"&gt;};&lt;/span&gt;  
                &lt;span class="n"&gt;len&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nn"&gt;cmp&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="nf"&gt;max&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;len&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;i&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="nb"&gt;i32&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;x&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;
            &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;else&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
                &lt;span class="n"&gt;map&lt;/span&gt;&lt;span class="nf"&gt;.insert&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;sum&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="nb"&gt;i32&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
            &lt;span class="p"&gt;}&lt;/span&gt;
        &lt;span class="p"&gt;}&lt;/span&gt;
        &lt;span class="n"&gt;len&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;






&lt;p&gt;In short, start solving competitive programming questions in the language you want to learn. You will see a stark difference within a month! &lt;/p&gt;

&lt;p&gt;Let me know your thoughts in discussion below. &lt;/p&gt;

&lt;p&gt;Cheers!&lt;/p&gt;

</description>
      <category>productivity</category>
      <category>beginners</category>
      <category>javascript</category>
      <category>career</category>
    </item>
    <item>
      <title>Productivity Hacks To Get Things Done. No BS.</title>
      <dc:creator>Niharika Singh ⛓</dc:creator>
      <pubDate>Sat, 22 Aug 2020 11:10:15 +0000</pubDate>
      <link>https://dev.to/niharrs/productivity-hacks-to-get-things-done-no-bs-2c6h</link>
      <guid>https://dev.to/niharrs/productivity-hacks-to-get-things-done-no-bs-2c6h</guid>
      <description>&lt;p&gt;Procrastination. Ugh. Can't live with it, can't live without it.&lt;/p&gt;

&lt;p&gt;"There's so much to do, and so little time." &lt;/p&gt;

&lt;p&gt;"Man, how tf am I going to finish this by then!"&lt;/p&gt;

&lt;p&gt;"God..."&lt;/p&gt;

&lt;p&gt;"Fu..."&lt;/p&gt;




&lt;h3&gt;
  
  
  BEEN THERE, DONE THAT?
&lt;/h3&gt;

&lt;h3&gt;
  
  
  Let's kill the sloth in you.
&lt;/h3&gt;

&lt;p&gt;Try out these tips/tricks, and let me know which ones worked for you! &lt;/p&gt;

&lt;h2&gt;
  
  
  1. Batch processing
&lt;/h2&gt;

&lt;p&gt;This is especially helpful for mundane tasks. Batch similar tasks together to operate at greater efficiency.&lt;/p&gt;

&lt;p&gt;Batch your phone calls. Batch your emails. Batch your bills.&lt;/p&gt;

&lt;p&gt;DO NOT CHECK YOUR EMAIL 10 TIMES A DAY! This is a sin.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. Love your workspace
&lt;/h2&gt;

&lt;p&gt;You should like to sit and work in your workspace. If something about it ticks you off, change it. Keep it clean and organised. &lt;/p&gt;

&lt;p&gt;If you don't love your workspace, what are you even doing...&lt;/p&gt;

&lt;h2&gt;
  
  
  3. If a task takes 2 minutes or less, do it now.
&lt;/h2&gt;

&lt;p&gt;I know a lot of developer friends who preempt using the washroom to save 80 seconds. NO KIDDING. Stop with that madness.&lt;/p&gt;

&lt;h2&gt;
  
  
  4. Prioritise!
&lt;/h2&gt;

&lt;p&gt;One of the most crucial decisions you have to make while prioritising your task is to think if you should first do &lt;strong&gt;important things&lt;/strong&gt; or &lt;strong&gt;urgent things&lt;/strong&gt;. &lt;/p&gt;

&lt;p&gt;💡 &lt;strong&gt;TIP: Important things first.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Most people default to doing urgent tasks first — the problem is that if you're always doing urgent tasks, you're not able to accomplish important tasks. Urgent tasks always come up. And there will always be more urgent tasks than you have time to accomplish, no matter how hard you try. (Source &lt;a href="https://observer.com/2017/03/urgent-vs-important-the-simplest-way-to-stay-productive-and-do-the-right-work/#:~:text=Most%20people%20default%20to%20doing,matter%20how%20hard%20you%20try."&gt;here&lt;/a&gt;)&lt;/p&gt;

&lt;h2&gt;
  
  
  5. Divide and conquer
&lt;/h2&gt;

&lt;p&gt;Break down large or complex tasks into small chunks. This way you will have multiple small wins throughout the day. To stay productive, it is necessary to have a healthy amount of dopamine in your system.&lt;/p&gt;

&lt;h2&gt;
  
  
  6. Brainwave symphonies
&lt;/h2&gt;

&lt;p&gt;Personally, I love listening to some Chopin while working. I know many people who also like to listen to lofi. The music will help you focus your energy.&lt;/p&gt;

&lt;h2&gt;
  
  
  7. Figure out when are you most productive
&lt;/h2&gt;

&lt;p&gt;You could be highly productive early in the morning or late in the night or even in the afternoon. Figure out when is your body more alert, and capitalise on that.&lt;/p&gt;

&lt;p&gt;💡 &lt;strong&gt;TIP: Don't schedule meetings or meet people at this time. This time is super precious for you.&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  8. Templatize everything
&lt;/h2&gt;

&lt;p&gt;I use &lt;a href="https://notion.so"&gt;Notion&lt;/a&gt; a lot. I have a template for every damn thing in my life. This helps me reduce number of decisions I make everyday. Believe it or not, decision fatigue is a real thing! &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Just for giggles:&lt;/strong&gt; Why do you think managers are always stressed out without doing anything really impactful? 😉&lt;/p&gt;

&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/aj-lYRZopXU"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;h2&gt;
  
  
  9. The famous 80/20 rule ~ Pareto principle
&lt;/h2&gt;

&lt;p&gt;80% of results come from 20% efforts.&lt;/p&gt;

&lt;p&gt;Understand that being productive does not mean to do more work. It is about generating more value in less time.&lt;/p&gt;

&lt;p&gt;Carefully analyse where are you spending your 24 hours at, and then optimise. Automate 80% of the efforts and then improve the remaining 20%.&lt;/p&gt;

&lt;h2&gt;
  
  
  10. Eat healthy, live healthy, drink well.
&lt;/h2&gt;

&lt;p&gt;Can't stress enough on this point.&lt;/p&gt;




&lt;p&gt;Stay peachy!&lt;/p&gt;

</description>
      <category>productivity</category>
      <category>career</category>
      <category>beginners</category>
      <category>motivation</category>
    </item>
    <item>
      <title>6 Awesome Ways To Present Your Code 🔥</title>
      <dc:creator>Niharika Singh ⛓</dc:creator>
      <pubDate>Fri, 21 Aug 2020 10:49:11 +0000</pubDate>
      <link>https://dev.to/niharrs/6-awesome-ways-to-present-your-code-3jj2</link>
      <guid>https://dev.to/niharrs/6-awesome-ways-to-present-your-code-3jj2</guid>
      <description>&lt;p&gt;At some point, every developer has to present code snippets. This could be for a presentation, or a tweet, or a blog, or just to go through a snippet later in time.&lt;/p&gt;

&lt;h3&gt;
  
  
  Let's dive into the tools you can use to present your code awesomely.🔥
&lt;/h3&gt;




&lt;h2&gt;
  
  
  1. &lt;a href="https://carbon.now.sh/" rel="noopener noreferrer"&gt;carbon.now.sh&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;Create and share beautiful images of your source code.&lt;br&gt;
Start typing or drop a file into the text area to get started.&lt;/p&gt;

&lt;p&gt;You can also connect GitHub with carbon.&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%2Fi%2F5q7xgxtbcz47nb2sjnvc.png" 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%2Fi%2F5q7xgxtbcz47nb2sjnvc.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  2. &lt;a href="https://codeimg.io/" rel="noopener noreferrer"&gt;codeimg.io&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;This is my personal favourite. ❤️️&lt;/p&gt;

&lt;p&gt;The best part about &lt;a href="https://codeimg.io/" rel="noopener noreferrer"&gt;codeimg&lt;/a&gt; is that they have already existing Social Media Templates. So you don't have to worry about canvas sizing. &lt;/p&gt;

&lt;p&gt;Feature wise, you get more options in &lt;a href="https://codeimg.io/" rel="noopener noreferrer"&gt;codeimg&lt;/a&gt; as compared with &lt;a href="https://carbon.now.sh/" rel="noopener noreferrer"&gt;carbon.now.sh&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Here's a Twitter template created with &lt;a href="https://codeimg.io/" rel="noopener noreferrer"&gt;codeimg.io&lt;/a&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%2Fi%2Fmz7ksxvtu2epoljnwysk.jpeg" 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%2Fi%2Fmz7ksxvtu2epoljnwysk.jpeg" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  3. &lt;a href="http://pastie.org/" rel="noopener noreferrer"&gt;Pastie&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;If you like minimalism and simply want to share code as a link instead of a screenshot, Pastie is for you. &lt;/p&gt;

&lt;p&gt;This is perfect to share code among friends/colleagues. The link generated with &lt;a href="http://pastie.org/" rel="noopener noreferrer"&gt;Pastie&lt;/a&gt; is valid for 24 hours.&lt;/p&gt;

&lt;p&gt;CAUTION: Pastie uses HTTP and not HTTPS. This means that it lacks encryption and is not secure.&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%2Fi%2Fpv03p3xihedul6sc11xz.png" 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%2Fi%2Fpv03p3xihedul6sc11xz.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  4. &lt;a href="https://play.rust-lang.org/" rel="noopener noreferrer"&gt;Rust playground&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;If you are a Rust person, this one is for you. &lt;/p&gt;

&lt;p&gt;Play around with browser interface to the Rust compiler to experiment with the language. It also has the capability to share snippet link just like &lt;a href="http://pastie.org/" rel="noopener noreferrer"&gt;Pastie&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  5. &lt;a href="https://github.com/Aloxaf/silicon" rel="noopener noreferrer"&gt;Silicon&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;This is &lt;a href="https://carbon.now.sh/" rel="noopener noreferrer"&gt;carbon.now.sh&lt;/a&gt; implemented in Rust language.&lt;/p&gt;

&lt;p&gt;Problems with &lt;a href="https://carbon.now.sh/" rel="noopener noreferrer"&gt;carbon.now.sh&lt;/a&gt; that are overcome by &lt;a href="https://github.com/Aloxaf/silicon" rel="noopener noreferrer"&gt;Silicon&lt;/a&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Cannot work without Internet &amp;amp; browser.&lt;/li&gt;
&lt;li&gt;Doesn't work well with shell. (Although there is carbon-now-cli, its experience is not very good, especially when the network is not so good.)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Usage:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;

$ silicon main.rs -o main.png 


&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%2Fi%2F1x16ru3hee96yxai5ztm.png" 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%2Fi%2F1x16ru3hee96yxai5ztm.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  6. &lt;a href="https://github.com/octref/polacode" rel="noopener noreferrer"&gt;Polacode&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;If you love VS Code, this one is for you! Polacode is a VS Code extension that takes beautiful screenshots of your code right from VSCode.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://i.giphy.com/media/LRTiSzuftpeg5YH9pz/giphy.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://i.giphy.com/media/LRTiSzuftpeg5YH9pz/giphy.gif" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h3&gt;
  
  
  The best part about these 6 tools is that they are all free to use!
&lt;/h3&gt;

&lt;p&gt;Cheers.✌️&lt;/p&gt;

</description>
      <category>career</category>
      <category>productivity</category>
      <category>beginners</category>
      <category>javascript</category>
    </item>
    <item>
      <title>Language Check</title>
      <dc:creator>Niharika Singh ⛓</dc:creator>
      <pubDate>Sun, 16 Aug 2020 14:02:40 +0000</pubDate>
      <link>https://dev.to/niharrs/language-check-3jk4</link>
      <guid>https://dev.to/niharrs/language-check-3jk4</guid>
      <description>&lt;h3&gt;
  
  
  My Workflow
&lt;/h3&gt;

&lt;p&gt;Language Check action automatically filters issues and pull requests that contains objectionable language (profane words) and instantly reports the action URL on your chosen Slack channel. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;This workflow is a must-have for all the developers out there who contribute to open source projects and &lt;em&gt;may&lt;/em&gt; get trashed for their hard work 🤦🏻‍♀️&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--5RELUA0D--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://tenor.com/view/paul-rudd-sigh-gif-5394064.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--5RELUA0D--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://tenor.com/view/paul-rudd-sigh-gif-5394064.gif" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Maintaining sanity in the open source community is essential AF. 😉&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This workflow is triggered each time there is an issue is opened, or there is a new comment on an existing issue, or there is a pull request.&lt;/p&gt;

&lt;p&gt;⚠️ To test this flow by yourself, you need to have a #blockchain channel in your workspace. Or, you can edit the &lt;code&gt;yml&lt;/code&gt; file and change &lt;code&gt;SLACK_CHANNEL&lt;/code&gt; there.&lt;/p&gt;

&lt;p&gt;⚠️ You also need to generate &lt;code&gt;SLACK_WEBHOOK&lt;/code&gt; token for your own Slack workspace and save it in GitHub secrets. To set it up, see &lt;a href="https://github.com/marketplace/actions/slack-notify"&gt;this&lt;/a&gt;. The slack channel I am using: degen-gh-actions.slack.com. So, the token for this workspace would be different than yours.&lt;/p&gt;

&lt;h3&gt;
  
  
  Submission Category:
&lt;/h3&gt;

&lt;p&gt;Maintainer Must-Haves&lt;/p&gt;

&lt;h3&gt;
  
  
  Yaml File
&lt;/h3&gt;



&lt;div class="highlight"&gt;&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Language Check&lt;/span&gt;
&lt;span class="na"&gt;on&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;issues&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;types&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;opened&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;edited&lt;/span&gt;
  &lt;span class="na"&gt;issue_comment&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;types&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;created&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;edited&lt;/span&gt;
  &lt;span class="na"&gt;pull_request_review_comment&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;types&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;created&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;edited&lt;/span&gt;
&lt;span class="na"&gt;jobs&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;echo_issue_comment&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;runs-on&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;ubuntu-latest&lt;/span&gt;
    &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;profanity check&lt;/span&gt;
    &lt;span class="na"&gt;steps&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Checkout&lt;/span&gt;
        &lt;span class="na"&gt;uses&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;actions/checkout@v2&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Profanity check step&lt;/span&gt;
        &lt;span class="na"&gt;id&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;set_output&lt;/span&gt;
        &lt;span class="na"&gt;uses&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;niharrs/mind-your-language-action@master&lt;/span&gt;
        &lt;span class="na"&gt;env&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
          &lt;span class="na"&gt;GITHUB_TOKEN&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;${{ secrets.GITHUB_TOKEN }}&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Slack Notification&lt;/span&gt;
        &lt;span class="na"&gt;if&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;steps.set_output.outputs.result == 'bad'&lt;/span&gt;
        &lt;span class="na"&gt;uses&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;rtCamp/action-slack-notify@master&lt;/span&gt;
        &lt;span class="na"&gt;env&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
          &lt;span class="na"&gt;SLACK_CHANNEL&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;blockchain&lt;/span&gt;
          &lt;span class="na"&gt;SLACK_USERNAME&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;moralPolice&lt;/span&gt;
          &lt;span class="na"&gt;SLACK_COLOR&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;red&lt;/span&gt;
          &lt;span class="na"&gt;SLACK_MESSAGE&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'&lt;/span&gt;&lt;span class="s"&gt;:warning:&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;Profanity&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;found&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;on&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;repository'&lt;/span&gt;
          &lt;span class="na"&gt;SLACK_WEBHOOK&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;${{ secrets.SLACK_WEBHOOK }}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;h3&gt;
  
  
  Link to Code
&lt;/h3&gt;


&lt;div class="ltag-github-readme-tag"&gt;
  &lt;div class="readme-overview"&gt;
    &lt;h2&gt;
      &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--vJ70wriM--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://practicaldev-herokuapp-com.freetls.fastly.net/assets/github-logo-ba8488d21cd8ee1fee097b8410db9deaa41d0ca30b004c0c63de0a479114156f.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/niharrs"&gt;
        niharrs
      &lt;/a&gt; / &lt;a href="https://github.com/niharrs/language-check"&gt;
        language-check
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      
    &lt;/h3&gt;
  &lt;/div&gt;
  &lt;div class="ltag-github-body"&gt;
    
&lt;div id="readme" class="md"&gt;
&lt;h1&gt;
Hackathon Entry for &lt;a href="https://dev.to/devteam/announcing-the-github-actions-hackathon-on-dev-3ljn" rel="nofollow"&gt;GitHub Actions Hackathon on DEV&lt;/a&gt;
&lt;/h1&gt;
&lt;p&gt;&lt;strong&gt;Submission Category:&lt;/strong&gt;
Maintainer Must-Have&lt;/p&gt;
&lt;h2&gt;
Description of the workflow&lt;/h2&gt;
&lt;p&gt;Language Check action automatically filters issues and pull requests that contains objectionable language (profane words) and instantly reports the action URL on your chosen Slack channel.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;This workflow is a must-have for all the developers out there who contribute to open source projects and &lt;em&gt;may&lt;/em&gt; get trashed for their hard work
🤦🏻‍♀️&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;a rel="noopener noreferrer" href="https://camo.githubusercontent.com/a303f6574926bab145773b24aa66d721adb157b3/68747470733a2f2f74656e6f722e636f6d2f766965772f7061756c2d727564642d736967682d6769662d353339343036342e676966"&gt;&lt;img src="https://camo.githubusercontent.com/a303f6574926bab145773b24aa66d721adb157b3/68747470733a2f2f74656e6f722e636f6d2f766965772f7061756c2d727564642d736967682d6769662d353339343036342e676966" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Maintaining sanity in the open source community is essential AF. 😉&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;This workflow is triggered each time there is an issue is opened, or there is a new comment on an existing issue, or there is a pull request.&lt;/p&gt;
&lt;p&gt;This workflow makes use of two already existing GitHub actions:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;a href="https://github.com/tailaiw/mind-your-language-action"&gt;Mind your language action&lt;/a&gt;: I forked it and tweaked the &lt;code&gt;entrypoint.sh&lt;/code&gt; to use conditional jobs and workflows offered by GitHub Actions API.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://github.com/marketplace/actions/slack-notify"&gt;Slack Notify - GitHub Action&lt;/a&gt;: This action is highly…&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
  &lt;/div&gt;
  &lt;div class="gh-btn-container"&gt;&lt;a class="gh-btn" href="https://github.com/niharrs/language-check"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;



&lt;h3&gt;
  
  
  Additional Resources / Info
&lt;/h3&gt;

&lt;p&gt;This workflow makes use of two already existing GitHub actions:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;a href="https://github.com/tailaiw/mind-your-language-action"&gt;Mind your language action&lt;/a&gt;: I forked it and tweaked the &lt;code&gt;entrypoint.sh&lt;/code&gt; to use conditional jobs and workflows offered by GitHub Actions API. &lt;/li&gt;
&lt;li&gt;
&lt;a href="https://github.com/marketplace/actions/slack-notify"&gt;Slack Notify - GitHub Action&lt;/a&gt;: This action is highly customizable, you can send in parameters in the form of environment variables.&lt;/li&gt;
&lt;/ol&gt;




&lt;p&gt;&lt;strong&gt;Feel free to reach out in case of any issue.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Cheers.✌️&lt;/p&gt;

</description>
      <category>actionshackathon</category>
      <category>showdev</category>
      <category>github</category>
      <category>opensource</category>
    </item>
    <item>
      <title>(Part 1) Simplified: Hierarchical Deterministic (HD) Wallets</title>
      <dc:creator>Niharika Singh ⛓</dc:creator>
      <pubDate>Sat, 18 Jul 2020 07:45:17 +0000</pubDate>
      <link>https://dev.to/niharrs/simplified-hierarchical-deterministic-hd-wallets-30lf</link>
      <guid>https://dev.to/niharrs/simplified-hierarchical-deterministic-hd-wallets-30lf</guid>
      <description>&lt;p&gt;&lt;strong&gt;&lt;em&gt;If you want to know how Hierarchical Deterministic (HD) wallets work, you're in the right place. We will get down to the fundamentals of cryptography and mathematics to solidify our learning.&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;To make the most out of this blog, I am assuming you have had some sort of interaction with blockchain in the past. Especially with the process of signing up for a wallet.&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;




&lt;p&gt;So as you may know, each time we sign up for a blockchain wallet, we are presented with a long list of words (sequence-sensitive) that is to be kept a secret. Because if you don't, anyone with this list can withdraw assets from your account.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--5cnYb7Xz--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/50hljlgulcqw42x736lk.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--5cnYb7Xz--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/50hljlgulcqw42x736lk.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You can tell if it is an HD Wallet if it presents you with this list of words, formally known as a &lt;strong&gt;mnemonic phrase&lt;/strong&gt;. HD Wallets can potentially have infinite number of account addresses and private keys. Your wallet's UI may choose to present just 10 or 20 of them. &lt;/p&gt;

&lt;p&gt;It is important to securely store this mnemonic phrase because this phrase has the ability to regenerate the exact same addresses and their corresponding private keys. And, keep in mind that anybody with this mnemonic phrase or private key will have full control over the entire wallet or the particular address respectively.&lt;/p&gt;

&lt;h3&gt;
  
  
  In Short...
&lt;/h3&gt;

&lt;p&gt;HD wallets are hierarchically determined from a single seed and you can regenerate the same list of accounts every time using the same mnemonic phrase. The ability to regenerate the same future state using a given set of inputs is called deterministic. Thus, HD wallets are a combination of hierarchical and deterministic.&lt;/p&gt;




&lt;p&gt;At this point, you might have some burning questions like: &lt;strong&gt;But where do these addresses come from? How does a mnemonic phrase work? Can we pick random words from a dictionary and create our very own mnemonic?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This post will explain the fundamentals of mnemonics by: &lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Creating a private key&lt;/li&gt;
&lt;li&gt;Computing a mnemonic seed using a given private key &lt;/li&gt;
&lt;li&gt;Encoding the seed into human-readable mnemonic phrase&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;I hope that by the end of this article you will understand the nuts and bolts of mnemonic phrases.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;“Any sufficiently advanced technology is indistinguishable from magic.” - Arthur C. Clarke&lt;/em&gt;&lt;/p&gt;




&lt;h3&gt;
  
  
  Mnemonic Phrases and Blockchain
&lt;/h3&gt;

&lt;p&gt;The genesis of mnemonics dates back to ancient Greek times. It is a simple memorization technique that encodes and recalls information effectively. In computer science it is both time and memory efficient. &lt;/p&gt;

&lt;p&gt;Here’s a well-known mnemonic which helped many of us during elementary math classes; King Henry Died Mother Didn’t Cry Much. This decodes to: Kilometer, Hectometer, Decameter, Meter, Decimeter, Centimeter, and Millimeter. (Yes, the metric system is confusing for some of us.)&lt;/p&gt;

&lt;p&gt;Blockchain uses the same technique!&lt;/p&gt;

&lt;p&gt;A typical blockchain mnemonic phrase looks like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;section canal ice eternal city bamboo sunset skill note scare entire couple van ancient absurd window grunt arm runway season found
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;These words may sound random to an average person, but blockchain wallet software can derive a ton of information from it, like addresses and private keys. This means that your mnemonic phrase is the key to your blockchain accounts. Hence, it is necessary to protect it.&lt;/p&gt;

&lt;p&gt;Mnemonic phrases won the confidence of the blockchain community because: &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;They make account backup very simple by completely eliminating the need to store private keys&lt;/li&gt;
&lt;li&gt;The same mnemonic phrase can be used in different wallet software provided by different vendors (given that the same standards are used to implement it)&lt;/li&gt;
&lt;li&gt;They enable its users to operate with more freedom. Users can create multiple accounts for diverse purposes. For example, one account for just receiving payments and other one for encrypting files.&lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;
  
  
  Mnemonics in action
&lt;/h3&gt;

&lt;p&gt;Let’s see the mnemonic magic in action by using one of the most badass tools celebrated by the blockchain community created by &lt;a href="https://github.com/iancoleman"&gt;Ian Coleman&lt;/a&gt;; Mnemonic Code Converter (otherwise known as the BIP39 tool). This tool is most commonly used to derive blockchain addresses using a mnemonic phrase.&lt;/p&gt;

&lt;p&gt;⚠️ We highly recommend you to download the tool and use it offline. This tool should not be used online. There are countless number of online scams attempting to steal your mnemonic phrase. ⚠️&lt;/p&gt;

&lt;p&gt;To use the Mnemonic Code Converter offline, download the bip39-standalone.html file from &lt;a href="https://github.com/iancoleman/bip39/releases"&gt;here&lt;/a&gt;. Open this HTML file in any browser. To stay on the safe side, make sure you are not connected to the internet while using it.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--9iSTqkNe--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/2pxt2x4t6fqui5oeh2hq.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--9iSTqkNe--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/2pxt2x4t6fqui5oeh2hq.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You can either create your mnemonic phrase by clicking on the ‘Generate’ button. You can also define the number of words the mnemonic phrase should have. A longer mnemonic phrase guarantees more security because it has a higher degree of randomness or entropy.&lt;/p&gt;

&lt;p&gt;To add an extra layer of security, you can enter a mnemonic passphrase. This passphrase is like a lock on your accounts. In other words, a mnemonic passphrase is used to add Two-Factor Authentication (2FA). To unlock the suite of HD accounts, you need to enter this passphrase. Ultimately, this mnemonic passphrase gets encoded in the resultant mnemonic seed. Therefore, having the protection of a mnemonic passphrase enhances entropy of mnemonic phrase. The same mnemonic with different passphrases will yield different accounts.&lt;/p&gt;

&lt;p&gt;The BIP-39 tool can not only be used for Bitcoin but for many other coins. For example ethereum, dogecoin, zcash, etc.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--cvOC_2uS--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/u41b9jvhmtmf00ve1cy4.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--cvOC_2uS--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/u41b9jvhmtmf00ve1cy4.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You can select the coin for which you want to generate HD accounts. By default, it is set to Bitcoin. If you change the cointype, the addresses generated will be for the coin you selected. The same mnemonic will generate different addresses for different coins. This is simply because the protocol to generate an  address from a private key is different for each coin.&lt;/p&gt;




&lt;h3&gt;
  
  
  Deriving Addresses
&lt;/h3&gt;

&lt;p&gt;On scrolling down, you will see addresses and their corresponding public-private key pair.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--IO4PDApC--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/szpsa5uriwc5j476hjrk.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--IO4PDApC--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/szpsa5uriwc5j476hjrk.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;All the addresses and keypairs are generated from a single seed (i.e. the mnemonic phrase). This is the beauty of HD accounts. &lt;/p&gt;

&lt;p&gt;All accounts created are hierarchically determined from a single seed and you can regenerate the same list of accounts every time using the same mnemonic phrase. &lt;/p&gt;

&lt;p&gt;Scientifically speaking, the ability to regenerate the same future state using a given set of inputs is called deterministic. &lt;/p&gt;

&lt;p&gt;Thus, HD accounts are a combination of hierarchical and deterministic.&lt;/p&gt;




&lt;h3&gt;
  
  
  Now, it’s time to put on our first principle goggles understand this process bottom up
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--TmickcFq--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/3zc6b3stdnvhpo7dughc.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--TmickcFq--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/3zc6b3stdnvhpo7dughc.jpg" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In raw form, a mnemonic is nothing but a randomly chosen large number. This number can be 128 bits, 160 bits, 192 bits, 224 bits, or 256 bits. The word ‘randomly’ is essential here because we do not want to create a predictable mnemonic (as this would lead to poor security).&lt;/p&gt;

&lt;p&gt;Now, let’s take an unbiased coin. (When tossing an unbiased coin, the probability of heads showing up is the same as that of tails showing up i.e. 0.5.) The next step is to flip it 128 times. Let’s denote heads with 1 and tails with 0. Ultimately we will end up with a 128-bit binary number which may look like:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;10101100 11011100 00111110 10010010 01111001 01000000 10100110 01000101 11000101 00011101 00000101 10011101 11000100 01110110 10100000 11101100
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;In hexadecimal representation, this number is:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;acdc3e927940a645c51d059dc476a0ec
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;The next step is to apply the &lt;a href="https://en.wikipedia.org/wiki/SHA-2"&gt;SHA256&lt;/a&gt; algorithm on the 128-bit random number. This will give us a 256-bit hash.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;a5f1cc6ff28228b130455a7eb05f5367f53c9bce9443393e35cbf5a9f8f9a570
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;The next step is to find the length of the &lt;a href="https://en.wikipedia.org/wiki/Checksum"&gt;checksum&lt;/a&gt;. A checksum is a sequence of numbers or characters. It is used to check any data for errors that may occur due to transmission or storage.  &lt;/p&gt;

&lt;p&gt;Length of checksum = mnemonic length (bits) / 32 &lt;/p&gt;

&lt;p&gt;In our case, the mnemonic length is 128. So, the length of our checksum is 128 / 32 = 4.&lt;/p&gt;

&lt;p&gt;Now take the first four bits of the 256-bit long hash (should be equal to the length of the checksum) and append these four bits to the end of the randomly generated 128-bit number i.e. &lt;code&gt;a5f1&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;In binary, this number is:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;10101100 11011100 00111110 10010010 01111001 01000000 10100110 01000101 11000101 00011101 00000101 10011101 11000100 01110110 101000001 11011001 01001011 1110001
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;Now, make groups of 11 bits each. You will end up with 12 groups. (The total number of bits is 132) Each group represents a decimal index number of a lookup table. The total number of words in this lookup table is 2^11 (2048) with indices ranging from 0 to 2047. The total number of 12-word mnemonics that can be generated is 2048^12. &lt;/p&gt;

&lt;p&gt;This lookup table (formally known as a word-list) can be found &lt;a href="https://github.com/bitcoin/bips/blob/master/bip-0039/bip-0039-wordlists.md"&gt;here&lt;/a&gt;. The order of words should not be changed because each word is hard-linked to an index value.&lt;/p&gt;

&lt;p&gt;This word-list exists for English, Japanese, Korean, Spanish, Chinese (Simplified), Chinese (Traditional), French, and Italian.&lt;/p&gt;

&lt;p&gt;These words make up a human-readable mnemonic phrase. &lt;/p&gt;

&lt;h3&gt;
  
  
  So now we know how to create a human-readable mnemonic from a random number.
&lt;/h3&gt;




&lt;p&gt;This algorithm is the &lt;a href="https://github.com/bitcoin/bips/blob/master/bip-0039.mediawiki"&gt;BIP-39&lt;/a&gt; standard. &lt;/p&gt;

&lt;p&gt;We learned how to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Create a completely random private key by flipping a coin&lt;/li&gt;
&lt;li&gt;Compute a mnemonic seed using a given private key &lt;/li&gt;
&lt;li&gt;Encode the seed into human-readable mnemonic phrase&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;While mnemonic phrases were meant to make complicated cryptography human-readable, a list of 12 random words isn’t exactly intuitive for most users to remember or store.&lt;/p&gt;

&lt;p&gt;For mass adoption of blockchain technology, we need to create tools that are not just human-readable, they need to be intuitive. There is little meaning in pursuing Layer 2 solutions and ZKSnarks if there isn’t a dead simple fundamental layer comprised of tools that are easy for everyday people to use and understand.&lt;/p&gt;




&lt;h3&gt;
  
  
  Stay tuned for the next part. We will see how BIP-32 standard is responsible for generating HD accounts.
&lt;/h3&gt;

</description>
      <category>blockchain</category>
      <category>cryptography</category>
      <category>tutorial</category>
      <category>security</category>
    </item>
  </channel>
</rss>
