<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Adarsh Menon</title>
    <description>The latest articles on DEV Community by Adarsh Menon (@adarsh_menon_).</description>
    <link>https://dev.to/adarsh_menon_</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F445292%2F7e8c8b84-19a7-4a21-bebd-015687d09bfc.jpg</url>
      <title>DEV Community: Adarsh Menon</title>
      <link>https://dev.to/adarsh_menon_</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/adarsh_menon_"/>
    <language>en</language>
    <item>
      <title>Resources to become a better Software Engineer</title>
      <dc:creator>Adarsh Menon</dc:creator>
      <pubDate>Sun, 19 Sep 2021 15:16:13 +0000</pubDate>
      <link>https://dev.to/adarsh_menon_/resources-to-become-a-better-software-engineer-23ji</link>
      <guid>https://dev.to/adarsh_menon_/resources-to-become-a-better-software-engineer-23ji</guid>
      <description>&lt;p&gt;There is so much information out there today, that it has become almost impossible to differentiate between signal and noise.&lt;/p&gt;

&lt;p&gt;Our brains are great at making connections - the quality of these connections depends upon the information we feed it. Garbage in, garbage out.&lt;/p&gt;

&lt;p&gt;So it is extremely important to consume quality information and learn from the best - not just for engineering, but for everything that you are trying to learn. In this post I am sharing a few resources that have helped me become a better engineer.&lt;/p&gt;

&lt;h2&gt;
  
  
  Books
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;A Philosophy of Software Design by John Ousterhout&lt;br&gt;
This is one of my favourite books on software engineering. It talks about breaking down complexity in the context of software engineering - which is exactly what we do on a daily basis. It introduces quite a few concepts and patterns that can really help you avoid costly mistakes.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The Pragmatic Programmer by Andy Hunt and Dave Thomas&lt;br&gt;
This is one of the most popular books on programming and can be considered as a guide for anyone who is starting out in the field. Like the name suggests, it talks about low level concepts that you can apply right away to improve your programming skills.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Head First Design Patterns by Elisabeth Freeman and Kathy Sierra&lt;br&gt;
This is very useful if you are working with Java and explains when to use what pattern, with real world examples. Knowing these patterns and understanding when to apply them correctly can really help you become a better engineer and avoid costly mistakes.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Clean Code by Robert C. Martin&lt;br&gt;
This is a classic book and helps you recognize the common mistakes everyone makes while programming and teaches you how to write clean code. Rather than the book I prefer &lt;a href="https://www.youtube.com/playlist?list=PLdpsE-GEhYVn_81kDPo1mwE73UgYCeMLu"&gt;this youtube playlist&lt;/a&gt; where the author himself talks about a lot of the concepts covered in the book.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  YouTube Channels
&lt;/h2&gt;

