<?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>Forem: ANDI NUGROHO</title>
    <description>The latest articles on Forem by ANDI NUGROHO (@andinugroho).</description>
    <link>https://forem.com/andinugroho</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%2F2919681%2Fff8f3f22-df3c-4771-9cfe-61a5edff7faf.jpeg</url>
      <title>Forem: ANDI NUGROHO</title>
      <link>https://forem.com/andinugroho</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/andinugroho"/>
    <language>en</language>
    <item>
      <title>Introducing colorific-magic: Enhance Your Console Logs with Stunning Colors</title>
      <dc:creator>ANDI NUGROHO</dc:creator>
      <pubDate>Wed, 17 Sep 2025 04:25:02 +0000</pubDate>
      <link>https://forem.com/andinugroho/introducing-colorific-magic-enhance-your-console-logs-with-stunning-colors-4kfm</link>
      <guid>https://forem.com/andinugroho/introducing-colorific-magic-enhance-your-console-logs-with-stunning-colors-4kfm</guid>
      <description>&lt;p&gt;🚀 Exciting News! 🚀&lt;/p&gt;

&lt;p&gt;I’m thrilled to announce the release of my latest npm package: colorific-magic! 🎨✨&lt;/p&gt;

&lt;p&gt;What is colorific-magic?&lt;/p&gt;

&lt;p&gt;colorific-magic is a lightweight and versatile Node.js library designed to bring vibrant and customizable colors to your console logs. Perfect for developers who want to make their terminal outputs stand out, colorific-magic offers a range of colorful and stylish log options to brighten up your development workflow.&lt;/p&gt;

&lt;p&gt;NPM package : npm i colorific-magic&lt;br&gt;
Link :&lt;/p&gt;

&lt;p&gt;Key Features:&lt;br&gt;
Success Messages:&lt;/p&gt;

&lt;p&gt;success(msg: string) - Green and bold&lt;br&gt;
successLight(msg: string) - Light green and bold&lt;br&gt;
successBg(msg: string) - Green background with white text&lt;br&gt;
Danger/Error Messages:&lt;/p&gt;

&lt;p&gt;danger(msg: string) - Red and bold&lt;br&gt;
dangerBg(msg: string) - Red background with white text&lt;br&gt;
dangerOutline(msg: string) - Red border with text&lt;br&gt;
Info Messages:&lt;/p&gt;

&lt;p&gt;info(msg: string) - Black text on yellow background&lt;br&gt;
infoLight(msg: string) - Yellow text on black background&lt;br&gt;
infoBlue(msg: string) - Blue and bold&lt;br&gt;
Warning Messages:&lt;/p&gt;

&lt;p&gt;warning(msg: string) - Orange and bold&lt;br&gt;
warningBg(msg: string) - Orange background with white text&lt;br&gt;
warningOutline(msg: string) - Orange border with text&lt;br&gt;
Debugging Messages:&lt;/p&gt;

&lt;p&gt;debug(msg: string) - Blueviolet and bold&lt;br&gt;
debugBg(msg: string) - Blueviolet background with white text&lt;br&gt;
debugShadow(msg: string) - Blueviolet with text shadow&lt;br&gt;
Success with Borders:&lt;/p&gt;

&lt;p&gt;successWithBorder(msg: string) - Green border with text&lt;br&gt;
successBgWithBorder(msg: string) - Green background with dark green border&lt;br&gt;
Neutral Messages:&lt;/p&gt;

&lt;p&gt;neutral(msg: string) - Gray text&lt;br&gt;
neutralBg(msg: string) - Gray background with white text&lt;br&gt;
neutralShadow(msg: string) - Gray text with shadow&lt;br&gt;
Custom Styles:&lt;/p&gt;

&lt;p&gt;custom(msg: string, color: string, bgColor: string) - Customizable text and background&lt;br&gt;
bold(msg: string) - Bold black text&lt;br&gt;
italic(msg: string) - Italic blue text&lt;br&gt;
underline(msg: string) - Underlined purple text&lt;br&gt;
strikethrough(msg: string) - Strikethrough red text&lt;br&gt;
Fancy Styles:&lt;/p&gt;

&lt;p&gt;gradientText(msg: string) - Gradient text&lt;br&gt;
shadowText(msg: string) - Text with shadow&lt;br&gt;
rainbowText(msg: string) - Rainbow text&lt;br&gt;
darkBg(msg: string) - White text on dark background&lt;br&gt;
lightBg(msg: string) - Black text on light background&lt;br&gt;
blueBg(msg: string) - White text on blue background&lt;br&gt;
Other Fancy Styles:&lt;/p&gt;

&lt;p&gt;fancyShadow(msg: string) - Magenta text with shadow&lt;br&gt;
fancyBorder(msg: string) - Purple dashed border&lt;br&gt;
fancyBgWithShadow(msg: string) - Dark blue background with shadow&lt;br&gt;
Why Use colorific-magic?&lt;/p&gt;

&lt;p&gt;Enhance Visibility: Make your logs more readable and visually appealing.&lt;br&gt;
Customizable: Tailor your logs with different colors, backgrounds, and styles.&lt;br&gt;
Easy to Use: Simple API for integrating into any Node.js project.&lt;br&gt;
🔗 Check it out and get started today! You can find colorific-magic on npm.&lt;/p&gt;

&lt;p&gt;Feel free to reach out with any questions or feedback, and happy coding! 💻✨&lt;/p&gt;

</description>
      <category>node</category>
      <category>npm</category>
      <category>opensource</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Just enough Typescript to build Projects.</title>
      <dc:creator>ANDI NUGROHO</dc:creator>
      <pubDate>Tue, 10 Jun 2025 16:13:54 +0000</pubDate>
      <link>https://forem.com/andinugroho/just-enough-typescript-to-build-projects-3hlg</link>
      <guid>https://forem.com/andinugroho/just-enough-typescript-to-build-projects-3hlg</guid>
      <description>&lt;h2&gt;
  
  
  What is the point of using TypeScript ?
&lt;/h2&gt;

&lt;p&gt;JavaScript is a &lt;strong&gt;dynamically typed language&lt;/strong&gt; meaning &lt;strong&gt;type checking is performed at runtime&lt;/strong&gt; or at the time of execution.&lt;/p&gt;

&lt;p&gt;JavaScript allows accessing values which aren't present leading to unexpected bugs.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;person&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Andi Delouise&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;id&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;1&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="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;person&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;email&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="c1"&gt;// &amp;lt;- undefined&lt;/span&gt;
&lt;span class="nx"&gt;person&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="nf"&gt;toUppercase&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="c1"&gt;// &amp;lt;- will throw TypeError&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;TypeScript was created to solve these type of problems by adding static type checking to JavaScript.&lt;/p&gt;

&lt;p&gt;Think of JavaScript as a person which doesn't provide feedback until you Beat the s- I mean ask it. The feedback provided however is not much in-depth such as where might the error be until you console log it like above.&lt;/p&gt;

&lt;p&gt;TypeScript is a &lt;strong&gt;typed superset of JavaScript which provides static type checking&lt;/strong&gt; (type checking is performed at compile time) to catch potential bugs before runtime. It adds type safety to your JavaScript code.&lt;/p&gt;

&lt;p&gt;With TypeScript, The above code will now throw an error in the IDE before runtime.&lt;/p&gt;

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

&lt;p&gt;Typescript is basically a more wiser version of JavaScript which helps you catch a lot of errors including typos, uncalled function (Math.random * 6), etc.&lt;/p&gt;

&lt;h2&gt;
  
  
  TL;DR
&lt;/h2&gt;

&lt;p&gt;types + Javascript = Typescript.&lt;/p&gt;

&lt;h2&gt;
  
  
  Basic Types
&lt;/h2&gt;

&lt;p&gt;Before using Typescript we need to know about JavaScript types and some special TypeScript types.&lt;/p&gt;

