<?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[Stories by Ziyan Karmali on Medium]]></title>
        <description><![CDATA[Stories by Ziyan Karmali on Medium]]></description>
        <link>https://medium.com/@ziyankarmali?source=rss-7b0167d6d3b1------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*zNUpbhICG4Qjpjknf_u7FA.jpeg</url>
            <title>Stories by Ziyan Karmali on Medium</title>
            <link>https://medium.com/@ziyankarmali?source=rss-7b0167d6d3b1------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 04 Dec 2026 20:13:36 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@ziyankarmali/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Why I’m Not “Locking In” for the Second Half of 2026]]></title>
            <link>https://medium.com/@ziyankarmali/why-im-not-locking-in-for-the-second-half-of-2026-8e368b1e53fe?source=rss-7b0167d6d3b1------2</link>
            <guid isPermaLink="false">https://medium.com/p/8e368b1e53fe</guid>
            <dc:creator><![CDATA[Ziyan Karmali]]></dc:creator>
            <pubDate>Mon, 01 Jun 2026 06:01:08 GMT</pubDate>
            <atom:updated>2026-06-01T06:01:08.742Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xoK686zU7Gk9TFGFeTUDWA.png" /></figure><p>We are stepping into June, approaching the halfway mark into this year. It’s nearly about that time where everyone’s feed is going to be flooded with the usual mid-year panic “<em>Only 6 months left to achieve your 2026 goals”,</em> <em>“Welcome to the Lock-In Era”,</em> <em>“Time to start your Six Month Hustle Arc.”</em> etc etc you get the idea.</p><p>Naturally, I spent the last few days reflecting (more like stressing) about this and recounting everything I had set out to do and didn’t do. And you know what, I don’t want to meet June with this mindset.</p><p>Because truthfully, my year so far hasn’t been perfect or wildly productive or always aligned with the version of me I thought I’d be by now. There are things I said I would do that I haven’t touched yet. Goals that are still waiting on my docket for attention, some plans didn’t go anywhere and some days I didn’t have it in me to go anywhere.</p><p>And that’s entirely okay.</p><p>I don’t want to build the rest of my year with that kind of pressure. It doesn’t work and seems to only burn me out faster. Because no matter how much I achieve, there will always be more I wish I’d done.</p><p>So this is about acknowledging that because I want to approach the rest of this year from a better place. Perhaps I am not “on track” in an ideal way, but I am learning to be okay with where I am right now.</p><p>Ultimately yeah, June is here and half the year is almost over and there is still so much I want to do. But I refuse to chase the next six months from a place of panic or inadequacy. I don’t want to achieve things to play catch up with everyone on the internet. Everyday there are new things emerging with everyone calling it a “game changer”. I want to do things that make me happy and bring me joy. Even if this year doesn’t look perfect from the outside, I’ve made choices I can be proud of.</p><p>Here’s to the many fun small random things that happened this year that deserve to be appreciated in this halfway checkpoint.</p><ul><li>After struggling with a years-long reading slump, I read an entire book in 2 days (this is a very big deal to me). Also my new favourite travel ritual is buying a new book at the airport.</li><li>Continued my digital nomad chapter. Packed up my laptop and worked from Thailand, then Goa and then Bangalore for at least a month each, figuring things out as I went.</li><li>Got into playing Pickleball regularly with my friends. It is absolutely nothing like the gym routine I had pictured at the start of the year, but much better in so many ways.</li><li>Put myself out there and pitched my startup at multiple events and eventually figured out how to perfect my pitches. It was an incredibly thrilling way to learn, 10/10 recommended.</li><li>Somewhat randomly, I have become a real cold brew connoisseur and have tried at least seven different brands in the last 2 months. Feel free to suggest your favourites!</li><li>And maybe the biggest one yet, I took a risk on myself. I quit my job to try and build something. I am exploring what it means to be a founder even if I don’t have everything figured out.</li></ul><p>Somehow, making this list made me feel better and worse about myself at the same time. None of this was part of some “big plan” but that’s okay, it still counts.</p><p>This is a reminder that while you scroll through the many ‘<em>Lock-In</em>’ posts in the coming weeks, take a moment to appreciate everything you have done so far, and let that be your source of motivation instead.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8e368b1e53fe" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Software Is About to Get Personal]]></title>
            <link>https://medium.com/@ziyankarmali/software-is-about-to-get-personal-a236e2796015?source=rss-7b0167d6d3b1------2</link>
            <guid isPermaLink="false">https://medium.com/p/a236e2796015</guid>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[saas]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[ai]]></category>
            <dc:creator><![CDATA[Ziyan Karmali]]></dc:creator>
            <pubDate>Tue, 24 Feb 2026 09:20:00 GMT</pubDate>
            <atom:updated>2026-02-24T09:20:00.415Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8AqgbAToFtiuM8d0Onm5YA.png" /></figure><p>You’re paying for 100 features. You use 5.</p><p>That’s not a guess. <a href="https://www.pendo.io/resources/the-2019-feature-adoption-report/">Pendo analyzed usage data across 615 software products</a> and found that <strong>80% of features in the average software product are rarely or never used.</strong> The Standish Group found something similar years earlier- 64% of features, basically dead on arrival.</p><p>Think about that. The software you use every day? Four-fifths of it is bloat you scroll past. And someone paid millions to build it.</p><p>This is the generalist era of software. And it’s ending.</p><h3>The One-Size-Fits-All Compromise</h3><p>Every SaaS product you’ve ever used was built the same way: figure out what the <em>average</em> user needs, then ship that to <em>everyone.</em></p><p>Salesforce has 3,000+ features. The average sales rep uses maybe a dozen. Notion ships as a wiki, project manager, database, docs tool, and AI assistant <strong>but</strong> most people use it as a fancy notepad with checkboxes.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*itM4RuzwI8a_g624" /></figure><p>This isn’t a failure of product teams. It’s a structural problem. When you’re building software for millions of users, you have to be a generalist. You build for the median. The compromise.</p><p>The result? Everyone gets something. No one gets exactly what they need.</p><p><a href="https://hbr.org/2006/09/defeating-feature-fatigue">Harvard Business Review covered this</a> back in 2006, consumers systematically choose feature-rich products, then regret it after using them. We <em>want</em> the 200-feature CRM when we’re shopping. We <em>hate</em> it when we’re working.</p><p>Feature fatigue. It’s been the default for two decades.</p><h3>Why It Was This Way</h3><p>Simple: building software was expensive.</p><p>If you wanted a custom tool that did exactly your workflow, your sales process, your reporting, your onboarding- you had two options:</p><ol><li>Hire a dev agency for $150–300K and wait 6 months.</li><li>Buy Salesforce and spend 3 months customizing it to be 70% of what you actually wanted.</li></ol><p>Neither was great. But building custom was so expensive that the generalist approach won by default. Ship one product, charge everyone. Make it configurable enough that people <em>feel</em> like it’s tailored, even when it’s not.</p><p>The entire SaaS model around monthly subscriptions, feature-gated tiers, annual contracts was built around this reality. Software was expensive to make, so you amortized the cost across as many users as possible.</p><p>That reality just changed.</p><h3>The Cost Collapse</h3><p>AI didn’t just make software development faster. It collapsed the cost curve.</p><p><a href="https://github.blog/2022-09-07-research-quantifying-github-copilots-impact-on-developer-productivity-and-happiness/">GitHub’s research on Copilot</a> showed developers completing tasks 55% faster. That was 2022. Since then, we’ve gone from autocomplete to agents that can build entire features from a description.</p><p>What used to take a dev team 3 months now takes a competent person with AI tools 3 days. I’m not exaggerating. I’ve watched it happen, internal tools, data pipelines, custom dashboards, workflow automations- built in days, not quarters.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*XFrcV03AAW_WavLh" /></figure><p>When building custom software costs 10x less and takes 10x less time, the whole logic of “buy the generalist tool and deal with it” breaks down.</p><p>Why pay $50K/year for an enterprise CRM when you can build an agent that does <em>your</em> exact sales process for a fraction of that?</p><h3>The New Model: Personal Software</h3><p>Here’s what I think is coming and it’s already started:</p><p><strong>Software stops being a product you buy and becomes a system built around you.</strong></p><p>Not “personalized” in the way Netflix recommends shows. Actually personal. Built for your workflow, your edge cases, your preferences.</p><p>Instead of a CRM with 200 features where you use 5, you get an agent that handles <em>your</em> specific sales motion. It knows your follow-up cadence, your qualification criteria, your deal stages. It doesn’t have features you don’t use because it was built for you.</p><p>Instead of a project management tool with Gantt charts and Kanban and timelines and calendars, you get something that matches how <em>you</em> actually track work.</p><p>The shift is from <strong>“which tool fits me best?”</strong> to <strong>“what tool can I build for myself?”</strong></p><h3>Agents, Not Automations</h3><p>The other piece that makes this work: agents aren’t just automations with a fancy name.</p><p>Traditional automation is rigid. If X, then Y like Zapier. It works until it hits an edge case, then it breaks or does something dumb.</p><p>Agents are different. They make decisions. They handle ambiguity. They adapt.</p><p>An automation says: “When a lead fills out a form, send email template A.”</p><p>An agent says: “A lead came in. Based on their company size, industry, and how they found us, I’m going to route them to the right rep, customize the outreach based on their specific situation, and flag them as high-priority because they match our ideal customer profile.”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*VkGUrq4RMK4rrxvB" /></figure><p>That’s not a workflow. That’s judgment. And it’s why the shift from generalist tools to personal software actually works now, the AI layer can handle the complexity that used to require either custom code or a human.</p><h3>The Agency Disruption</h3><p>This quietly kills the dev agency model too.</p><p>Companies used to hire agencies for 6-figure projects to bridge the gap between what off-the-shelf software did and what they actually needed.</p><p>That gap is closing. Not because the off-the-shelf tools got better, but because the cost of custom collapsed. When a product manager with AI tools can build what used to require a 4-person agency team, the math changes fast.</p><p>I’m not saying agencies disappear overnight. But their bread-and-butter work is getting eaten by AI-assisted building at a pace most agencies aren’t ready for.</p><h3>What This Means</h3><p>I don’t think every SaaS company dies. The platforms with real network effects like Slack, GitHub, the infrastructure layers, those stick.</p><p>But the mid-tier SaaS tools? The ones whose entire value prop is “we do X for everyone”? They’re in trouble. Because “X built specifically for you” is now achievable, affordable, and often better.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*WzT8Oz-sKNWM8Ohp" /></figure><p>Here’s what I’d bet on:</p><ul><li><strong>More software, built by fewer people.</strong> The ratio of tools-to-engineers keeps climbing.</li><li><strong>The rise of the “one-person software company.”</strong> People building and selling hyper-specific tools powered by AI agents.</li><li><strong>SaaS pricing pressure.</strong> When custom alternatives get cheap, paying $200/seat/month for Salesforce becomes a harder sell.</li><li><strong>Agents as the default interface.</strong> Less clicking through dashboards, more telling an agent what you need.</li></ul><p>Software has been a generalist compromise for 30 years. The economics that made it that way just flipped.</p><p>It’s about to get personal.</p><p><em>Sources and data referenced in this article are linked throughout. Key stat: </em><a href="https://www.pendo.io/resources/the-2019-feature-adoption-report/"><em>Pendo’s 2019 Feature Adoption Report</em></a><em> found 80% of features in the average software product are rarely or never used.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a236e2796015" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Right Room Has Changed]]></title>
            <link>https://medium.com/@ziyankarmali/the-right-room-has-changed-878fa3dbc4a6?source=rss-7b0167d6d3b1------2</link>
            <guid isPermaLink="false">https://medium.com/p/878fa3dbc4a6</guid>
            <category><![CDATA[startup]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[future-of-work]]></category>
            <category><![CDATA[entrepreneurship]]></category>
            <dc:creator><![CDATA[Ziyan Karmali]]></dc:creator>
            <pubDate>Mon, 16 Feb 2026 06:32:32 GMT</pubDate>
            <atom:updated>2026-02-16T07:13:42.432Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*y-ZQiDpu2MtZiutZnflGjw.png" /></figure><p>Last week, a friend told me she’s going to do an MBA. Although she’s passionate about business theory, she’s smart enough to know most of it is filler. She’s doing it because she believes it’s the <strong>path</strong>. The credential that puts her in the “right room”. The thing that puts you in a position of power.</p><p>This conversation stuck with me, because I think she’s aspiring to be in a room that’s rapidly losing its relevance.</p><p>She’s not wrong about what an MBA <strong>used to</strong> do. Ten years ago, it was one of the clearest signals you could send. It said: I’m serious, I’m vetted, I belong in this room. And the room, the network, the recruiting pipeline, the alumni dinner, was where the real leverage lived.</p><p>But here’s what I keep coming back to: the room she’s trying to get into isn’t the room where power lives anymore. The room has moved. And the entry fee isn’t a degree, it’s what you can build.</p><blockquote>There’s this old piece of career advice that goes: “Get yourself in the right room.”</blockquote><p>For decades, everyone knew what that meant. The boardroom at McKinsey. The partner dinner at Sequoia. The Davos panel. The YC batch dinner where you’re three handshakes from someone who can write a $10M check. The “right room” was a place you had to be <strong>invited</strong> to, and most people never were.</p><p>That room is closing. Or more accurately, it doesn’t matter like it used to.</p><p>The definition of the right room has changed. And most people haven’t noticed it yet.</p><p>That conversation is what made me write this.</p><h3>The Old Room</h3><p>Let me be clear about what the old room was. It wasn’t just about networking. It was about <strong>access</strong>.</p><p>Access to capital. Access to distribution. Access to talent. Access to information that wasn’t public yet. The entire game was built on gatekeeping. You needed a team of 50 to build what one person can build today. You needed a VC to fund your company. You needed a publisher to reach an audience. You needed an executive title to be taken seriously.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*afFLeyvK2FXbm_IRRQwmnQ.jpeg" /></figure><p>The room was the signal. If you were in it, you had power. If you weren’t, you were on the outside looking in, trying to figure out how to get a seat.</p><p>This created an entire economy of room-seekers. People optimizing for proximity to power instead of building actual things. MBA programs, golf clubs, conferences with $5,000 memberships, all designed to get you closer to the room.</p><p>And honestly? It worked. For a long time, being in the right room <strong>was</strong> the most leveraged thing you could do.</p><h3>What Changed</h3><p>Two things collapsed simultaneously: the cost of building and the cost of distribution.</p><p>AI didn’t just make coding faster. It fundamentally changed the ratio of what one person can do versus what required a team. Sam Altman said we’d see the first one-person billion-dollar company. And while we’re not there yet, the trajectory is undeniable. <a href="https://x.com/levelsio">Pieter Levels</a> runs multiple products generating millions in revenue. Solo. From his laptop. No office, no board, no employees.</p><p>He’s not an anomaly anymore. He’s a template.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lCv7ka8i-RpkOHghBt3bEA.jpeg" /></figure><p>The tools have gotten absurd. You can spin up an AI agent that does customer support, another that handles marketing, another that monitors your analytics. You can ship a product in a weekend that would’ve taken a funded startup six months, three years ago. You can reach millions of people through a tweet thread or a YouTube video without ever meeting a single person.</p><p><a href="https://twitter.com/paulg">Paul Graham</a> wrote about super linear returns, how performance compounds, how the gap between good and great isn’t linear but exponential. What he didn’t fully articulate (though I think he sees it) is that AI is making those super linear returns accessible to individuals, not just companies.</p><p>The leverage isn’t in who you know anymore. It’s in what you can build. And what you can build just went 10x with a fraction of the resources.</p><h3>The New Room</h3><p>The new room is your home office at 2 AM, shipping a feature while your AI agents handle the grunt work.</p><p>The new room is a solo builder in Lisbon with three SaaS products, no investors, and more monthly revenue than most Series A companies.</p><p>The new room is someone who never went to Stanford, never worked at Google, never got invited to a single VC dinner, but who understands how to use AI tools so well that they’re outpacing teams of 20.</p><p>This isn’t just a tech story. It’s a power story.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ELY900XnakPqCla-KXCYOQ.jpeg" /></figure><p>The old room concentrated power in institutions. You needed the institution: the company, the fund, the network, to do anything meaningful. The new room distributes power to individuals. You don’t need permission. You don’t need a warm intro. You don’t need to be in San Francisco.</p><p>You need a laptop, an internet connection, and the ability to learn fast.</p><p>That’s it. That’s the room.</p><h3>What This Actually Means</h3><p>I’m not saying networking is dead. Relationships still matter. Being around smart people still accelerates your thinking. But the <strong>function</strong> of the room has changed.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*B5RWzoxUPce5rhy8fABvNA.jpeg" /></figure><p>Here’s what I think this means practically:</p><h4>Stop optimizing for proximity to power. Start optimizing for personal leverage.</h4><p>Every hour you spend trying to get into someone’s inner circle is an hour you could spend building something that generates its own gravity. Build something good enough and the room comes to you.</p><h4>Learn the tools, not just the theory.</h4><p>The gap right now isn’t between people who “understand AI” and people who don’t. It’s between people who are actively <strong>using</strong> AI to multiply their output and people who are still doing everything manually. That gap is going to become a canyon.</p><h4>Rethink what “team” means.</h4><p>You don’t need to hire 10 people. You might need 2 people and 8 AI agents. The most effective teams in 2026 are small, fast, and AI-augmented. The bloated 50-person startup is becoming a liability, not an asset.</p><h4>The credential game is dying.</h4><p>Nobody cares about your MBA when a 22-year-old with Claude and Cursor is shipping better products than your entire department. The market is starting to reward output over credentials, building over belonging.</p><p>This is the best time in human history to be alive. The barriers are gone. The tools are here. The room is wherever you are.</p><p>The question isn’t whether the right room has changed. It has.</p><p>The question is whether you’re going to keep trying to get into the old one, or start building the new one.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=878fa3dbc4a6" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Setup an AWS Application Load Balancer with EC2 instances using Terraform]]></title>
            <link>https://medium.com/@ziyankarmali/setup-an-aws-application-load-balancer-with-ec2-instances-using-terraform-466f8d430824?source=rss-7b0167d6d3b1------2</link>
            <guid isPermaLink="false">https://medium.com/p/466f8d430824</guid>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[ec2]]></category>
            <category><![CDATA[terraform]]></category>
            <category><![CDATA[load-balancing]]></category>
            <dc:creator><![CDATA[Ziyan Karmali]]></dc:creator>
            <pubDate>Fri, 23 Aug 2024 18:54:05 GMT</pubDate>
            <atom:updated>2024-09-01T05:58:53.277Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zV2EJx9HWIqEe2EHhrQRYg.png" /></figure><p>In this article, we’ll walk through the step-by-step process of using Terraform to set up an AWS Application Load Balancer with EC2 instances. Whether you’re new to Terraform or looking to refine your cloud infrastructure practices, this guide will help you build a robust and scalable environment for your applications.</p><p>Start by defining the provider used, in our case AWS</p><pre>terraform {<br>  required_providers {<br>    aws = {<br>      source  = &quot;hashicorp/aws&quot;<br>      version = &quot;~&gt; 3.0&quot;<br>    }<br>  }<br>}<br><br>provider &quot;aws&quot; {<br>  region = &quot;ap-south-1&quot;<br>}</pre><p>We use two variables in this process to define the EC2 instance type and the AMI used</p><pre>variable &quot;ec2_instance_type&quot; {<br>  description = &quot;Value of the instance type used for EC2&quot;<br>  type        = string<br>}<br><br>variable &quot;ec2_ami&quot; {<br>  description = &quot;Value of the AMI used&quot;<br>  type        = string<br>}</pre><p>Let’s create the 2 EC2 instances that will serve our traffic</p><pre># EC2 instance<br>resource &quot;aws_instance&quot; &quot;instance_1&quot; {<br>  ami             = var.ec2_ami<br>  instance_type   = var.ec2_instance_type<br>  security_groups = [&quot;${aws_security_group.instance_sg.name}&quot;]<br>  tags = {<br>    Name = &quot;Instance-1&quot;<br>  }<br>  user_data = file(&quot;${path.module}/ec2-script.sh&quot;)<br>}<br><br># EC2 instance<br>resource &quot;aws_instance&quot; &quot;instance_2&quot; {<br>  ami             = var.ec2_ami<br>  instance_type   = var.ec2_instance_type<br>  security_groups = [&quot;${aws_security_group.instance_sg.name}&quot;]<br>  tags = {<br>    Name = &quot;Instance-2&quot;<br>  }<br>  user_data = file(&quot;${path.module}/ec2-script.sh&quot;)<br>}</pre><p>For demo purposes, here is the “ec2-script.sh” that we can use to serve sample http traffic</p><pre>#!bin/bash<br>yum update -y<br>yum install -y httpd<br>systemctl start httpd<br>systemctl enable httpd<br>echo &quot;&lt;h1&gt;Hello World from $(hostname -f)&lt;/h1&gt;&quot; &gt; /var/www/html/index.html</pre><p>For the security groups, we don’t want to allow anyone to access the EC2 instances directly. This is a potential security risk for our application.</p><p>Instead of providing the <em>cidr_blocks, </em>we have to<em> </em>add a <em>security_groups</em> field and provided the id of the ALB security group created so only requests from the ALB are allowed as inbound traffic.</p><pre># Security group for the ALB<br>resource &quot;aws_security_group&quot; &quot;alb_sg&quot; {<br>  name        = &quot;alb_sg&quot;<br>  description = &quot;Allow traffic from anywhere&quot;<br><br>  ingress {<br>    description = &quot;allow HTTP from everywhere&quot;<br>    from_port   = 80<br>    to_port     = 80<br>    protocol    = &quot;tcp&quot;<br>    cidr_blocks = [&quot;0.0.0.0/0&quot;]<br>  }<br><br>  egress {<br>    from_port   = 0<br>    to_port     = 0<br>    protocol    = &quot;-1&quot;<br>    cidr_blocks = [&quot;0.0.0.0/0&quot;]<br>  }<br>}<br><br># Security group for the EC2 instances<br>resource &quot;aws_security_group&quot; &quot;instance_sg&quot; {<br>  name        = &quot;instance_sg&quot;<br>  description = &quot;Allow traffic only from the &#39;alb_sg&#39; security group&quot;<br><br>  ingress {<br>    description     = &quot;Allow traffic from other security group&quot;<br>    from_port       = 80<br>    to_port         = 80<br>    protocol        = &quot;tcp&quot;<br>    # Note here that I do not add the cidr_blocks<br>    security_groups = [&quot;${aws_security_group.alb_sg.id}&quot;]<br>  }<br><br>  egress {<br>    from_port   = 0<br>    to_port     = 0<br>    protocol    = &quot;-1&quot;<br>    cidr_blocks = [&quot;0.0.0.0/0&quot;]<br>  }<br>}</pre><p>Since we will be using the default VPC provided by AWS and it’s respected subnets, we use this block of code to get the VPC ID and the Subnet IDs that will be required for the ALB setup ahead</p><pre># Get the default vpc of the AWS account<br>data &quot;aws_vpc&quot; &quot;default&quot; {<br>  default = true<br>}<br><br># Get the subnet ids associated to the VPC<br>data &quot;aws_subnet_ids&quot; &quot;subnets&quot; {<br>  vpc_id = data.aws_vpc.default.id<br>}</pre><p>Time to get started on the Application Load Balancer!</p><p>We start with defining the ALB resource as follows. We add the <em>alb_sg</em> security group here as well as the <em>subnets</em> to direct traffic in the availability zones of our default VPC.</p><pre>resource &quot;aws_lb&quot; &quot;test&quot; {<br>  name               = &quot;test-alb-tf&quot;<br>  internal           = false<br>  load_balancer_type = &quot;application&quot;<br>  security_groups    = [&quot;${aws_security_group.alb_sg.id}&quot;]<br>  subnets            = data.aws_subnet_ids.subnets.ids<br><br>  enable_deletion_protection = false<br><br>  tags = {<br>    Environment = &quot;production&quot;<br>  }<br>}</pre><p>Next we add a listener to this ALB and define a target group to which we want to point to using the ALB.</p><blockquote>Note: Here we need the VPC ID in the target group that we fetched above</blockquote><pre>resource &quot;aws_lb_listener&quot; &quot;test_listener&quot; {<br>  load_balancer_arn = aws_lb.test.arn<br>  port              = 80<br>  protocol          = &quot;HTTP&quot;<br><br>  default_action {<br>    type             = &quot;forward&quot;<br>    target_group_arn = aws_lb_target_group.test.arn<br>  }<br>}<br><br>resource &quot;aws_lb_target_group&quot; &quot;test&quot; {<br>  name     = &quot;test-lb-target-group-tf&quot;<br>  port     = 80<br>  protocol = &quot;HTTP&quot;<br>  vpc_id   = data.aws_vpc.default.id<br><br>  health_check {<br>    interval            = 30<br>    path                = &quot;/&quot;<br>    port                = &quot;traffic-port&quot;<br>    protocol            = &quot;HTTP&quot;<br>    timeout             = 5<br>    healthy_threshold   = 5<br>    unhealthy_threshold = 2<br>  }<br><br>  tags = {<br>    Environment = &quot;production&quot;<br>  }<br>}</pre><p>We attach our 2 EC2 instances to this target group using the <em>aws_lb_target_group_attachment</em></p><pre>resource &quot;aws_lb_target_group_attachment&quot; &quot;instance1_attachment&quot; {<br>  target_group_arn = aws_lb_target_group.test.arn<br>  target_id        = aws_instance.instance_1.id<br>  port             = 80<br>}<br><br>resource &quot;aws_lb_target_group_attachment&quot; &quot;instance2_attachment&quot; {<br>  target_group_arn = aws_lb_target_group.test.arn<br>  target_id        = aws_instance.instance_2.id<br>  port             = 80<br>}</pre><p>Finally we add an output variable to our configuration to get the <strong>DNS URL</strong> of the ALB that we just created</p><pre>output &quot;aws_lb_dns_name&quot; {<br>  description = &quot;DNS URL of the ALB created on AWS&quot;<br>  value       = aws_lb.test.dns_name<br>}</pre><p>And that was the final step! We have finished the configuration required to setup everything. Go ahead and run the <strong>terraform apply</strong> command see the magic happen.</p><p>Link to <a href="https://github.com/ZiyanK/AWS-ALB">code repository</a></p><h4><strong>Conclusion</strong></h4><p>Setting up an AWS Application Load Balancer (ALB) with EC2 instances using Terraform offers a scalable, reliable, and automated solution for managing your cloud infrastructure. By leveraging Terraform, you can easily define, provision, and manage your ALB and EC2 instances as code, ensuring consistency and reducing the potential for manual errors. This approach not only simplifies the deployment process but also enables seamless updates and scaling as your application demands grow.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=466f8d430824" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Setup a Kubernetes Cluster on AWS EC2 with just 1 command]]></title>
            <link>https://medium.com/@ziyankarmali/setup-a-kubernetes-cluster-on-aws-ec2-with-just-1-command-43ed1a66a8b8?source=rss-7b0167d6d3b1------2</link>
            <guid isPermaLink="false">https://medium.com/p/43ed1a66a8b8</guid>
            <category><![CDATA[terraform]]></category>
            <category><![CDATA[bash]]></category>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[containers]]></category>
            <category><![CDATA[automation]]></category>
            <dc:creator><![CDATA[Ziyan Karmali]]></dc:creator>
            <pubDate>Fri, 23 Aug 2024 08:17:12 GMT</pubDate>
            <atom:updated>2024-08-24T05:59:37.675Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yAKkee1eAJ_CSb1YD5FkfA.png" /></figure><p>I’ve been learning Kubernetes for some time now and use an AWS account to run experiments and implement what I know. But it isn’t very pleasant to set up multiple EC2 instances, install Kubernetes, and then have to connect them. I wanted to set up my k8s cluster with minimal effort running just a few commands. In this case, just <strong>ONE</strong>.</p><blockquote>P<a href="https://www.google.com/search?client=safari&amp;rls=en&amp;q=prerequisite&amp;ie=UTF-8&amp;oe=UTF-8">rerequisite</a>s: Your AWS credentials should be configured before running these steps and you should have <strong>terraform</strong> installed.</blockquote><p>You can do this by cloning the given <a href="https://github.com/ZiyanK/k8s-aws-1-command-deploy">git repository</a> and running the given bash script</p><pre>git clone https://github.com/ZiyanK/k8s-aws-1-command-deploy<br>cd k8s-aws-1-command-deploy<br>./main.sh</pre><blockquote>Note: I create a ssh key with an empty passphrase at the start of the script to access the EC2 instances. Please change this according to your requirements if needed.</blockquote><h3>How did I go about setting this up</h3><p>I started by learning how I can use Terraform to build my infrastructure. I wanted 3 EC2 instances, 2 security groups (1 for the control plane and another for the worker nodes) and a key pair to get access to the instances. I was okay with using the default VPC provided by AWS since this was an experimentation cluster.</p><p>I created a simple terraform file that created just 2 instances (one for the control plane and another for a worker node) and 1 security group which I used for both instances. I also had to create a key pair to access the instances. This is what it looked like</p><pre>terraform {<br>  required_providers {<br>    aws = {<br>      source  = &quot;hashicorp/aws&quot;<br>      version = &quot;~&gt; 3.0&quot;<br>    }<br>  }<br>}<br><br>provider &quot;aws&quot; {<br>  region = &quot;ap-south-1&quot;<br>}<br><br># Creating key-pair on AWS using SSH-public key<br>resource &quot;aws_key_pair&quot; &quot;deployer&quot; {<br>  key_name   = &quot;aws-ec2&quot;<br>  public_key = file(&quot;${path.module}/aws-ec2.pub&quot;)<br>}<br><br><br>resource &quot;aws_instance&quot; &quot;control-plane&quot; {<br>  ami             = &quot;ami-0522ab6e1ddcc7055&quot;<br>  instance_type   = &quot;t2.micro&quot;<br>  security_groups = [&quot;${aws_security_group.k8s-sg.name}&quot;]<br>  key_name        = aws_key_pair.deployer.key_name<br>  tags = {<br>    Name = &quot;Control-plane&quot;<br>  }<br>}<br><br>resource &quot;aws_instance&quot; &quot;worker-1&quot; {<br>  ami             = &quot;ami-0522ab6e1ddcc7055&quot;<br>  instance_type   = &quot;t2.micro&quot;<br>  security_groups = [&quot;${aws_security_group.k8s-sg.name}&quot;]<br>  key_name        = aws_key_pair.deployer.key_name<br>  tags = {<br>    Name = &quot;worker-1&quot;<br>  }<br>}<br><br>resource &quot;aws_security_group&quot; &quot;k8s-sg&quot; {<br>  name        = &quot;k8s-sg&quot;<br>  description = &quot;Allow k8s traffic&quot;<br><br>  ingress {<br>    description = &quot;SSH ingress&quot;<br>    from_port   = 22<br>    to_port     = 22<br>    protocol    = &quot;tcp&quot;<br>    cidr_blocks = [&quot;0.0.0.0/0&quot;]<br>  }<br><br>  ingress {<br>    description = &quot;Allow all traffic&quot;<br>    from_port   = 0<br>    to_port     = 0<br>    protocol    = &quot;tcp&quot;<br>    cidr_blocks = [&quot;0.0.0.0/0&quot;]<br>  }<br><br>  egress {<br>    description = &quot;Allow all traffic&quot;<br>    from_port   = 0<br>    to_port     = 0<br>    protocol    = &quot;-1&quot;<br>    cidr_blocks = [&quot;0.0.0.0/0&quot;]<br>  }<br>}</pre><p>I created an SSH key in the same directory with the name “aws-ec2” since this is what I defined in the terraform config.<br>I ran this and voila! We have 2 instances and a security group along with a key to access it ready to go.</p><h3><strong>Script to setup the EC2 instances</strong></h3><p>I knew I needed 2 separate scripts to set up the control plane node and the worker nodes so I followed the Kubernetes documentation and a few other articles that I usually refer to. I used <strong>containerd</strong> as the container runtime. I started with installing containerd, installing other required packages like curl, and then installed kubeadm, kubelet and kubectl. These steps were common for both the control plane and the worker nodes.</p><p>Once these steps are done, on the control plane, I initialize the Kubernetes cluster by running</p><pre>sudo kubeadm init</pre><p>I go on to copy the Kubernetes config files to the .kube directory as suggested by Kubernetes and give the user permission to access it.</p><p>To check if everything is running well,</p><pre>kubectl get pod -A</pre><h4>Fix the cluster</h4><p>If you’re cluster is running well, congratulations! In my case, it didn’t and this was the further configuration required.</p><p>For containerd, there is some additional setup required which is mentioned in their installation regarding the <a href="https://github.com/containerd/containerd/blob/main/docs/cri/config.md#cgroup-driver">Cgroup Driver</a>. Since I wanted to set up my k8s cluster using just 1 command, I used <strong>sed </strong>to perform the updates required. This is the command I used</p><pre>sed -i -e &#39;s/SystemdCgroup = false/SystemdCgroup = true/g&#39; &quot;/etc/containerd/config.toml&quot;</pre><p>After restarting containerd and kubelet, everything should be working as expected.</p><p>After following a similar process for the worker nodes, I came up with the two scripts I required to set up a <a href="https://github.com/ZiyanK/k8s-aws-1-command-deploy/blob/main/setup-control-plane.sh">control-plane</a> and a <a href="https://github.com/ZiyanK/k8s-aws-1-command-deploy/blob/main/setup-worker.sh">worker node</a>. (Linked to their respective scripts)</p><h3>Script to run them all</h3><p>Everything was setup individually but I needed 1 final script to run them all. The actions I needed to perform:</p><ol><li>Setup a new SSH key</li><li>Apply the terraform code to AWS</li><li>Setup the control plane and get the join command</li><li>Setup the worker nodes and run the join command on the respective nodes</li></ol><p>Once this script was working, I improved the terraform code to add variables, and 2 different security groups for the instances along with defining the appropriate rules required and adding the necessary description. I also refined the scripts written to add some more clarity.</p><h3>Conclusion</h3><p>I am sure this process can be improved, but it does the job for now! I would highly appreciate feedback from anyone on how I can make this better. I enjoyed doing this small project as it provided a great learning experience. I gained valuable insights into Infrastructure as Code, explored various Linux commands, and honed my skills in writing bash scripts, which saved me ample time. I’m excited to continue refining my approach and writing more scripts to help me and anyone out there!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=43ed1a66a8b8" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Using gRPC with microservices in Nodejs]]></title>
            <link>https://medium.com/@ziyankarmali/using-grpc-with-microservices-in-nodejs-9aa226135102?source=rss-7b0167d6d3b1------2</link>
            <guid isPermaLink="false">https://medium.com/p/9aa226135102</guid>
            <category><![CDATA[microservices]]></category>
            <category><![CDATA[nodejs]]></category>
            <category><![CDATA[grpc]]></category>
            <category><![CDATA[node-js-tutorial]]></category>
            <dc:creator><![CDATA[Ziyan Karmali]]></dc:creator>
            <pubDate>Thu, 12 Jan 2023 14:27:19 GMT</pubDate>
            <atom:updated>2023-01-12T14:27:19.724Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EMk4ya67vCfpKoklVMSVgw.png" /></figure><p>When I started using gRPC in Nodejs, I wanted a way to have all my proto files in one place rather than copying it into every microservice. It would also require the hassle of updating at multiple places for every small change. <em>Hopefully this article will save your time!</em></p><p>In this short read, I will demonstrate a simple way to isolate your proto files and use it across multiple nodejs microservices. This will prevent duplication of your proto files in multiple services.</p><h3>What is gRPC?</h3><p>gRPC is a new technology here for building APIs to achieve high load time and fast network latency. It is based in HTTP/2 that is used for client-server and duplex streaming of data, and this data streaming is highly efficient because of the use of protocol buffers.</p><h3>What are proto files?</h3><p>Proto files contain the RPC services and the data types the services are going to accept and return. A proto file is always followed with .proto extension. <br>Example:</p><pre>syntax = &quot;proto3&quot;;<br><br>service UserService {<br>    rpc createUser(CreateUserRequest) returns (Response) {}<br>}<br><br>message CreateUserRequest {<br>    string first_name = 1;<br>    string last_name = 2;<br>    string email = 3;<br>    int64 age = 4;<br>}<br><br>message Response {<br>    bool success = 1;<br>}</pre><h3>The architecture</h3><p>Create a new repository and create an index.js file and paste the following code</p><pre>const fs = require(&quot;fs&quot;);<br>const path = __dirname;<br>let directoryPaths = [];<br><br>fs.readdir(&quot;./&quot;, { withFileTypes: true }, (error, files) =&gt; {<br>  if (error) throw error;<br>  directoryPaths = files<br>    .filter((item) =&gt; item.isDirectory())<br>    .map((item) =&gt; `${path}/${item.name}`);<br>});<br><br>module.exports = directoryPaths;</pre><p>Now you can create folders inside this repository and make your proto files within the respective folders. It is preferable to do this rather than have all your proto files in your root folder to improve readability.</p><p>In your microservice, create a file called <strong>protoOptions.js </strong>and paste the following code</p><pre>const PROTO_PATHS = require(&quot;../cadence-proto/index&quot;);<br><br>module.exports = {<br>  keepCase: true,<br>  longs: String,<br>  enums: String,<br>  defaults: true,<br>  oneofs: true,<br>  includeDirs: PROTO_PATHS,<br>};</pre><p>This will get the paths of all the directories in which your proto files are present and pass them into the <strong>includeDirs</strong> variable.</p><blockquote>Note: You could also directly pass this into your proto options but I prefer have this in one file and importing it everywhere.</blockquote><p>Now, wherever you load your package definitions, pass the same options as used above.</p><pre>const grpc = require(&quot;@grpc/grpc-js&quot;);<br>const protoLoader = require(&quot;@grpc/proto-loader&quot;);<br>const options = require(&quot;./protoOptions&quot;);<br><br>const services = require(&quot;../services/user&quot;);<br><br>const PROTO_FILE = &quot;user.proto&quot;;<br><br>const pkgDef = protoLoader.loadSync(PROTO_FILE, options);<br>const proto = grpc.loadPackageDefinition(pkgDef);<br><br>global.grpcServer.addService(proto.UserService.service, services);</pre><p>You can use a similar approach for all your microservices and <em>voila, you have a working microservice architecture following the principle of DRY.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9aa226135102" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to make a Connected App in Salesforce]]></title>
            <link>https://medium.com/@ziyankarmali/how-to-make-a-connected-app-in-salesforce-45e5000845e6?source=rss-7b0167d6d3b1------2</link>
            <guid isPermaLink="false">https://medium.com/p/45e5000845e6</guid>
            <category><![CDATA[connected-app-salesforce]]></category>
            <category><![CDATA[salesforce-development]]></category>
            <category><![CDATA[salesforce]]></category>
            <category><![CDATA[oauth]]></category>
            <dc:creator><![CDATA[Ziyan Karmali]]></dc:creator>
            <pubDate>Thu, 08 Dec 2022 08:02:40 GMT</pubDate>
            <atom:updated>2022-12-08T08:02:40.575Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/440/1*G3upPcSBmr27ndaNLR9hxw.png" /><figcaption>Salesforce logo</figcaption></figure><p>Salesforce is one of the most widely used CRMs across the world. It is used by small, mid and large scale companies to manage their client data. This article will give you a step by step guide on how to make a Connected App in Salesforce.</p><h3>What is a CRM?</h3><p>CRM stands for “Customer Relationship Management” which is a software that helps companies or business owners keep track of their clients and potential leads data. It stores the data of the people, any communication that takes place amongst the sales team and the client making it organised and efficient.</p><h3>What is a Connected App?</h3><p>A connected app is used to allow external applications to connect to salesforce and make various tools that would link to your CRM. It is used to enable OAuth connections as well allowing certain data to be access from the CRM to improve workflows or enabling performant applications to integrate with your account.</p><h3>Steps to make a Connected App in Salesforce</h3><ol><li>Go to the top right corner and click on “Settings”. Once the drop down appears, click on “Setup”</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/315/1*GLZd7mGTrwqv6Fsyqnw7tg.png" /></figure><p>2. On the top left, in the quick find, search for “App Manager”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/341/1*7ubNx1BXxoNK9NnHT7rJrw.png" /></figure><p>3. Once you open this page, you will see a list of all the Apps that already exist in your Salesforce account. On the top right, click on the option to create “New Connected App”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3azLvyTZdDoAcbjBG1MQbw.png" /></figure><p>4. <strong>Basic Information</strong> about your app can be entered here. While naming your app, ensure it is unique in your salesforce organization and add any information that you feel necessary.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/789/1*BiM9S4pEDWncgZApYBI67g.png" /></figure><p>5. <strong>API (Enable OAuth Settings) </strong>is to add OAuth to your app. You can add a Callback URL and define the permission scopes you would like the app to follow.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nFOieYdB5n2akGfY-XZeCg.png" /></figure><p>Note: In order to use refresh_token to generate new access tokens in the future, ensure you have added the option that says “Perform requests at any time (refresh_token, offline_access)</p><p>6. <strong>Web App Settings </strong>can be used to add a personal service provider and link it to your Salesforce organization.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/752/1*A2qYkMdS0m8DPuPr6p_CSA.png" /></figure><p>7. <strong>Mobile App Settings</strong> can be used to enable OAuth for your mobile applications. Simply enter the start URL, the device, and also enable push messaging services in this setting.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/759/1*ZM77FyzZjR6_wi5W-5v5Yg.png" /></figure><p>8. When you have finished configuring your name, click on <strong>Save</strong>.</p><p>9. In order to get the client_id and client_secret of the app, you can click on the button “Manage Consumer Details”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/949/1*Rsqv7GAYxxCMGNIImTnLtQ.png" /></figure><p>You would receive a security code for verifying the user on your registered email. Once entered, you are redirect to another page to view the Consumer Key and Consumer Secret.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/931/1*M1Dl2HluGkr2j0RD8spvXw.png" /></figure><p>Now you can use these keys to perform Salesforce OAuth in your custom application and get access to organization data.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=45e5000845e6" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Introduction to Neural Networks]]></title>
            <link>https://medium.com/techloop/introduction-to-neural-networks-f1d14767e0c4?source=rss-7b0167d6d3b1------2</link>
            <guid isPermaLink="false">https://medium.com/p/f1d14767e0c4</guid>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[neural-networks]]></category>
            <category><![CDATA[aritificial-intelligence]]></category>
            <category><![CDATA[deep-learning]]></category>
            <dc:creator><![CDATA[Ziyan Karmali]]></dc:creator>
            <pubDate>Wed, 01 Apr 2020 11:13:20 GMT</pubDate>
            <atom:updated>2020-04-07T15:10:02.485Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-szGPYMktU4gEfP2M-AcXw.jpeg" /></figure><p>Wouldn’t it be cool if we could somehow mimic the human brain, figure out the basic concept of how and what all processes are being done inside it and somehow make a machine understand how to think like a human? All of us have definitely seen some movies or read about machines evolving to this whole other level where they can be exactly like humans and are able to do everything at a faster rate. But people often get confused between Artificial Intelligence, Machine Learning and Deep Learning.</p><p>There is a difference between artificial intelligence, deep learning and machine learning.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*o-LaVPlmduMxavlHfGo7og.jpeg" /></figure><ul><li>Artificial intelligence essentially comprises of any effort which enables machines to mimic human intelligence.</li><li>Machine learning is a process of teaching a computer system how to make accurate predictions on certain data without explicitly being programmed to do so.</li><li>Deep learning is a machine learning technique which is inspired from the human brain done using the help of neural networks.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5DFG8xJOgvFwH-B_jPCvJQ.jpeg" /><figcaption>The human brain</figcaption></figure><p>The human brain consists of about 100 billion neurons which are interconnected to each other. Each neuron is connected up to around 10,000 other neurons and all these neurons together form a neural network. They receive an input, process certain information and then feed out an output which is then sent to the rest of the neurons it is connected to.</p><p>Artificial Neural Networks or ANNs recreate the human brain imitating the structure of the neural network to process information which therefore results in a greater accuracy compared to other models and can become more efficient if they can understand how to solve problems possibly even unknown to humans.</p><h3>So what does the structure of a neuron in an ANN look like?</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/937/1*3sJmdX9JdY4117lXtFsVvg.png" /><figcaption>Structure of a neuron</figcaption></figure><p>As we can see, there are various input parameters which can be called <strong>independent variables</strong> and they are all connected to the neuron using synapses (each having their own weight) which pass the signals to the neuron. And then the neuron has an output value.</p><p>All the input variables (in yellow) are all for a single observation in your data-set so that you can think of it as a single row in your database. For example it can consist of the age of the person, the amount of money in the bank account, how do they get to work, etc. So it’s all related to the information of one person.</p><p>The output value which we receive from the neuron can be of various types such as it can be continuous (eg. Price), binary (i.e. yes/no) or it can also be categorical variable (there will be multiple output variables in this and not just one).</p><p>The neuron, as we know, is the basic and most crucial building block of the network. Here is what a neuron does.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/659/1*Yf6BWJq0kdHTumErO99bUQ.jpeg" /><figcaption><a href="http://cs231n.github.io/neural-networks-1/">Source</a></figcaption></figure><p>Let x0, x1 and x2 be the independent variable and w0, w1 and w2 be the weights assigned to the respective synapses. The neuron computes the sum of all the independent variables with their respective weights and a bias (constant value) is added to the weighted sum. The bias is used to adjust the output with the sum to get the best model fit for the data. The final computed value is then passed into an activation function which then gives an output.</p><h3>Why do we require activation functions?</h3><p>An activation function is used to introduce non-linear properties to the network. Now you might me wondering why we do we require non-linearity in the neural network?</p><p>A neural network without an activation function simply acts as a <a href="https://medium.com/techloop/linear-regression-part-1-fbfb43b96249"><strong><em>linear regression model</em></strong></a>. The activation function does the non-linear transformation of the data to make the model capable of learning complex tasks and functions. And without the activation function, we would not be able to learn complicated data such as images, videos, audio, speech, etc. This is the reason we require neural networks to understand and learn complicated, high dimensional and non-linear data-sets with a lot of hidden layers to help get a better result.</p><p>Now there are various types of activation functions but the most popularly used ones are:</p><p><strong>Sigmoid Function:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UoiSSQz7lA89Tz0Vnx6MuA.png" /></figure><p>The function used in this method can be seen in the top right corner of the above image where x is the value of the weighted sum. The reason this function is important is because it has a smooth curve (s-shaped) unlike the threshold function. As the value drops below 0, the output approximates to 0 and the higher the value, it approximates to 1. This function is very useful in the final layer to predict probabilities.</p><p><strong>ReLU (Rectified Linear Unit):</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CYlx_R0s1fZm65_BZwXwcA.png" /></figure><p>As we can clearly see from the graph, anything value before 0 results in the output to be 0 and from there it gradually progresses same as the input value i.e. the weighted sum.</p><h3><strong>Neural Networks</strong></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/760/1*0TUtOl9cFJGXpD78oOJ8_Q.png" /><figcaption>Basic Neural Network</figcaption></figure><p>A neural network is made by connecting all the neurons present in various layers as seen in the diagram. All the neurons in each layer are connected to all the neurons in the adjacent layers and each connection (synapse) has a weight assigned to it. Each neuron carry out all the processes explained above and pass on the output to the next layer.</p><p>The first layer in the neural network is always the<strong> input layer</strong>. This is where we feed the data into the network.</p><p>The last layer in the neural network is called the <strong>output layer</strong>. The output from the last hidden layer is brought together to give the output of the information required.</p><p>In the middle of the input layer and the output layer are present the <strong>hidden layers</strong>. This is where the processing of the data takes place. There can be multiple hidden layers and there is simply no limit to the number of hidden layers which can be added to the network. The weights and values are multiplied along with a bias to be added, go through the activation function and passed on to the neurons of the next hidden layer and eventually to the output layer.</p><h3>Training the Neural Network</h3><p>So now that you understand the structure of a neural network, you must be wondering where the values of the weights and biases come from because we do not know the values required to give an accurate prediction and neither does the computer.</p><p>Initially neural networks start with random values of weights and biases. A particular input is provided, the values are passed to the hidden layer and the present untrained neural network gives a prediction of the output. This process of passing values in this order from the input layer to the output layer is known as <strong>Forward Propagation</strong>.</p><p>The output provided by the network is then compared with the output to the given data that we have and the amount of error is calculated. This is called the <strong>cost</strong> of the neural network.</p><p>The most basic cost function used is <strong>mean squared error. </strong>A general function for minimizing a function and in this case is <strong>Gradient Descent</strong>. It can be used for the mean squared error cost function. For more details on mean squared error and gradient descent can be found on <a href="https://medium.com/techloop/linear-regression-part-1-fbfb43b96249"><strong>Introduction to</strong> <strong>Machine Learning — Linear Regression</strong></a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*aIWc_3wk2thN4B2ufIps8g.png" /></figure><p>where y(hat) is the output obtained from the neural network and y is the required output.</p><h3>Back Propagation</h3><p>Our objective is to reduce the value of the cost function as much as possible in order to get a better accuracy from the network. So now since we have compared the values of y(hat) and y, we will feed these details back into the neural network and update the weights. This process is done by <strong>Back propagation</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8b_qjDwU8-5v9CN_sloXlg.png" /><figcaption>The entire process</figcaption></figure><p>Back propagation is basically the reverse of forward propagation i.e. now we feed the data from the output layer, through the hidden layer and all the way to the input layer and therefore update the weights while going through it. The weights get updated according to how much they are responsible for the error. First, the weights of the last layer get updated, followed by the second last and so on. This entire process is called <strong>one epoch</strong>. Therefore in order to train the model, you would have to let a certain number of epochs to get the optimized weights which shall give the best prediction.</p><p>In this way our model gets trained and we can get a good accuracy/prediction of the data-set and we can make predictions using this model for other data as well.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hWy7UYX9o-3sHmwQltkiaw.jpeg" /></figure><p>So we have just talked about how a neural network works and the processes involved in creating an algorithm to learn from data provided by us and to make accurate predictions of the unseen data. But it does not stop here. There are various kinds of neural networks that exist. A few of these neural networks are Recurrent Neural Network (RNN) comprising of LSTM and GRU, Convolutional Neural Network (CNN), Generative adversarial networks (GAN) and a lot more. Each of these have a specific function or feature which help you build a model to perform a variety of tasks such as face recognition, sentiment analysis, activity detection, autonomous driving, speech recognition, and much more. It is even being used in the medical field to detect tumors and various diseases. The applications are endless…</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f1d14767e0c4" width="1" height="1" alt=""><hr><p><a href="https://medium.com/techloop/introduction-to-neural-networks-f1d14767e0c4">Introduction to Neural Networks</a> was originally published in <a href="https://medium.com/techloop">Techloop</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[What is GoLang and how to install it!]]></title>
            <link>https://medium.com/@ziyankarmali/what-is-golang-and-how-to-install-it-4ef0f3a867ee?source=rss-7b0167d6d3b1------2</link>
            <guid isPermaLink="false">https://medium.com/p/4ef0f3a867ee</guid>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[google]]></category>
            <category><![CDATA[go]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[golang]]></category>
            <dc:creator><![CDATA[Ziyan Karmali]]></dc:creator>
            <pubDate>Wed, 13 Nov 2019 16:05:42 GMT</pubDate>
            <atom:updated>2021-01-20T14:35:26.736Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3UehuW71Q2S5PSej_6Oz8Q.png" /></figure><h3><strong>What is Go or Golang?</strong></h3><p>Go is a programming language created by Google. It was launched in the year 2009 and it has already been an entire decade. In layman’s terms, it’s basically a statically typed open source programming language. It is a general-purpose programming language which means which basically means you can do anything and almost everything in Golang. The main aim of creating Go was that it can build binaries across various platforms with a single code base.</p><p>For those of you who don’t know what a statically typed language is, there are essentially two types of languages:</p><ul><li><strong>Statically typed</strong>- those in which the type checking is done at compile type.</li><li><strong>Dynamically typed</strong>- those in which type checking is done at run-time.</li></ul><h3><strong>But why Go?</strong></h3><ul><li>Concurrency</li><li>Fast compile time</li><li>Good built-in libraries</li><li>Better use of multi-core processors</li><li>Strong security built-in</li><li>Garbage collection</li></ul><blockquote><em>“Go’s purpose is therefore not to do research into programming language design; it is to improve the working environment for its designers and their coworkers. Go is more about software engineering than programming language research. Or to rephrase, it is about language design in the service of software engineering</em>.” <strong><em>— Rob Pike(creator of Go)</em></strong></blockquote><h3><strong>What can it be used for?</strong></h3><p>Literally ANYTHING. Go was made to do all the things that you would want to do and even more…</p><ul><li>Web Development</li><li>Mobile App Development</li><li>Creating Microservices</li><li>Server Deployment</li><li>Dev-Ops</li><li>Cloud Computing</li><li>Building IDE’s and desktop applications</li></ul><h3>Which companies are using Go right now?</h3><ul><li>Google</li><li>Uber</li><li>Medium</li><li>Twitch</li><li>Sendgrid</li></ul><p>And many more.</p><h3>How to install Go</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*f_ecuSysW05mCjiTHpb6KQ.png" /></figure><h3>For Linux users:</h3><p>Open up your terminal and run the following commands:</p><pre>sudo apt-get update</pre><pre>wget <a href="https://golang.org/dl/go1.15.7.linux-amd64.tar.gz">https://dl.google.com/go/go1.15.7.linux-amd64.tar.gz</a></pre><p>If you get an error that says ‘wget not found’ then simply install wget by running the following command:</p><pre>sudo apt install wget</pre><p>After successfully downloading this, run this command in your terminal:</p><pre>sudo tar -C /usr/local -xvf go1.15.7.linux-amd64.tar.gz</pre><p>Now to run Go directly from the terminal, you need to export the path. To do this run the given commands:</p><pre>sudo vi ~/.profile</pre><pre>PATH=&quot;$PATH:/usr/local/go/bin&quot;</pre><p>Save and close the file. Run this command in the terminal once done.</p><pre>source ~/.profile</pre><pre>go version</pre><p>You should get the following output:</p><pre>go version go1.13.4 linux/amd64</pre><p>You have successfully installed Go for Linux.</p><h3>For Windows users:</h3><p><a href="https://dl.google.com/go/go1.13.4.windows-amd64.msi">Click here</a> to get the download link for Go for windows.</p><p>Run the file and the setup procedure for it is very intuitive. It will successfully install and will mostly automatically add it to your path.</p><p>Run the command to check if it is working correctly:</p><pre>go version</pre><p>If you receive an error, it’s probably because it has not been added to your path. To add it, follow these simple steps:</p><ul><li>Right-click on My PC and select properties.</li><li>Click on Advanced System Settings, go to the advanced option, and click on Environment variables.</li><li>Under System variables, click on Path and then select the edit option</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/566/1*DC2uXS4zX6TLYOffh38xGQ.png" /></figure><ul><li>Click on New and add the following line</li></ul><pre>C:\go\bin</pre><p>If your go folder is located elsewhere then copy the location and paste it here and add ‘\bin’ to it.</p><ul><li>Click OK. And then add a new User Variable</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/595/1*ghc4_USl8Edsp8_xs90PXQ.png" /></figure><ul><li>And you’re all done.</li></ul><p>Go to the command prompt and type go version and it should be working!</p><h3>For MAC OS:</h3><p><a href="https://dl.google.com/go/go1.13.4.darwin-amd64.pkg">Click here</a> to download the latest version of Go for macOS.</p><p>Run through the installation after downloading the file and install it successfully.</p><p>Edit the ~/.bash_profile or ~/.profile file (or its equivalent) to set environment variables. Commonly you need to set 3 environment variables as <strong>GOROOT</strong>, <strong>GOPATH,</strong> and <strong>PATH</strong>.</p><p><strong>GOROOT</strong> is the location where the Go package is installed on your system.</p><pre>$ export GOROOT=/usr/local/go</pre><p><strong>GOPATH</strong> is the location of your work directory. For example, my project directory is <strong>~/Projects/Proj1</strong>.</p><pre>$ export GOPATH=$HOME/Projects/Proj1</pre><p>Now set the <strong>PATH</strong> variable to access go binary system-wide.</p><pre>$ export PATH=$GOPATH/bin:$GOROOT/bin:$PATH</pre><p>And you’re all done. Test it by running the command</p><pre>$ go version</pre><pre>go version go1.13.4 darwin/amd64</pre><h3>Conclusion</h3><p>Go is one of the various upcoming languages and is gaining a lot of attention. This language can be your one-stop-shop for everything there is you might be looking for. Master all the domains by mastering just one language.</p><p>Go, is the way to go!</p><figure><a href="https://usejournal.com/?utm_source=medium.com&amp;utm_medium=noteworthy_blog&amp;utm_campaign=tech&amp;utm_content=guest_post_image"><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PYxBP_WV7LI6zc-zdUkNqQ.png" /></a></figure><p>📝 Read this story later in <a href="https://usejournal.com/?utm_source=medium.com&amp;utm_medium=noteworthy_blog&amp;utm_campaign=tech&amp;utm_content=guest_post_read_later_text">Journal</a>.</p><p>👩‍💻 Wake up every Sunday morning to the week’s most noteworthy stories in Tech waiting in your inbox. <a href="https://usejournal.com/newsletter/noteworthy-in-tech/?utm_source=medium.com&amp;utm_medium=noteworthy_blog&amp;utm_campaign=tech&amp;utm_content=guest_post_text">Read the Noteworthy in Tech newsletter</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4ef0f3a867ee" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>