&lt;p&gt;I think there are tons of good youtube channels to learn software engineering and programming from, but here are some of my favourites:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://www.youtube.com/user/Computerphile"&gt;Computerphile&lt;/a&gt; - this channel coverts topics in computer science and engineering like compilers, algorithms, cryptography, networks etc.. I love how every concept is explained by experts with detailed, easy to understand presentation.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://www.youtube.com/user/thenewboston"&gt;thenewboston&lt;/a&gt; and &lt;a href="https://www.youtube.com/c/derekbanas"&gt;Derek Banas&lt;/a&gt; - both of these are amazing channels run by amazing people for people who are looking for tutorials to follow along and learn by doing. Both of them have tutorials on multiple languages and topics.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://www.youtube.com/c/sentdex"&gt;sentdex&lt;/a&gt; - if you work with python, you have definitely watched a sentdex video at some point of time. One of the best channels for software engineers in my opinion because of the wide variety of topics covered, simplicity and detailed explanations. Lots of great series on machine learning, data science, deep learning, self driving cars, NLP, robotics and many more.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://www.youtube.com/c/TraversyMedia"&gt;Traversy Media&lt;/a&gt; and &lt;a href="https://www.youtube.com/c/WebDevSimplified"&gt;Web Dev Simplified&lt;/a&gt; - if you are interested in web development, then both of these channels can be great resources to learn about web development concepts and some beginner friendly projects to follow along. Traversy Media has a crash course on almost every framework or library available for web development.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://www.youtube.com/c/GauravSensei"&gt;Gaurav Sen&lt;/a&gt; and &lt;a href="https://www.youtube.com/c/TechDummiesNarendraL"&gt;Tech Dummies Narendra L&lt;/a&gt; - both of these are great channels to learn about system design and architecture patterns. They have detailed videos on how to design popular applications with great explanations on the concepts used and why they are important.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://www.youtube.com/channel/UC8butISFwT-Wl7EV0hUK0BQ"&gt;freeCodeCamp.org&lt;/a&gt; - this is a great channel for almost every tool and subject in software engineering with detailed tutorials from various people. Some of the videos are really long, so I recommend watching only parts that you need.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://www.youtube.com/c/TheChernoProject"&gt;The Cherno&lt;/a&gt; - if you are someone who is interested in game development, then you definitely need to check out this channel. There are tons of videos on C++ and even an on going series about the guy building his own game engine.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://www.youtube.com/c/HusseinNasser-software-engineering"&gt;Hussein Nasser&lt;/a&gt; - a great channel especially if you are interested in backend engineering. Hussein talks in detail about concepts, tools and even has tutorials that can help you become a better engineer.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;These are only some resources which I found useful with good signal to noise ratio. I have only included books and youtube channels here keeping a beginner engineer in mind. But there are tons of websites, podcasts, courses, newsletters and github repos out there with great information on software engineering.&lt;/p&gt;

&lt;p&gt;I think the the core skill for all of us to master is the ability to differentiate signal and noise. It can help us look into the right places, consume the right content from the right people - eventually leading to better connections and ideas.&lt;/p&gt;

</description>
      <category>codenewbie</category>
      <category>webdev</category>
      <category>engineering</category>
    </item>
    <item>
      <title>What tools to use for your next web based project?</title>
      <dc:creator>Adarsh Menon</dc:creator>
      <pubDate>Sun, 29 Aug 2021 11:04:01 +0000</pubDate>
      <link>https://dev.to/adarsh_menon_/what-tools-to-use-for-your-next-web-based-project-233m</link>
      <guid>https://dev.to/adarsh_menon_/what-tools-to-use-for-your-next-web-based-project-233m</guid>
      <description>&lt;p&gt;Picking the right tools is one of the most important steps to starting any project. This is also the step where most people spend a lot of time, thinking and researching about all the available tools out there.&lt;/p&gt;

&lt;h2&gt;
  
  
  You cannot predict the future
&lt;/h2&gt;

&lt;p&gt;I think the biggest challenge is making sure that the tools you pick will be able to handle your future use cases. But you cannot predict the future, and so we spend a lot of time researching every new tool out there and finally lose motivation to get started.&lt;/p&gt;

&lt;p&gt;Another issue is thinking about scaling while building an MVP. Some tools are good for high performance and scaling, but hard to work with, whereas others are easy to work with but are not as fast as other tools. But wile building an MVP or a proof of concept, the most important thing is to build something and get users to test it, rather than obsessing about that 10ms optimization.&lt;/p&gt;

&lt;h2&gt;
  
  
  A general framework
&lt;/h2&gt;

&lt;p&gt;The first step is to understand what type of project you are going to build. Is it a minimum viable product, or is it a proof of concept for some feature? Or are you going to build the final project itself?&lt;/p&gt;

&lt;p&gt;In general if you are building an MVP or PoC, just pick whatever makes life easier for you, and forget about scaling, or support for all possible future use cases. Because chances are, this will not be the final project. If things work out, you will have a second chance to rethink your choices.&lt;/p&gt;