&lt;p&gt;Here are a bunch of them -&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;code&gt;string&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;number&lt;/code&gt; (there's no int or float data type in JavaScript)&lt;/li&gt;
&lt;li&gt;&lt;code&gt;boolean&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Arrays (datatype[] or Array)&lt;/li&gt;
&lt;li&gt;object ({})&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;any&lt;/code&gt; (NOTE :- This removes the type safety provided by TS, meaning you will be back to the same old JavaScript for that particular variable)&lt;/li&gt;
&lt;li&gt;undefined&lt;/li&gt;
&lt;li&gt;void&lt;/li&gt;
&lt;li&gt;never&lt;/li&gt;
&lt;li&gt;unknown&lt;/li&gt;
&lt;li&gt;Union Types (combination of two or more types)&lt;/li&gt;
&lt;li&gt;Enum&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;and more&lt;/p&gt;

&lt;h2&gt;
  
  
  Type Annotations and Inference
&lt;/h2&gt;

&lt;p&gt;TypeScript allows you to optionally specify the type of variable while declaring it.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;string&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;andi&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;count&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;number&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;isEven&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;boolean&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;true&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;array&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;number&lt;/span&gt;&lt;span class="p"&gt;[]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;4&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;5&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;obj&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nl"&gt;a&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;number&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nl"&gt;b&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;number&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nl"&gt;c&lt;/span&gt;&lt;span class="p"&gt;?:&lt;/span&gt; &lt;span class="kr"&gt;number&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;a&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;10&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;b&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;20&lt;/span&gt; 
&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="na"&gt;age&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;number&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="kr"&gt;string&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;20&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c1"&gt;// union type, age is either a number or string&lt;/span&gt;
&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="na"&gt;alignment&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;left&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;centre&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;right&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c1"&gt;// Union of literal types&lt;/span&gt;
&lt;span class="p"&gt;};&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  These are called Type Annotations.
&lt;/h2&gt;

&lt;p&gt;In the example of object, we use &lt;code&gt;;&lt;/code&gt; separate the properties and declare a property optional by adding &lt;code&gt;?&lt;/code&gt; after its name.&lt;/p&gt;

&lt;p&gt;But this is redundant as TypeScript can automatically infer the type of variable based on assigned value.&lt;/p&gt;

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

&lt;p&gt;This is called &lt;strong&gt;Type Inference.&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Functions in TypeScript
&lt;/h2&gt;

&lt;p&gt;While declaring a function you can add Type Annotations to parameters and return type, so that arguments to that function gets checked.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;add&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;a&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;number&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;b&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;number&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt; &lt;span class="kr"&gt;number&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;a&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="nx"&gt;b&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 the above function, a and b are assigned the type &lt;code&gt;number&lt;/code&gt; as well as the return type which comes after the closing parenthesis of parameter list, note that the return type can be inferred by typescript so it is not necessary to write always.&lt;/p&gt;

&lt;p&gt;Here are some more examples&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;print&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="kr"&gt;string&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt; &lt;span class="k"&gt;void&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="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;`Hello &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="s2"&gt;`&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;sum&lt;/span&gt;&lt;span class="p"&gt;(...&lt;/span&gt;&lt;span class="nx"&gt;numbers&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;number&lt;/span&gt;&lt;span class="p"&gt;[]):&lt;/span&gt; &lt;span class="kr"&gt;number&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;numbers&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;reduce&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="nx"&gt;acc&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;curr&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;acc&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="nx"&gt;curr&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;printLength&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;item&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;string&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="kr"&gt;string&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="k"&gt;typeof&lt;/span&gt; &lt;span class="nx"&gt;item&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;string&lt;/span&gt;&lt;span class="dl"&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="nf"&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;Length:&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;item&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="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="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&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;Lengths:&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;item&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;map&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;str&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;str&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="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;The first function, &lt;code&gt;print&lt;/code&gt;, simply console logs the string, hence the return type is void.&lt;/p&gt;

&lt;p&gt;The second function, &lt;code&gt;sum&lt;/code&gt;, uses the &lt;a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/rest_parameters" rel="noopener noreferrer"&gt;Rest parameters&lt;/a&gt; syntax, allowing it to accept an indefinite number of arguments so we use array of numbers.&lt;br&gt;
You may want to revisit &lt;a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce" rel="noopener noreferrer"&gt;reduce&lt;/a&gt; function.&lt;br&gt;
and in the last function, &lt;code&gt;printlength&lt;/code&gt;, item is either a string or an array of string, inside the function we use &lt;code&gt;typeof&lt;/code&gt; to check its type. If it is a &lt;code&gt;string&lt;/code&gt;, we simply log the length of the string otherwise if it is an array, we iterate over each string in the array and log their lengths. This is called &lt;strong&gt;Narrowing.&lt;/strong&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  Type Aliases
&lt;/h2&gt;

&lt;p&gt;It is a name for a type, It is used to create reusable types or if you simply want to separate writing types for convenience.&lt;/p&gt;

&lt;p&gt;You may capitalize type aliases name to differentiate them from variables and functions.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="kd"&gt;type&lt;/span&gt; &lt;span class="nx"&gt;Person&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;string&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;age&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;number&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;};&lt;/span&gt;

&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;greet&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;p&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;Person&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="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;`Hi &lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;p&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="s2"&gt;, you are &lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;p&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;age&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt; years old`&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nf"&gt;greet&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;John Doe&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;age&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;100&lt;/span&gt; &lt;span class="p"&gt;});&lt;/span&gt;

&lt;span class="c1"&gt;// Some more examples&lt;/span&gt;
&lt;span class="kd"&gt;type&lt;/span&gt; &lt;span class="nx"&gt;ID&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kr"&gt;number&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; 
&lt;span class="kd"&gt;type&lt;/span&gt; &lt;span class="nx"&gt;Name&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kr"&gt;string&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="kd"&gt;type&lt;/span&gt; &lt;span class="nx"&gt;Age&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kr"&gt;number&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="kr"&gt;string&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="kd"&gt;type&lt;/span&gt; &lt;span class="nx"&gt;NaturalNumbers&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kr"&gt;number&lt;/span&gt;&lt;span class="p"&gt;[];&lt;/span&gt;

&lt;span class="kd"&gt;type&lt;/span&gt; &lt;span class="nx"&gt;Body&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="na"&gt;height&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;number&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;width&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;number&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;location&lt;/span&gt;&lt;span class="p"&gt;?:&lt;/span&gt; &lt;span class="kr"&gt;string&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="k"&gt;readonly&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;string&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c1"&gt;// This property cannot be re-assigned.&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;We can use type aliases to create &lt;strong&gt;function type expressions.&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="kd"&gt;type&lt;/span&gt; &lt;span class="nx"&gt;func&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;a&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;string&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="k"&gt;void&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c1"&gt;// function type expression&lt;/span&gt;

&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;greets&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="kr"&gt;string&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;callback&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;func&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nf"&gt;callback&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="nf"&gt;greets&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;John Doe&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nf"&gt;function &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="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;`Hi &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="s2"&gt;`&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;The above type &lt;code&gt;func&lt;/code&gt; means a function with one parameter of type &lt;code&gt;string&lt;/code&gt; and returns nothing.&lt;/p&gt;

&lt;h2&gt;
  
  
  Interfaces
&lt;/h2&gt;

&lt;p&gt;Interfaces are another way to name an object type. They are similar to Type Aliases but have some distinctions which we'll talk about later.&lt;/p&gt;

&lt;p&gt;Syntax&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="kr"&gt;interface&lt;/span&gt; &lt;span class="nx"&gt;Book&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;title&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;string&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;author&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;string&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="k"&gt;readonly&lt;/span&gt; &lt;span class="nx"&gt;pageCount&lt;/span&gt;&lt;span class="p"&gt;?:&lt;/span&gt; &lt;span class="kr"&gt;number&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;book&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;Book&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="na"&gt;title&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;The Great Gatsby&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;author&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;F. Scott Fitzgerald&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;};&lt;/span&gt;

&lt;span class="kr"&gt;interface&lt;/span&gt; &lt;span class="nx"&gt;AnotherInterface&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;string&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;func&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;a&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;string&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="k"&gt;void&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c1"&gt;// describe a function inside interface&lt;/span&gt;
  &lt;span class="nf"&gt;func2&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;a&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;string&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt; &lt;span class="k"&gt;void&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c1"&gt;// another way to describe a function&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="c1"&gt;// This is function type, functions in JavaScript are objects which can be called, and we can also add properties to our functions.&lt;/span&gt;
