<?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: Sanjana Bhat</title>
    <description>The latest articles on DEV Community by Sanjana Bhat (@sanjbhat).</description>
    <link>https://dev.to/sanjbhat</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%2F788745%2F7cf109f1-b045-4bc5-8f50-73bb5a768758.jpeg</url>
      <title>DEV Community: Sanjana Bhat</title>
      <link>https://dev.to/sanjbhat</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/sanjbhat"/>
    <language>en</language>
    <item>
      <title>How to ace the System Design Interview in 2022</title>
      <dc:creator>Sanjana Bhat</dc:creator>
      <pubDate>Wed, 01 Jun 2022 07:47:08 +0000</pubDate>
      <link>https://dev.to/sanjbhat/how-to-ace-the-system-design-interview-in-2022-4epp</link>
      <guid>https://dev.to/sanjbhat/how-to-ace-the-system-design-interview-in-2022-4epp</guid>
      <description>&lt;p&gt;Do you want to be better prepared for your next System Design interview ? Here's a very simple way to go about it.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Overall goal:&lt;/strong&gt;&lt;br&gt;
This is a chance to demonstrate your design thinking, your technical knowledge.  Most importantly - your opinions.&lt;br&gt;
for e.g. - it means not just knowing the meaning of NoSQL and SQL, but when do we use one vs the other. It is possible to use both (any) of these in the same system you will be designing. Knowing under what circumstances would you go for one vs the other.&lt;/p&gt;

&lt;h3&gt;
  
  
  1. Ask Questions
&lt;/h3&gt;

&lt;p&gt;Just imagine, your PM asked you to develop a feature with one line description, how would you go about it. You would want to gather as much info as possible, right?&lt;br&gt;
Same goes here. Think of all possible questions - who are we designing this for, what problem are we solving? How many users might use this and how ? And so on.&lt;/p&gt;

&lt;p&gt;While your interviewer is answering those questions, it's a great practice to write down those on the whiteboard.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Back of the envelope calculation
&lt;/h3&gt;

&lt;p&gt;For determining number of requests per second (in turn to determine how many nodes required to scale), for calculating storage required per year and so on. &lt;br&gt;
Sometimes the interviewer does not care for this. So, go for this only if the interviewer asks something like 'design a system which should support 50 million users per month'.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Start with the data model
&lt;/h3&gt;

&lt;p&gt;Think about this, what is your system at the bare minimum ? It is basically data and the components we build on top of it.&lt;br&gt;
What were people doing before the cloud era? Before software era, even. It was just files and book keeping. Which is essentially data.&lt;br&gt;
So starting with defining what the tables look like, is a great way to start designing your system.&lt;br&gt;
Then choose a database that fits the model better. &lt;br&gt;
Do tables have strong entity relation -&amp;gt; RDBMS. &lt;br&gt;
No relation or not much relation with less tables -&amp;gt; NoSQL.&lt;br&gt;
Nodes and relationships -&amp;gt; graph database&lt;br&gt;
You get the gist.&lt;/p&gt;

&lt;h3&gt;
  
  
  4. API Design
&lt;/h3&gt;

&lt;p&gt;A lot of the times, in a system design interview you would also be asked to design the APIs. API design itself is a whole different topic. &lt;br&gt;
Even for this, you would have to start with the data model first. Then go with exposing that data over REST via APIs. &lt;br&gt;
I found this MuleSoft PDF to be the best one so far.&lt;br&gt;
&lt;a href="https://www.mulesoft.com/lp/ebook/api/restbook"&gt;https://www.mulesoft.com/lp/ebook/api/restbook&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  5. Pick any area where you can deep dive
&lt;/h3&gt;

