<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Ninad's Tech Blog]]></title><description><![CDATA[Sharing Tech Knowledge.]]></description><link>https://tech.ninadnaik.me</link><image><url>https://cdn.hashnode.com/res/hashnode/image/upload/v1735729757981/5d15ecbf-4a9f-4d1c-8531-792147e14f89.png</url><title>Ninad&apos;s Tech Blog</title><link>https://tech.ninadnaik.me</link></image><generator>RSS for Node</generator><lastBuildDate>Sun, 26 Apr 2026 17:04:01 GMT</lastBuildDate><atom:link href="https://tech.ninadnaik.me/rss.xml" rel="self" type="application/rss+xml"/><language><![CDATA[en]]></language><ttl>60</ttl><item><title><![CDATA[Using Redis as a primary database]]></title><description><![CDATA[When we think of a structured databases, we think about rows, columns, tables, and the relationships between different tables. And we are correct about this. Most applications we use/develop use some sort of relational database, such as PostgreSQL, M...]]></description><link>https://tech.ninadnaik.me/using-redis-as-a-primary-database</link><guid isPermaLink="true">https://tech.ninadnaik.me/using-redis-as-a-primary-database</guid><category><![CDATA[Redis]]></category><category><![CDATA[cache]]></category><category><![CDATA[nestjs]]></category><category><![CDATA[Url Shortener]]></category><dc:creator><![CDATA[Ninad Naik]]></dc:creator><pubDate>Wed, 01 Jan 2025 13:48:51 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1735733268376/e979c6e6-f409-40dd-ae8d-86ecbfac89c1.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>When we think of a structured databases, we think about rows, columns, tables, and the relationships between different tables. And we are correct about this. Most applications we use/develop use some sort of relational database, such as <a target="_blank" href="https://www.postgresql.org/">PostgreSQL</a>, <a target="_blank" href="https://www.mysql.com/">MySQL</a>, and <a target="_blank" href="https://mariadb.org/">MariaDB</a>. Then, we have applications that use NoSQL databases, like <a target="_blank" href="https://www.mongodb.com/">MongoDB</a>.</p>
<p><a target="_blank" href="https://redis.io/">Redis</a> is popularly known for being used as a cache store alongside Relational Database Management System (RDBMS). As it is an in-memory data store, the read/write speed is higher than traditional RDBMS, which stores data on the disk. However, there are downsides to this database as well. For instance, there are memory limitations as all the data is stored in memory (or RAM), and a large amount of RAM can significantly increase the cost of the server on the cloud.</p>
<h2 id="heading-using-redis-as-a-cache">Using Redis as a Cache</h2>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1735043452911/afc4c58b-6d7e-484c-a04e-4ef1482eb7e8.png" alt class="image--center mx-auto" /></p>
<p>Image credit: <a target="_blank" href="https://backendless.com/redis-what-it-is-what-it-does-and-why-you-should-care/">backendless.com</a></p>
<p>Redis can be viewed as an intermediate data store or cache that temporarily stores frequently requested data from the database so that database operations are reduced. When the data is not present in the cache, it is retrieved from the persistent database and cached to Redis for further retrieval.</p>
<h2 id="heading-redis-as-a-primary-database">Redis as a Primary database</h2>
<p>When we think of using Redis as a primary database, we need to figure out how to store all of our application’s data on Redis, i.e., user data, login credentials, relationships, indexes, etc. Redis has grown from simply storing key-value pairs to storing multiple data structures like Sets, Bitmaps, Hyperloglogs, and others.</p>
<h3 id="heading-database-design-of-shortomega">Database design of Shortomega</h3>
<p>As key-value stores like Redis don’t have rows, columns, tables, or relationships, I need to devise a solution.</p>
<p>Let’s start with a simple data — user’s email and password:</p>
<p>Each user has a unique email and corresponding password to log in. We typically store the hashed value of the password using a hashing algorithm like <a target="_blank" href="https://en.wikipedia.org/wiki/SHA-1">SHA-1</a> or <a target="_blank" href="https://en.wikipedia.org/wiki/SHA-2">SHA-256</a> to protect the plain password from attackers.</p>
<p>We can store email ID with the corresponding user ID by adding the prefix “email” to the key:</p>
<pre><code class="lang-plaintext">email:&lt;userid&gt; -&gt; &lt;email address&gt;
</code></pre>
<p>And the hashed password using:</p>
<pre><code class="lang-plaintext">password:&lt;password&gt; -&gt; password
</code></pre>
<p>However, there are some issues with this approach. Whenever we need to add new attributes to the same user, we must add a new hash with a new prefix every time. This will significantly increase the memory space needed to store each user's attributes. Moreover, we usually need to set and retrieve email and password together and for that, we have to perform 2 database operations.</p>
<p>Redis has a built-in structure called <a target="_blank" href="https://redis.io/docs/latest/develop/data-types/hashes/">hashes</a> which is a collection of field-value pairs. We use the <code>HSET</code> command to add fields to the hash. <code>HSET</code> syntax looks something like this:</p>
<pre><code class="lang-ruby">HSET key field value [field value ...]
</code></pre>
<p>Now we have only one hash for each user data and can store data in this way:</p>
<pre><code class="lang-ruby">HSET <span class="hljs-symbol">user:</span>&lt;userid&gt; email mail@test.com password &lt;hashed-password&gt; [...other fields <span class="hljs-keyword">and</span> value]
</code></pre>
<p>We can easily retrieve all fields using <code>HGETALL</code> command:</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1735195836315/ffbb0e1c-6ea8-443e-a7cf-9232b6347bcf.png" alt class="image--center mx-auto" /></p>
<p>Now that we have successfully stored user data efficiently, I will explain how I am building a URL shortener application — <a target="_blank" href="https://shortomega.ninadnaik.me">Shortomega</a> using Redis as the primary database. I am storing the user login credentials similarly as explained before.</p>
<p>To store short URLs and their corresponding long URL, I am simply storing them in key-value pairs to query them in O(1) time.</p>
<pre><code class="lang-plaintext">short:&lt;short-url&gt; -&gt; &lt;long-url&gt;
</code></pre>
<p>In order to associate a short URL to a user, I created a set of short URLs for each user as shown below so that I can retrieve all the created short URLs in a single Redis query.</p>
<pre><code class="lang-plaintext">user:&lt;userid&gt;:urls -&gt; [set]
</code></pre>
<h3 id="heading-challenges">Challenges</h3>
<p>Using sets to store short URLs created by a particular user, I need to perform additional N queries to retrieve corresponding long URLs. This is similar to the <a target="_blank" href="https://planetscale.com/blog/what-is-n-1-query-problem-and-how-to-solve-it">N+1 query problem</a> in databases. To address this, I needed to choose between these 2 options:</p>
<ol>
<li><p>Store the long URL along with the short URL for a particular user. This will result in redundancy. Managing and updating the URLs at the two places would be cumbersome.</p>
</li>
<li><p>Another option is to write a custom <a target="_blank" href="https://www.lua.org/">Lua</a> script that runs on the Redis instance and returns the pairs of short and corresponding long URLs. This solves the N+1 query problem and gives the result in a single query. I chose to use this method. The script looks something like this:</p>
</li>
</ol>
<pre><code class="lang-ruby">local urls = redis.call(<span class="hljs-string">'SMEMBERS'</span>, KEYS[<span class="hljs-number">1</span>])
local result = {}
<span class="hljs-keyword">for</span> i, url <span class="hljs-keyword">in</span> ipairs(urls) <span class="hljs-keyword">do</span>
    local longUrl = redis.call(<span class="hljs-string">'GET'</span>, <span class="hljs-string">'short:'</span>..url)
    <span class="hljs-keyword">if</span> longUrl <span class="hljs-keyword">then</span>
        table.insert(result, url)
        table.insert(result, longUrl)
    <span class="hljs-keyword">end</span>