&lt;span class="kr"&gt;interface&lt;/span&gt; &lt;span class="nx"&gt;MathOperation&lt;/span&gt; &lt;span class="p"&gt;{&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="kr"&gt;number&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="kr"&gt;number&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt; &lt;span class="kr"&gt;number&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;add&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;MathOperation&lt;/span&gt; &lt;span class="o"&gt;=&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="nx"&gt;y&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;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="p"&gt;;&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;subtract&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;MathOperation&lt;/span&gt; &lt;span class="o"&gt;=&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="nx"&gt;y&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;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="p"&gt;;&lt;/span&gt;

&lt;span class="c1"&gt;// Its type aliases equivalent&lt;/span&gt;
&lt;span class="kd"&gt;type&lt;/span&gt; &lt;span class="nx"&gt;MathOperationType&lt;/span&gt; &lt;span class="o"&gt;=&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="kr"&gt;number&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="kr"&gt;number&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="kr"&gt;number&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Some key differences between Types and Interfaces&lt;/p&gt;

&lt;p&gt;Types aliases do not support declaration merging while interfaces do.&lt;/p&gt;

&lt;p&gt;Declaration merging is adding new properties to an existing interface.&lt;/p&gt;

&lt;p&gt;for example,&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="kr"&gt;interface&lt;/span&gt; &lt;span class="nb"&gt;Object&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;a&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;number&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="kr"&gt;interface&lt;/span&gt; &lt;span class="nb"&gt;Object&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;b&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;number&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;printobj&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;o&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;Object&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="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;o&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;a&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="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;o&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;b&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;Both Interface and types can be extended but have different syntax.&lt;/p&gt;

&lt;p&gt;You can read more about these distinctions &lt;a href="https://stackoverflow.com/questions/37233735/interfaces-vs-types-in-typescript" rel="noopener noreferrer"&gt;here.&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You can use whatever you like, I generally use interfaces for objects and types for everything else.&lt;/p&gt;

&lt;h2&gt;
  
  
  Generics
&lt;/h2&gt;

&lt;p&gt;lets say you wanna create a function that accepts an argument and returns it.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;identity&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;arg&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;any&lt;/span&gt;&lt;span class="p"&gt;)&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;arg&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;num&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;identity&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This works fine but the issue with this is we lose all our type definitions for the return value of the function. If we pass in an argument of type &lt;code&gt;number&lt;/code&gt;, the function returns the same argument but with type &lt;code&gt;any&lt;/code&gt;.&lt;/p&gt;

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

&lt;p&gt;By using generic this problem can be solved.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;identity&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;T&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;arg&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;T&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt; &lt;span class="nx"&gt;T&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;arg&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="c1"&gt;// Two ways of consuming generic functions&lt;/span&gt;
&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;num0&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="kr"&gt;number&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="nf"&gt;identity&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="c1"&gt;// explicitly passing the T parameter&lt;/span&gt;
&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;num&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;identity&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="c1"&gt;// let the compiler infer it&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



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

&lt;p&gt;The &lt;code&gt;T&lt;/code&gt; in the angle bracket is called the Type Variable, you can name it whatever you like.&lt;/p&gt;

&lt;p&gt;Generics are used to create reusable components that work with different types of data.&lt;/p&gt;

&lt;p&gt;Let's say now we want to pass an array of different types and return it&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;identity&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;T&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;arg&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;T&lt;/span&gt;&lt;span class="p"&gt;[])&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;arg&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;Notice we don't have to specify the return type as the compiler can infer it.&lt;/p&gt;

&lt;p&gt;If we want to have a generic type for types with a length property such as string and arrays. We can use something called a constraint.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;identity&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;T&lt;/span&gt; &lt;span class="kd"&gt;extends&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;length&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;number&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;arg&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;T&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;arg&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="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In similar way we can create generic interfaces.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="kr"&gt;interface&lt;/span&gt; &lt;span class="nx"&gt;Box&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;T&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="na"&gt;value&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;T&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;};&lt;/span&gt;

&lt;span class="kd"&gt;type&lt;/span&gt; &lt;span class="nx"&gt;NumberBox&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;Box&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="kr"&gt;number&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="kd"&gt;type&lt;/span&gt; &lt;span class="nx"&gt;StringBox&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;Box&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="kr"&gt;number&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Tuples
&lt;/h2&gt;

&lt;p&gt;Tuples are array but with a pre-defined length and types for each index.&lt;/p&gt;

&lt;p&gt;Syntax&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="kd"&gt;type&lt;/span&gt; &lt;span class="nx"&gt;FirstTuple&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="kr"&gt;number&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="kr"&gt;string&lt;/span&gt;&lt;span class="p"&gt;];&lt;/span&gt;
&lt;span class="kd"&gt;type&lt;/span&gt; &lt;span class="nx"&gt;SecondTuple&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="kr"&gt;number&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="kr"&gt;string&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;boolean&lt;/span&gt;&lt;span class="p"&gt;];&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;firstTuple&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;FirstTuple&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;2&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;];&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;secondTuple&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;SecondTuple&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;2&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;];&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;FirstTuple is an array of fixed length 2 with index 0 being a number and index 1 being a string. if we try access element past index 1, TypeScript will throw error.&lt;/p&gt;

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

&lt;h2&gt;
  
  
  never
&lt;/h2&gt;

&lt;p&gt;Type when function &lt;strong&gt;never&lt;/strong&gt; returns a value, it is similar to void but it is used when function throws an exception or if a function enters an infinite loop.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;throwError&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;message&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;string&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt; &lt;span class="nx"&gt;never&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;throw&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Error&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;message&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;infiniteLoop&lt;/span&gt;&lt;span class="p"&gt;():&lt;/span&gt; &lt;span class="nx"&gt;never&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;while &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="c1"&gt;// ...&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;h2&gt;
  
  
  Non-null Assertion Operator (Postfix !)
&lt;/h2&gt;

&lt;p&gt;It is used to tell the compiler to assume that a value is not &lt;code&gt;null&lt;/code&gt; or &lt;code&gt;undefined&lt;/code&gt;, even if typescript thinks it could be nullable.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;func&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;arg&lt;/span&gt;&lt;span class="p"&gt;?:&lt;/span&gt; &lt;span class="kr"&gt;number&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="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;arg&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;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Type Assertions
&lt;/h2&gt;

&lt;p&gt;Type Assertions are way to override the type inference and explicitly set the type.&lt;/p&gt;

&lt;p&gt;For Example&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;btn&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;document&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getElementById&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;my_button&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="nx"&gt;HTMLButtonElement&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;TypeScript thinks that getElementById will return some kind of HTMLElement, but you can override this by using the &lt;code&gt;as&lt;/code&gt; operator.&lt;/p&gt;

&lt;p&gt;Thanks for reading, I tried to condense as much as examples possible and tried cover most frequently used types.&lt;/p&gt;

</description>
      <category>typescript</category>
      <category>tutorial</category>
      <category>codenewbie</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Blockchain Architecture Basics: Components, Structure, Benefits &amp; Creation</title>
      <dc:creator>ANDI NUGROHO</dc:creator>
      <pubDate>Sun, 11 May 2025 17:46:27 +0000</pubDate>
      <link>https://forem.com/andinugroho/blockchain-architecture-basics-components-structure-benefits-creation-58nm</link>
      <guid>https://forem.com/andinugroho/blockchain-architecture-basics-components-structure-benefits-creation-58nm</guid>
      <description>&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Frf2n2u49579wwi6ex4eq.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Frf2n2u49579wwi6ex4eq.png" alt="abstract-blockchain-technology-cryptocurrency-fintech-square-cube-crypto-operations-connect" width="800" height="281"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Understanding the blockchain architecture and process doesn’t seem like an easy task, does it? The following article will help you learn the different components of blockchain technology effortlessly.&lt;/p&gt;

&lt;p&gt;The term blockchain was first described back in 1991. A group of researchers wanted to create a tool to timestamp digital documents so that they could not be backdated or changed. Further, the technique was adapted and reinvented by Satoshi Nakamoto. In 2008, Nakamoto created the first cryptocurrency, the blockchain-based project called Bitcoin.&lt;/p&gt;

&lt;p&gt;In general, blockchain technology has the core characteristics of decentralization, accountability, and security. This technique can improve operational efficiency and save costs significantly. The demand and usage of applications built on blockchain architecture will only evolve. Thus, it makes now the right time to get educated on this topic.&lt;/p&gt;

&lt;p&gt;Let's learn the key insights to easily understand how blockchain technology works. Maybe this will encourage you to think more about building your own blockchain solution.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is Blockchain Architecture?
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fy583vvnwf2z4f5voe5kh.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fy583vvnwf2z4f5voe5kh.png" alt="Centralized, Decentralized, and Distributed Ledger" width="800" height="387"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;For starters, let's first learn what is blockchain technology. Logically, a blockchain is a chain of blocks which contain specific information (database), but in a secure and genuine way that is grouped together in a network (peer-to-peer). In other words, blockchain is a combination of computers linked to each other instead of a central server, meaning that the whole network is decentralized.&lt;/p&gt;

&lt;p&gt;To make it even simpler, the blockchain concept can be compared to work done with Google Docs. You may recall the days of tossing over doc. documents and waiting for other participants to make necessary edits. These days, with the help of Google Docs, it is possible to work on the same document simultaneously.&lt;/p&gt;