&lt;p&gt;It could be database scaling, it could be solving concurrency issues or metrics and analytics. Pick one (or more). And be ready to go deeper into these topic(s).&lt;br&gt;
When I started, I had the impression that the crux of the interview is basically drawing those boxes and lines. (user, service, database). I know, so naive.&lt;br&gt;
But it's actually this. Just showing what you know and have learned so far. And being able to discuss those choices and trade offs.&lt;br&gt;
To get into that mode of thinking - &lt;br&gt;
a) Get started with the basics first. Reliability, Caching, Consistent Hashing and so on. &lt;a href="https://github.com/donnemartin/system-design-primer"&gt;https://github.com/donnemartin/system-design-primer&lt;/a&gt;. &lt;br&gt;
a) It helps if you have read the &lt;a href="https://www.amazon.com/Designing-Data-Intensive-Applications-Reliable-Maintainable/dp/1449373321"&gt;DDIA&lt;/a&gt; book. This is a great book to actually understand the basics like load, reliability, CAP theorem. Also a great idea to go through the references mentioned by the author.&lt;br&gt;
b) Reading major tech blogs. These talk about a specific problem and it is good to know what those are and how were they solved.&lt;br&gt;
c) Taking notes of all your reading, in a structured and a concise way. I would simply go through these two days before the interview.&lt;/p&gt;

&lt;h3&gt;
  
  
  6. Talking about failure scenarios
&lt;/h3&gt;

&lt;p&gt;Anything and every component in a system can fail. How to handle specific error scenarios effectively is very important. Having a distributed system is not enough.&lt;br&gt;
Read about load shedding, exponential back-off, replication and so on.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Some great resources on the internet that I have learned a lot from.&lt;/strong&gt;&lt;/p&gt;

&lt;h5&gt;
  
  
  1) Microservices pattern
&lt;/h5&gt;

&lt;p&gt;&lt;a href="https://microservices.io/patterns/microservices.html"&gt;https://microservices.io/patterns/microservices.html&lt;/a&gt;&lt;br&gt;
&lt;a href="https://docs.microsoft.com/en-us/azure/architecture/microservices/design/patterns"&gt;https://docs.microsoft.com/en-us/azure/architecture/microservices/design/patterns&lt;/a&gt;&lt;/p&gt;

&lt;h5&gt;
  
  
  2) Common System Design Patterns
&lt;/h5&gt;

&lt;p&gt;&lt;a href="http://highscalability.com/blog/2010/12/1/8-commonly-used-scalable-system-design-patterns.html"&gt;http://highscalability.com/blog/2010/12/1/8-commonly-used-scalable-system-design-patterns.html&lt;/a&gt;&lt;/p&gt;

&lt;h5&gt;
  
  
  3) Scaling MysQL - GitHub blog
&lt;/h5&gt;

&lt;p&gt;&lt;a href="https://github.blog/2018-06-20-mysql-high-availability-at-github/"&gt;https://github.blog/2018-06-20-mysql-high-availability-at-github/&lt;/a&gt;&lt;br&gt;
&lt;a href="https://github.blog/2021-09-27-partitioning-githubs-relational-databases-scale/"&gt;https://github.blog/2021-09-27-partitioning-githubs-relational-databases-scale/&lt;/a&gt;&lt;/p&gt;

&lt;h5&gt;
  
  
  4) Stripe's Rate Limiter
&lt;/h5&gt;

&lt;p&gt;&lt;a href="https://stripe.com/blog/rate-limiters"&gt;https://stripe.com/blog/rate-limiters&lt;/a&gt;&lt;/p&gt;

&lt;h5&gt;
  
  
  5) Twitter - Timelines at scale
&lt;/h5&gt;

&lt;p&gt;Watch this wonderful video on how twitter scaled its rendering of home and timeline. By Twitter's Senior Director of the Applications Services Group at that time.&lt;br&gt;
&lt;a href="https://www.infoq.com/presentations/Twitter-Timeline-Scalability/"&gt;https://www.infoq.com/presentations/Twitter-Timeline-Scalability/&lt;/a&gt;&lt;/p&gt;

&lt;h5&gt;
  
  
  6) AWS Kafka
&lt;/h5&gt;

&lt;p&gt;I found this to be a great explanation of Kafka. If anyone wants to understand messaging systems - please read this.&lt;br&gt;
&lt;a href="https://aws.amazon.com/msk/what-is-kafka/"&gt;https://aws.amazon.com/msk/what-is-kafka/&lt;/a&gt;&lt;br&gt;
This one requires educative subscription. Deep dive into Kafka and its components. &lt;a href="https://www.educative.io/courses/grokking-adv-system-design-intvw/g7z2zNY9RR9"&gt;https://www.educative.io/courses/grokking-adv-system-design-intvw/g7z2zNY9RR9&lt;/a&gt;&lt;/p&gt;

