<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[SRMKZILLA - Medium]]></title>
        <description><![CDATA[The official Mozilla Campus Club promoting the power of Open Source in and around the campus of SRMIST, Chennai. - Medium]]></description>
        <link>https://medium.com/srmkzilla?source=rss----ea5e42fc31ec---4</link>
        <image>
            <url>https://cdn-images-1.medium.com/proxy/1*TGH72Nnw24QL3iV9IOm4VA.png</url>
            <title>SRMKZILLA - Medium</title>
            <link>https://medium.com/srmkzilla?source=rss----ea5e42fc31ec---4</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 17 Nov 2026 21:47:51 GMT</lastBuildDate>
        <atom:link href="https://medium.com/feed/srmkzilla" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Democratizing the Metaverse and Art: A Fusion of Creativity and Interaction]]></title>
            <link>https://medium.com/srmkzilla/democratizing-the-metaverse-and-art-a-fusion-of-creativity-and-interaction-c6c7c252fe2a?source=rss----ea5e42fc31ec---4</link>
            <guid isPermaLink="false">https://medium.com/p/c6c7c252fe2a</guid>
            <category><![CDATA[art]]></category>
            <category><![CDATA[metaverse]]></category>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[creativity]]></category>
            <category><![CDATA[cyber]]></category>
            <dc:creator><![CDATA[Anushmita Bose]]></dc:creator>
            <pubDate>Mon, 15 Jan 2024 18:15:12 GMT</pubDate>
            <atom:updated>2024-01-15T18:15:12.035Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UaYQd7sJ7PuIoO4ZS5OxJg.jpeg" /><figcaption>Photo by <strong>J</strong><a href="https://unsplash.com/@julientromeur"><strong>ulien Tromeu</strong></a><strong>r</strong> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral"><strong>Unsplash</strong></a></figcaption></figure><p>A sci-fi enthusiast likely experienced a revolutionary moment when the term <em>Metaverse</em> was first coined during their stimulating read of the 1992 novel, “Snow Crash”. Unbeknownst to them, this imaginative word is no longer a fictional concept, but rather a part of a progressive future.</p><p>The metaverse refers to a virtual space where we observe a blend of augmented physical reality and the digital realms. Essentially, it is an interconnected environment of digital and virtually-enhanced physical landscapes. Imagine immersing yourself in the most dynamic and diverse experience- from a futuristic, dystopian world much like <em>The Maze Runner</em>, to just a chance to walk through the neon-lit streets of Chicago in the 80s, it’s all here in the metaverse.</p><p>Gone are the days when the creation of art was constricted to paintbrushes and two- dimensional canvases; with the ever-evolving character of the metaverse, artists take on newer styles and methods to create art, one that dissolves boundaries between what is real and what is imaginary, essentially redefining the very nature of artistic form and expression. A connoisseur of art? The metaverse can very well offer the most flamboyant gallery of digital art sprawled ahead, making it an opportunity for visitors to delve into 3-dimensional galleries that transcend the limitations of a traditional one. A metaverse art gallery can recreate the feeling of walking through a real-life gallery, viewing unique art pieces just as if they were in the gallery itself. Visitors feel a sense of presence and immersion which in comparison to traditional art goes unmatched. There are no rules to metaverse art, one may push boundaries when it comes to creating art pieces, such as 3D paintings, and one may even display those splendid works in galleries that can shift their bases from magical underwater canyons to the grandeur of Olympus, and its all possible if you just have an internet connection!</p><p>The exceptionality of metaverse art is just how it can bulldoze the barriers down for artists around the globe, allowing artists from diverse backgrounds to collaborate and innovate in the metaverse. It’s not just limited to that, however. It offers a new way to experience art for people unable to secure access to exclusive art events. Regardless of where you live, working and creating with artists is just as easy as now, resulting in cultural amalgamation and fresher perspectives on the world of art. “Webaverse” and “Somnium Space”, both open-source platforms, are taking charge of redefining the world of art on a global and dynamic scale. The inclusivity of all sorts of art admirers brings a wider audience to witness the evolution of art and technology.</p><p>As revolutionary an idea may be, the most seemingly ideal creation will barely escape skepticism. While it cannot be denied that the concept of Metaverse has been met with a fair amount of jazz and excitement, there also have been whispers of criticism surrounding its name. So, what exactly is its future?</p><p>Satya Nadella, CEO of Microsoft envisioned the future of the metaverse:</p><p>“<em>Metaverse is essentially about creating games. It is about being able to put people, places, things in a physics engine and then having all the people, places, things in the physics engine relate to each other. You and I will be sitting on a conference room table soon with either our avatars or our holograms or even 2D surfaces with surround audio.”</em></p><p>In other words, humankind is on its way to being interactive hologram figures, the same technology Tony Stark used to create the world’s favorite Iron Man suits. The big guys of the tech arena are already playing in the field as Meta (previously Facebook), quite literally changed its name to highlight their commitment to expanding and exploring social interactions in the metaverse. Then what exactly brings us to the point of divergence, where opinions start differing?</p><p>The accessibility of art by all and spellbinding immersive experience is as perfect as it could get, but it all runs exposed to vulnerabilities. Technical glitches and server malfunctions may disrupt the experience for all, creating frustration and unrest among artists and viewers. Moreover, the exposure to a wide variety of people could also raise concerns regarding the security framework of cyberspace, with visitors and artists having an ever-lasting cloud of worry as there is immense susceptibility to a breach of privacy. Though Meta wishes to expedite the landscape of social networks, the involvement of big techs may risk the decentralized nature of the metaverse that allows fluidity and artistic freedom. Therefore, the potential of monopolization intimidates such artists.</p><p>There’s also the involvement of NFTs that have received quite the controversy. Is it here to stay? And what role could it possibly play in digital art and the metaverse?</p><p>These tokens are a way to prove ownership of a piece of art in the form of small contracts. They cannot be replicated, unlike traditional currency and this ultimately increases the value of the art. This may seem like the most optimal method, however, NFTs have sparked debate due to environmental concerns as they are highly energy intensive. Moreover, they take longer to sell and aren’t as easy to trade. Tokenizing their creations may be empowering as a digital artist in the metaverse, but the risk due to the unstable nature of this medium of transaction can be a major drawback for self-employed artists.</p><p>The future of art in the metaverse is one of the most transformative yet in the history of art and its expansion. As it continues to evolve, there will come much newer, thrilling, and complex ideas envisioning the advancements and heights that we as a society will achieve. It can be described as a limitless canvas of colorful possibilities, but it all condenses down to one simple thing- one’s love for art, where technology and creativity fuse and unite individuals with passion.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c6c7c252fe2a" width="1" height="1" alt=""><hr><p><a href="https://medium.com/srmkzilla/democratizing-the-metaverse-and-art-a-fusion-of-creativity-and-interaction-c6c7c252fe2a">Democratizing the Metaverse and Art: A Fusion of Creativity and Interaction</a> was originally published in <a href="https://medium.com/srmkzilla">SRMKZILLA</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How I automated a tedious task in an hour using JavaScript and JIMP!]]></title>
            <link>https://medium.com/srmkzilla/how-i-automated-a-tedious-task-in-an-hour-using-javascript-and-jimp-a8944a7a53f4?source=rss----ea5e42fc31ec---4</link>
            <guid isPermaLink="false">https://medium.com/p/a8944a7a53f4</guid>
            <category><![CDATA[certificate]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[nodejs]]></category>
            <category><![CDATA[jimp]]></category>
            <category><![CDATA[development]]></category>
            <dc:creator><![CDATA[Shashank Kumar]]></dc:creator>
            <pubDate>Sun, 25 Jun 2023 09:01:32 GMT</pubDate>
            <atom:updated>2023-06-25T09:01:32.377Z</atom:updated>
            <content:encoded><![CDATA[<p>My primary job at <a href="https://srmkzilla.net/">SRMKZILLA</a>, other than making memes, is to generate certificates once every few months. We have a very neat little discord bot <a href="https://github.com/srm-kzilla/jack">JACK</a> that does that, where you enter the certificate template in a database and run a very simple command, and et voila, people who have their names in the database (the participants) can enter their emails in a text channel and our cute little bot, JACK, will send them their certificate. This works flawlessly but over time we realized that not everyone is… how do I say this politely… tech savvy enough to use Discord.</p><p>People found it difficult to get their certificates and in some instances, we had to manually write their names over our certificate template and send them that, which rendered the entire process moot. So I did what I do best, I wrote a simple script that takes in the certificate template and based on the specifications generates as many certificates as you want.</p><p>Let’s start with a sample template:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*YOb7VeohOyY4n7cj" /></figure><p>Half of the work is done once you have a template like this in an image format (jpg or png). Thanks to the amazing editorial domain, I need not worry about this 😉.</p><p>Now, let’s get started with the coding part (you can find the entire code <a href="https://github.com/shawshankkumar/certificate-generator-jimp">here</a>).</p><p>First, initialize a new project and install the dependencies (use pnpm and instantly become 20% faster and 100% cooler):</p><pre>npm init -y <br>npm i jimp slugify</pre><p>We are using <a href="https://www.npmjs.com/package/jimp">Jimp</a> for image manipulation and <a href="https://www.npmjs.com/package/slugify">slugify</a> to make sure the file names do not have unusual casing or spaces and are uniform hence easier to search alphabetically. Additionally, we’ll be using the fs module(No need to install this, it is a core module) to save the images to the file system.</p><p>Now our next step is to create an index.js file and import the required modules:</p><pre>const jimp = require(&quot;jimp&quot;);<br><br>const fs = require(&quot;fs&quot;);<br><br>const slugify = require(&quot;slugify&quot;);</pre><p>Before moving ahead, let’s create another file called people.js where we’ll store the participant data.</p><pre>module.exports.participants = [ { name: &quot;Michael Scott&quot;, }, ];</pre><p>Here we have created an array of objects where each object contains the name of the participant. An array of objects is preferable over an array of names because we might need additional data like the date in certain cases. In addition to this, most of the participant data we get is in the csv format and csv files can be easily <a href="https://csvjson.com/">converted</a> to an array of objects.</p><p>Let’s come back to index.js and import this there:</p><pre>const jimp = require(&quot;jimp&quot;);<br><br>const fs = require(&quot;fs&quot;);<br><br>const slugify = require(&quot;slugify&quot;);<br><br>const { participants } = require(&quot;./people&quot;);</pre><p>Now, we’ll create a main function and call it, this function will contain the necessary logic to print certificates:</p><pre>const jimp = require(&quot;jimp&quot;);<br><br>const fs = require(&quot;fs&quot;);<br><br>const slugify = require(&quot;slugify&quot;);<br><br>const { participants } = require(&quot;./people&quot;);<br><br>const main = async () =&gt; {<br><br>};<br><br>main();</pre><p>Why did I make the main function asynchronous?</p><p>In Jimp, when you load a font, it returns a promise, hence we must wait for it to return, therefore the need for async and await. Alternatively, you could use .then but it makes the code unreadable after a certain extent.</p><p>Next up, we add a for loop to iterate over the participants (I am using the raw for syntax, one could use forEach or map but that requires the usage of Promise.all because of the promises):</p><pre>const jimp = require(&quot;jimp&quot;);<br><br>const fs = require(&quot;fs&quot;);<br><br>const slugify = require(&quot;slugify&quot;);<br><br>const { participants } = require(&quot;./people&quot;);<br><br>const main = async () =&gt; {<br>  for (let i = 0; i &lt; participants.length; i++) {<br><br>  }<br>};<br><br>main();</pre><p>Next up, we log some data to the console, set a timeout (this ensures there is a small break between printing of all certificates to make sure I don’t burn my system, and it looks cool as hell), read the image from the file system, and load the font:</p><pre>const jimp = require(&quot;jimp&quot;);<br><br>const fs = require(&quot;fs&quot;);<br><br>const slugify = require(&quot;slugify&quot;);<br><br>const { participants } = require(&quot;./people&quot;);<br><br>const main = async () =&gt; {<br>  for (let i = 0; i &lt; participants.length; i++) {<br>    const ele = participants[i];<br>    console.log(i, &quot; : &quot;, ele.name);<br><br>    setTimeout(function timer() {}, 2000);<br><br>    let imgObject = await jimp.read(&quot;thank-you-figma-community.png&quot;);<br><br>    const fontLoaded = await jimp.loadFont(&quot;./font3/font1.fnt&quot;);<br>  }<br>};<br><br>main();</pre><p>Our ./font folder contains the data necessary to load the font. It looks something like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*expe6qT66Y4a1raJ" /></figure><p>In my case, I have used the popping font. To use the font, go to <a href="https://fonts.google.com/">google fonts</a>, find the font you want, download it and unzip it.</p><p>If you wish to simplify the process, you can use the built-in fonts and just import JIMP and use the fonts like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*pCJ4xnk7Y1xAAlzT" /></figure><p>Once unzipped, you’ll notice that it is in the <em>ttf</em> format and we need to convert it to the <em>fnt</em> format. We can easily do it by using <a href="https://ttf2fnt.com/">ttf2fnt</a> . Now, the size and color selection is more of a trial and error case, so you might have to do that a few times to find out which one suits your certificate template the best.</p><p>Next up, we copy the downloaded font to a folder in our working directory (where index.js is) and save the folder as <strong>font</strong>. You’ll notice that the .fnt file has a unique name, make sure you copy it and use that in your code, else things might break.</p><p>Now, that are done with the fonts, let’s print the actual certificate and save it to our file system (in a folder called certificates):</p><pre>const jimp = require(&quot;jimp&quot;);<br><br>const fs = require(&quot;fs&quot;);<br><br>const slugify = require(&quot;slugify&quot;);<br><br>const { participants } = require(&quot;./people&quot;);<br><br>const main = async () =&gt; {<br>  for (let i = 0; i &lt; participants.length; i++) {<br>    const ele = participants[i];<br>    console.log(i, &quot; : &quot;, ele.name);<br><br>    setTimeout(function timer() {}, 2000);<br><br>    let imgObject = await jimp.read(&quot;thank-you-figma-community.png&quot;);<br><br>    const fontLoaded = await jimp.loadFont(&quot;./font3/font1.fnt&quot;);<br>    imgObject = await imgObject.print(<br>        fontLoaded,<br>        0,<br>        590,<br>        {<br>          text: ele.name,<br>          alignmentX: jimp.HORIZONTAL_ALIGN_CENTER,<br>          alignmentY: jimp.VERTICAL_ALIGN_CENTER,<br>        },<br>        1600,<br>        155<br>      );<br><br>      imgObject.write(<br>        &quot;./certificates/&quot; +<br>          slugify(ele.name, {<br>            replacement: &quot;_&quot;,<br>            lower: true,<br>            trim: true, <br>          }) +<br>          &quot;.png&quot;<br>      );<br>  }<br>};<br><br>main();</pre><p>Now there are 4 different numbers and you might have to play with them to find the sweet spot. The first 0 represents the starting x coordinate, 590 represents the y coordinate, 1600 and 155 represent the max horizontal and vertical width. You can find more detailed documentation <a href="https://www.npmjs.com/package/jimp">here</a>.</p><p>The <strong>write</strong> part is pretty self-explanatory where we save the file in the certificates folder with the name slugified and .png as the file extension.</p><p>If everything goes right, you’ll see your certificates folder populated with images like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/602/0*uLnTcs4fth-9YRk7" /></figure><p>And boom, we have successfully automated the tedius task. Alternatively, you could use something like <a href="https://www.figma.com/community/plugin/952689592792995578/Scribe---Dynamic-data-in-seconds">Scribe</a> to do this in figma itself, but it has certain restrictions and is a paid tool.</p><p>You can find the entire codebase on <a href="https://github.com/shawshankkumar/certificate-generator-jimp">GitHub</a>, this was a result of some quick scripting so any changes are more than welcome. Some of the next steps that come to my mind would be to include a function to upload these to google drive or some other storage solution. Sending the certificates via mail can be a great addition to this as well.</p><p>Made with 💝 and JavaScript.</p><p><em>Originally published at </em><a href="https://blogs.shawshankkumar.me/how-i-automated-a-tedious-task-in-an-hour"><em>https://blogs.shawshankkumar.me</em></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a8944a7a53f4" width="1" height="1" alt=""><hr><p><a href="https://medium.com/srmkzilla/how-i-automated-a-tedious-task-in-an-hour-using-javascript-and-jimp-a8944a7a53f4">How I automated a tedious task in an hour using JavaScript and JIMP!</a> was originally published in <a href="https://medium.com/srmkzilla">SRMKZILLA</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[A deep dive into the development of Octavia.]]></title>
            <link>https://medium.com/srmkzilla/a-deep-dive-into-the-development-of-octavia-c572d60a9c3d?source=rss----ea5e42fc31ec---4</link>
            <guid isPermaLink="false">https://medium.com/p/c572d60a9c3d</guid>
            <category><![CDATA[music]]></category>
            <category><![CDATA[discord]]></category>
            <category><![CDATA[nodejs]]></category>
            <dc:creator><![CDATA[Shashank Kumar]]></dc:creator>
            <pubDate>Tue, 01 Nov 2022 13:39:37 GMT</pubDate>
            <atom:updated>2022-11-01T13:39:37.909Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*bAxJFc42TOH8ELwC" /></figure><p>#kzoctavia play memories by Maroon 5 because we are about to go down memory lane for this blog!</p><p>Before we begin, who is Octavia? Well, she is a music bot that lives in your Discord Server (or Discord Guild as the nerdy kids call it). It is written in TypeScript and is wholly open-sourced under the MIT license. Anyone can clone the codebase and run it on their own servers with minimal effort. She was developed and is maintained by SRMKZILLA, a community that loves open-source tech as much as a developer loves dark mode. Or coffee.</p><p>Now, you must be wondering why we developed our own music bot when Spotify and YouTube as well as other music bots like Groovy exist. For that, we must go back to the days when the only classroom we used was a Google product, when COVID was at its peak and everyone was forced to work remotely.</p><p>SRMKZILLA has its own vibrant discord server where people from different colleges, different domains and interests come together to form a community to share their knowledge and learn more. Since its inception, our Discord Server has come a long way, it has become more inclusive and vibrant with time. Before Octavia and before COVID vaccines, when COVID-19 was very new to us and we were still getting used to the ways of coronavirus, our Discord Server was launched aimed at replicating our physical activities in our University. Offline meets and coding sessions were suddenly halted and we moved everything to our Discord Server. But running a Discord community is a chore. Managing roles, banning and deleting unwanted messages, and generating certificates for our workshops were a lot of work to be done manually. And to fix all of this we came up with Jack! Jack managed roles and had a certificate generator for all workshops; we used Jack for many more things. It was used to check in and dynamically create text and voice channels for all of the teams in our annual Hackathon, the same hackathon where the idea to develop Octavia was born.</p><p>Every year, SRMKZILLA hosts MOZOHACK, our annual hackathon where teams from across the country build some really remarkable products. Since everything was online in 2021, we used Discord as our primary mode of communication with the teams. During the 24-hour hackathon, there are large stretches of time where teams are in their team voice channels, working on their ideas and writing code. This 24-hour stretch was the reason the idea to develop Octavia came to fruition.</p><p>While we accept that Groovy is (rather was) a very well-made product and it served as an inspiration for Octavia, it simply did not fulfill our needs. Some of those were:</p><ul><li>Groovy’s non-premium version only allowed one instance of Groovy per server. This meant only one voice channel could use Groovy at a given point in time. Which was simply too few for us.</li><li>Groovy was not open-sourced. In discord, all messages in a guild are sent to the bots and they are actively listening for the wake word.</li></ul><p>To overcome these issues we started working on our own music bot and 23 Pull requests, 140 commits, 5 contributors, a few sleepless nights and a dozen missed classes later we had Octavia ready to rock the world. We (and our Linux servers) were overwhelmed by the response to Octavia.</p><h3>So How did Octavia help resolve the issues we had with Groovy?</h3><p>Well, first of all, Octavia was completely open-sourced. With minimal configuration, anyone could create as many instances of Octavia as they wish to use. And there was complete transparency with how the data in discord servers are used by Octavia so that you can sleep peacefully while Taylor Swift songs play in the background.</p><h3>Tech Stack:</h3><p>The easiest decision we made while developing Octavia was to use DiscordJS, a JavaScript library for using Discord APIs. The developers at SRMKZILLA absolutely adore the documentation and the community support for the library.</p><p>We chose DiscordJS because we already had a lot of experience working with DiscordJS while developing Jack (our first Discord bot which moderates our server) and the fact that most of the developers working on the product were very familiar with JavaScript/TypeScript helped reduce the development time.</p><p>Discord APIs have tons of official and unofficial wrapper libraries in almost all popular languages be it high-level, dynamically typed, and interpreted languages like Python or compiled and low-level languages like Rust.</p><p>In the end, picking a language is a personal choice and we went ahead with TypeScript and DiscordJS.</p><p>While Octavia’s core functionality is playing music, we did not want to limit it to just that. We wanted a bot that could fulfil all your music needs. Be it queueing tracks, fetching lyrics or just copying and pasting your Spotify album links and letting Octavia handle it. To allow all of this to function, we used a suite of APIs listed below:</p><ul><li>ytdl-core: If DiscordJS is the brain of Octavia, ytdl-core is the heart. It allows us to stream music from our servers to your discord voice channels. DiscordJS has amazing support for handling audio streams, including pausing the audio streams, which turned out to be very helpful in the later stages of development.</li><li>Spotify API: The first feature we had in mind was to allow users to use their Spotify albums/playlists and export them effortlessly. All a user has to do is write ‘play’ followed by the Spotify link and the bot automatically fetches the list of songs and adds them to the queue! While Spotify does not give API keys, it does provide tokens that last for an hour and we built a simple yet full-proof caching system to use the Spotify tokens to the fullest. We’ll go more into depth about this in our next article.</li><li>Genius API: Allowing our users to get the lyrics of a particular song was a no-brainer. And what better tool to use for lyrics than Genius?</li></ul><h3>What would we change about Octavia if we were developing it today?</h3><p>While Octavia is a very successful product according to our metrics, it doesn’t mean its perfect. There are a lot of things that went wrong because we didn’t consider them at the time of development. Some of them were minor and have already been fixed, for example when Octavia was released, it was unable to recognize commands with more than 1 whitespace. This was fixed by one of our community members and Octavia is a better product for it. Some of the issues are major architectural changes that require either a lot of effort or need Octavia to be developed from the start. A few of them are:</p><ul><li>Sharding. We never expected the user base to grow so much but looking at the current demand, we would definitely perform sharding. To discord’s credit, it is quite easy to perform instance level sharding by using the sharding manager but at some point, horizontal scaling becomes inefficient and vertical scaling needs to be done.</li><li>Caching and Database Management: While the use of caching is very limited at the moment, we accept that the bot’s caching is not very effective on a bigger scale. At the time of development, we used node cache, which does only instance-level caching. We plan to add new features such as saving music history and sharing queues. For that, something like a separate Redis instance coupled with a persistent database would be more scalable.</li></ul><p>Well, that was more or less how we developed Octavia, right here at SRMKZILLA. We believe the first step towards becoming a better open-source contributor is accepting that no product ever made is flawless. These imperfections open the way for us to learn and fix them. A small bug or imperfection inspires others to learn and be a part of something bigger than them. That is how a lot of us become better developers. Much like Octavia, we have Jack, another Discord bot who happens to be the hardest-working member of the entire Organization. And our curiosity and willingness to develop something better and newer than Jack led us on the path of developing Octavia. SRMKZILLA develops open-sourced and free products like URL shorteners, mass mailers and so much more. If you happen to share our love for open-source tech, please consider becoming a contributor to our organization and our products. We firmly believe what you bring to the table is invaluable and extremely unique. So head over to our discord server or our GitHub organization and maybe that one action can ripple into us collaborating and making something bigger and better. And remember, we have only one rule at SRMKILLA, whatever product we make, it has to be “Made with 💖”.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c572d60a9c3d" width="1" height="1" alt=""><hr><p><a href="https://medium.com/srmkzilla/a-deep-dive-into-the-development-of-octavia-c572d60a9c3d">A deep dive into the development of Octavia.</a> was originally published in <a href="https://medium.com/srmkzilla">SRMKZILLA</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Getting Started With Cyber Security]]></title>
            <link>https://medium.com/srmkzilla/getting-started-with-cyber-security-c03240033b61?source=rss----ea5e42fc31ec---4</link>
            <guid isPermaLink="false">https://medium.com/p/c03240033b61</guid>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[careers]]></category>
            <category><![CDATA[basics]]></category>
            <category><![CDATA[hacking]]></category>
            <category><![CDATA[cyberattack]]></category>
            <dc:creator><![CDATA[reeti jha]]></dc:creator>
            <pubDate>Wed, 21 Jul 2021 04:56:20 GMT</pubDate>
            <atom:updated>2021-07-21T04:56:20.815Z</atom:updated>
            <content:encoded><![CDATA[<p>People are always so intrigued about Cybersecurity. But do hackers fight tooth and nail, as shown in movies? Are there other options in Cybersecurity apart from hacking? To begin with, is hacking easy? How and where do I start? If you have had these questions bugging you for a long time, then it’s time to clear them up finally!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Lsm32wdvifjYwbfhqpdq7Q.png" /></figure><p>Let’s get started by understanding the critical points of the concept. Cybersecurity is <strong>a way of protecting all internet-connected devices from unauthorized access or cyber-attacks</strong>. There are many ways through which these cyber-attacks can take place. Let’s dive deeper into a few of them:</p><h3>Few Types of Cyber-Attacks:</h3><ol><li><strong>Phishing: </strong>Often posed as a <em>request for data from a trusted third party.</em> It is sent as an email and asks people to click on a link to enter their personal data.</li><li><strong>DDoS:</strong> It stands for Distributed Denial of Service. The attacker <em>sends a lot of data into the network to create network traffic</em>. It overloads the network and creates loopholes to attack.</li><li><strong>Man in the middle: </strong>The attacker can pull off this attack by <em>being in between the website or app and the client</em>. It helps them gain important information like passwords, bank details, etc. The client is under the belief that these details are provided for the legitimate website.</li><li><strong>Drive-by downloads:</strong> It is the <em>unintentional download of a malicious code or software</em> without the user being aware of the consequences of the file.</li><li><strong>Buffer overflow: </strong>The attacker targets the <em>stack data structure where the data is stored and could inject components into the stack</em>. It causes the buffer(the part of physical memory where the stack is stored) to overflow and not accept other data into it.</li></ol><p>These are just a few ways a cyber-attack can take place. There are multiple other mediums and mechanisms like password attacks, malvertising, malware, rogue software, etc., to pose a security threat to a device. During such episodes, Cybersecurity relies on its three pillars to come up with a solution.</p><h3>CIA Triad:</h3><p>The CIA triad refers to the three pillars of Cybersecurity. They define the goals that every Cybersecurity system should attain to be reliable and stable.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SYIDZIHRAZGIaHnmsQRHvQ.png" /></figure><blockquote>1. <strong>Confidentiality: </strong>It assures the privacy of user information. An ideal Cybersecurity system makes sure that all the information related to the user is safe.</blockquote><blockquote>2. <strong>Integrity: </strong>It makes sure that all the information transferred by the user doesn’t get modified and reaches the destination in its actual form.</blockquote><blockquote>3. <strong>Accessibility/Availability: </strong>It ensures that the network systems and various applications are up and running so that the user doesn’t have to face the unavailability of services.</blockquote><p>By now, I am sure you must be aware of what Cybersecurity entails. In the next section, we will be talking about hacking and hacker. Let’s look into it.</p><h3>What do hackers do?</h3><p>Not the ‘die-hard’ or ‘inception’ way of hacking, but let’s take a look into real hacking!</p><p>Hackers are <strong>cybersecurity experts who try to break the defenses of a system to penetrate through the system</strong>. What they do with the information next helps us categorize them into three categories: a white hat, grey hat, and black hat hacker.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/793/1*HUQTSJt77tDbS73kC7lqrQ.png" /></figure><h4>Types of hackers:</h4><blockquote><strong>White hat Hackers: </strong>They penetrate the system of an organization to report bugs and vulnerabilities in the organization’s security system.</blockquote><blockquote><strong>Black Hat Hackers:</strong> They penetrate the system of an organization for malicious use of the information obtained.</blockquote><blockquote><strong>Grey Hat Hackers: </strong>They strive to maintain a balance between the white and black hat hackers. They tend to violate laws sometimes but not as much as the black hat hackers.</blockquote><h3>Skills Necessary for Hacking</h3><p>Hacking requires an in-depth knowledge of the following topics to penetrate a system and help get your job done safely and ethically.</p><h4>Computing Aptitude:</h4><ol><li>Basic understanding of operating systems.</li><li>Understanding of basic software systems.</li><li>Grasp of CLI Commands.</li></ol><h4>Networking Aptitude:</h4><ol><li>Basic understanding of cables, systems, switches.</li><li>Basic understanding of Networking Architecture and different network protocols like TCP/IP.</li></ol><h4>Life Skills:</h4><ol><li>Ability to think out of the box.</li><li>Perseverance.</li></ol><h3>Preferred Operating System For Hacking:</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/889/0*a0TDfJvsLIvV8emi.jpg" /></figure><p>Kali Linux is <strong>a Debian-based Linux distribution used for advanced penetration testing and security auditing</strong>. It contains more than 600 inbuilt tools used for penetration testing, security research, or reverse engineering.</p><h4>Reasons for using Kali Linux:</h4><ol><li>Kali Linux is free.</li><li>Has more than 600 built-in penetration testing tools</li><li>Multi-language support with a customizable kernel</li><li>Committed to the open-source model.</li><li>Wide-ranging wireless device support.</li><li>Casting kernels have the latest injections.</li></ol><p>There are many more reasons, but the above enlisted are the primary reasons to choose kali Linux over other operating systems.</p><h3>Career Opportunities In Cybersecurity:</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GF34JSV3rgmJ6Qp268-FuA.png" /></figure><p>Considering the advancement of technology and the wide use of Cybersecurity in almost everything around us, the need for security rises. The devices we use need to be secured for other devices to trust them. This brings us to the topic of career opportunities in Cybersecurity.</p><h4>Job titles</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HZb8mezCihAa1IqAJmZ3nA.png" /></figure><ol><li><strong>CISO(Chief Information Security Officer):</strong> Oversees the general operations of an organization’s IT security division.</li><li><strong>Forensic Computer Analyst: </strong>Reviews computer-based information for evidence of a security breach.</li><li><strong>Information Security Analyst:</strong> Responsible for the protection of an organization’s computer systems and networks.</li><li><strong>Penetration Tester:</strong> They hack into a system to discover bugs or vulnerabilities of security systems.</li><li><strong>Security Analysts: </strong>They plan and execute flawless security measures.</li><li><strong>Security Engineer: </strong>Build IP Security systems for various organizations.</li><li><strong>Security Specialist:</strong> An entry-level range with huge potential.</li><li><strong>Incident Responders:</strong> They prevent and protect against threats.</li><li><strong>Vulnerability Assessors: </strong>Their job is to spot vulnerabilities in a system and formulate appropriate patches.</li><li><strong>Security Architect: </strong>They design tough security systems for an organization so that the system is less prone to cyber-attacks.</li><li><strong>Security Administrators: </strong>Keeps the security system running smoothly every day.</li><li><strong>Cryptographer:</strong> Write the code that hackers can’t hack.</li><li><strong>Security Directors:</strong> They make the rules and solve complex problems.</li><li><strong>Security Consultants:</strong> Advice on the security solutions to be used.</li><li><strong>Security Managers:</strong> Keeps the system secure with the help of expert team advisors.</li><li><strong>Security Auditors: </strong>Their works is to find weak spots in a security system before others do and cause harm to the organization.</li></ol><p>As we have discussed the basics of Cybersecurity and the various paths you can pursue in this field, it’s time to get some hands-on experience on the same. Starting from a penetration tester to an analyst, everyone needs to have experience in handling bugs or finding vulnerabilities. So what are you waiting for? Let’s start our respective journies in Cybersecurity right now!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c03240033b61" width="1" height="1" alt=""><hr><p><a href="https://medium.com/srmkzilla/getting-started-with-cyber-security-c03240033b61">Getting Started With Cyber Security</a> was originally published in <a href="https://medium.com/srmkzilla">SRMKZILLA</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Kotlin]]></title>
            <link>https://medium.com/srmkzilla/kotlin-c305e3de6b84?source=rss----ea5e42fc31ec---4</link>
            <guid isPermaLink="false">https://medium.com/p/c305e3de6b84</guid>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[kotlin]]></category>
            <category><![CDATA[technical]]></category>
            <dc:creator><![CDATA[Sahil K]]></dc:creator>
            <pubDate>Thu, 25 Mar 2021 00:32:56 GMT</pubDate>
            <atom:updated>2021-03-25T00:32:55.121Z</atom:updated>
            <content:encoded><![CDATA[<h4>The next evolution in programming</h4><h3>The web development boom</h3><p>The increase in technology access and the rise in e-learning platforms has led to the emergence of many web development communities and accelerated this sector’s development. Whether you are a novice, an amateur, or a professional in web development, you would have heard of Java, Node JS, or JavaScript repeatedly either in tutorials of web and app development, coding forums, etc. So, what is <em>Java</em>? And why is it so popular?</p><h3>What is Java?</h3><p>Java is the brainchild of James Gosling of Sun Microsystems which was born in 1995. It has flourished into one of the popular programming languages in web development and application development circles.</p><p>When you look back at the origins of Java, few interesting facts come to light.</p><blockquote>Java was initially devised for interactive digital television and was named “Oak” after an Oak tree outside Gosling’s office, after which its name became “Green” and finally “Java” after a cup of Javanese coffee.</blockquote><p>The defining features of Java are:</p><ol><li><strong>It is object-oriented: </strong>Java is an Object-Oriented-Programming (OOP) language, where all its components are called“objects.” These objects can be given attributes or created via code.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*fOdb_ET1sOd4uZStK4E8HA.jpeg" /></figure><p>2. <strong>Platform independent</strong>: Java can run on all operating systems (OS).</p><p>3. <strong>Compatible architecture</strong>: The file format that Java generates is a neutral architecture format executable on many different processors.</p><p>4. <strong>Easy to learn</strong>: As mentioned before, Java is based on the OOP which is an easy-to-understand model. The simplicity in understanding offered by Java motivates developers to kick-start their development journey with this language. It is among those few programming languages that can be learned within a few days or even hours!</p><h3>The need for evolution</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/259/1*Bpkc1MxX7qtRIINYgaIrew.png" /></figure><p>Evolution is a sign of growth, and this growth is noticeable through the change or development and competition of various components and systems. Although Java is a fantastic programming language with constant updates and an amazing community, it has remained virtually unchallengeable for decades, almost stagnating the field’s growth. But, a programming language emerged worthy of competing with Java, named <em>Kotlin</em>.</p><p>So, what is Kotlin? And why is Kotlin leading the change?</p><h3>Say hello to Kotlin</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KEcGysVAlWoJA8U_FoUzrg.png" /></figure><p>Kotlin is a multi-platform, statically-typed general-purpose programming language. It was developed by JetBrains and was made fully open-source in the year 2012. Kotlin helps developers build Android applications faster, increasing their productivity, and compares to the Swift programming language used in IOS app development.</p><h3>Kotlin vs Java</h3><p>Kotlin has many advantages over Java, to list a few:</p><ol><li><strong>Shortened code for identical tasks: </strong>Kotlin is a statically typed programming language, which is easy to understand. It uses lesser code than the amount of code Java uses for the same problem.</li><li><strong>Simpler code: </strong>Kotlin uses a simpler code and doesn’t have the repetition of commands that one may face while coding in Java.</li><li><strong>Interoperability: </strong>Kotlin can easily exchange and use information from Java.</li><li><strong>Increased security: </strong>Kotlin has increased security due to its concise nature, which comes from the fact that it is easy to understand, leading to fewer bugs boosting its security.</li></ol><h3>Conclusion:</h3><p>Java is an excellent programming language that has changed the web and application development community. But it is time for new applications to arise and improve by competing with benchmarks such as Java promoting a healthy-competition and a continually evolving web, which Kotlin has achieved learning and improving from Java’s downfalls.</p><blockquote>Let us keep learning, growing, and developing applications toward a brighter and cyber safe future.</blockquote><p>To learn and start your Kotlin journey, refer to this link 👇<a href="https://kotlinlang.org/">https://kotlinlang.org/</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c305e3de6b84" width="1" height="1" alt=""><hr><p><a href="https://medium.com/srmkzilla/kotlin-c305e3de6b84">Kotlin</a> was originally published in <a href="https://medium.com/srmkzilla">SRMKZILLA</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[ABC of Cryptocurrency]]></title>
            <link>https://medium.com/srmkzilla/abc-of-cryptocurrency-2b3e0ecef16d?source=rss----ea5e42fc31ec---4</link>
            <guid isPermaLink="false">https://medium.com/p/2b3e0ecef16d</guid>
            <category><![CDATA[technical]]></category>
            <category><![CDATA[blockchain]]></category>
            <category><![CDATA[cryptocurrency]]></category>
            <category><![CDATA[bitcoin]]></category>
            <dc:creator><![CDATA[Akshita Singh]]></dc:creator>
            <pubDate>Thu, 11 Feb 2021 02:32:49 GMT</pubDate>
            <atom:updated>2021-02-11T02:32:47.798Z</atom:updated>
            <content:encoded><![CDATA[<p>Simplifying the hype about cryptocurrencies</p><p>The evolution of currencies has been radical. In the early ages, the barter system was adapted for making transactions but was discontinued due to its various shortcomings. Currency evolved from barter to bartering with set mediums of exchange, coins representing exchangeable goods to coins stamped in precious metal, paper representing coins to money transferred digitally, and now, <em>cryptocurrency</em>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rcJD5ViFTuCRgcJqxaVR0Q.png" /></figure><p>Almost all of us have heard the term cryptocurrency, but very few know how it works. Well, if you’re like me and all others who have no clue of how crypto works, don’t worry. I’m sure, by the end of this article, you’ll be confident enough in your understanding of cryptocurrency.</p><h4><strong>What is Cryptocurrency?</strong></h4><p>Let’s take an example of a puzzle, a complex multi-level puzzle in which you earn points for solving each level. Now think of those points as a currency that you can use to buy goods and services in the cyber world. This is basically what cryptocurrency means; it is a form of digital currency that is secured by cryptography i.e. you have to solve a complex mathematical problem secured by cryptographic algorithms using high processing computers to gain cryptocurrency or be wealthy enough to buy it from those who can solve these problems.</p><p><strong><em>“In other words, cryptocurrency is a medium of exchange, like physical currency but it is digitized and encrypted using encryption algorithms to facilitate the creation of monetary units and verify fund transfers.”</em></strong></p><p>Modern cryptocurrency is the brainchild of Satoshi Nakamoto, an anonymous individual who created the first-ever cryptocurrency, named <a href="https://bitcoin.org/bitcoin.pdf"><strong><em>Bitcoin</em></strong></a>. He developed it in 2008 to eliminate the need for middlemen like banks and other financial institutions. It gained popularity because people’s trust in the banking system started wavering and their dissatisfaction with the financial institutions grew bigger. Cryptocurrency eliminates these problems by placing the trust of people in mathematics. It created a decentralized system where all the people in the network can see all the transactions while remaining anonymous.</p><h4><strong>Examples</strong></h4><p>Today, there are close to <strong>5392 cryptocurrencies</strong> being traded worldwide. And guess what their value is — it is approximately $201 billion. I am pretty sure Satoshi did not see that coming, and if he did, what a genius he is! The three main types of cryptocurrencies are Bitcoin, Altcoin which is a derivative of Bitcoin, and tokens which are built specifically for decentralized applications. There are hundreds of Altcoins out there, some of which are Litecoin, Ethereum, and Dogecoin, we’ve all heard of that one, haven’t we!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*aXAvd0JMRXs-ze9w23MHLA.jpeg" /><figcaption>Elon Musk endorsing Dogecoin in his tweet led to a surge in its value by 44%</figcaption></figure><p>Yet the most widely talked about cryptocurrency is a no-brainer, Bitcoin. Why did it become so popular, you ask? Well, that’s because it is decentralized, implying that no bank has control over it, and its anonymity enables you to make payments without revealing your identity.</p><h4><strong>Understanding how Bitcoin works</strong></h4><p>Two of the many fundamentals of cryptocurrency transactions are <em>miners</em> and <em>blockchain</em> technology. The term <strong>‘</strong>miners<strong><em>’</em></strong> refers to individuals who keep track of transactions and make them secure by verifying the identities of the parties doing the transaction. They do so by updating the digital <a href="https://www.ledger.com/academy/blockchain/what-is-blockchain#:~:text=A%20blockchain%20is%20a%20distributed,anyone%20with%20an%20Internet%20connection.">ledger of a blockchain</a>. The miner is rewarded for his work in cryptocurrency.</p><h4>Check out this video for a better explanation👇</h4><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2F6Gu2QMTAkEU%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3D6Gu2QMTAkEU&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2F6Gu2QMTAkEU%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/1782283746133cbb3a60a18a83dc5274/href">https://medium.com/media/1782283746133cbb3a60a18a83dc5274/href</a></iframe><p>Cryptocurrencies use<strong><em> blockchain technology</em></strong> to ensure security. A block records information regarding the transaction, for example, the account number of the sender and the receiver, and <em>hash codes</em>, which are unique to the block of information. Each time someone tries to change the information; a new code is generated, and the block is no longer the previous one. A blockchain is a sequence of blocks, which contains all the information about the transactions and each block refers to the previous block, hence forming a chain. A new block is added whenever a new transaction takes place. Every sender, on a cryptocurrency network, has two keys,<strong><em> </em></strong><em>public</em> and <em>private</em>. A private key, which is only known to the individual, is used by the owner/sender to prove his ownership for security purpose, While a public key, which is available to everyone on the network, acts as the account number of the sender/receiver which is used by others to do transactions. People on the blockchain network verify the validity of the transaction by checking the public key, while miners update the blocks by solving the mathematical process.</p><h4><strong>Limitations of Cryptocurrencies</strong></h4><p>If cryptocurrencies sound so alluring, why have they still not become mainstream? That is because they have their own limitations and risks that need to be addressed before they can be accepted as the currency of the world. First, a lot of <em>computational power </em>goes into the mining of cryptocurrency. Not everyone can afford that kind of power. The energy requirements related to mining are tremendous and produce a lot of <em>carbon footprint</em>. Since its affordability is limited to a handful of people, they might turn to unlawful means to carry out mining. Second, these currencies are <em>highly</em> <em>volatile</em> and these fluctuations present market risks to those who have invested in them. Moreover, with the changing laws, no one can be sure what the future holds for investments in cryptocurrencies. Third, these are especially attractive to fraudsters and thieves trying to steal from users of cryptocurrency. There is always the risk of <em>hacking and hijacking</em> <em>digital wallets</em> which would result in huge losses for investors. All things considered, cryptocurrency is a risky endeavor for anyone who is not well-informed about it.</p><h4><strong>Status of cryptocurrency in India</strong></h4><p>Bitcoin, the most commonly used cryptocurrency, is growing popular in the Indian market, but the government is wary of it. There is a lack of clarity over the status of cryptocurrencies in India. In 2018, the Reserve Bank of India asked <a href="https://www.thehindu.com/business/Economy/rbi-asks-banks-to-stop-services-to-those-dealing-in-virtual-currencies/article23445222.ece">all banks in India to withdraw support from those dealing in cryptocurrencies</a>. After a two-year-long battle, the Supreme Court allowed people in India to trade in cryptocurrency. Many welcomed this decision as the number of searches related to crypto grew tremendously. It proved that people in the country wanted to trade and invest in cryptocurrency. Today several companies exist in the country that trade in cryptocurrencies like WazirX, BuyUcoin, etc.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/635/1*AUbo6o43VitsTNT17oFXjA.jpeg" /><figcaption>The journey of Cryptocurrency in India</figcaption></figure><p>Due to the unregulated nature of cryptocurrency, the RBI is cautious of its widespread use, due to the risks it presents to the investors. It has led them to devise a regulatory framework that would protect the investors and curb all illegal activities. Recently, RBI announced that they would issue a ban on all private cryptocurrencies in India and launch its digital currency. During the budget presentation for the session 2021–22, the Finance Minister quoted an inter-ministerial committee suggestion to <a href="https://www.businesstoday.in/current/economy-politics/inter-ministerial-group-recommends-ban-on-private-cryptocurrency-in-india-except-issued-by-state-fm/story/430763.html">ban private cryptocurrencies</a> in India, except for any virtual currencies issued by the state. For the time being, people are free to use and trade in cryptocurrencies.</p><blockquote>“The future of Money is Digital Currency.” ~ Bill Gates</blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2b3e0ecef16d" width="1" height="1" alt=""><hr><p><a href="https://medium.com/srmkzilla/abc-of-cryptocurrency-2b3e0ecef16d">ABC of Cryptocurrency</a> was originally published in <a href="https://medium.com/srmkzilla">SRMKZILLA</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Crux of Redux]]></title>
            <link>https://medium.com/srmkzilla/the-crux-of-redux-b02b4c1dbfe8?source=rss----ea5e42fc31ec---4</link>
            <guid isPermaLink="false">https://medium.com/p/b02b4c1dbfe8</guid>
            <category><![CDATA[technical]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[redux]]></category>
            <dc:creator><![CDATA[Krishna Priya]]></dc:creator>
            <pubDate>Sun, 07 Feb 2021 04:28:14 GMT</pubDate>
            <atom:updated>2021-02-07T04:43:43.427Z</atom:updated>
            <content:encoded><![CDATA[<p>A tool for managing data and UI states in JS apps</p><p>Redux has been the developer community’s talk since its dawn, making it a popular tool for managing applications. Being a fancy React framework, Redux makes some complicated stuff a lot easier for programmers. It follows a pretty exciting and intuitive pattern to implement in enormously growing applications. Redux is a constant buzzword around React, and I hope after reading this article you might become one step closer to understand what Redux is, how it works, and why is it preferred.</p><p>Redux is an open-source <a href="https://en.wikipedia.org/wiki/JavaScript">JavaScript</a> library, specifically for the state management of an application. It was created by Dan Abramov in 2015, inspired by the famous application architecture of Facebook called Flux. With<strong> </strong>its<strong> excellent documentation, small size (only 2 KB), and flexibility to work with many libraries, Redux soon became a favorite choice for handling application states and data flow.</strong> Head to <a href="https://redux.js.org/">https://redux.js.org/</a>, and you would be welcomed with a neat and portable text:</p><blockquote>“A predictable state container for JavaScript applications.”</blockquote><p>Before jumping to further definitions from the technical glossary, let me illustrate how Redux comes to the rescue of the developer community.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/356/1*jg6O7DX2bGjm0SqbwwicoQ.png" /><figcaption>Source: www.educative.io</figcaption></figure><p>Potterheads (and muggles) imagine we are now at an imaginary carnival hosted by Professor Dumbledore in the Hogwarts School of Magic. The carnival will showcase several games, joy rides, food stalls, and obviously, an exhibit of magic potions and wands. Dumbledore instructed the students to arrange all the booths, games, prizes, and everything magical. Not to forget the less co-operation between the houses, things didn’t go as planned. There were repeated installations of the same stuff at unsuitable spots. The Professor was disappointed to see the unorganized display of the carnival. A change was inevitable, and the Wizard’s Council chose to seek an expert- <em>The Redux Management Store</em>. They analyzed the problem and decided to channelize all the workflow only through the store and implement a good communication and coordination path. The following week, a poster spread across the Hogwarts School.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/404/1*uEZHLt7yfseAP241bNE8uw.png" /></figure><p>Long story short, the carnival was a huge success! Similar to the carnival, an application has many components to use and update. In this case, each house was confused with the existing changes made, which gets even more complicated with an increase in components. In small applications, this might not arise as a significant problem. But for large applications with larger application states, managing and making decisions on the growing data is difficult. There might be components that use the same data, store them randomly in the DOM (Document Object Model) tree, and later render the stored data. Redux is handy when multiple components share the data, which changes the current application state. <strong>Without worrying about the expanding application asset size, developers can extract the piece of data they require as Redux connects all components to a single store✨</strong></p><blockquote><em>“One app — One store — One state”</em></blockquote><p>Redux has a single repository of information called the store, often called “single source of truth,” which contains the global state for the entire application. This concept is called <strong>immutability</strong>, which means any change can produce a new version of the state, enabling developers to write a more predictable code and move back and forth among the state’s previous versions. <strong>State management facilitates communication and data sharing across all components</strong>. Data need not be passed through multiple levels of components, which makes applications more traceable. It helps to sync the current state with actions and other parts of the application. Let’s get to a quick heads-up on the three main aspects of Redux: <br><strong>ACTIONS:</strong> Actions send data to the store <em>from user interaction, API calls, form submissions,</em> etc. It is dispatched to the reducers when there is a state update.<br><strong>REDUCERS:</strong> Pure functions that act on the current state of the application to return a new state. The states are stored as objects and specify how the state responds to the action. <br><strong>STORE: </strong>You might know by now that the store holds the current state, functions, and objects. Redux maintains a single store to<em> store, update and access </em>the state.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/541/1*deN7yEHpE8LGw9ayO8dLOg.png" /><figcaption>Source: <a href="https://dev.to/radiumsharma06/abc-of-redux-5461">https://dev.to/radiumsharma06/abc-of-redux-5461</a></figcaption></figure><h3>Why REDUX?</h3><p>-&gt;<strong> Organization:</strong> Redux maintains a strict structure on how the code needs to be organized, making it consistent and more manageable for a team of developers. <br>-&gt; <strong>Maintainable:</strong> The Redux application structure can be easily understood, which makes it easier to organize. It works with any UI layer and offers a large ecosystem of components and add-ons. <br>-&gt; <strong>Ease of testing:</strong> Redux’s code consists of functions that are pure, small, and isolated. Developers get the freedom to test across any client, server, and native environment.<em> </em><br>-&gt; <strong>Server rendering:</strong> Provides a better user experience and search engine optimization. The initial render of the app can be handled by sending the state to the server. The components can be rendered in HTML before sending them to the clients. <br>-&gt; <strong>Ease in debugging:</strong> It is easy to understand errors in coding, networks, and other bugs during the development phase. <em>Time-travel debugging</em> allows you to perform infinite undo-redo between the states and even send absolute error reports to a server.<em> </em><br>-&gt; <strong>Community:</strong> Numerous articles, tutorials, boilerplates, and tools makes Redux more appealing to use. It provides a great developer experience with many additional tools like logging, hot reloading, replay, and so much more.</p><p>Over time, Redux Toolkit has evolved with several utility functions, store setup, common use cases, and much more. However, the fundamentals of Redux remain the same, which calls for a proficient knowledge in handling actions, reducers, and the store. It is viable to create an entire application using React, but as it gets more complex, a state management library like Redux allows better data flow without performance concerns. Again, Redux might not be that perfect fit for your puzzle. Or you may not need Redux for simple actions and UI changes at the component level. But Redux still has a lot of features that provide you a hassle-free experience.</p><p>To explore more about the diversity, data flow, and rendering the components along with helpful code snippets, check out this article by <strong>Hristijan Stevanoski:</strong> <a href="https://medium.com/javascript-in-plain-english/the-only-introduction-to-redux-and-react-redux-youll-ever-need-8ce5da9e53c6">https://medium.com/javascript-in-plain-english/the-only-introduction-to-redux-and-react-redux-youll-ever-need-8ce5da9e53c6</a><br>Happy learning :)</p><p>Further Reading: <a href="https://almerosteyn.com/2016/08/redux-explained-again">https://almerosteyn.com/2016/08/redux-explained-again</a> <br><a href="https://blog.logrocket.com/why-use-redux-reasons-with-clear-examples-d21bffd5835/">https://blog.logrocket.com/why-use-redux-reasons-with-clear-examples-d21bffd5835/</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b02b4c1dbfe8" width="1" height="1" alt=""><hr><p><a href="https://medium.com/srmkzilla/the-crux-of-redux-b02b4c1dbfe8">The Crux of Redux</a> was originally published in <a href="https://medium.com/srmkzilla">SRMKZILLA</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Your Express-way to Serverless APIs]]></title>
            <link>https://medium.com/srmkzilla/your-express-way-to-serverless-apis-5387194d6db?source=rss----ea5e42fc31ec---4</link>
            <guid isPermaLink="false">https://medium.com/p/5387194d6db</guid>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[serverless]]></category>
            <category><![CDATA[api]]></category>
            <category><![CDATA[lambda]]></category>
            <category><![CDATA[technical]]></category>
            <dc:creator><![CDATA[Gita Alekhya Paul]]></dc:creator>
            <pubDate>Mon, 10 Aug 2020 19:27:51 GMT</pubDate>
            <atom:updated>2020-08-10T19:27:51.421Z</atom:updated>
            <content:encoded><![CDATA[<h4>Part 1 — Serverless Architecture and AWS Lambdas</h4><h3>Introduction to this Serverless Computing Series:</h3><p>If you are an upcoming web developer, you may have heard the following words… “<em>Serverless”</em>, “<em>FaaS”</em>, “<em>Event-driven Architecture”</em>, and whatnot. Often amazed by these buzzwords, young developers are confused when and how to start.</p><blockquote>A popular saying goes: “There is no cloud. It’s just someone else’s computer.” So do you think serverless is no computer at all? All these confusions and misconceptions will be cleared in our following series.</blockquote><h4>The following Medium series mainly focuses on serverless architecture, a trending topic and a popular choice for upcoming developers.</h4><h4>Did you know?</h4><p>Interestingly, the serverless revolution was not started by any so-called “tech giants” back in the day. The first PaaS (Platform-as-a-service) was launched with the name of <strong>Zimki, </strong>by a company called Fotango in March 2006, a London-based company owned by Canon Europe.</p><h4>The series is divided into two parts:</h4><ol><li><strong>Serverless Architecture and AWS Lambdas:<br></strong>The following article will cover the basics of serverless architecture, its application lifecycle and the modelling strategies, meanwhile providing you with all the pros and cons of why you would like to build and deploy serverless applications. After that, we will quickly move on to what Lambda functions are, how we can use them to build APIs and the best practices to make serverless applications.</li><li><strong>Using Netlify Functions to create your very first Serverless API:<br></strong>The second article will focus on how we can use Netlify Functions, to build our very first Serverless Web Application, while understanding how Netlify uses Lambda functions and getting a grasp over the infrastructure as a whole. <strong>So, keep a look-out for this article in the future!</strong></li></ol><h3>An Insight into Serverless</h3><p>Okay, a lot of talking, now let’s get back to work, shall we?</p><h4>Is Serverless truly server-less?</h4><p><strong>TL;DR No. </strong>It just means you don’t manage your servers and they are fully managed by your provider. Confused? I was too. Read on to understand the differences.</p><h4>What are PaaS and FaaS?</h4><p><strong>Let me define two words beforehand, FaaS and PaaS:</strong><br><strong>PaaS: Platform-as-a-service, </strong>It is a category of cloud computing services, offering a platform allowing customers to develop, run and manage applications without the complexity of building and maintaining the infrastructure typically associated with developing and deploying an application, like managing servers, load balancers and network configurations.<br><strong>FaaS: Function-as-a-service, </strong>Also called Serverless computing, is a software design pattern where applications are hosted by a third-party service, eliminating the need for server software and hardware management by the developer. The applications are broken up into individual functions that can be scaled and invoked individually.</p><h4>So, how is PaaS and FaaS(Serverless Computing) different?</h4><p>Good, you asked!. Although PaaS like Heroku, AWS Elastic Beanstalk or Azure Web Apps offer many of the benefits with that of Serverless Architecture, the main difference in the way your application scales in both platforms. In PaaS, the application is deployed as a single unit and thus, it also scales unit wise. Scaling is done at the application level.</p><p>This is where FaaS differs from PaaS. In serverless computing, the whole application is broken up into individual, autonomous functions. Each function is hosted by the FaaS provider and even scales automatically as per the number of requests a function receives. FaaS is very cost-effective in comparison to PaaS as they do not require the whole application to be scaled, rather it can just scale certain functions based on their individual uses.</p><p>Due to this, the whole execution of serverless function changes, compared to when you were building an application in a PaaS platform. In a PaaS platform, the application is always on, eating through the provider’s resources <em>(and probably your wallet also)</em>, listening for requests and executing them on receiving and occasionally spinning up more instances when the traffic increases, be it even on one of the functions of the application. But in FaaS, it is different. We use a design and execution pattern called <strong>Event-driven system architecture</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/324/1*1JAOk0QrC4IObsVfAXrxIQ.png" /><figcaption>A relationship between Event-driven architecture, Serverless Architecture and FaaS</figcaption></figure><h4>The lifecycle of Event-driven systems:</h4><p>So, what are event-driven systems? As explained earlier, in serverless computing we do not assign a server which is always on, listening for requests and only when it receives any request, it acts upon it. In serverless computing we assign functions which are triggered on a certain event, hence they are “event-driven”. This allows us to use fewer resources and only when they are triggered. The following image shows a brief understanding of how the lifecycle of these applications works:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/713/1*1tBoDKMEuiUm-Z6nuAVJHw.png" /><figcaption>The lifecycle of an Event-Driven Architecture</figcaption></figure><p>As you may notice, there are three main components to a serverless application:<br><strong>1. Event Source:<br></strong>The event source is what triggers the event. Be it REST API calls, a new object in a storage bucket like that of Amazon S3, a new record in the data stream of a scalable database like Amazon DynamoDB or even a trigger from any IoT appliance with it’s gathered data.<br><strong>2. Logic / Function:<br></strong>The main logic, which is your Lambda function, or even any of the different FaaS provided by different providers. This will contain the main logic which the function will use to process the event data and then return the result to the next step.<br><strong>3. Services:<br></strong>The services which are integrated with the function. It is the result of all the operations conducted by the function. It can range from sending an appropriate response JSON to the REST API call or creating a new data record from the incoming data, endless possibilities are there.</p><h4>Key points while modelling Serverless Applications:</h4><ol><li><strong>Stateless Runtime:</strong><br>A key portion of understanding the stateless runtime provided by the FaaS services is how containers are provisioned for the execution of the code after the function is invoked. It is very important to consider the stateless nature of your function while writing it. It should not be stateful, meaning it should not depend on any state of the user data. Thus, unfortunately, if you are looking to build a WebSocket API, you are out of luck. But if you are up for making REST APIs, we can move forward and create them. In-memory data stores, persisting filesystem content, and even Memcache databases are thus not an option while writing Lambda functions.</li><li><strong>Limited Resources:<br></strong>Another important aspect of Serverless architecture is the limited resources available for use. For example, Amazon Lambda allows a minimum memory allocation of 128MB and a maximum of 1.5GB per container initiated. This shows the limited amount of performance available. But this is the inherent nature of Lambda functions. They should be quick and less intensive to execute. The startup time and execution time can also be reduced following some best practices as per AWS, which I will list in the last section of this article.</li><li><strong>Reusability of Container:<br></strong>Last, but the most important topic to address is the way the Lambda containers are reused and how we should optimise for them.<br><em>According to the </em><a href="https://docs.aws.amazon.com/lambda/latest/dg/runtimes-context.html"><em>AWS Developer Guide</em></a><em>:</em></li></ol><blockquote>When you write your Lambda function code, do not assume that AWS Lambda automatically reuses the execution context for subsequent function invocations. Other factors may dictate a need for AWS Lambda to create a new execution context, which can lead to unexpected results, such as database connection failures.</blockquote><p>This is especially important while writing Database Services and other connection profiles for the Lambda function. The main factor we should always have in mind is that Lambda does not assure us the reusability of the container and thus we should adjust for that factor in our code. <strong>In my second article, I will discuss in details the problem I faced while writing the Database services.</strong></p><h4>Serverless Modelling Code Patterns:</h4><p>There are 4 major code patterns we follow in Serverless:<br>1. Microservices Pattern<br>2. Services Pattern<br>3. Monolithic Pattern<br>4. Graph Pattern</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/623/1*wuTIjt4rVHcj-4R331sB-A.png" /><figcaption>Serverless Modelling Patterns</figcaption></figure><ol><li><strong>Microservices Pattern<br></strong>In this pattern, each job functionality is isolated within a single Lambda function. Each Lambda function responds to a single event and thus the whole application can be modularised. In this way, we can modify our application’s components individually without affecting the application as a whole. It also makes the application easy to debug and maintain.</li><li><strong>Services Pattern<br></strong>In this pattern, the Lambda functions can handle multiple operations (~4), often related to a certain data model. For example, a Lambda function managing student’s data for a classroom which can perform CRUD(Create, Read, Update, Delete) for all the student data. Thus, this Lambda function becomes a service maintaining the student data.</li><li><strong>Monolithic Pattern<br></strong>In this pattern, the entire application is crammed into a single Lambda function. It is often not preferred while writing Serverless applications. Lambdas written in this pattern have varying application performance and often reach their resource limit since it starts up the whole application for a single event which probably just caters to certain functionality. In this way, we can see Microservices are the way to go for Serverless applications.</li><li><strong>Graph Pattern<br></strong>This is similar to the Monolithic pattern but uses GraphQL to execute queries and thus reduces the number of endpoints to be available for the Lambda function. Although, you have to learn GraphQL for it.</li></ol><h4>Pros and Cons of Serverless Architecture:</h4><p>There’s a lot to debate about, but I will go over some of the main points I thought you guys should be aware of:<br><strong>Pros:</strong><br><strong>1. No server management: </strong>The meaning of the “<em>serverless</em>” is actually that you don’t have to maintain your servers, not that there are any servers involved!<br><strong>2. Flexible Scaling:</strong> The applications are scaled automatically based on the usage of a certain function, instead of scaling the application as a whole.<br><strong>3. Cost-effective:</strong> Since we have an event-driven architecture, and flexible scaling, it is extremely nice on your wallets compared to PaaS where a server is running 24x7 while handling requests occasionally.<br><strong>4. Improved Development Speed:</strong> Developers has to worry less about servers and deploys and focus more on the application logic.</p><p><strong>Cons:<br>1. Less system control <br></strong>Since the servers are managed by your vendor, there are a lot of limitations imposed by your provider, often called <em>“vendor lock-ins”. </em>These pose a lot of challenges while customising the runtime environments and often pose a lot of debugging challenges.<strong><br>2. Not suitable for large-scale complicated applications<br></strong>Often writing large-scale complicated applications, it is easier to write monolithic pattern applications and let the server run continuously. Developers prefer to use Lambdas mostly while writing microservices for their application.<br><strong>3. More complexity required for testing on local environments<br></strong>It is often a difficult task to incorporate FaaS code into local testing environments, making thorough testing of applications a more intensive task.<br><strong>4. Architectural Complexity</strong><br>One of the most prominent complain against the Serverless Architecture is the difficulty in setting it up. Although making Lambda functions may seem easier to code, provisioning the appropriate resources (like DynamoDB, S3 and API Gateway) and writing the CloudFormation template, which includes all the services the Lambda function intends to use, is a difficult task for beginner developers.</p><p><strong>But we will give you a head-start by introducing you to Netlify functions in our next article, an easier way to get started using the Serverless Architecture.</strong></p><h4>Some popular providers of Serverless Arch:</h4><p>There are many of them, thus I am listing out some of the most common ones. Feel free to explore them in your way:<br>1. AWS Lambda<br>2. Azure Functions<br>3. Google Cloud Functions<br>4. Netlify Functions <strong><em>(coming up, next in the series)<br></em></strong>5. Webtask by Auth0</p><h3>An Introduction to AWS Lambda Architecture</h3><p>Phew! So much theory about Serverless! Let’s now see where we see this in use on a large scale. Introduced in 2014, AWS Lambdas are one of the most popular and successful products on the AWS Platform.</p><h4>What is a Lambda function?</h4><p>Lambda is a high-scale, provision free serverless compute offering based on functions. It provides the cloud logic layer for your application. They can be triggered by a variety of events either offered by AWS or third-party services. Lambda functions scale precisely, down to the individual request. When there are multiple concurrent events, Lambda simply starts up more copies of the functions in parallel and almost ensures no idle time <strong>(More on the invocation lifecycle of Lambda functions later in the article)</strong>. It is a type of serverless FaaS. Each Lambda function contains the <strong>code</strong> you want to execute, the <strong>configuration</strong> of the environment you want to execute in and the <strong>event sources</strong> the function has to react to.</p><h4>An example Lambda function</h4><p>An example of a “synchronous” handler function.</p><p>Above is a Lambda function with synchronous “handler”. Below is an example of an asynchronous handler.</p><p>An example of an “asynchronous” handler function.</p><h4>How do serverless APIs work with AWS?</h4><p>As discussed earlier, each Lambda function gets triggered by an event and uses certain services to complete its execution. Although there are many uses of invocation of a Lambda function, a common use is to create APIs. To create a serverless API using AWS we will have to configure the following things:<br><strong>1. AWS API Gateway:</strong> It serves as the event source which lists out the available endpoints for a REST API and then invokes a certain Lambda function based on the incoming request.<br><strong>2. Lambda Function:</strong> The main logic of what you want to do with the incoming data.<br><strong>3. Services: </strong>Either AWS Services or Third-party services which are used by the Lambda function. Examples are Amazon S3, DynamoDB or CloudWatch Logs to name a few.</p><h4>Main components of a Lambda Function:</h4><p>As you may have noticed in the above two examples of Lambda functions, the function signature is as follows:</p><pre>exports.handler = (event, context, callback(err, response)) =&gt; {}</pre><p><strong>The Handler<br></strong>When a Lambda function is invoked, the code execution begins at the handler function. The handler is a specific code method (Java, C#), or a function (Node.js, Python) that we have created and included in the package. The Lambda function can then call any other methods and functions within the files and classes. They can also interact with other AWS services or third-party APIs based on the use case.<strong><br>The Event Object<br></strong>As we have seen multiple times earlier, the event source is the first step to the invocation of a Lambda function. The event object contains all the data and the metadata parameters passed from the event source. Thus, the structure of the event object varies from an event source to an event source. For example, an event from the API Gateway will contain the HTTPS Request properties whereas an event from an S3 bucket will contain the details about the bucket and the new object. In the above, I have shown an example of an event.body and the event.pathParameters property of the event object. This is when the event source is API Gateway. The event.body contains the request body, while the event.pathParameters contains the request parameters. <br><strong>The Context Object<br></strong>The context object allows your Lambda code to interact with the execution environment. It will contain all the data fro that specific execution environment. Later, we will learn how we can use “Netlify Identity”, an easy-to-use user identity management system by Netlify.<br><strong>But, before moving on, I wanted to discuss a specific line of code in the above Gist:</strong></p><pre>context.callbackWaitsForEmptyEventLoop = false;</pre><p>The above callbackWaitsForEmptyEventLoop is a boolean attribute of the context object. It instructs the execution environment to “freeze” after it has done executing all the code, <strong>even if the promises are not yet resolved.</strong> By default, the execution context waits for the Node.js event loop to finish resolving all the promises. It is especially important in such situations as shown above, where the outcome of the delete operation can be non-blocking. Although executing such async code can have its caveats, this piece of code has to be included when calling async functions, else the Lambda execution environment waits for the promise to resolved, which may introduce latency or in worst cases, timeout. But you need not worry, once the lambda function is executed, the execution context is maintained for some time, in anticipation of another function invocation. It is when your remaining promises will be resolved.</p><p><strong>The Callback<br></strong>The callback object, although not compulsory, is often used to send back the invoker some data, either an HTTP Response or even the errors occurring during execution. In asynchronous handlers, simply returning the promise is enough, a callback is not mandatory.</p><h4>Container Reuse: Optimising Code for “Warm Starts”</h4><p>Let’s now discuss the prime factor in optimising your code for Lambda containers. Let’s see an example of how AWS provisions and manages its Lambda containers:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/653/1*pTaMp8e62QlH0x0yJoDozw.png" /><figcaption>Lambda Invocation and Execution Lifecycle</figcaption></figure><p>Although it is strictly said by AWS, that we should not assume any stateful nature of our code, it is often even preferred by developers, to optimise their code for the “Warm starts”. Now what do we mean by “Warm starts” and “Cold starts”? You see, each time a function container is created and invoked, it remains active in anticipation of a subsequent invocation for a certain time. Now if a successful invocation happens, it is said to be running on a “<strong>warm container</strong>”. Else, the applications “freeze”, and the next invocation requires the code package to be created and invoked for the first time, when we say the invocation is experiencing a “<strong>cold start</strong>”. Now, why do you it is important for developers? This starting mechanism allows developers to optimise their code for the warm starts, and reuse module references, database connections and thus resulting in faster startup time, and even faster execution time. It is highly recommended to scope variables in such a way that their contents can be reused on subsequent invocations while keeping in mind the cold starts.</p><h4>Function Invocation Patterns:</h4><p>This small section shows the various categories of events Lambdas can be triggered through:<br><strong>1. Push events:</strong><br>The type of events where the function is invoked only when a particular event occurs within another AWS service. Examples: Amazon S3, Amazon API Gateway, Amazon Alexa.</p><p><strong>2. Pull events:</strong><br>The type of events where a certain data source is polled for new data, and invoke our function with any new records that arrive at our data source. Examples: Amazon DynamoDB, Amazon Kinesis Streams.</p><h4>Handling Exceptions:</h4><p>Last but not the least, the methods of handling exceptions. When using synchronous handler functions, proper error handling has to be done, and a proper error message has to be sent to the invoker. But things get interesting when we start handling asynchronous errors and exceptions:<br><strong>Introducing Dead Letter Queues…</strong><br>Dead letter Queues are a powerful concept, which helps software developers to find issues within their asynchronous function components. To explain it simply — when your application encounters an unhandled error in an asynchronous process, the error information and the context can be sent to another location, to a message queue, probably a notification service Like Amazon SQS(Simple Queue Service). Thus, developers can also handle such errors gracefully. Below is a short flow diagram of dead-letter queues:</p><h3>Best Practices while coding Serverless Applications</h3><p>Here are some of the best practices which should be followed while writing serverless applications:</p><ul><li><strong>Language Runtime Preference:<br></strong>This is a tough fight between compiled languages like Java and C#, compared to interpreted languages like Node.js and Python. It has been monitored by AWS that, compiled languages have the largest startup times, while interpreted languages start up very quickly. But the compiled languages perform better under maximum performance, so it is a developer’s call to decide speed over workload capacity.</li><li><strong>Business Logic outside the handler function:<br></strong>It is recommended to store the business logic, database connections, SDK clients outside the handler function to take advantage of subsequent invocations. It is also recommended to use code reusability features like static/global variables, and singletons so avoid the reinitializations of variables, taking full advantage of warm starts. But it is important to keep in mind, that we should also have the cold start logic in place, whenever cold starts take place from scratch.</li></ul><blockquote>In the next article, we will address this topic of reusing database connections in MongoDB and the problems I faced. Surely an interesting thing to learn while using Netlify functions!</blockquote><ul><li><strong>Minimising the deployment package:</strong><br>The deployment package should be minimised to reduce the initial cost of a cold start. Developers are encouraged to keep external dependencies to a minimum. Instead of uploading entire SDKs, you are encouraged to selectively depend on libraries.</li></ul><h3>Conclusion</h3><p><strong>Woo-hoo! Man, that was a lot of information to share! We hope you enjoyed reading as much as we loved making for you guys! We tried to keep it as simple as possible to remove the complexity in AWS young developers. If you like the article, do give it a clap!<br>This is </strong><a href="https://medium.com/u/b6be337366fe"><strong>Gita Alekhya Paul</strong></a><strong> signing off. Next week, we will discuss how Netlify Functions work, and make a hands-on project of your first serverless API! Until then, stay safe, stay protected and follow us at </strong><a href="https://medium.com/u/65fced42c6f3"><strong>SRMKZILLA</strong></a><strong>, to be posted about our upcoming articles!</strong></p><h4>References:</h4><ul><li><a href="https://docs.aws.amazon.com/lambda/latest/dg/welcome.html">AWS Lambda Developer Guide</a></li><li><a href="https://www.serverless.com/framework/docs/">Serverless Framework Documentations</a></li><li><a href="https://www.cloudflare.com/learning/serverless/glossary/function-as-a-service-faas/">Cloudflare FaaS Documentation</a></li><li><a href="https://d1.awsstatic.com/whitepapers/serverless-architectures-with-aws-lambda.pdf">AWS Whitepaper on Lambda functions</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5387194d6db" width="1" height="1" alt=""><hr><p><a href="https://medium.com/srmkzilla/your-express-way-to-serverless-apis-5387194d6db">Your Express-way to Serverless APIs</a> was originally published in <a href="https://medium.com/srmkzilla">SRMKZILLA</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How is COVID treating you?]]></title>
            <link>https://medium.com/srmkzilla/how-is-covid-treating-you-d06e345d9746?source=rss----ea5e42fc31ec---4</link>
            <guid isPermaLink="false">https://medium.com/p/d06e345d9746</guid>
            <category><![CDATA[mental-health]]></category>
            <category><![CDATA[rejuvenation]]></category>
            <category><![CDATA[covid19]]></category>
            <dc:creator><![CDATA[Seerat Parmar]]></dc:creator>
            <pubDate>Thu, 06 Aug 2020 07:17:39 GMT</pubDate>
            <atom:updated>2020-08-06T07:17:39.334Z</atom:updated>
            <content:encoded><![CDATA[<p>We all wished for a Sunday seven times a week, and the COVID-19 pandemic gave of us just that. The lockdown has bestowed us with a lot of time to spend with our families. I’m sure all of us have recently discovered that our parents are pretty cool. Enjoying this time with our loved ones while being safe is a privilege. But we all are responsible for taking care of ourselves, and in return, ensure the safety of thousands of others (<em>no pressure </em>xD).</p><p>Fear, anxiety, and stress are common outcomes of perceived or real threats, and when we face uncertainty or the unknown. <strong>Hence it is quite natural that people are experiencing fear and similar feelings during the pandemic.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/626/1*bt17ZlOj-aWr3IsXVS3F0w.jpeg" /></figure><p>Off recently, we have all been looking at <a href="https://www.mygov.in/corona-data/covid19-statewise-status/">numbers reporting active cases and recoveries</a> without actually understanding the meaning of it. In some cases, this can lead to overstress and take a toll on our mental health. <strong>We need to make sure that we are mentally sound to conquer these trying times.</strong></p><p>Rumors and speculations can fuel anxiety. Having access to authentic information about the pandemic can help you feel more in control.</p><p>Follow hygiene advice such as washing your hands more often than usual, for <a href="https://www.who.int/gpsc/clean_hands_protection/en/"><strong>20 seconds with soap and hot water</strong></a> (sing <em>happy birthday</em> to yourself twice to make sure you do this for 20 seconds). If you can’t wash your hands straight-away, use hand sanitizers, and wash-up, the next time you have access to water and soap.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/626/1*zpwRCZ4KMINeHpttXfqn7A.jpeg" /></figure><p>Keeping yourself busy and not letting your thoughts run wild is necessary. You can do a lot of things like:</p><p><strong><em>~ Bring out your inner MasterChef</em></strong></p><p><strong><em>~ Re-decorate your room</em></strong></p><p><strong><em>~ Play board games with family</em></strong></p><p><strong><em>~ Video call your loved ones</em></strong></p><p><strong><em>~ Explore online courses</em></strong></p><p><strong><em>~ Learn new skills that you could never take up</em></strong></p><p><strong><em>~ Workout and exercise</em></strong></p><p>If you are going through a tough time because of the environment at your home or wish to talk to someone about your mental health, you can contact the <strong>mental health helpline no:</strong> <strong>080- 46110007 </strong>without second thoughts.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/626/1*A6o_kt1yGMvve_juj-3SeQ.jpeg" /></figure><h4>When this is over, we will grow as a human to become better at loving ourselves, and at appreciating the smallest moments of our lives. When this is over, we will have a greater love and appreciation for companionship, our environment, our health, and our freedom.</h4><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d06e345d9746" width="1" height="1" alt=""><hr><p><a href="https://medium.com/srmkzilla/how-is-covid-treating-you-d06e345d9746">How is COVID treating you?</a> was originally published in <a href="https://medium.com/srmkzilla">SRMKZILLA</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Taiwan vs Coronavirus]]></title>
            <link>https://medium.com/srmkzilla/taiwan-vs-coronavirus-41aa23e3f61a?source=rss----ea5e42fc31ec---4</link>
            <guid isPermaLink="false">https://medium.com/p/41aa23e3f61a</guid>
            <category><![CDATA[covid19]]></category>
            <category><![CDATA[taiwan]]></category>
            <dc:creator><![CDATA[Aditya Mukherjee]]></dc:creator>
            <pubDate>Sat, 25 Jul 2020 02:31:01 GMT</pubDate>
            <atom:updated>2020-07-25T02:31:01.052Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*q1oyvnfCT6429O5iMhWNJg.jpeg" /><figcaption>Office workers pray for business prosperity as their company reopens after the Chinese New Year holidays in Taipei, Taiwan.</figcaption></figure><p>The world is amidst a crisis it has never faced before. Even the developed countries like the United States of America, Germany, and Italy — countries that boast of some of the best health care systems — are struggling to contain this Coronavirus. Death statistics are something of a horror scene, and they are not showing any signs of halting. Yet, in the middle of the battle against Coronavirus, Taiwan has proclaimed a ray of hope to the world.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/1*q3Z30eBzj4LwqvIDiqsBEA.jpeg" /></figure><p>Taiwan is a small island near China. It has a population of 23.54 million, which is about the same as that of Australia. Taiwan is a democratic nation that has been incessantly pressurized by China and its allies to follow the One-China principle. <strong>As a result, Taiwan has always struggled to have a stand among world organizations</strong><em>.</em> The WHO doesn’t even recognize Taiwan as a member due to China’s pressure. But this has taught Taiwan to be self-sufficient and shape itself into a responsible nation for its citizens.</p><p>Taiwan had suffered tremendously at the hands of the SARS outbreak in 2003. The fatality percentage of SARS in Taiwan was 27%, and more than 150,000 people quarantined on the island, and nearly 181 deceased. This outbreak prepared Taiwan for any future crisis that could hit the island. Their healthcare system was improved, and now it is one of the best in the world. They also set up Taiwan’s National Health Command Center (NHCC), for a swift response to any health emergency.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PslgHAsvWTtXnSkP_ZUDsw.png" /><figcaption>Cases in various countries comparing to Taiwan(Source: <a href="https://www.bloomberg.com/opinion/articles/2020-03-12/coronavirus-stages-taiwan-shows-how-to-skip-denial-to-save-lives">Bloomberg</a>)</figcaption></figure><p>When the news broke out about the Coronavirus in the run-up to Lunar new year, the world stood still, thinking whether they should take any action or not. Not Taiwan, though. It knew from its past experiences that early response is crucial to controlling such health hazards, and thus, called its forces to action immediately. The NHCC produced a list of at least 124 action items and implanted it for the safety of the public. These actions included border control measures, alerting cities, wide-scale testing, and punishing those who don’t follow the quarantine guidelines. <strong>They also activated the Central Epidemic Command Centre (CECC), which established after the outbreak of the SARS epidemic.</strong> These steps were crucial and provided them with a head start against Coronavirus. The Taiwanese Government boosted the production of masks by mobilizing government funds and military personnel. They also launched a name-based rationing system for mask purchases at pharmacies and local public health agencies. This system helped people to order masks online and pick them up from their nearby convenience stores. These measures helped Taiwan achieve a strategic distribution of its limited resources and meet its health care needs. The government also started tracing any immigrants who landed in Taiwan and imposed a strict 14-day self-quarantine on them. They also used contact tracing to find out potential patients and eliminate any cases that may have been brewing. Negative reinforcement, too, played a crucial role.<strong> A penalty of 1 million NTD (about $30,000) had also been imposed on people violating the quarantine guidelines.</strong></p><p>At the same time, as an incentive, the government decided to pay 1,000 NTD per day (about $450 for 14 days) for those undergoing quarantine.</p><p><strong>Another success of Taiwan was to stop spreading misinformation about the virus and provide the public with authentic updates every day.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/512/1*UF_tMpjyRSSsyUYQdkLNsw.jpeg" /></figure><p>Taiwan has also been helping the world in every means it can. The country has donated 1million face masks to India and will donate 10 million masks to countries that have been hit the hardest by the COVID-19 pandemic. They have shared complete information on confirmed cases, travel and contact histories of patients, and border control measures to countries such as Japan, the Republic of Korea, Singapore, Malaysia, the Philippines, the United States, Canada, Italy, France, Switzerland, Germany, the United Kingdom, Belgium, and the Netherlands. Taiwan has abided by the International Health Regulations 2005 (IHR 2005) in notifying WHO of confirmed COVID-19 cases — thus fulfilling its duty as a global citizen.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SVETkUrjlecCMOzQ5BqZxA.jpeg" /><figcaption>Source: <a href="https://focustaiwan.tw/politics/202004090012">Focus Taiwan</a></figcaption></figure><p>A virus sees no border, and if organizations like the WHO are working for the health care of the entire world, then it shouldn’t either. We are currently going through testing times, and we can’t let politics keep Taiwan away from helping the world and vice versa.</p><h4>Taiwan has been making immense progress and neglecting its contribution to the Global Health Security might turn out to be a mistake.</h4><p>Taiwan will continue to work with the countries and try to enjoy its fundamental right to health, echoing the United Nations’ 2030 Sustainable Development Goals: <em>No one should be left behind.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=41aa23e3f61a" width="1" height="1" alt=""><hr><p><a href="https://medium.com/srmkzilla/taiwan-vs-coronavirus-41aa23e3f61a">Taiwan vs Coronavirus</a> was originally published in <a href="https://medium.com/srmkzilla">SRMKZILLA</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>