&lt;p&gt;The blockchain technique allows digital information to be distributed, rather than copied. This distributed ledger provides transparency, trust, and data security.&lt;/p&gt;

&lt;p&gt;Blockchain architecture is being used very broadly in the financial industry. However, these days, this technology helps create software development solutions for cryptocurrencies and record keeping, digital notary, and smart contracts.&lt;/p&gt;

&lt;h2&gt;
  
  
  Database vs. Blockchain Architecture
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fjo5uklwt6jaye77ktfsb.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fjo5uklwt6jaye77ktfsb.png" alt="Client-Server vs P2P Network" width="800" height="385"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The traditional architecture of the World Wide Web uses a client-server network. In this case, the server keeps all the required information in one place so that it is easy to update, due to the server being a centralized database controlled by a number of administrators with permissions.&lt;/p&gt;

&lt;p&gt;In the case of the distributed network of blockchain architecture, each participant within the network maintains, approves, and updates new entries. The system is controlled not only by separate individuals, but by everyone within the blockchain network. Each member ensures that all records and procedures are in order, which results in data validity and security. Thus, parties that do not necessarily trust each other are able to reach a common consensus.&lt;/p&gt;

&lt;p&gt;To summarize things, the blockchain is a decentralized, distributed ledger (public or private) of different kinds of transactions arranged into a P2P network. This network consists of many computers, but in a way that the data cannot be altered without the consensus of the whole network (each separate computer).&lt;/p&gt;

&lt;p&gt;The structure of blockchain technology is represented by a list of blocks with transactions in a particular order. These lists can be stored as a flat file (txt. format) or in the form of a simple database. Two vital data structures used in blockchain include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Pointers&lt;/strong&gt; - variables that keep information about the location of another variable. Specifically, this is pointing to the position of another variable.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Linked lists&lt;/strong&gt; - a sequence of blocks where each block has specific data and links to the following block with the help of a pointer.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fi668bjjknci7zle3r2k5.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fi668bjjknci7zle3r2k5.png" alt="Blockchain Hashing" width="800" height="386"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Logically, the first block does not contain the pointer since this one is the first in a chain. At the same time, there is potentially going to be a final block within the blockchain database that has a pointer with no value.&lt;/p&gt;

&lt;p&gt;Basically, the following blockchain sequence diagram is a connected list of records:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Frieezsdd5zebvdityoak.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Frieezsdd5zebvdityoak.png" alt="Blockchain Structure" width="800" height="387"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Blockchain architecture can serve the following purposes for organizations and enterprises:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Cost reduction&lt;/strong&gt; - lots of money is spent on sustaining centrally held databases (e.g. banks, governmental institutions) by keeping data current secure from cyber crimes and other corrupt intentions.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;History of data&lt;/strong&gt; - within a blockchain structure, it is possible to check the history of any transaction at any moment in time. This is a ever-growing archive, while a centralized database is more of a snapshot of information at a specific point.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Data validity &amp;amp; security&lt;/strong&gt; - once entered, the data is hard to tamper with due to the blockchain’s nature. It takes time to proceed with record validation, since the process occurs in each independent network rather than via compound processing power. This means that the system sacrifices performance speed, but instead guarantees high data security and validity.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Types of Blockchain Architecture Explained
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ff567zcftzkkw6tm6tcp4.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ff567zcftzkkw6tm6tcp4.png" alt="Nodes in Public vs. Private Blockchains" width="800" height="383"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;All blockchain structures fall into three categories:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Public blockchain architecture&lt;/strong&gt;&lt;br&gt;
A public blockchain architecture means that the data and access to the system is available to anyone who is willing to participate (e.g. Bitcoin, Ethereum, and Litecoin blockchain systems are public).&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Private blockchain architecture&lt;/strong&gt;&lt;br&gt;
As opposed to public blockchain architecture, the private system is controlled only by users from a specific organization or authorized users who have an invitation for participation.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Consortium blockchain architecture&lt;/strong&gt;&lt;br&gt;
This blockchain structure can consist of a few organizations. In a consortium, procedures are set up and controlled by the preliminary assigned users.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The following table provides a detailed comparison among these three blockchain systems:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0zs686q2zydw8wmk6pgc.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0zs686q2zydw8wmk6pgc.png" alt="Blockchain System" width="800" height="375"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;As mentioned, blockchain is a distributed journal where all parties hold a local copy. However, based on the type of blockchain structure and its context, the system can be more centralized or decentralized. This simply refers to the blockchain architecture design and who controls the ledger.&lt;/p&gt;

&lt;p&gt;A private blockchain is considered more centralized since it is controlled by a particular group with increased privacy. On the contrary, a public blockchain is open-ended and thus decentralized.&lt;/p&gt;

&lt;p&gt;In a public blockchain, all records are visible to the public and anyone could take part in the agreement process. On the other hand, this is less efficient since it takes a considerable amount of time to accept each new record into the blockchain architecture.&lt;/p&gt;

&lt;p&gt;In terms of efficiency, the time for each transaction in a public blockchain is less eco-friendly since it requires a huge amount of computation power compared to private blockchain architecture.&lt;/p&gt;

&lt;h2&gt;
  
  
  Core Components of Blockchain Architecture: How Does It Work
&lt;/h2&gt;

&lt;p&gt;These are the core blockchain architecture components:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Node&lt;/strong&gt; - user or computer within the blockchain architecture (each has an independent copy of the whole blockchain ledger)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Transaction&lt;/strong&gt; - smallest building block of a blockchain system (records, information, etc.) that serves as the purpose of blockchain&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Block&lt;/strong&gt; - a data structure used for keeping a set of transactions which is distributed to all nodes in the network&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Chain&lt;/strong&gt; - a sequence of blocks in a specific order&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Miners&lt;/strong&gt; - specific nodes which perform the block verification process before adding anything to the blockchain structure&lt;br&gt;
Consensus (consensus protocol) - a set of rules and arrangements to carry out blockchain operations&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Any new record or transaction within the blockchain implies the building of a new block. Each record is then proven and digitally signed to ensure its genuineness. Before this block is added to the network, it should be verified by the majority of nodes in the system.&lt;/p&gt;

&lt;p&gt;The following is a blockchain architecture diagram that shows how this actually works in the form of a digital wallet.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffalaj6tdtzfw63i45gla.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffalaj6tdtzfw63i45gla.png" alt="How Blockchain Works" width="800" height="537"&gt;&lt;/a&gt;&lt;br&gt;
Let's have a closer look at what is a block in a blockchain. Each blockchain block consists of:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;certain data&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;the hash of the block&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;the hash from the previous block&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The data stored inside each block depends on the type of blockchain. For instance, in the Bitcoin blockchain structure, the block maintains data about the receiver, sender, and the amount of coins.&lt;/p&gt;

&lt;p&gt;A hash is like a fingerprint (long record consisting of some digits and letters). Each block hash is generated with the help of a cryptographic hash algorithm (SHA 256). Consequently, this helps to identify each block in a blockchain structure easily. The moment a block is created, it automatically attaches a hash, while any changes made in a block affect the change of a hash too. Simply stated, hashes help to detect any changes in blocks.&lt;/p&gt;

&lt;p&gt;The final element within the block is the hash from a previous block. This creates a chain of blocks and is the main element behind blockchain architecture’s security. As an example, block 45 points to block 46. The very first block in a chain is a bit special - all confirmed and validated blocks are derived from the genesis block.&lt;/p&gt;

&lt;p&gt;Any corrupt attempts provoke the blocks to change. All the following blocks then carry incorrect information and render the whole blockchain system invalid.&lt;/p&gt;

&lt;p&gt;On the other hand, in theory, it could be possible to adjust all the blocks with the help of strong computer processors. However, there is a solution that eliminates this possibility called proof-of-work. This allows a user to slow down the process of creation of new blocks. In Bitcoin blockchain architecture, it takes around 10 minutes to determine the necessary proof-of-work and add a new block to the chain. This work is done by miners - special nodes within the Bitcoin blockchain structure. Miners get to keep the transaction fees from the block that they verified as a reward.&lt;/p&gt;

&lt;p&gt;Each new user (node) joining the peer-to-peer network of blockchain receives a full copy of the system. Once a new block is created, it is sent to each node within the blockchain system. Then, each node verifies the block and checks whether the information stated there is correct. If everything is alright, the block is added to the local blockchain in each node.&lt;/p&gt;

&lt;p&gt;All the nodes inside a blockchain architecture create a consensus protocol. A consensus system is a set of network rules, and if everyone abides by them, they become self-enforced inside the blockchain.&lt;/p&gt;