&lt;h5&gt;
  
  
  7) Azure Architecture fundamentals
&lt;/h5&gt;

&lt;p&gt;&lt;a href="https://docs.microsoft.com/en-us/azure/architecture/guide/"&gt;https://docs.microsoft.com/en-us/azure/architecture/guide/&lt;/a&gt;&lt;/p&gt;

&lt;h5&gt;
  
  
  8) AirBnb - Scaling Financial Reporting
&lt;/h5&gt;

&lt;p&gt;&lt;a href="https://medium.com/airbnb-engineering/tracking-the-money-scaling-financial-reporting-at-airbnb-6d742b80f040"&gt;https://medium.com/airbnb-engineering/tracking-the-money-scaling-financial-reporting-at-airbnb-6d742b80f040&lt;/a&gt;&lt;/p&gt;

&lt;h5&gt;
  
  
  9) Basics of AWS services
&lt;/h5&gt;

&lt;p&gt;This provides a nice overview of AWS services&lt;br&gt;
&lt;a href="https://www.educative.io/path/fundamentals-of-aws"&gt;https://www.educative.io/path/fundamentals-of-aws&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;All are non-affiliated links.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;I am curious to know what your favorite resources are. If you liked reading this article, please hit the ❤️ button !&lt;/p&gt;

</description>
      <category>systemdesign</category>
      <category>tech</category>
      <category>interview</category>
    </item>
    <item>
      <title>How to ace the coding interview in 2022</title>
      <dc:creator>Sanjana Bhat</dc:creator>
      <pubDate>Wed, 18 May 2022 05:16:44 +0000</pubDate>
      <link>https://dev.to/sanjbhat/how-to-ace-the-coding-interview-in-2022-336f</link>
      <guid>https://dev.to/sanjbhat/how-to-ace-the-coding-interview-in-2022-336f</guid>
      <description>&lt;p&gt;Coding was the most I prepared for. &lt;br&gt;
a) Because I love solving coding puzzles and &lt;br&gt;
b) I was initially getting rejected in the first rounds, that made me get back to this and keep on leetcoding. 😭&lt;/p&gt;

&lt;h3&gt;
  
  
  1. Preparation
&lt;/h3&gt;

&lt;p&gt;This stage is what I call, pre-leetcode.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Get comfortable with algorithms basics. quick sort, merge sort, binary search and the likes.&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;Really&lt;/em&gt; know Big O notation. That means knowing what is the runtime and spacetime complexities for recursion, data structures like trees and graphs and so on.&lt;/li&gt;
&lt;li&gt;Know language specific constructs to work with date, time and regular expressions.&lt;/li&gt;
&lt;li&gt;Revising is important. I made notes on evernote and would only revise this the day before my interviews.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  2. How to use LeetCode effectively
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Premium account is definitely worth it.&lt;/li&gt;
&lt;li&gt;LeetCode has these really good prepare tracks - for Graphs, LinkedLists, Arrays, Strings, Trees and I found these to be the best. This is a great place to brush up the concepts.&lt;/li&gt;
&lt;li&gt;LeetCode has more than 2000 coding questions. So it is easy to feel overwhelmed and lost. Create a list and stick to it. I followed the Blind75 list, and it is great.&lt;/li&gt;
&lt;li&gt;When you have an upcoming interview, do some of the company tagged questions. Also check the Discuss section for interview experiences.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Avoid the pitfalls&lt;/strong&gt;. LeetCode platform emphasizes on the run time of solutions. So it is easy to fall into the trap of writing bad code that runs &lt;em&gt;really&lt;/em&gt; fast. In a real interview, candidates are also graded on code quality. 
Make a habit of following these coding guidelines. &lt;a href="https://developers.google.com/style/code-in-text#coding"&gt;https://developers.google.com/style/code-in-text#coding&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Consistency is key. Solving one question everyday is better than solving 10 questions only on the weekends.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  3. Online Tests
&lt;/h3&gt;