&lt;p&gt;But if you are building the final project itself, you will need to understand the advantages and limitations of all the tools you pick. Again, you cannot predict the future, so don’t worry too much. Just set a deadline for yourself to do the research, and make your decisions within the deadline.&lt;/p&gt;

&lt;p&gt;Here are some of my go to tools, based on some use cases I have come across:&lt;/p&gt;

&lt;h3&gt;
  
  
  Design tools
&lt;/h3&gt;

&lt;p&gt;This is maybe not relevant here, but I personally like to visualize what I am about to build (at least on a piece of paper).&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.figma.com/"&gt;Figma&lt;/a&gt; is my go to tool to design anything. There are tons of other tools like &lt;a href="https://www.adobe.com/in/products/xd.html"&gt;Adobe XD&lt;/a&gt;, &lt;a href="https://www.sketch.com/"&gt;Sketch&lt;/a&gt;, &lt;a href="https://www.invisionapp.com/"&gt;InVision&lt;/a&gt;, etc.. but figma is just easy to use and collaborate.&lt;/p&gt;

&lt;p&gt;Be sure to check out wire-framing toolkits and UI toolkits available on the figma marketplace, which can save you lots of time and effort while trying to ideate on something quickly.&lt;/p&gt;

&lt;h3&gt;
  
  
  Frontend tools
&lt;/h3&gt;

&lt;p&gt;There is a new frontend tool coming out every week. So I think this selection comes down to personal preference, and just picking whatever your team is most comfortable with.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://reactjs.org/"&gt;React&lt;/a&gt; is my go-to tool for all kinds of frontend projects. Simply because I am comfortable with it, and the community is great. There is almost nothing you cannot do with it. If you are unsure, just go with React.&lt;/p&gt;

&lt;p&gt;If you are looking to build a blog, landing pages or a static website, be sure to check out &lt;a href="https://nextjs.org/"&gt;Next.js&lt;/a&gt;. It can do both server side rendering (SSR) and static site generation (SSG). Do not pick Gatsby, Next.js is much much better (from personal experience).&lt;/p&gt;

&lt;p&gt;For building the UI be sure to take advantage of available UI tools instead of building everything from scratch (although it can be a good learning exercise in CSS). Some of my favourite tools are &lt;a href="https://material-ui.com/"&gt;Material UI&lt;/a&gt; for quick development, &lt;a href="https://tailwindcss.com/"&gt;tailwind&lt;/a&gt; and &lt;a href="https://styled-components.com/"&gt;styled-components&lt;/a&gt; for more custom things. Take advantage of UI themes available for free out there.&lt;/p&gt;

&lt;p&gt;Make sure that you do a quick google search before you decide to build anything in react, because chances are it has already been done before.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://vuejs.org/"&gt;Vue.js&lt;/a&gt; is also a popular light weight alternative to react. Many interactive websites nowadays use Vue.&lt;/p&gt;

&lt;p&gt;If you are looking to build a simple SPA with very few features, then definitely check out &lt;a href="https://svelte.dev/"&gt;Svelte.js&lt;/a&gt;. It is light weight, easy to use and is a great fit for simple use cases like calculator pages, information display from APIs, landing pages, or even simple blogs.&lt;/p&gt;

&lt;p&gt;I am not too familiar with &lt;a href="https://angular.io/"&gt;Angular&lt;/a&gt;, but from what I know, it is usually used in enterprise projects. If you like typescript, and object oriented programming and have a lot of people going to work on the project, then angular might be the best choice.&lt;/p&gt;

&lt;p&gt;If you are a fan of functional programming, then be sure to check out &lt;a href="https://elm-lang.org/"&gt;Elm&lt;/a&gt; that let’s you build frontend using functional programming concepts.&lt;/p&gt;

&lt;p&gt;Basically the conclusion is that if you are building a PoC or something with simple features, check out Vue.js or Svelte. Otherwise just pick react and don’t overthink it.&lt;/p&gt;