&lt;p&gt;For example, the Bitcoin blockchain has a consensus rule stating that a transaction amount must be cut in half after every 200,000 blocks. This means that if a block produces a verification reward of 10 BTC, this value must be halved after every 200,000 blocks.&lt;/p&gt;

&lt;p&gt;As well, there can only be 4 million BTC left to be mined, since there is a maximum of 21 million BTC laid down in the Bitcoin blockchain system by the protocol. Once the miners unlock this many, the supply of Bitcoins ends unless the protocol is changed.&lt;/p&gt;

&lt;p&gt;To recap, this makes blockchain technology immutable and cryptographically secure by eliminating any third-parties. It is impossible to tamper with the blockchain system; as it would be necessary to tamper with all of its blocks, recalculate the proof-of-work for each block, and also control more than 50% of all the nodes in a peer-to-peer network.&lt;/p&gt;

&lt;h2&gt;
  
  
  How to Make a Private Blockchain Architecture
&lt;/h2&gt;

&lt;p&gt;A decentralized blockchain application is designed just the same as any other normal software product. Functional specification, UX/UI designs, and an architecture plan are required for its development. It is crucial to identify the app’s functionality, user roles, and think over the system flow and the interaction between users and information.&lt;/p&gt;

&lt;p&gt;In order to build your own blockchain architecture, it is necessary to consider:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Blockchain network&lt;/strong&gt; - refers to the application’s infrastructure placed within a particular environment inside one, or a few, organizations.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Blockchain code&lt;/strong&gt; - refers to the tasks and goals this blockchain solution has been developed to perform.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;There are a few open-source solutions used to build a private blockchain architecture. The most popular among them is Hyperledger by Linux Foundation. This project is also widely used by IBM and other famous tech organizations. Hyperledger Composer provides a set of tools for building blockchain architecture.&lt;/p&gt;

&lt;p&gt;Some other solutions to build your own blockchain with are Ethereum and Corda.&lt;/p&gt;

&lt;h2&gt;
  
  
  Blockchain Network Creation
&lt;/h2&gt;

&lt;p&gt;Once an organization, or a few, decide to implement a blockchain solution, they are already creating a network. The network could be viewed as companies with their personnel or from the perspective of the technical infrastructure within these companies.&lt;/p&gt;

&lt;p&gt;To make it more concrete, let's take the example of diamonds. Risks and challenges associated with diamonds exist during every part of the process, from the extraction of diamonds to their final, commercial result. Consumers want to be sure they are purchasing real and ethical diamonds. Government institutions want to keep track of their taxation and exports. Blockchain architecture can be used to eliminate these risks.&lt;/p&gt;

&lt;p&gt;The parties involved in this network include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Diamond Manufacturers&lt;/li&gt;
&lt;li&gt;Government Institutions&lt;/li&gt;
&lt;li&gt;Diamond Transporters&lt;/li&gt;
&lt;li&gt;Diamond Sellers&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Blockchain solutions organize all these parties into a peer-to-peer network that helps to remove all the mentioned risks and build a transparent system. Everyone would receive access to the synchronized data of a “shared, immutable ledger” and be able to keep track of the diamond's moving from manufacturing to the final consumer. The blockchain ledger would hold the sequence of all actions occurring like diamond mining, refining, and distribution.&lt;/p&gt;

&lt;p&gt;In most cases, each organization within a network holds their own copy synced together with clever protocols and technical layers of blockchain network (called peers). As well, in order to outline a few processes happening at the same time, there is the Ordering Service. This is shared among all parties deciding the transactions within the blockchain structure and their order. In case with multiple users, there is a Membership Services Provider (MSP) that allows access for particular users inside the network.&lt;/p&gt;

&lt;p&gt;In the end, all the transactions during this path are kept in a general ledger (e.g data with diamond photos, place of extraction, color, serial number, place where it was cut, purified, sold, etc.). This information is complete and authentic.&lt;/p&gt;

&lt;p&gt;Here is a high-level hyperledger architecture diagram to create a blockchain solution.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2f6gmvvxn3ibdafj3em8.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2f6gmvvxn3ibdafj3em8.png" alt="Diagram from the Hyperledger Composer" width="800" height="385"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Blockchain Code Creation
&lt;/h2&gt;

&lt;p&gt;After the blockchain network is set up, the next step is to agree upon the type of business transactions happening inside the blockchain architecture. In reality, these rules are written in legal agreements. Logically, within the blockchain code, this refers to a Smart Contract (also called as Chaincode or Business Network Definition from Hyperledger Composer).&lt;/p&gt;

&lt;p&gt;As in the real world, the blockchain contract has participants, assets, and transactions. For each transaction, a Transactional Processor Function is written (reflects JavaScript) and lays out the things that will happen once the transaction has been generated.&lt;/p&gt;

&lt;h2&gt;
  
  
  Skills Required to Build Blockchain Architecture
&lt;/h2&gt;

&lt;p&gt;To be a blockchain developer is a demanding task that requires a lot of technical skills and a complex background. Generally, in order to work with blockchain architecture, a strong background in Computer Science or Engineering is most desirable. As well, knowledge pertaining to consensus methods, data structures, decentralized ledgers, cryptographies and cryptocurrencies, and data security is also highly sought after.&lt;/p&gt;

&lt;p&gt;Recently, the task of developing a blockchain has been simplified with the help of Ethereum and other similar blockchain software. Ethereum is an open source software platform based on blockchain technology allowing for the building and deployment of decentralized applications (DApps).&lt;/p&gt;

&lt;p&gt;In terms of the coding skills required to develop a blockchain solution, one should become familiar with a range of programming languages, not one specifically. If the goal is to implement a customizable blockchain system, programming languages such as C++, Python, C, Java, and Ruby help to accomplish this task. As well, web development skills like HTML, CSS, Node JS could become handy.&lt;/p&gt;

&lt;p&gt;In case you are interested in writing smart contracts (smart contracts are the programs stored in the blockchain system and used to automatically exchange coins or any other funds based on predefined conditions) using Ethereum, the contract-based programming language Solidity is required.&lt;/p&gt;

&lt;p&gt;Aside from hard programming skills, custom software developers need to understand business requirements and operations, as well as possess great cooperation and negotiation skills&lt;/p&gt;

&lt;h2&gt;
  
  
  Key Characteristics of Blockchain Architecture
&lt;/h2&gt;

&lt;p&gt;Blockchain architecture possesses a lot of benefits for businesses. Here are several embedded characteristics:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Cryptography&lt;/strong&gt; - blockchain transactions are validated and trustworthy due to the complex computations and cryptographic proof among involved parties&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Immutability&lt;/strong&gt; - any records made in a blockchain cannot be changed or deleted&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Provenance&lt;/strong&gt; - refers to the fact that it is possible to track the origin of every transaction inside the blockchain ledger&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Decentralization&lt;/strong&gt; - each member of the blockchain structure has access to the whole distributed database. As opposed to the central-based system, consensus algorithm allows for control of the network&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Anonymity&lt;/strong&gt;- each blockchain network participant has a generated address, not user identity. This keeps users' anonymity, especially in a public blockchain structure&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Transparency&lt;/strong&gt; - the blockchain system cannot be corrupted. This is very unlikely to happen, as it requires huge computing power to overwrite the blockchain network completely&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Create Your Own Blockchain Architecture
&lt;/h2&gt;

&lt;p&gt;To summarize everything, blockchain technology can be viewed from business, legal, and technical perspectives as a great solution. It can help businesses run daily operations more easily within a network of mutually agreeing members. From a legal perspective, any intermediaries are excluded from the blockchain ledger and any connection is made between involved parties only. At the same time, technically, it ensures control, security, and privacy of data inside the system.&lt;/p&gt;

&lt;p&gt;Blockchain technology enables organizations &amp;amp; companies in the following ways:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Possibility to complete transactions much more quickly and with trust&lt;/li&gt;
&lt;li&gt;Cost reduction for businesses, or cross-enterprise processes while removing intermediaries, inefficiencies, and duplications&lt;/li&gt;
&lt;li&gt;Introduction of modern digital interaction&lt;/li&gt;
&lt;li&gt;Opportunity to keep detailed control over business processes and transactions without a central control point&lt;/li&gt;
&lt;li&gt;Remove cheating, cyber attacks, or other electronic crimes&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;A blockchain, with its transparent mechanisms and maximum clarity, will ultimately revolutionize the way individuals and societies carry out transactions and deal with one another. Unsurprisingly, many projects already exist using blockchain architecture. For example, TenX helps to spend cryptocurrencies, EOS.IO offers functionality for decentralized apps (DApps), Augur assists with a predictive market analysis for future events, etc.&lt;/p&gt;