&lt;p&gt;Some companies have this qualifying round before the on-site rounds. Now, online tests are whole together a different ball game. I have generally detested these. But there are some points to keep in mind while you take an online test.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;These tests also monitor your activity along with grading your code. So, do not switch tabs. &lt;/li&gt;
&lt;li&gt;Do NOT copy paste. Some sites state that you are free to work on your IDE and then run the code on the site. But it is better to avoid doing that.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  4. During the interview
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Keep your introduction short. This gives you more time to write code.&lt;/li&gt;
&lt;li&gt;When you get a question, read that out loud, make sure you understand it fully.&lt;/li&gt;
&lt;li&gt;Come up with your own boundary test cases. Ask clarifying questions like "how long can the input string be" or "what is expected to happen if we pass an empty array".
It is a red flag if a candidate jumps straight to solving a problem without asking the questions first. &lt;/li&gt;
&lt;li&gt;Discuss the approaches with your interviewer (if you know more than one, that is). Take hints - your interviewer will guide you here. May be they are looking for the fastest implementation, or they are looking for the one that uses constant space. Your solution will be based on this discussion.&lt;/li&gt;
&lt;li&gt;While writing code, keep thinking out loud. Keep talking about the design choices you are making.&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;Listen&lt;/em&gt; to the hints. It is easy to get absorbed in our train of thought. But when you get a hint from the interviewer, it is time to take a pause and re-orient.
&lt;/li&gt;
&lt;li&gt;Make use of TODOs. When you don't have enough time, just write an abstract function that does the job and get to its implementation if time permits.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  5. Resources
&lt;/h3&gt;

&lt;p&gt;(all non-affiliated links)&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;a href="https://www.amazon.in/dp/B004P8J1NA/ref=cm_sw_r_tw_dp_SCPJTE0J7VF6SHJZXQA8"&gt;Algorithms by Sedgewick and Wayne&lt;/a&gt;
Best book on algorithms. I especially liked the section on Tries and Union Find. The code examples in the book are quite elaborate, so it is better to rely on examples from sites GeeksForGeeks or Techie Delight.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://www.amazon.in/dp/0984782869/ref=cm_sw_r_tw_dp_K1292Y642B6WXN9WBA85"&gt;Cracking the Coding Interview&lt;/a&gt;
Best book to get started - with Linked Lists, Trees, Strings and Arrays. Clean code examples. But alas, in 2022, this book is not enough.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://www.amazon.in/dp/B09WJCJJJV/ref=cm_sw_r_tw_dp_0VE0BWF794QHW8FH3BH6"&gt;Elements of Programming Interviews&lt;/a&gt;
Written by former Googlers, this book is great after finishing Cracking the Coding Interview. I really liked the code examples here and the precise explanation.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://leetcode.com/list?selectedList=53jvm316"&gt;LeetCode My 75 List&lt;/a&gt;
My own curated list based on the very famous Blind 75 list.&lt;/li&gt;
&lt;/ol&gt;

</description>
      <category>coding</category>
      <category>algorithms</category>
      <category>leetcode</category>
    </item>
    <item>
      <title>Acing your next tech interview</title>
      <dc:creator>Sanjana Bhat</dc:creator>
      <pubDate>Fri, 13 May 2022 06:19:36 +0000</pubDate>
      <link>https://dev.to/sanjbhat/how-to-ace-your-next-tech-interview-54jd</link>
      <guid>https://dev.to/sanjbhat/how-to-ace-your-next-tech-interview-54jd</guid>
      <description>&lt;p&gt;Tech interviews have been getting harder each year, the Covid pandemic only increased the competition worldwide.&lt;/p&gt;

&lt;p&gt;I constantly see posts on LeetCode, where people shared that it took them an average of one year to get a good job offer.&lt;br&gt;
My journey has been similar, it took a year of prep, lots of job applications, rejections and feeling of sheer hopelessness, until I finally got two great job offers. There have been a lot of learning and un-learning for me. &lt;/p&gt;