<span class="hljs-keyword">end</span>
<span class="hljs-keyword">return</span> result
</code></pre>
<p>In the above Lua script, I am fetching all the short URLs based on the user ID passed from the <a target="_blank" href="https://nestjs.com/">NestJS</a> backend. By looping over each URL, I get the corresponding long URL that is simply stored in a key-value pair. Lastly, I insert the pair in a table which I return to the back-end for further processing.</p>
<p>To benchmark the performance of retrieving the data in a single database query, I ran a <a target="_blank" href="https://gist.github.com/ninadnaik10/61eee23004a7c08cb19b700bc7111688">Python script</a> where I first stored and retrieved the data using N+1 queries and I executed Lua script on the Redis instance to retrieve the data in one single query. I plotted the graph as shown below:</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1735659220713/8cbaaa27-01ca-4e21-a42c-b61b798897be.png" alt class="image--center mx-auto" /></p>
<p>In the above plot diagram, we can see the execution time difference between N+1 queries and the Lua script. A user with around 5000 URLs can fetch all the URLs in under 50 ms instead of 300 ms.</p>
<h3 id="heading-analytics">Analytics</h3>
<p>Analytics include counting of total and unique visitors for each short URLs. This helps the user to track the engagements of created short links across different regions.</p>
<p>The count of total visits can easily be stored in a key-value pair. The value is incremented each time someone clicks on the link. But what about unique visitors? I can store unique IP addresses of visitors in a set and then count the elements in the set to get the unique visitors. However, it will take O(N*M) space in the database to store all the <code>N</code> IP addresses of <code>M</code> links, consuming the memory of the server. As mentioned before, increasing the RAM of a server instance on the cloud is more expensive than adding more disk space. It turns out that there is one special built-in data structure in Redis that can solve this problem. I am talking about <a target="_blank" href="https://redis.io/docs/latest/develop/data-types/probabilistic/hyperloglogs/">HyperLogLog</a>.</p>
<p>HyperLogLog is a probabilistic data structure that estimates the cardinality of a set. Basically, it estimates the number of unique elements in a set without the need for actual storage of elements in a set. It uses up to 12 KB of memory irrespective of count of elements in the set and provides a standard error of 0.81%.</p>
<p>We can add and count elements using following syntax:</p>
<pre><code class="lang-ruby">PFADD key [element [element ...]]
PFCOUNT key [key ...]
</code></pre>
<p>I can now add the IP addresses to the HyperLogLog and count the unique IP addresses.</p>
<pre><code class="lang-plaintext">PFADD short:&lt;hash&gt;:ips [IP addresses ...]
PFCOUNT short:&lt;hash&gt;:ips
</code></pre>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1735658699925/14bde8f8-f0d9-4269-855a-93eb4092ebb6.png" alt class="image--center mx-auto" /></p>
<h2 id="heading-lastly">Lastly</h2>
<p>There are endless possibilities of how we can use Redis as a cache and even as a primary database. The fast operations and in-memory operations of Redis make it an ideal choice for high-performance and real-time applications.</p>
<p>The URL shortener application — Shortomega is work in progress and I will add further development and details here or in another blog.</p>
<p>Enjoy Building!</p>
]]></content:encoded></item><item><title><![CDATA[Why is Social Media not what you might think?]]></title><description><![CDATA[A month ago, I watched a mind-blowing documentary The Social Dilemma on YouTube. It was worth watching and shows you the real business behind the tech companies. Inspired by that, I thought of writing down the important topics discussed in the docume...]]></description><link>https://tech.ninadnaik.me/why-is-social-media-not-what-you-might-think</link><guid isPermaLink="true">https://tech.ninadnaik.me/why-is-social-media-not-what-you-might-think</guid><category><![CDATA[social media]]></category><category><![CDATA[truth]]></category><dc:creator><![CDATA[Ninad Naik]]></dc:creator><pubDate>Tue, 12 Oct 2021 06:30:00 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1735717390960/d535d82e-f743-4f50-85fc-9a1a019678a5.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>A month ago, I watched a mind-blowing documentary <a target="_blank" href="https://www.netflix.com/in/title/81254224"><em>The Social Dilemma</em></a> on YouTube. It was worth watching and shows you the real business behind the tech companies. Inspired by that, I thought of writing down the important topics discussed in the documentary and my own thoughts. Before proceeding, let's peak into the history first.</p>
<p>The internet started in the 1960s as a way for government researchers to share information. It was not until 1991 when computer scientist Tim Berners-Lee invented the World Wide Web (WWW). He created the browser to access the web and made publicly available. That's when internet reached to the common people all around the world. At first, people could only send emails to communicate with other people on the internet. This version of web was named as Web 1.0. After the rise of social networking sites like SixDegrees, MySpace, Facebook, Twitter, Instagram and Snapchat. Then new version was made named Web 2.0.</p>
<blockquote>
<p>You affect the world by what you browse.</p>
<p>— Tim Berners-Lee</p>
</blockquote>
<p>Since every coin has two sides, the advantages of social media are worth mentioning. It is easy to find new people of same interest, talent or profession. On social media sites like Facebook, we can find the groups of our interest, follow influencers and make new friends from anywhere in the world. Sharing ideas, creating new things, talking about serious topics, spreading awareness around the globe and many more things have been made possible by the community on the internet. Some creators crowdfund for good cause and needy ones managed to get organs with the help of the social media. During the global pandemic, many people seek out hobbies, interest, attend live concert online, connect with friends on video call and educate themselves with genuine news about the pandemic.</p>
<p>Internet is a volatile place. One can never predict what would possibly happen in very short span of time. With over 4.5 billion people on the internet, a large number information is shared on the web which can be accessed by everyone on the web. As the consequence, there's a lot of content uploaded every single second. If not regulated properly, anyone can read the content which leads to misuse of the shared information. People might get exposed to age-restricted content, fake news, conspiracies, illegal digital materials, and many more. Speaking of fake news, Covid-19 fake news spread faster than virus itself. There was violence, protests in many countries. In fact, people didn't cooperate with local authority which made even more difficult to curb the virus. As a result, social media can be useful at a certain extent but it can surely overwhelm us.</p>
<p>Social media addiction is another major problem especially among teenagers. According to Addiction Center, social media addiction looks much like any other substance disorder and may include mood modification, behavioural and emotional changes, ever-increasing use of social media, experiencing unpleasant physical and emotional symptoms when social media use is restricted and conflict. These trillion dollars-per year companies produce the same sense as of gambling and drugs to keep users using their products as much as possible. We have seen people considering the amount of likes and comments on their posts and worrying about it, constantly checking their social media apps. We tend to make a lot friends online but the question is whether they are our real friends. We chat a lot on Instagram, Messenger, and WhatsApp but definitely don't know the mood, expression, emotion and attention of the person with whom we are texting. Talking in front of that person makes the conversation real because we can see their body gestures, look, voice, etc. Teenagers are facing more depression, anxiety and loneliness than ever.</p>
<blockquote>
<p>Likes just changed from spreading love around the world to making teenagers depressed.</p>
</blockquote>
<p>Big tech corporation are very good at making their products as addictive as possible. These companies collect a huge amount of data even if you are not using their products. Facebook and Instagram collect your browsing history, posts you like, people you follow, your exact location, news you read and undoubtedly sell these data to advertising companies to show you ads. It seems fine as these platforms run on advertising business models but it's hard to imagine the amount of data collected and processed to target us with relevant ads. Not only that, intruders can attack these platforms and steal users' data. In Facebook-Cambridge Analytica scandal, Facebook confirmed that data of potentially 87 million users was collected without the users' consent for political advertising. The data contained users' profile photo, birthday, current city, page likes, news feed, timeline, messages and 5000 different data points. The data was detailed enough to create psychographic profiles of the users. As mentioned in popular documentary <a target="_blank" href="https://www.netflix.com/in/title/80117542"><em>The Great Hack</em></a>, Cambridge Analytica is just the tip of the iceberg.</p>
<blockquote>
<p>If you are not paying for the product, you are the product.</p>
</blockquote>
<p>Internet was created to decentralize the mode of communication which means there is web of network and even if anyone network collapses, the internet does not get disrupt. Contrary to this, internet is mostly centralized by tech companies like Facebook and Google today. Most of the people feel internet is Facebook and Google and they are not wrong. During the recent Facebook, Instagram and WhatsApp outage, many people suffer because businesses work on it. People could not log into other web services with Facebook. Therefore, it is clear that Facebook has created monopoly throughout the internet.</p>
<blockquote>
<p>Data is the most valuable asset on the Earth.</p>
</blockquote>
<p>Now it is our responsibility to control the use of social media. No one would suggest to delete social media accounts to everyone. But even if few people do, it matters a lot. Here are the suggestions for everyone:</p>
<ol>
<li><p>Turn off all the notifications. Don't let unnecessary stuff disturb your peaceful mind.</p>
</li>
<li><p>Turn off any personalised ads option.</p>
</li>
<li><p>Check multiple times before posting anything online. Even if you delete it later, it still remains in the system.</p>
</li>
<li><p>Don't spread fake news. Fact-check it always on Google or any other trusted source.</p>
</li>
<li><p>Set screen time limits on your phone.</p>
</li>
<li><p>Avoid keeping your phone in the bedroom at night.</p>
</li>
<li><p>Don't watch what YouTube recommends you, always search for the video.</p>
</li>
<li><p>Keep social media apps out of your sight which means out of your home screen.</p>
</li>
<li><p>If you feel uncomfortable, talk about it with seniors.</p>
</li>
<li><p>Take your time. Do something exciting. Read a book, go for a walk.</p>
</li>
<li><p>Make friends in your neighbourhood.</p>
</li>
<li><p>Lastly, get out of these AI-generated world. Look outside. The world is beautiful.</p>
</li>
</ol>
<blockquote>
<p>Whether it is to be Utopia or Oblivion will be a touch-and-go relay race right up to the final moment....</p>
<p>— Buckminster Fuller</p>
</blockquote>
]]></content:encoded></item><item><title><![CDATA[Getting Started with Linux]]></title><description><![CDATA[Personal computers have evolved in the past and is evolving every coming year. So is the operating system. An operating system is system software that makes communication between computer hardware and software. We have a bunch of operating system to ...]]></description><link>https://tech.ninadnaik.me/getting-started-with-linux</link><guid isPermaLink="true">https://tech.ninadnaik.me/getting-started-with-linux</guid><category><![CDATA[Linux]]></category><category><![CDATA[Ubuntu]]></category><category><![CDATA[Gnome]]></category><dc:creator><![CDATA[Ninad Naik]]></dc:creator><pubDate>Wed, 09 Jun 2021 06:30:00 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1736317385173/4ce7bdad-fece-4d49-9e8c-e361e92ccce3.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Personal computers have evolved in the past and is evolving every coming year. So is the operating system. An operating system is system software that makes communication between computer hardware and software. We have a bunch of operating system to choose from as per our convenience and need. The popular ones are Windows 10, macOS and Linux distributions. Each operating system has its own advantages and disadvantages. So, there is no sense by asking which is the best operating system in the world.</p>
<p>We get Windows 10 preinstalled with most of the computers and laptops. macOS is installed in Mac lineup manufactured by Apple. These two operating systems are proprietary which means no one except the owning companies can access the code and contribute in the development of them. On the other hand, Linux is an open source operating system. It is owned by a community of developers. These people develop it and fix any errors or bugs in the OS. It is free of cost and can be used on any hardware. Linux has many distributions like Kali Linux, Ubuntu, Fedora, Arch Linux, Peppermint OS, Linux Mint, Elementary OS, etc. You can either buy a PC with Linux preinstalled or use Linux along with Windows 11 using Dual-Boot or installing it on a Virtual Machine like VMWare Workstation or VirtualBox. Here we are going to see how to install and setup Ubuntu using Dual-Boot because it is the most popular and easy for beginners.</p>
<h2 id="heading-pros">Pros</h2>
<ol>
<li><p>It is less susceptible to viruses and malware.</p>
</li>
<li><p>It is easy to install.</p>
</li>
<li><p>It does not take much disk space and can be run on any hardware system.</p>
</li>
<li><p>It has powerful command prompts.</p>
</li>
<li><p>It does not crash or requires reboot frequently like other OS.</p>
</li>
</ol>
<h2 id="heading-cons">Cons</h2>
<ol>
<li><p>The user interface is not as good-looking as the other OS.</p>
</li>
<li><p>It requires practice and skills.</p>
</li>
<li><p>There is limited support for popular software and apps.</p>
</li>
<li><p>Some hardware drivers are not available for Linux.</p>
</li>
<li><p>Not useful for gamers as games are popularly made for Windows.</p>
</li>
</ol>
<p>As we can clearly see Linux OS is not useful for everyone. If you are a gamer then Windows is best for you. If you are a productive user then Linux has a lot of support and features to help you.</p>
<h2 id="heading-basic-installation">Basic Installation</h2>
<p><strong>Prerequisites:</strong> A PC with Windows installed and minimum 30 GB disk space, USB pen drive (minimum 8 GB), Active internet connection.</p>
<ul>
<li><p><strong>Step 1: Create a backup of your PC [Optional]</strong></p>
<p>  It is a good practice to frequently make backups of your computer in a separate external disk. I would recommend you to take backup before installing Ubuntu in case you get stuck into a major boot issue.</p>
</li>
<li><p><strong>Step 2: Download Ubuntu ISO file</strong></p>
<p>  You can download Ubuntu ISO file from <a target="_blank" href="https://ubuntu.com/download/desktop">the official Ubuntu website</a> . Make sure you download latest version available. The latest version is Ubuntu 20.04 (Focal Fossa).</p>
</li>
<li><p><strong>Step 3: Create live USB stick</strong></p>
<p>  To create a live USB stick, download and install <a target="_blank" href="https://www.pendrivelinux.com/universal-usb-installer-easy-as-1-2-3/">Universal USB Installer</a> . After installing, connect your Pen Drive and open File Explorer and format it. Open Universal USB Installer and browse the location of Ubuntu ISO file. Leave everything default and click start. It will automatically create a live USB of Ubuntu.</p>
</li>
<li><p><strong>Step 4: Boot into Ubuntu</strong></p>
<p>  This is the most important step. Connect the pen drive to the computer you wish to install Ubuntu. Click start button and type Change advanced startup options and press Enter. Under the Advanced startup, click Restart Now. Windows Safe Mode page will show up. Choose Use a device option and click the USB disk. It may also be displayed as EFI USB Device. Clicking it will automatically boot into Ubuntu OS.</p>
</li>
<li><p><strong>Step 5: Installing Ubuntu</strong></p>
<p>  <img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1735724484894/5fcf38b1-b102-4d2a-a3a9-7124cbe32609.png" alt class="image--center mx-auto" /></p>
<p>  When the Ubuntu boots up, you will see two options. You can either try Ubuntu or install it. We are going to install it on the PC so select the second option.</p>
<p>  <img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1735724564738/1861a4ad-4195-4fed-8b6c-26f3ee58f31e.png" alt class="image--center mx-auto" /></p>
<p>  After that choose your language and keyboard layout.</p>
<p>  <img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1735724585275/7220271d-8220-4680-8159-305af1a97630.png" alt class="image--center mx-auto" /></p>
<p>  On the next screen choose Normal installation and tick Install Third-Party Software and click continue.</p>
<p>  <img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1735724609509/e53263ba-d32c-4b7b-aed8-0db5e1cdd9d1.png" alt class="image--center mx-auto" /></p>
<p>  On the next page choose install Ubuntu alongside Windows.</p>
<p>  <img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1735724620761/0454f930-8bde-4be9-91e8-e4997779a0af.png" alt class="image--center mx-auto" /></p>
<p>  After that allocate the disk space you want to give to Ubuntu and click Install Now. It will take 8-10 minute to install. Once the installation is complete restart your PC. Remove the USB and press Enter.</p>
</li>
</ul>
<p>Everything is done. Now just set up your home screen as per your need. Now it is important to check for updates so that everything runs smooth.</p>
<h2 id="heading-installing-updates">Installing Updates</h2>
<p>To install updates, go to app drawer and open Software Updater. It will automatically start updating. Make sure you sign up to Canonical Livepatch. It will frequently install security patches.</p>
<h2 id="heading-fixing-issues">Fixing Issues</h2>
<p>Even if you do everything right, there are some issues which will appear. Let's see some common issues and fixes.</p>
<ol>
<li><p><strong>Wi-Fi issue:</strong> This is the most common issue which everyone talks about on the internet. It's pretty easy to fix this. This happens because of missing Wi-Fi driver. To fix this, update the software from Software Updater and then open Additional Drivers. There you will see the Wi-Fi driver available for Ubuntu. Tick use option and click Apply changes.</p>
<p> <img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1735724644621/f061d71f-e49c-4de5-b51b-e7a86610a967.png" alt class="image--center mx-auto" /></p>
</li>
<li><p><strong>Bluetooth issue:</strong> I don't know how many people face this issue but I got this on my PC. I search for fixing this but haven't found the solution. I will update if I find anything.</p>
</li>
<li><p><strong>Display flickering issue:</strong> Even this issue is prominent on the internet and I still haven't found any fix for this. It may have happened due to incompatible Graphics Driver. I will update once I find anything.</p>
</li>
</ol>
<h2 id="heading-accessing-windows-files">Accessing Windows Files</h2>
<p>Switching OS doesn't mean you can't access another OS files. You can actually access your photos, videos, documents, audio files present on Windows. To do this, go to Files and click Other locations. You will see all your drives (C, D, E,…). Just click on the desired drive and you can read the files on it.</p>
<h2 id="heading-command-lines">Command Lines</h2>
<p>Terminal of Linux is far more powerful than Windows Command Prompt. You can do a lot of things with just typing commands. We will see some of the common commands.</p>
<p><code>cd [folder name or path]</code>: This lets you to change the directory.</p>
<p><code>ls</code>: This simply displays all folders and files in the directory.</p>
<p><code>mv</code>: Move a file</p>
<p><code>cp</code>: Copy a file</p>
<p><code>sudo</code>: It gives root access to any command. You must enter your password to use this command. It requires you to type before every command. Use <code>sudo -s</code> to avoid typing <code>sudo</code> for every command.</p>
<h2 id="heading-downloading-apps">Downloading apps</h2>
<p>Downloading apps is easier on Linux than any other OS. You can either head to Ubuntu Software Store and install your favorite apps or just type command in the terminal. We will see the second method.</p>
<p>Installing apps using apt</p>
<pre><code class="lang-bash">sudo apt install [package-name]
</code></pre>
<p>Installing apps using Snap Store</p>
<pre><code class="lang-bash">sudo apt update
sudo apt install snapd
sudo snap install core
sudo snap install [package-name]
</code></pre>
<p>Commands for popular apps</p>
<ol>
<li><p><strong>Spotify</strong></p>
<pre><code class="lang-bash"> sudo snap install spotify
</code></pre>
</li>
<li><p><strong>VLC media player</strong></p>
<pre><code class="lang-bash"> sudo apt install vlc
</code></pre>
</li>
<li><p><strong>Audacity</strong></p>
<pre><code class="lang-bash"> sudo snap install audacity
</code></pre>
</li>
<li><p><strong>Android Studio</strong></p>
<pre><code class="lang-bash"> sudo snap install android-studio --classic
</code></pre>
</li>
<li><p><strong>Sublime Text</strong></p>
<pre><code class="lang-bash"> sudo snap install sublime-text
</code></pre>
</li>
</ol>
<h2 id="heading-using-gnome-shell-extensions">Using GNOME Shell Extensions</h2>
<p>Extensions are pretty useful and enhances the overall experience. With GNOME, we can have a bunch of useful extensions from keeping all copied text to changing desktop wallpapers daily. There are some things to install before using extensions.</p>
<p>First check your GNOME shell version. It should be 3.36 or above</p>
<pre><code class="lang-bash">gnome-shell --version
</code></pre>
<p>Add Extension Integration on browser</p>
<p><a target="_blank" href="https://chrome.google.com/webstore/detail/gnome-shell-integration/gphhapmejobijbbhgpjhcjognlahblep">For Chrome</a> | <a target="_blank" href="https://addons.mozilla.org/en-US/firefox/addon/gnome-shell-integration/?utm_source=addons.mozilla.org&amp;utm_medium=referral&amp;utm_content=search">For Firefox</a></p>
<p>Install Native connector</p>
<pre><code class="lang-bash">sudo apt install chrome-gnome-shell
</code></pre>
<p>Install GNOME tweaks</p>
<pre><code class="lang-bash">sudo apt install gnome-tweaks
</code></pre>
<p>That's it. Now you can go to <a target="_blank" href="http://extensions.gnome.org">extensions.gnome.org</a> . There you can browse and enable extensions. To enable click on it and toggle the on or off switch. Then enter your password.</p>
<p>Here are my favorite GNOME extensions:</p>
<ul>
<li><p>Arc menu</p>
</li>
<li><p>Clipboard Indicator</p>
</li>
<li><p>GSConnect</p>
</li>
<li><p>NetSpeed</p>
</li>
<li><p>Transparent Top Panel</p>
</li>
<li><p>Caffeine</p>
</li>
<li><p>Google Earth Wallpaper</p>
</li>
</ul>
<p>Well that's it for this guide. I hope it helped you to successfully install Ubuntu and get started. There is a lot to learn here. You can search more about this on Google and YouTube. If you have any questions or doubts, you can email me. Thanks a lot.</p>
]]></content:encoded></item><item><title><![CDATA[What is Cryptocurrency?]]></title><description><![CDATA[Cryptocurrencies are popular across the internet. We have seen many news publishers, businessmen and influencers talking about cryptocurrency. But what exactly is cryptocurrency and how did it become so popular?
Here I am going to explain what is thi...]]></description><link>https://tech.ninadnaik.me/what-is-cryptocurrency</link><guid isPermaLink="true">https://tech.ninadnaik.me/what-is-cryptocurrency</guid><category><![CDATA[Cryptocurrency]]></category><category><![CDATA[Bitcoin]]></category><category><![CDATA[Ethereum]]></category><dc:creator><![CDATA[Ninad Naik]]></dc:creator><pubDate>Wed, 28 Apr 2021 18:30:00 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1735716264646/12f4a615-89b3-41b1-aed1-69a34a21f282.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Cryptocurrencies are popular across the internet. We have seen many news publishers, businessmen and influencers talking about cryptocurrency. But what exactly is cryptocurrency and how did it become so popular?</p>
<p>Here I am going to explain what is this new type of currency in simple words. I want to address that I do not know everything about cryptocurrency so it is difficult for me to discuss everything here. So, let's start from the basics.</p>
<h2 id="heading-what-is-cryptocurrency">What is Cryptocurrency?</h2>
<p>Cryptocurrency is a digital money. It is not physical money. It is all online. That's why you won't see a person giving crypto coins to the cashier. You can transfer cryptocurrency to someone else online without a middle factor like a bank. Bitcoin is the most popular cryptocurrency.</p>
<p>Cryptocurrencies work on the blockchain technology. Blockchain is a secure decentralized technology spread across many computers all over the world. These computers manage transaction records.</p>
<p>As cryptocurrencies are decentralized, there is no centralising organisation or any Government body which manages the market value of a particular cryptocurrency. This is one of the many reasons why the cryptocurrencies are super sensitive. This means that their value increases or decreases unprecedentedly.</p>
<h2 id="heading-how-does-cryptocurrency-work">How does cryptocurrency work?</h2>
<p>Cryptocurrency is mined (in other words earned) using powerful supercomputer. This supercomputer is given a complicated mathematical puzzle to solve. If the computer solves this puzzle, then it is rewarded with some cryptocurrency. This puzzle is nothing but the records of previous crypto-transactions which is placed to the next block in the blockchain.</p>
<p>Is this the only way one can earn cryptocurrency? No. Cryptocurrency can be bought using real money. Think it as the Casino Coins. It is exchanged with general currency. This makes it an ideal asset for investors because its market value changes all the time like a share value or gold value.</p>
<h2 id="heading-what-is-a-blockchain-and-how-does-it-work">What is a Blockchain and how does it work?</h2>
<p>Blockchain is a chain of blocks which contains information. This helps for the sequential arrangement of data which is very difficult to change it. Each block contains some data along with hash of the block and hash of previous block. The data stored depends on the type of the blockchain. A bitcoin blockchain contains details of the transactions such as the sender, receiver and amount.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1735716090528/7adf977d-0269-4e69-88c9-f472324e6e13.jpeg" alt class="image--center mx-auto" /></p>
<p>A block includes hash. The hash is alphanumerical data and it is unique like fingerprint. Any changes made in the block causes the hash to change. That's why hash is very important to verify the data in the block. The interesting part of the blockchain starts here. If someone tampers with the data in a block, the hash will change but the next block does not contain the new hash of previous block. This makes the following blocks invalid. To check the changes made in the block is authentic or not, all the system having access to it need to verify. This makes the blockchain technology so secure. Learn more about this in the YouTube video <a target="_blank" href="https://youtu.be/SSo_EIwHSd4">here</a>.</p>
<h2 id="heading-is-cryptocurrency-legal">Is cryptocurrency legal?</h2>
<p>Cryptocurrency is not illegal. Anyone can sell, buy and trade cryptocurrency. In the US, cryptocurrencies are defined as a property rather than the currency. In India, the mining and trading of cryptocurrency is not legal. The Government does not consider cryptocurrency as legal tender or coin. The right intention is to prevent the wrong usage of cryptocurrency and blockchain. The Government will make use of blockchain technology in few years.</p>
<h2 id="heading-advantages">Advantages</h2>
<p>As the cryptocurrency is virtual money, there are some key advantages over traditional currency.</p>
<ol>
<li><p>Transaction: In the traditional businesses, there is brokerage, commission, agents, paperwork which makes the process complicated. Cryptocurrencies are traded without the need of ‘middle man'. This is known as one-to-one affair.</p>
</li>
<li><p>More confidentiality: The transaction details are not publicly available unless you do so. This protects your financial history.</p>
</li>
<li><p>Less transaction fees: As there is no bank system, you do not require to pay transaction fees. You are maybe required to pay to crypto wallets.</p>
</li>
<li><p>Greater access: These services are accessible to anyone having internet. It is estimated that people have more access to internet and mobile phones than banking services like credit cards.</p>
</li>
<li><p>Strong security: We have seen that blockchain technology is highly encrypted. So, it is impossible to hack this system.</p>
</li>
</ol>
<h2 id="heading-disadvantages">Disadvantages</h2>
<p>This system has some major disadvantages which prevents it to become wide-spread.</p>
<ol>
<li><p>Illegal transaction: This problem is concerning many countries. As the transaction details are private, the investigating organisations cannot access these details. So many illegal items like drugs are bought on the dark web. Bitcoin is the biggest culprit here.</p>
</li>
<li><p>Financial losses: If a user loses its wallet key and password, there's no getting it back. The wallet will be locked along with the number of coins in it.</p>
</li>
<li><p>Adverse effects on environment: Mining cryptocurrency requires advanced computing power which cannot be done using ordinary computers. This demands a lot of energy.</p>
</li>
<li><p>Susceptible to hacks: Although cryptocurrencies are very secure, the wallet data is not that secure. Hackers can access this data and a lot of money can be stolen.</p>
</li>
<li><p>No refund: If someone mistakenly sends money to wrong address, there is no way to get it back. Many people can cheat others and create transaction whose products or services the user never receives.</p>
</li>
</ol>
<h2 id="heading-conclusion">Conclusion</h2>
<p>Cryptocurrencies have a long way to go. They are just at the initial stage. Many individuals and organisation are creating their own cryptocurrency. Even you can create your own cryptocurrency. This digital currency has become a good investment for investors. Cryptocurrencies might be banned in several countries but blockchain technology is more acceptable around the world. Indian Government is considering to release their own cryptocurrency using this technology.</p>
<p>As the result, if you have little knowledge about cryptocurrency, you can get started with it. Hope it helped you to understand. Please share this blog with your friends. Thank you!</p>
<p>PS: <em>This blog was published on my</em> <a target="_blank" href="https://blog.ninadnaik.xyz/blog/what-is-cryptocurrency"><em>personal blog page</em></a> <em>on April 29, 2021</em></p>
]]></content:encoded></item></channel></rss>