&lt;h3&gt;
  
  
  Backend tools
&lt;/h3&gt;

&lt;p&gt;Coming to backend tools, I think the first consideration to make is what programming language you are comfortable with.&lt;/p&gt;

&lt;p&gt;You could also have micro services where each service does a separate task, or even go with a serverless architecture with tools like &lt;a href="https://aws.amazon.com/lambda/"&gt;lambda&lt;/a&gt;. This would make your backend system programming language agnostic, but might be hard to customize or optimize certain things.&lt;/p&gt;

&lt;p&gt;If you want to build an MVP then just pick a python based tool like &lt;a href="https://flask.palletsprojects.com/en/2.0.x/"&gt;Flask&lt;/a&gt; or &lt;a href="https://fastapi.tiangolo.com/"&gt;FastAPI&lt;/a&gt;, or pick &lt;a href="https://nodejs.org/en/"&gt;Node.js&lt;/a&gt;. I think python and javascript are the most popular languages now, and the community support is amazing. There is almost nothing that you cannot do in both.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.djangoproject.com/"&gt;Django&lt;/a&gt; is a great option to get started with backend development. The problem with Django and python in general is that it is slow, but nowadays it is quite optimizied and lots of companies are using Django on their backend. Other than ease of development, it also makes hiring easier, since a lot of people are familiar with it.&lt;/p&gt;

&lt;p&gt;If your primary use case is fast CRUD operations, with an MVC architecture - then I would recommend &lt;a href="https://spring.io/projects/spring-boot"&gt;Spring&lt;/a&gt; in Java or &lt;a href="https://phoenixframework.org/"&gt;Phoenix&lt;/a&gt; in Elixir. .NET might also be a good option here, although personally I am not a fan of it. I have been using Phoenix at work, and it is just amazing. Fast, simple, good project structure, the community is good but not as vast as other tools.&lt;/p&gt;

&lt;p&gt;If you are looking to build real time systems, like games or chat - then I would recommend checking out Phoenix. It has a built in feature called channels, that makes working with web sockets very easy. Other popular options would be Node.js or &lt;a href="https://golang.org/"&gt;Golang&lt;/a&gt;. Golang is great for stand alone services that do one thing very fast.&lt;/p&gt;

&lt;p&gt;If performance and scale is your primary goal then again I would recommend Phoenix or Spring. Both elixir and java were built to scale and handle high loads. If you want performance but not huge scale, then Node.js or Golang might be good options.&lt;/p&gt;

&lt;p&gt;The conclusion here is to use Python if you want to get something out there quickly, or you have to run deep learning models. If you want performance or have any real time use cases consider phoenix, Node.js or Golang. If you want both performance and huge scale, consider Spring or Phoenix.&lt;/p&gt;

&lt;h3&gt;
  
  
  Databases
&lt;/h3&gt;

&lt;p&gt;The step to figure out here is to understand if you want SQL or NoSQL. Postgres is quite popular now - it has tons of features, can handle some unstructured data, and even index it.&lt;/p&gt;

&lt;p&gt;I have not worked with NoSQL systems, but MongoDB seems the most popular tool there. You could even consider managed options like firebase.&lt;/p&gt;

&lt;p&gt;If you are building an MVP then definitely checkout Supabase, for a managed postgres database, with great tooling in all languages.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;Tools change every day, tomorrow something new might come up, which is perfect for your use case, and you might decide to move to it. Being able to adapt easily is very important today. Try not be confined to a single language or tool, pick whatever is best suited to solve your problem fast and effectively.&lt;/p&gt;

&lt;p&gt;Let me know if I missed out your favourite tools in the comments!&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>tooling</category>
      <category>beginners</category>
    </item>
    <item>
      <title>The Best Way To Simplify Any Complex Problem</title>
      <dc:creator>Adarsh Menon</dc:creator>
      <pubDate>Sun, 22 Aug 2021 06:07:12 +0000</pubDate>
      <link>https://dev.to/adarsh_menon_/the-best-way-to-simplify-any-complex-problem-4onh</link>
      <guid>https://dev.to/adarsh_menon_/the-best-way-to-simplify-any-complex-problem-4onh</guid>
      <description>&lt;p&gt;As software engineers our jobs are mostly breaking down abstract problem statements into code that computers can understand.&lt;/p&gt;