&lt;p&gt;This is the precursor of a 5 part series - on my preparation journey and what worked for me. Hoping that it helps someone who is in the same boat as I was last year.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://dev.to/sanjbhat/how-to-ace-the-coding-interview-in-2022-336f"&gt;How to ace the Coding Interview in 2022&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://dev.to/sanjbhat/how-to-ace-the-system-design-interview-in-2022-4epp"&gt;How to ace the System Design Interview in 2022&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

</description>
      <category>interview</category>
      <category>coding</category>
      <category>tip</category>
    </item>
    <item>
      <title>How to add your new project to GitHub in 10 easy steps</title>
      <dc:creator>Sanjana Bhat</dc:creator>
      <pubDate>Tue, 11 Jan 2022 05:17:06 +0000</pubDate>
      <link>https://dev.to/sanjbhat/add-your-project-to-github-in-10-easy-steps-4cl9</link>
      <guid>https://dev.to/sanjbhat/add-your-project-to-github-in-10-easy-steps-4cl9</guid>
      <description>&lt;p&gt;Okay, I am fairly new to GitHub. And initially, I used to struggle a lot with adding my local projects to GitHub. &lt;br&gt;
I created a cheat sheet, so here it goes.&lt;/p&gt;


&lt;h5&gt;
  
  
  0. Pre-requisites:
&lt;/h5&gt;

&lt;p&gt;Git on your local machine&lt;br&gt;
&lt;a href="https://git-scm.com/book/en/v2/Getting-Started-Installing-Git"&gt;Here&lt;/a&gt; is a neat article to help with that.&lt;/p&gt;
&lt;h5&gt;
  
  
  1. Create new repository on github.
&lt;/h5&gt;

&lt;p&gt;Do not initialize .gitignore or readme at this point.&lt;/p&gt;
&lt;h5&gt;
  
  
  2. In your project root folder, create a .gitignore file.
&lt;/h5&gt;

&lt;p&gt;In this file, add all the folder and the file extensions that you wouldn't want in the remote repository. &lt;br&gt;
The following is an example .gitignore for a java project.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;*.class

# Mobile Tools for Java (J2ME)
.mtj.tmp/

# Package Files #
*.jar
*.war
*.ear

# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
hs_err_pid*

#folders
logs/
target/

#other
*.classpath
*.project
*.settings
*.pdf
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h5&gt;
  
  
  3. Initialize local repo
&lt;/h5&gt;

&lt;p&gt;In your local, navigate to the project folder from your favorite command prompt &lt;br&gt;
&lt;code&gt;git init -b main&lt;/code&gt;&lt;/p&gt;

&lt;h5&gt;
  
  
  4. Add all files from your project to your local
&lt;/h5&gt;

&lt;p&gt;&lt;code&gt;git add .&lt;/code&gt;&lt;/p&gt;

&lt;h5&gt;
  
  
  5. See the status of changes in local
&lt;/h5&gt;

&lt;p&gt;&lt;code&gt;git status&lt;/code&gt;&lt;/p&gt;

&lt;h5&gt;
  
  
  6. Commit to local
&lt;/h5&gt;

&lt;p&gt;&lt;code&gt;git commit -m "commit message"&lt;/code&gt;&lt;br&gt;
&lt;em&gt;On a side note, it's a great practice to keep committing to your local in small increments. That way, if you see that a code change is breaking and don't know which line did that, it's easy to revert back to a stable version.&lt;/em&gt;&lt;/p&gt;

&lt;h5&gt;
  
  
  7. Specify the remote repo for current local repo
&lt;/h5&gt;

&lt;p&gt;&lt;code&gt;git remote add origin https://github.com/username/repo&lt;/code&gt;&lt;/p&gt;

&lt;h5&gt;
  
  
  8. Add files from local to remote
&lt;/h5&gt;

&lt;p&gt;&lt;code&gt;git push origin main&lt;/code&gt;&lt;/p&gt;

&lt;h5&gt;
  
  
  9. Add a README.md file in github repo.
&lt;/h5&gt;

&lt;h5&gt;
  
  
  10. In case you want to update local from remote
&lt;/h5&gt;

&lt;p&gt;&lt;code&gt;git pull origin main&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;That's it, you did it :)&lt;/p&gt;

</description>
      <category>github</category>
      <category>git</category>
    </item>
  </channel>
</rss>
