Thursday, October 10, 2019

System Design

System Design
System design is key in Senior Engineering interviews. Following are some of the good resources to prepare well for the system design interview questions


Below are some additional System Design Questions which have appeared in different company interviews


Table Booking System

Design a table booking system.
Expectations :
  • System design
  • Class Diagram (UML diagram )
  • Flow / Seqence diagram

From <https://www.geeksforgeeks.org/interview-experience-at-flipkart-sd-ii/>


JIRA like System

Design a system like Jira. It should have the following functionalities :
  • User should be able to create Task of type Story, Feature, Bugs. Each can have their own status.
  • Stories can further have subtasks.
  • Should be able to change the status of any task.
  • User should be able to create any sprint. Should be able to add any task to sprint and remove from it.
  • User should be able to print
    • Delayed task
    • Sprint details
    • Tasks assigned to the user

From <https://www.geeksforgeeks.org/interview-experience-at-flipkart-sd-ii/>


Design Swiggy.

HLD and LLD
Major focus on data modeling and API design. High level discussion on system design and components to be used.

Twitter Design



From <https://www.geeksforgeeks.org/flipkart-interview-for-sde-ii/>

Offer Ride System

Design offerRide and shareRide mechanism on basis of fastest and earliest ride
Create a application that will add user and add their vehicle, there will be two categories one who is offering ride and other who is selecting ride.
In offer ride(user_name, vehicle_no, origin, destination, start_time, duration)
select_ride(user_name, origin, destination, parameter)

parameter is fastest ride which will be on shortest duration and earliest ride will be lesser start_time+duration.


Design Book My Show

Elevator Design

Other Reference Documentation

AWS Cloud Practitioner Essentials

Monday, December 10, 2018

Mobile Usage hitting Code Quality


You might be thinking how can mobile usage hit code quality. How can these two be related ? As you read through this blog you would be convinced the title is very true.

Mobile has come a long way in the past decade or two. Now with the Data being very cheap and everyone having the Smartest phones all of us have access to complete internet and entertainment all the time. While it has it own perks it also has its own disadvantage.

According to stats in statista the time spend by Millennial has more than doubled from 2012 to 2017. Millennials spend around 223 minutes per day on Mobile which is around 4 hours.



Out of those four hours which is spend on mobile every day how many hours or minutes do you think we spend during work hours ? It could range from person to person but you get the picture.

Now you might be thinking of the counter argument for spending time on phone during Work. For engineers the best excuse is code was getting compiled so just though of checking my phone. While this excuse might feel apt at first but it is quite detrimental to code Quality.  These are few of things that can go wrong:

  • Taking time away from Thinking about the code : By checking your phone in between coding you are taking away time from thinking about the code. While a engineer is coding he/she has to build the complete architecture of the code in their mind. It is like build a castle in mind. While he/she is in the process of building the castle checking phone can cause the castle to collapse and the whole process has to done all over again. This-is-why-you-shouldnt-interrupt-a-programmer aptly describe what happens when you interrupt a programmer. Not only it is external disturbance our mobile also distract us by showing a message from a friend or a new Facebook story that a friend has added.
  • Mistakes during coding : As we get distracted while coding there are high chances that the programmer does not think through all the scenarios. This causes bugs to be seeded in the code and it requires rework. All of us very well know the cost of fixing a bug. And if the bug is leaked to the clients then it takes the company a lot of money and resource to fix it.
  • Innovative ways to Solve the Problem : To think of new ways to solve the problem or getting the performance of the existing code up programmer requires the mind to be free of distraction. Mobile are a easy source to create this distraction which can deprive the clients from having high performing code.

So now you might be thinking should I not use my mobile at all during work ? No I am not suggesting that. Mobile has become integral part of our life's and I know its not possible to live without that.

Check your mobiles only during the breaks. Go way from your desk while you are checking your mobile or talking to friend or texting someone. This would help you judge how long you were on your mobile. There are apps now which can tell you how many hours you spend on the mobile on different apps. Use the apps to get a time spent on the mobile.

You can also turn off Data from your mobile which would stop unnecessary messages and notifications coming on your mobile. If it is anything urgent other would call you.

Mobile could be the only thing standing between you bringing the next big innovation for Clients.

With that I leave you with a quote by Robert C Martin -
Clean code is not written by following a set of rules. You don’t become a software craftsman by learning a list of heuristics. Professionalism and craftsmanship come from values that drive disciplines.” 


Tuesday, March 22, 2016

Java Interview Preparation Links


Different Java Versions and Important Features

https://ondro.inginea.eu/index.php/new-features-in-java-versions-since-java-8/


Java Links

Exception handling

Interview Questions

Java Strings

Collections


Design Pattern


OOPS Concepts

Generics In Java

Threads
Executor,Executor Service


Frameworks

Friday, June 13, 2014

Git Basic Commands


Set user.name and user.email in config file

$ git config --global user.name "John Doe" $ git config --global user.email johndoe@example.com

See the config setting in your git

$ git config --list user.name=Scott Chacon user.email=schacon@gmail.com color.status=auto color.branch=auto color.interactive=auto color.diff=auto ...

Getting Help

$ git help $ git --help $ man git-

Initializing a repository

$ git init

Add a file to the repository

$ git add *.c 
OR $ git add README

Clone a repository

$ git clone git://github.com/schacon/grit.git
OR
$ git clone https://github.com/schacon/grit.git


Clone a repository in a particular folder

$ git clone https://github.com/schacon/grit.git mygrit

Check status of the files

$ git status

Checkout a branch

$ git checkout

Checkout and create a branch

$ git checkout -b

Commit the changes

$ git commit -m "comment"

Push the changes to the branch

$ git push origin

See the logs

$ git log

git

git


References:








Tuesday, June 10, 2014

Find if the port is already in use in Windows

In the command prompt use the following command to find if a port is already in use:

C:\Users\username>netstat -an |find /i "2990"