&lt;p&gt;The future looks bright for blockchain solutions. These are applied in fields like crowdfunding, stock trading, the sharing economy,mobile banking app developmenti, in many aspect of the healthcare industry, etc.&lt;/p&gt;

</description>
      <category>blockchain</category>
      <category>basic</category>
      <category>web3</category>
      <category>cryptocurrency</category>
    </item>
    <item>
      <title>Python + Databases = Unlimited Side Projects!</title>
      <dc:creator>ANDI NUGROHO</dc:creator>
      <pubDate>Tue, 18 Mar 2025 07:06:49 +0000</pubDate>
      <link>https://forem.com/andinugroho/python-databases-unlimited-side-projects-bkh</link>
      <guid>https://forem.com/andinugroho/python-databases-unlimited-side-projects-bkh</guid>
      <description>&lt;p&gt;Imagine turning every spark of an idea into a working project with just a few lines of Python code and the power of a database. Whether it's a personal finance tracker to keep your spending in check, an AI-powered chatbot that engages users, or a real-time dashboard that brings data to life, you have the tools to make it happen today.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;Why Python and Databases?&lt;/strong&gt;&lt;br&gt;
Python’s clear, concise syntax makes it accessible for beginners and robust enough for professionals. When paired with a reliable database system—be it SQLite for small projects or PostgreSQL for larger applications—the combination offers versatility, scalability, and a wealth of learning opportunities.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Key Advantages:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Simplicity &amp;amp; Readability:&lt;/strong&gt; Python’s code is like plain English, making it easy to learn and maintain.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Extensive Libraries:&lt;/strong&gt; Tools like SQLAlchemy for database management, Flask for web apps, and Pandas for data manipulation save you time and headaches.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Versatility:&lt;/strong&gt; From web development to data science, Python can be the backbone of your next big side project.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Scalability:&lt;/strong&gt; Start small with SQLite and transition to more powerful databases as your project grows.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;info:&lt;/strong&gt; "Python's blend of simplicity and power makes it the ideal choice for anyone looking to build real-world applications. Its extensive community support and libraries ensure that help is always just a search away."&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;Did You Know?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Recent surveys have shown that Python is among the top three most popular programming languages, with over 50% of developers using it daily. This wide adoption means countless tutorials, community forums, and real-world examples are at your disposal.&lt;/p&gt;

&lt;p&gt;For those interested in furthering their expertise, explore deep dives into &lt;a href="https://learn.microsoft.com/en-us/shows/dbfundamentals/" rel="noopener noreferrer"&gt;Database fundamentals&lt;/a&gt; and &lt;a href="https://github.com/martin-majlis/Wikipedia-API" rel="noopener noreferrer"&gt;API Programming&lt;/a&gt; to level up your project-building skills. And if you’re curious about the cutting edge of technology, our &lt;a href="https://www.coursera.org/professional-certificates/ai-engineer" rel="noopener noreferrer"&gt;AI Engineering course&lt;/a&gt; offers practical insights into integrating AI into your projects.&lt;/p&gt;



&lt;p&gt;&lt;strong&gt;Project Spotlight 1: Personal Finance Tracker&lt;/strong&gt;&lt;br&gt;
Managing your finances can be challenging. Imagine having a tool that not only logs your transactions but also gives you insights into spending trends, helping you budget more effectively.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What to Build:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Expense Logging:&lt;/strong&gt; A simple interface to enter income, expenses, categories, and dates.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Data Storage:&lt;/strong&gt; Use SQLite for a lightweight solution or PostgreSQL for scalability.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Visual Insights:&lt;/strong&gt; Generate charts with Matplotlib or Plotly to visualize trends over time.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Detailed Explanation with Code Example:&lt;/strong&gt;&lt;br&gt;
Let’s start by creating a simple SQLite database to store transaction data. The code below sets up a table and inserts sample transactions:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;sqlite3&lt;/span&gt;
&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;random&lt;/span&gt;

&lt;span class="c1"&gt;# Connect to SQLite database (or create it)
&lt;/span&gt;&lt;span class="n"&gt;conn&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;sqlite3&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;connect&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;chatbot.db&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;cursor&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;conn&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;cursor&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;

&lt;span class="c1"&gt;# Create a table to log conversations
&lt;/span&gt;&lt;span class="n"&gt;cursor&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;execute&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;'''&lt;/span&gt;&lt;span class="s"&gt;
CREATE TABLE IF NOT EXISTS conversations (
    id INTEGER PRIMARY KEY,
    user_input TEXT,
    bot_response TEXT
)
&lt;/span&gt;&lt;span class="sh"&gt;'''&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;conn&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;commit&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;

&lt;span class="c1"&gt;# Simple chatbot logic
&lt;/span&gt;&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;get_bot_response&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;user_input&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="n"&gt;responses&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;hello&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Hi there! How can I help you today?&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;help&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Sure, I can help. What do you need assistance with?&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;bye&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Goodbye! Have a great day!&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;responses&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;user_input&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;lower&lt;/span&gt;&lt;span class="p"&gt;(),&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;I didn&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;t understand that. Can you rephrase?&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="c1"&gt;# Simulate a conversation
&lt;/span&gt;&lt;span class="n"&gt;user_inputs&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Hello&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Help&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Bye&lt;/span&gt;&lt;span class="sh"&gt;"&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;user_input&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="n"&gt;user_inputs&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="n"&gt;response&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;get_bot_response&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;user_input&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;User: &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;user_input&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s"&gt;Bot: &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;response&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="n"&gt;cursor&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;execute&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;INSERT INTO conversations (user_input, bot_response) VALUES (?, ?)&lt;/span&gt;&lt;span class="sh"&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;user_input&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;response&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
&lt;span class="n"&gt;conn&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;commit&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;span class="n"&gt;conn&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;close&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;info:&lt;/strong&gt; "Every interaction is a chance to learn. Logging conversations not only helps improve the bot's responses but also provides insights into user needs and behavior."&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;Additional Learning:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Enhance your skills with advanced &lt;a href="https://github.com/martin-majlis/Wikipedia-API" rel="noopener noreferrer"&gt;API Programming&lt;/a&gt;, ensuring your chatbot integrates seamlessly with other services.&lt;br&gt;
Brush up on &lt;a href="https://learn.microsoft.com/en-us/shows/dbfundamentals/" rel="noopener noreferrer"&gt;Database&lt;/a&gt; management for effective data logging.&lt;br&gt;
Explore our &lt;a href="https://www.coursera.org/professional-certificates/ai-engineer" rel="noopener noreferrer"&gt;AI Engineering&lt;/a&gt; course to incorporate more sophisticated AI techniques into your projects.&lt;/p&gt;



&lt;p&gt;&lt;strong&gt;Project Spotlight 3: Real-Time Dashboards&lt;/strong&gt;&lt;br&gt;
Real-time dashboards transform raw data into actionable insights by visualizing key metrics as they happen. Whether you're monitoring website traffic or tracking business performance, a dynamic dashboard can make a huge difference.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What to Build:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Data Collection:&lt;/strong&gt; Gather data from APIs, sensors, or internal systems.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Live Updates:&lt;/strong&gt; Use Python frameworks like Flask or FastAPI to serve real-time data.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Interactive Visuals:&lt;/strong&gt; Combine backend data processing with frontend JavaScript for a dynamic experience.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Detailed Explanation with Code Example:&lt;/strong&gt;&lt;br&gt;
Here’s a basic example using Flask to serve real-time data:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;flask&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;Flask&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;jsonify&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;render_template&lt;/span&gt;
&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;random&lt;/span&gt;
&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;threading&lt;/span&gt;
&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;time&lt;/span&gt;

&lt;span class="n"&gt;app&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;Flask&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;__name__&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;data&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;metric&lt;/span&gt;&lt;span class="sh"&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="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;update_data&lt;/span&gt;&lt;span class="p"&gt;():&lt;/span&gt;
    &lt;span class="k"&gt;while&lt;/span&gt; &lt;span class="bp"&gt;True&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="n"&gt;data&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;metric&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;random&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;randint&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="mi"&gt;100&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="n"&gt;time&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;sleep&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="nd"&gt;@app.route&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;/data&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;get_data&lt;/span&gt;&lt;span class="p"&gt;():&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nf"&gt;jsonify&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;data&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="nd"&gt;@app.route&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;/&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;index&lt;/span&gt;&lt;span class="p"&gt;():&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nf"&gt;render_template&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;dashboard.html&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;  &lt;span class="c1"&gt;# Assume a dashboard.html file exists