&lt;p&gt;I think the biggest challenge here is to simply figure out what to do. How do you convert an abstract problem statement with complex objects, asynchronous data flow, multiple stake holders and complex logic into low level code that a machine can understand?&lt;/p&gt;

&lt;h2&gt;
  
  
  Break it down — but how?
&lt;/h2&gt;

&lt;p&gt;Break down the problem into smaller steps is common advice that is seen everywhere when talking about problem solving. &lt;/p&gt;

&lt;p&gt;But how exactly? Where to start?&lt;/p&gt;

&lt;p&gt;I think the best way to go about simplifying a problem is to write it down.&lt;/p&gt;

&lt;p&gt;Simply write down the problem in your own words. Writing things down helps your mind to offload some of the information onto the screen or paper. Our brains are built for making connections, not remembering things.&lt;/p&gt;

&lt;p&gt;While tasked with an abstract problem statement think about the following and write down:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Why is solving this problem important? What is the impact? Who benefits from the solution for this problem?&lt;/li&gt;
&lt;li&gt;What are the different inputs and ideal output or finish state?&lt;/li&gt;
&lt;li&gt;How is the input taken in for processing? Through an API, event, database or any other data source? Does this raw input need any processing?&lt;/li&gt;
&lt;li&gt;What is the output format? Do you have to store it somewhere? Push an event? Or simply display it? Or maybe there is no output — maybe you are designing something?&lt;/li&gt;
&lt;li&gt;What areas of the code base would be affected by your solution? What areas need to be modified? Which teams need to know about this? Are there any teams/people that can help you out?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Once you have answers to these general questions, you should have a better idea on how to approach this problem. Talking to the people who are impacted by what you are about to solve really helps in getting a deeper understanding and might reveal some hidden insights that you might want to consider.&lt;/p&gt;

&lt;p&gt;Right now the abstract problem statement has been simplified to a more definite form, that resembles an engineering problem with inputs, outputs and their desired formats.&lt;/p&gt;

&lt;h2&gt;
  
  
  Solving the problem
&lt;/h2&gt;

&lt;p&gt;Next you need to figure out the steps to be taken, things to build, functions to write, objects to build, services to run etc.. to take the input to its output form. Maybe you are designing/architecting something, in that case there is no clear output — the plan itself is the output.&lt;/p&gt;

&lt;p&gt;Avoid writing paragraphs describing engineering problems or solutions. Write everything in bullets — this automatically adds some structure, and breaks it down into steps.&lt;/p&gt;

&lt;p&gt;Do your research. Are there any tools out there that can partially or fully solve your problem? What are the tools that you are going to use to help you solve this problem? Are there any alternatives that maybe more suitable for your use case?&lt;/p&gt;

&lt;p&gt;Gather as much information as you can about tools you could potentially use. While deciding what tools to finally use, do not just pick a tool because it seems better. Have a reason to pick it. Also have reasons not to pick the other tools you rejected.&lt;/p&gt;

&lt;p&gt;Almost always you will find that what you are trying to do has already been fully or partially done before. If you cannot use the same thing to solve your problem, you can still refer to these solutions. You can look for inspiration, patterns, things to do, not to do etc.. from it.&lt;/p&gt;

&lt;p&gt;By the end of this phase, you should have a clear plan about what needs to be done to get to your solution.&lt;/p&gt;

&lt;h2&gt;
  
  
  Your final plan
&lt;/h2&gt;

&lt;p&gt;Now you know your inputs, what processing is to be done on it, the tools you are going to use and the final output format. Write down the final plan in bullet points.&lt;/p&gt;