&lt;/span&gt;
&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;__name__&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;__main__&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="n"&gt;threading&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;Thread&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;target&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;update_data&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;start&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
    &lt;span class="n"&gt;app&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;run&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;debug&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="bp"&gt;True&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;dashboard.html might include a simple JavaScript snippet to poll the /data endpoint every few seconds.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;info:&lt;/strong&gt; "Real-time dashboards provide a window into the pulse of your operations. Even a simple metric can drive smarter decisions when visualized in real time."&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;Explore More:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Deepen your understanding of &lt;a href="https://learn.microsoft.com/en-us/shows/dbfundamentals/" rel="noopener noreferrer"&gt;Database&lt;/a&gt; connections and data flows.&lt;br&gt;
Consider exploring &lt;a href="https://github.com/martin-majlis/Wikipedia-API" rel="noopener noreferrer"&gt;API Programming&lt;/a&gt; for dynamic data integration.&lt;br&gt;
Advance your project with insights from our &lt;a href="https://www.coursera.org/professional-certificates/ai-engineer" rel="noopener noreferrer"&gt;AI Engineering&lt;/a&gt; curriculum.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;Beyond the Spotlight: More Cool Side Projects&lt;/strong&gt;&lt;br&gt;
The combination of Python and databases offers an endless playground for creativity. Here are some additional project ideas:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Task and Project Managers:&lt;/strong&gt; Build an app to organize your to-dos, deadlines, and progress.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Inventory Systems:&lt;/strong&gt; Create systems to manage stock, whether for a small business or a hobby.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Social Media Analyzers:&lt;/strong&gt; Develop tools to gather and analyze social media trends.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Event Trackers:&lt;/strong&gt; Design an application to monitor and manage event logistics.&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;info:&lt;/strong&gt; "Every new project is a learning opportunity. Don't hesitate to experiment—each iteration brings you one step closer to mastery."&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;Further Resources:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Get started with foundational &lt;a href="https://learn.microsoft.com/en-us/shows/dbfundamentals/" rel="noopener noreferrer"&gt;Database&lt;/a&gt; techniques.&lt;br&gt;
Expand your skill set with our &lt;a href="https://github.com/martin-majlis/Wikipedia-API" rel="noopener noreferrer"&gt;API Programming&lt;/a&gt; course.&lt;br&gt;
Check out our &lt;a href="https://www.coursera.org/professional-certificates/ai-engineer" rel="noopener noreferrer"&gt;AI Engineering&lt;/a&gt; course for innovative project ideas.&lt;/p&gt;




</description>
      <category>programming</category>
      <category>beginners</category>
      <category>tutorial</category>
      <category>python</category>
    </item>
    <item>
      <title>Advanced Developer Tutorial on Address Lookup Tables</title>
      <dc:creator>ANDI NUGROHO</dc:creator>
      <pubDate>Sun, 09 Mar 2025 07:13:15 +0000</pubDate>
      <link>https://forem.com/andinugroho/advanced-developer-tutorial-on-address-lookup-tables-30eg</link>
      <guid>https://forem.com/andinugroho/advanced-developer-tutorial-on-address-lookup-tables-30eg</guid>
      <description>&lt;p&gt;Since the early times when data begun to be used to compute values, there has always been a need to store complex data in such a way that they would always be easy to access. In ancient times this was accomplished with sine tables and a 98-column multiplication, advances in computing technology has impacted the way data is stored and retrieved.&lt;br&gt;
In the early years of computer technology, processing input/output was particularly slow and would consume more resource and time. To solve this problem, it made sense to reduce significantly the process of reading operations and operations data. A very efficient method that was introduced to solve this problem was Caching (which involves storing data so that it can be available for future request at faster speeds due to an earlier computation of the data stored elsewhere).&lt;br&gt;
However, while systemwide &lt;strong&gt;Caching&lt;/strong&gt; tries to automate the process of fetching commonly occurring data items, to enable a much faster mechanism for obtaining data items that possess a sort of immutability, lookup tables were introduced.&lt;/p&gt;

&lt;blockquote&gt;
&lt;h2&gt;
  
  
  What is a Lookup Table
&lt;/h2&gt;
&lt;/blockquote&gt;

&lt;p&gt;As if defined in computer science, &lt;a href="https://en.wikipedia.org/wiki/Lookup_table" rel="noopener noreferrer"&gt;1&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;a lookup table(LUT) is an array that replaces runtime computation with a simpler array indexing operation. This process of utilizing array indexing to compute the running phase of a program is also known as direct addressing. It is much faster and less expensive since data is retrieved from memory using indexes as reference compared to the processing input/output approach. The tables may be pre-calculated and stored in static program storage, calculated (or "pre-fetched") as part of a program's initialization phase, or even stored in hardware in application-specific platforms.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;A lookup table is more efficient in terms of lookup operation and has a guaranteed O(1) time complexity. However, it is not possible for two entities to have the same lookup key k, and as the size of the datasets grow increasingly larger, in the magnitude of considering all forms of allottable data, it becomes less practical to stored a LUT in memory.&lt;/p&gt;

&lt;blockquote&gt;
&lt;h2&gt;
  
  
  Address Lookup Table (ALTs)
&lt;/h2&gt;
&lt;/blockquote&gt;

&lt;p&gt;As defined on the Solana documentation, &lt;a href="https://docs.solana.com/developing/lookup-tables" rel="noopener noreferrer"&gt;2&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;An address Lookup Tables, commonly referred to as "lookup tables" or "ALTs" for short, allow developers to create a collection of related addresses to efficiently load more addresses in a single transaction. Since each transaction on the Solana blockchain requires a listing of every address that is interacted with as part of the transaction; without ALTs, this listing would effectively be capped at 32 addresses per transaction, but with ALTs, it would be effectively raise the addresses per transaction to 256&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;ALTs are part of additional functionalities that were introduced in the versioned transaction format which is quite similar to the legacy transaction format with just slight differences in libraries used.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;How to Create An Address Lookup Table(ALTs)&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;This tutorial is going to show you how you can implement ALTs on your projects and help you see the benefits and advantages they offer.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;What We Will Implement in This Tutorial&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;In this Tutorial, we will:&lt;/p&gt;

&lt;blockquote&gt;
&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Create and execute a &lt;a href="https://docs.solana.com/proposals/versioned-transactions" rel="noopener noreferrer"&gt;Version 0 (V0)&lt;/a&gt; Transaction&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Create and Populate an Address Lookup Table&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Compare the transaction size of two nearly identical transactions where one would implement a lookup table and the other would not&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Perquisites:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://nodejs.org/en/" rel="noopener noreferrer"&gt;Node.js&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Intermediate Experience with Typescript/JavaScript&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://www.npmjs.com/package/ts-node" rel="noopener noreferrer"&gt;ts-node&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;basic or solid experience in running Solana transactions&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;all necessary imports including classes from Solana Web3 library&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;create a wallet and fund it with some devnet SOL&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;set up API endpoint to connect with the Solana network&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/blockquote&gt;

&lt;p&gt;Your setup Environment should look similar to this:&lt;/p&gt;

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

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Steps to Creating ALTs&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;Executing Versioned Transaction V(0)&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;To use Lookup Tables, you must execute a versioned transactions.&lt;/p&gt;

&lt;p&gt;We can do this by Let's start by creating a new function, &lt;strong&gt;createAndSendV0Tx&lt;/strong&gt;, that accepts an array of TransactionInstructions, &lt;strong&gt;txInstructions&lt;/strong&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;async function createAndSendV0Tx(txInstructions: TransactionInstruction[]) {
// Step 1 - Fetch Latest Blockhash   
let latestBlockhash =await SOLANA_CONNECTION.getLatestBlockhash('finalized');    console.log("   ✅ - Fetched latest blockhash. Last valid height:", latestBlockhash.lastValidBlockHeight)
;    