&lt;p&gt;Write down the all options you considered including the reasons for choices, alternate approaches you could think of and links to everything you referred to and could be useful.&lt;/p&gt;

&lt;p&gt;Something my manager recently taught me is to always use an example when describing complex things. Take an example input, run it through you plan and see if you are getting to the desired output.&lt;/p&gt;

&lt;p&gt;This especially works where you are building services, designing APIs or data structures. The specifications are not enough, work it out using an example.&lt;/p&gt;

&lt;p&gt;Finally get a second opinion before you implement it or hand it over. A fresh pair of eyes can always spot things you overlooked or missed.&lt;/p&gt;

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

&lt;p&gt;I think real talent lies in breaking down abstract problems into bite sized chunks that you can easily implement and explain.&lt;/p&gt;

&lt;p&gt;If someone could tell you what exactly to do, what tools to use, design objects, what functions to write, where to write them and all the edge cases to consider, then anybody can solve it.&lt;/p&gt;

&lt;p&gt;A lot of people can write code without errors in multiple languages, but a few people can simplify abstract problems and know exactly what to write or build. I think it is this skill of simplifying and breaking down problems that differentiates engineers from programmers and coders.&lt;/p&gt;

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

&lt;p&gt;These are just a few things that I have learned from my managers and seniors over the last few years that I find useful. If you have any more ideas or improvements, feel free to share it in the comments or email me at &lt;a href="mailto:hello@adarshmenon.in"&gt;hello@adarshmenon.in&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;I also started a newsletter recently called &lt;a href="https://betterengineeringclub.substack.com/"&gt;Better Engineering&lt;/a&gt;, where I share engineering concepts, stuff I am working on and my journey of becoming a better engineer. Do &lt;a href="https://betterengineeringclub.substack.com/"&gt;subscribe to it&lt;/a&gt; if you love all things software engineering!&lt;/p&gt;

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

&lt;p&gt;Connect with me on &lt;a href="https://twitter.com/adarsh_menon_"&gt;Twitter&lt;/a&gt;, &lt;a href="https://www.linkedin.com/in/adarsh-menon-/"&gt;LinkedIn&lt;/a&gt; and check out my &lt;a href="https://youtube.com/adarshmenon"&gt;YouTube Channel&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>programming</category>
      <category>architecture</category>
      <category>career</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Stack Data Structure: Practical Applications &amp; Operations</title>
      <dc:creator>Adarsh Menon</dc:creator>
      <pubDate>Tue, 06 Oct 2020 11:58:47 +0000</pubDate>
      <link>https://dev.to/adarsh_menon_/stack-data-structure-practical-applications-operations-9go</link>
      <guid>https://dev.to/adarsh_menon_/stack-data-structure-practical-applications-operations-9go</guid>
      <description>&lt;p&gt;Stack is one of the most popular and widely known data structures in computer science, and one of the easiest to learn and understand. But often, maybe because of the way it is introduced or taught, it seems kind of useless and boring to learn.&lt;/p&gt;

&lt;p&gt;Stacks are not one of those useless thing that you need to learn just to pass your exams or to crack the coding interview, but they are actually used for a lot of things that you do daily on the computer.&lt;/p&gt;

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

&lt;h2&gt;
  
  
  Practical Applications
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;They are the building blocks of function calls and recursive functions. Yes, this is a common application that you maybe aware of, but think about it — right now there are hundreds (if not thousands) of functions existing on your call stack in memory maintained by your OS. Every time a function is called, some memory is reserved (PUSH) for it on the call stack, and when it returns, the memory is deallocated (POP).&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The undo/redo function that has become a part of your muscle memory now, uses the stack pattern. All your actions are pushed onto a stack, and whenever you ‘undo’ something, the most recent action is popped off. The number of undos you can do is determined by the size of this stack.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The stack pattern is also used to keep track of the ‘most recently used’ feature. I am sure you have come across the most recently seen files, items, tools etc.. across different applications. Your browser uses the stack pattern to maintain the recently closed tabs, and reopen them.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Your code editor uses a stack to check if you have closed all your parentheses properly, and even to prettify your code. &lt;br&gt;
This ties to the more formally described use case of stacks — expression evaluation and syntax parsing. They are used to convert one notation of expression into another (like infix to postfix etc..), this is actually used in calculators. If you have prepared for coding interviews, you know the famous parentheses matching problem is solved using stack.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;They are used to implement back tracking algorithm, which is basically an algorithm with a goal, and if it takes a wrong path it simply ‘back tracks’ back to a previous state. These states are maintained using stacks. Simple games like tic-tac-toe can be solved using this approach. &lt;br&gt;
A similar concept is used in the Depth First Search algorithm.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Increase efficiency of algorithms — Several algorithms make use of the stack data structure and its properties. Examples are Graham Scan — which is used to find the convex hull, and the problem of finding the nearest smaller or larger value in an array.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  The Stack Pattern
&lt;/h2&gt;

&lt;p&gt;So what makes stacks special ? Well, it is the Last In First Out property — the element that was added last to the stack is removed first. There is only one way to insert or remove an element from a stack — from the top.&lt;/p&gt;

&lt;p&gt;Stacks are often compared to a stack of plates in restaurant kitchens, where adding a new plate or removing an existing one from the stack is only possible from the top.&lt;/p&gt;

&lt;p&gt;In computer science, instead of plates we store objects in the stack. They could be anything from numbers, strings, memory addresses, entire functions or even other data structures.&lt;/p&gt;

&lt;p&gt;There are three operations that can be performed on a stack data structure:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;PUSH: adds an element to the stack&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;POP: removes an element from the stack&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;TOP/PEEK: returns the value of the current element on top of the stack, without actually removing it.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Now say you push 3 items into the stack, A, B and C in order. Now C is on the top. Popping off elements would give you C, B and A. So the LIFO pattern can be also used to reverse a set of ordered items.&lt;/p&gt;

&lt;h2&gt;
  
  
  Implementing Stacks
&lt;/h2&gt;

&lt;p&gt;Most programming languages nowadays have an inbuilt library for implementing stacks. If you are interested, you can implement it yourself from scratch too. Here are common implementations of stacks in Python and C++, especially useful if you are preparing for coding interviews.&lt;/p&gt;

&lt;h3&gt;
  
  
  Python
&lt;/h3&gt;

&lt;p&gt;In python, the list data structure can be used as a stack.&lt;/p&gt;


&lt;div class="ltag_gist-liquid-tag"&gt;
  
&lt;/div&gt;


&lt;h3&gt;
  
  
  C++
&lt;/h3&gt;

&lt;p&gt;The C++ STL (Standard Template Library) has a great implementation of stack.&lt;/p&gt;


&lt;div class="ltag_gist-liquid-tag"&gt;
  
&lt;/div&gt;


&lt;p&gt;The idea behind this whole post was simply to appreciate how the simple stack data structure plays a very important role in how we use computers every day. If you enjoyed this, I am planning to do a series on other data structures as well, so please consider following and check out my &lt;a href="https://www.youtube.com/watch?v=fAAJOY3rMNk"&gt;YouTube Channel&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;For questions, comments, feedback feel free to email me at &lt;a href="mailto:adarsh1021@gmail.com"&gt;adarsh1021@gmail.com&lt;/a&gt; or connect with me on &lt;a href="https://twitter.com/adarsh_menon_"&gt;Twitter&lt;/a&gt; (&lt;a class="comment-mentioned-user" href="https://dev.to/adarsh_menon_"&gt;@adarsh_menon_&lt;/a&gt;
).&lt;/p&gt;

</description>
      <category>datastructures</category>
      <category>stack</category>
      <category>programming</category>
      <category>operations</category>
    </item>
  </channel>
</rss>