// Step 2 - Generate Transaction Message    
const messageV0 = new TransactionMessage({ payerKey: SIGNER_WALLET.publicKey,  recentBlockhash: latestBlockhash.blockhash, instructions: txInstructions    }).compileToV0Message();    console.log("   ✅ - Compiled transaction message");    
const transaction = new VersionedTransaction(messageV0);    
// Step 3 - Sign your transaction with the required `Signers`    transaction.sign([SIGNER_WALLET]);    console.log("   ✅ - Transaction Signed");    // Step 4 - Send our v0 transaction to the cluster    const txid = await SOLANA_CONNECTION.sendTransaction(transaction, { maxRetries: 5 });    console.log("   ✅ - Transaction sent to network");    
// Step 5 - Confirm Transaction     
const confirmation = await SOLANA_CONNECTION.confirmTransaction({signature: txid,        blockhash: latestBlockhash.blockhash, lastValidBlockHeight: latestBlockhash.lastValidBlockHeight    });  if (confirmation.value.err) { throw new Error("   ❌ - Transaction not confirmed.") }    console.log('🎉 Transaction succesfully confirmed!', '\n', `https://explorer.solana.com/tx/${txid}?cluster=devnet`);}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Let's walk through our code:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 1:&lt;/strong&gt; We fetch the latest blockhash from the network. Note: We pass the parameter, 'finalized', to make sure the block does not belong to a dropped fork.&lt;br&gt;
&lt;strong&gt;Step 2:&lt;/strong&gt; Using our txInstructions parameter and the latestBlockhash, we create a new MessageV0 by building a Message and executing the .compileToV0Message() method.&lt;br&gt;
&lt;strong&gt;Step 3:&lt;/strong&gt; We sign the transaction with an array of signers. In this case, it is just our SIGNER_WALLET.&lt;br&gt;
&lt;strong&gt;Step 4:&lt;/strong&gt; We send the transaction to the cluster using sendTransaction, which will return a transaction signature/id.&lt;br&gt;
&lt;strong&gt;Step 5:&lt;/strong&gt; We wait for the cluster to confirm the transaction has succeeded. If it succeeds, we log our explorer URL; otherwise, we throw an error.&lt;/p&gt;

&lt;p&gt;Once successful with the above, we now move on to create an ALT&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Create an Address Lookup Table&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Create a new async function, &lt;strong&gt;createLookupTable&lt;/strong&gt;, that will build our transaction instruction and invoke &lt;strong&gt;createAndSendV0Tx&lt;/strong&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;async function createLookupTable() {
    // Step 1 - Get a lookup table address and create lookup table instruction
    const [lookupTableInst, lookupTableAddress] =
        AddressLookupTableProgram.createLookupTable({
            authority: SIGNER_WALLET.publicKey,
            payer: SIGNER_WALLET.publicKey,
            recentSlot: await SOLANA_CONNECTION.getSlot(),
        });

    // Step 2 - Log Lookup Table Address
    console.log("Lookup Table Address:", lookupTableAddress.toBase58());

    // Step 3 - Generate a transaction and send it to the network
    createAndSendV0Tx([lookupTableInst]);
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Breaking down our code:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 1:&lt;/strong&gt; We create two variables, &lt;strong&gt;lookupTableInst&lt;/strong&gt; and &lt;strong&gt;lookupTableAddress&lt;/strong&gt;, by destructuring the results of the &lt;strong&gt;createLookupTable&lt;/strong&gt; method. This method returns the public key for the table once created and a &lt;strong&gt;TransactionInstruction&lt;/strong&gt; that can be passed into our &lt;strong&gt;createAndSendV0Tx&lt;/strong&gt; function.&lt;br&gt;
&lt;strong&gt;Step 2:&lt;/strong&gt; We log the table's address&lt;br&gt;
&lt;strong&gt;Step 3:&lt;/strong&gt; Finally, we call &lt;strong&gt;createAndSendV0Tx&lt;/strong&gt;by passing &lt;strong&gt;lookupTableInst&lt;/strong&gt; inside of an array to match our type requirements.&lt;/p&gt;

&lt;p&gt;Create an empty address table by running:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;createLookupTable();
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;To run the transaction, enter your terminal and execute:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;ts-node app.ts
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;After the transaction has completed, you should receive a URL to the transaction page on Solana Explorer, like in the image below:&lt;/p&gt;

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

&lt;p&gt;The lookup table account address is: &lt;strong&gt;3uBhgRWPTPLfvfqxi4M9eVZC8nS1kDG9XPkdHKgG69nw&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Next steps:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Remove the call to createLookupTable()&lt;/li&gt;
&lt;li&gt;Add the table lookup address from your console to the PublicKey declaration like so :
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const LOOKUP_TABLE_ADDRESS = new PublicKey("YOUR_TABLE_ADDRESS_HERE"); 
// e.g const LOOKUP_TABLE_ADDRESS = new PublicKey("3uBhgRWPTPLfvfqxi4M9eVZC8nS1kDG9XPkdHKgG69nw");
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;So what's going on with the &lt;strong&gt;extendLookupTable&lt;/strong&gt; method:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;We pass our &lt;strong&gt;SIGNER_WALLET&lt;/strong&gt; to pay the transaction fees and any additional rent incurred.&lt;/li&gt;
&lt;li&gt;We define our update authority - in our case, we set that as the &lt;strong&gt;SIGNER_WALLET&lt;/strong&gt; in our table creation step above.&lt;/li&gt;
&lt;li&gt;We pass in the lookup table account address (which we defined as &lt;strong&gt;LOOKUP_TABLE_ADDRESS&lt;/strong&gt;).&lt;/li&gt;
&lt;li&gt;We pass an array of addresses into our lookup table. We will pass in a few random public keys, but you can pass in any public key that you like! &lt;strong&gt;The Program's "compression" supports storing up to 256 addresses in a single lookup table!&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;log a link to our lookup table entries for easy access after the transaction is complete. Finally, we pass &lt;strong&gt;TransactionInstruction&lt;/strong&gt; into &lt;strong&gt;createAndSendV0Tx&lt;/strong&gt; to generate a transaction and send it to the network!&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Call the new function:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;addAddressesToTable();
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now run the in the terminal using the previous ts-node app.tscommand. Check the returned URL to see your transactions and your lookup table entries on the Solana Explorer. On the lookup table entries, there will be a list of all the stored public keys.&lt;/p&gt;

&lt;p&gt;By now perhaps you are asking, &lt;em&gt;&lt;strong&gt;why is this better?&lt;/strong&gt;&lt;/em&gt; Well, The power of ALTs in transaction lies is in the efficiency of the transaction! By effectively &lt;em&gt;&lt;strong&gt;compressing a 32-byte address to a 1-byte index value&lt;/strong&gt;&lt;/em&gt;&lt;br&gt;
This is great for speed as well as space efficiency as you can push in more transactions without bothering about space. By eliminating the need for long and complex iterations in cases of numerous addresses, which leads to error-resistance as ALTs can be engineered to prevent duplicate addresses.&lt;br&gt;
Also this is cheaper; by reducing the number and size of the instructions in a transaction, thereby making fees required to develop on the blockchain way more cost-effective.&lt;br&gt;
From transaction caching operations, scalability, speed, cost, the advantages of the address lookup table cannot be overemphasized, the benefits are numerous!&lt;br&gt;
of course they are not the best when it comes to dealing with a dataset of unpredictable large number of possible keys, and could exceed the number of keys that are actually stored. For this sort of cases, hash tables are more efficient. Read more about hash tables &lt;a href="https://wiki.c2.com/?HashTable" rel="noopener noreferrer"&gt;here&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;While most use cases of ALTs revolve around transactional caching, decentralized applications employ their power to store multiple address for easy access at &lt;strong&gt;O(1)&lt;/strong&gt; time; within a single transaction, you can load a large number of addresses&lt;/p&gt;

&lt;p&gt;A very practical use case for ALTs can be found in asset management dApps where multiple wallets are being monitored; without Solana ALTs, it would be a resource consuming process.&lt;/p&gt;

&lt;p&gt;For further reference, You can find another simple example to build on the example we have shown already &lt;strong&gt;&lt;a href="https://github.com/andi-nugroho/Address-Lookup-Tables" rel="noopener noreferrer"&gt; Github&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Conclusion&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;We have learned the following points in this terse tutorial:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;In blockchain transactions, the magnitude of addresses used in multi-level transactions can easily scale in magnitude of millions of addresses; hence requiring an efficient means of retrieving transaction data in an O(1) time&lt;/li&gt;
&lt;li&gt;Lookup tables are best for this as they utilize a concept known as &lt;strong&gt;"direct addressing"&lt;/strong&gt; which utilizes array indexing to compute the running phase of a program.&lt;/li&gt;
&lt;li&gt;By utilizing Address Lookup Tables, blockchain developers can create a collection of related addresses to efficiently load more addresses in a single transaction; address tables can store up to 256 addresses each. This can however be a limitation in special cases. In addition to stored addresses, address table accounts also tracks various metadata.&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>webdev</category>
      <category>javascript</category>
      <category>blockchain</category>
      <category>web3</category>
    </item>
  </channel>
</rss>
