Showing posts with label Interview. Show all posts
Showing posts with label Interview. Show all posts
Sunday, December 3, 2017
Wednesday, November 15, 2017
Monday, August 7, 2017
UML Interview Questions Step by Step
UML:
Q1: What is UML?
Ans:
-
UML is Unified Modeling Language.
-
It is a graphical language for visualizing, specifying, constructing and documenting the artifacts of the system.
-
It allows you to create a blue print of all the aspects of the system, before actually physically implementing the system.
Q2: What is
modeling?
Ans:
Modeling is a proven
and well-accepted engineering technique which helps build a model.
Model is a simplification of reality; it is a blueprint of the actual
system that needs to be built.
Q3: What are the
advantages of creating a model?
Ans:
-
Model helps to visualize the system.
-
It helps to specify the structural and behavior of the system.
-
It helps to make templates for constructing the system.
-
It also helps to document the system.
Q4: What are the
different views that are considered when building an object-oriented
software system?
Ans:
Normally there are 5
views.
-
Use Case view - This view exposes the requirements of a system.
-
Design View - Capturing the vocabulary.
-
Process View - modeling the distribution of the systems processes and threads.
-
Implementation view - addressing the physical implementation of the system.
-
Deployment view - focus on the modeling the components required for deploying the system.
Q5: What are
diagrams?
Ans:
Diagrams are
graphical representation of a set of elements most often shown
made of things and associations.
Q6: What are the
major three types of modeling used?
Ans:
Major three types
of modeling are structural, behavioral, and
architectural.
Q7: Mention the
different kinds of modeling diagrams used?
Ans:
There are 9 types of
Modeling diagrams.
-
Use case diagram,
-
Class Diagram,
-
Object Diagram,
-
Sequence Diagram,
-
statechart Diagram,
-
Collaboration Diagram,
-
Activity Diagram,
-
Component diagram,
-
Deployment Diagram.
Q8:What is
Architecture?
Ans:
Architecture is not
only taking care of the structural and behavioral aspect of a
software system but also taking into account the software usage,
functionality, performance, reuse, economic and technology
constraints.
Q9: What is SDLC?
Ans:
SDLC is Software Development Life Cycle. It includes various
processes that are Use case driven, Architecture centric, Iterative
and Incremental.
This Life cycle is divided into phases. Phase is a time
span between two milestones.
The milestones are Inception, Elaboration, Construction, and
Transition. Process Workflows that evolve through these phase are
Business Modeling, Requirement gathering, Analysis and Design,
Implementation, Testing, Deployment. Supporting Workflows are
Configuration and change management, Project management.
Q10: What are
Relationships?
Ans:
There are different kinds of relationships:
-
Dependencies,
-
Generalization,
-
and Association.
Dependencies:
Dependencies are relationships between two entities that a change in
specification of one thing may affect another thing. Most commonly it
is used to show that one class uses another class as an argument in
the signature of the operation.
Generalization:
Generalization is relationships specified in the class subclass
scenario, it is shown when one entity inherits from other.
Association:
Associations are structural relationships that are: a room has walls,
Person works for a company.
Aggregation(Association):
Aggregation is a type of association where there is a has a
relationship, That is a room has walls, if there are two classes room
and walls then the relationship is called an association and further
defined as an aggregation.
Aggregation is the typical whole/part relationship. This is exactly
the same as an association with the exception that instances
cannot have cyclic aggregation relationships (i.e. a part cannot
contain its whole).
Composition:
Composition is exactly like Aggregation except that the lifetime of
the 'part' is controlled by the 'whole'. This control may be direct
or transitive. That is, the 'whole' may take direct responsibility
for creating or destroying the 'part', or it may accept an already
created part, and later pass it on to some other whole that assumes
responsibility for it.
Q11: How are the
diagrams divided?
Ans:
Classification of diagram:
9 diagrams are divided into 2 types.
-
static diagrams
-
and dynamic diagrams.
Static
Diagrams (Also called Structural Diagram):
-
Class diagram,
-
Object diagram,
-
Component Diagram,
-
Deployment diagram.
Dynamic
Diagrams (Also called Behavioral Diagrams):
-
Use Case Diagram,
-
Sequence Diagram,
-
Collaboration Diagram,
-
Activity diagram,
-
Statechart diagram.
Q12: What are
Messages?
Ans:
A message is the specification of a communication, when a message is
passed that results in action that is in turn an executable
statement.
Q13: What is an
Use Case?
Ans:
-
A use case specifies the behavior of a system or a part of a system,
-
It is used to capture the behavior that need to be developed.
-
It involves the interaction of actors and the system.
Resource Link:
Q14: Can you
explain ‘Extend’ and ‘Include’ in use cases?
Ans:
‘Extend’ and ‘Include’ define relationships between use
cases. Below figure ‘Extend and Include’ shows how these two
fundamentals are implemented in a project. The below use case
represents a system which is used to maintain customer. When a
customer is added successfully it should send an email to the admin
saying that a new customer is added. Only admin have rights to modify
the customer. First lets define extend and include and then see how
the same fits in this use case scenario.
Include: Include relationship represents an invocation of one
use case by the other. If you think from the coding perspective its
like one function been called by the other function.
Extend: This relationship signifies that the extending use
case will work exactly like the base use case only that some new
steps will inserted in the extended use case.
Scenerio#1:
I often use this to remember the two:
My use case: I am going to the city.
includes -> drive the car
extends -> fill the petrol
"Fill the petrol" may not be required at all times, but may
optionally be required based on the amount of petrol left in the car.
"Drive the car" is a prerequisite hence I am including.
Scenerio#2:
Extend is used when a use case adds steps to another first class use
case.
For example, imagine "Withdraw Cash" is a use case of an
ATM machine. "Access Fee" would extend Withdraw Cash and
describe the conditional "extension point" that is
instantiated when the ATM user doesn't bank at the ATM's owning
institution. Notice that the basic "Withdraw Cash" use case
stands on its own, without the extension.
Include is used to extract use case fragments that are duplicated in
multiple use cases. The included use case cannot stand alone and the
original use case is not complete without the included one. This
should be used sparingly and only in cases where the duplication is
significant and exists by design (rather than by coincidence).
For example, the flow of events that occurs at the beginning of every
ATM use case (when the user puts in their ATM card, enters their PIN,
and is shown the main menu) would be a good candidate for an include.
Friday, July 14, 2017
Various section of learning sites
- Codecademy:
Learn to code JavaScript, Python, etc - Coursera and edX: Go through courses with various universities online
- Adafruit and Sparkfun: Learn hardware prototyping to link up some sensors and display their values with a web app
- Stack Overflow: Ask programming related questions online
- GitHub and GitLabs: Look at other open source code, use them and learn from how they are coded
- Technology Review: Learn about latest engineering and development news around the world
Wednesday, June 7, 2017
Algorithm Learning Step by Step
Start from here
https://www.quora.com/I-am-willing-to-sacrifice-all-of-my-free-time-to-learn-algorithms-and-prepare-the-Google-interview-in-1-year-how-should-I-start
Algorithm Interview:
Algorithm Book:
http://www.techtud.com/sites/default/files/public/share/algorithm-book-by-karumanchi.pdf
Top 10 algorithms in Interview Questions
http://www.geeksforgeeks.org/top-10-algorithms-in-interview-questions/
Sorting Example using Java
https://www.topcoder.com/community/data-science/data-science-tutorials/sorting/
Mentor:
https://www.quora.com/profile/Gayle-Laakmann-McDowell
I’d recommend this: Cracking the Coding Interview discussion group on Facebook. I’m in the group too, but lots of other people can help you too.
https://www.quora.com/I-am-willing-to-sacrifice-all-of-my-free-time-to-learn-algorithms-and-prepare-the-Google-interview-in-1-year-how-should-I-start
Algorithm Interview:
- https://github.com/andreis/interview
- http://itsallonesandzeroes.blogspot.ro/2013/07/prepping-for-google-interview.html
Algorithm Book:
http://www.techtud.com/sites/default/files/public/share/algorithm-book-by-karumanchi.pdf
Top 10 algorithms in Interview Questions
http://www.geeksforgeeks.org/top-10-algorithms-in-interview-questions/
Sorting Example using Java
https://www.topcoder.com/community/data-science/data-science-tutorials/sorting/
Mentor:
https://www.quora.com/profile/Gayle-Laakmann-McDowell
I’d recommend this: Cracking the Coding Interview discussion group on Facebook. I’m in the group too, but lots of other people can help you too.
Dynamic programming vs memoization vs tabulation:
Thursday, April 6, 2017
Sunday, March 26, 2017
Microsoft Interview preparation and CV Preparation - Suggested by Masud Karim Khan Sir
Videos:
5 years details in microsoft life of Masud Karim Khan Sir: here
Some tips on writing good resume
- One page resume is the best. Up to two page it’s good. Too big resume they will think – “It’s going to take too much time, I will read the shorter ones first and come back to this later”. That "later" unfortunately hardly happen, they get lots of resume.
- Format is very important. There are several good way to organize the information. One example:
- Header – Your name, phone number, email address and physical address. Don’t mention your date of birth or Father’s name kind of info. I have seen people doing it!
- Objective – What are you looking for? Full time/part time, what kind of role (dev/PM/test etc.). Make it one liner.
- Highlights – Few bullet points that tells your skills. Try to make them quantifiable. Bad example: “Strong C++ coding skill”. Good example: “3 years of experience writing codes in C++”.
- Work Experience (Only if you worked in industry) – One section for each job you held. Write the job title, company name and start-end date. Few bullet points explaining your role. Don’t disclose any non-public info such as you working on a feature that’s nobody outside of your org supposed to know yet. This is important, they don’t want same to happen to their company either. If you have completed any professional training as part of your job, mention that too. In this section, while writing about your role, highlight what your achievements were, or how your your work helped the product/team/clients/overall quality and try to add some numbers and technical info (not jargons) about the work. Example: "Worked on the web service to handle customer requests" might be written as "Designed and implemented a distributed web service in Java that can serve x requests/per sec to handle customer requests from legacy systems". Another example "Implemented a multi threaded data access layer in C# that increased performance by 60%".
- School projects (Only if you are a fresh grad, skip this if you have a reasonable amount of industry experience to write a good section on “Work Experience”) – Mention several team projects you have worked on. Write a line or two summarizing each projects, what was your role in the team etc. Individual projects are not that important to mention but you can mention couple of challenging ones if you have. Your thesis goes in this section too.
- Education – This is important. You don’t need to mention your SSC or HSC information. Start from first professional degree, which would be Bachelor’s degree. One line per degree – name of the degree & major, university name, GPA and year graduated.
- Skills – This is different from Highlights. Totally non descriptive section, just mention the keywords. One line per skill set. Example skills: OS, Programming Languages, Test tools, Applications, Any version control tools etc.
- Activity/Honor – One line per activity/honor. Here you can mention if you won any scholarship, competed in a programming contest etc. It’s not necessary to have all activities related to programming/CS. If you have organized a picnic, led a debating club, president of student organization, this is the place to brag about it. Recruiters want to see a leader in you, not a back office programmer.
- References – This is optional. You might put couple of names who might recommend you if contacted by recruiters. You can skip this in resume, they have their way to verify if you provided any false info.
- If you don’t have a particular skill, don’t mention it in the resume just to make it look good. For example you don’t know perl but mentioning it might end up they will ask a question on it during interview even though that company doesn’t do any perl scripting. Bottom line, don’t try to oversell yourself by putting a lie in the resume.
- In big orgs they get 100s of resume daily. First level of review is done by recruiters in that case, who may not have enough technical knowledge. They will just look for matching keywords, such as C++, Java, Embedded software etc. and forward the resume to appropriate team. That’s why “Highlights” and “Skill” section is important.
- Have the resume ready in both Word/PDF version and also in simple text version. Many companies ask to copy the content of the resume in their online application. Text version helps in that case, copying from word doc most likely will mess up all the alignments.
Books for data structure and algorithm:
Introduction to Algorithm - by Thomas H. Cormen is one good book. Also, for quick preparation for software developer interview, Programming Interview Exposed - by John Mongan is very effective.5 years details in microsoft life of Masud Karim Khan Sir: here
মাইক্রোসফট - ইন্টারà¦িউ পর্ব
Wednesday, March 8, 2017
Thursday, March 2, 2017
Codility Question and preparation details
Some tips for codility:
- https://arkofmind.wordpress.com/2012/10/06/doing-a-test-with-codility/
- http://dev.tasubo.com/2012/09/tips-for-tasks-on-codility.html
- https://ilovefoobar.wordpress.com/2012/12/13/codility/
Java Code Example:
- https://github.com/jmornar/codility-java-solutions
- https://codesays.com/category/java/
- https://github.com/mkleine/codility-examples/blob/master/equi/src/main/java/Equi.java
- https://github.com/jmornar/codility-java-solutions/blob/master/src/timecomplexity/TapeEquilibrium.java
Blogs:
- http://codility-test-questions.blogspot.com/2013/01/my-experience-with-codility-test.html
- https://codility.com/programmers/lessons/1-iterations/
- http://www.elvishsu.com/2013/12/my-codility-test-experience.html#.WLhTN1dVYdc
- https://www.martinkysel.com/codility-solutions/
- http://stackoverflow.com/questions/12417383/programming-test-codility-dominator
Thursday, December 22, 2016
Friday, November 18, 2016
Java Interview Qustion for mid-level engineer
1. Maven Vs Gradle. Why you will use gradle over maven?
2. Say 3 design patterns name. Where you have used it. Ans details.
3. Singleton design patterns 2/3 example
4. What is web service? Have you written API?
5. Describe Spring MVC. How MVC works.
6. How lucene/solr works? In which section you have use it? What is your purpose to use it?
7. Sequence diagram using UML? Which tools you have used?
8. Apache Velocity/Freemaker: Where you have used? What is your purpose to use it? How it works?
2. Say 3 design patterns name. Where you have used it. Ans details.
3. Singleton design patterns 2/3 example
4. What is web service? Have you written API?
5. Describe Spring MVC. How MVC works.
6. How lucene/solr works? In which section you have use it? What is your purpose to use it?
7. Sequence diagram using UML? Which tools you have used?
8. Apache Velocity/Freemaker: Where you have used? What is your purpose to use it? How it works?
Thursday, October 6, 2016
Monday, August 22, 2016
Is there a good reason to create really empty abstract class vs interface ?
Hypothetically, you might do this to ensure that there is a single common base class for future anticipated requirements ... or for some other reason.
But generally speaking it is a bad idea ... IMO.
(Of course, things like this often happen for historical reasons; e.g. the
abstract class may have had more members in the past that have since been removed.)
From Stephen C's Answer
Resource Link: http://stackoverflow.com/a/10123241/2293534
From BalusC Answer:
Resource Link: http://stackoverflow.com/a/10123241/2293534
From BalusC Answer:
The key is that you can extend from only one abstract class, while you can implement moreinterfaces.
Apparently the "empty abstract class" design desicion was made so that it prevents the implementing class from extending from another classes.
If it was me I'd let it go, otherwise it might break. Best is still to contact the original developers and ask for reasoning (and add them as comments in the abstract class for your and future convenience).
Marker Interface
An empty
abstract class is very much equivalent to an interface except that it can extend a classabstract class myAbstractClass // extends anotherClass implements anInterface
{
}
interface myInterface // extends anotherInterface
{
}
This pattern is called Marker interface
Wednesday, July 13, 2016
Joel Test
Joel Test score: 12 out of 12
The Joel Test is a twelve-question measure of the quality of a software team.
- Do you use source control?
- Can you make a build in one step?
- Do you make daily builds?
- Do you have a bug database?
- Do you fix bugs before writing new code?
- Do you have an up-to-date schedule?
- Do you have a spec?
- Do programmers have quiet working conditions?
- Do you use the best tools money can buy?
- Do you have testers?
- Do new candidates write code during their interview?
- Do you do hallway usability testing?
Saturday, March 5, 2016
Special sites
- http://www.essentialsql.com/use-sql-server-to-sort-alphanumeric-values/
- http://www.javaspecialists.eu/archive/Issue054.html
- https://www.jitbit.com/news/181-jitbits-sql-interview-questions/
- http://jqpresentation.slaks.net/Demos/Introducing-jQuery/#
- http://www.programcreek.com/2013/03/leetcode-lru-cache-java/
- http://www.functionaljava.org/
- http://vvratha.blogspot.com/
Monday, February 22, 2016
HashMap Vs HashTable
- HashMap permits one null key and multiple null values. Hashtable doesn't permit any sort of nulls (key or values).
- http://javahungry.blogspot.com/2014/03/hashmap-vs-hashtable-difference-with-example-java-interview-questions.html
Monday, February 15, 2016
Some Interview Questions
Most Important Questions were as follows:
1) Difference between == and equals()
2) What is the requirements for a object to be used as a key on hashmap
3) What is difference betwen ConcurrentMap and SynchronizedMap
4) What is difference betwen HashMap and TreeMap
5) Which collection you should use if your need to do frequent delete/insert operation?
6) Which collection you should use if your need to use if you need faster get operation?
7) How did you handled security in Spring?
8) How did you handle dynamic query in Mybatis?
9) What is the differenc between Rest App vs Rest Webservice
10) How did handle transaction in project?
11) How did you handle composit primary key in hibernate?
12) How did you handle many to many relationsip in hibernate?
13) What are the collections availbe in hibernate FW?
14) How did you handle optimistic locking in hibernate?
You need to override equals() and hashcode() methods of a class whose objects you want to use as Key in a hashmap... This is required because hashmap uses these 2 methods to retrieve the stored values... Read implementation of hashmap for more details... It will clear away your doubt completely.
Resource Link:
1) Difference between == and equals()
2) What is the requirements for a object to be used as a key on hashmap
3) What is difference betwen ConcurrentMap and SynchronizedMap
4) What is difference betwen HashMap and TreeMap
5) Which collection you should use if your need to do frequent delete/insert operation?
6) Which collection you should use if your need to use if you need faster get operation?
7) How did you handled security in Spring?
8) How did you handle dynamic query in Mybatis?
9) What is the differenc between Rest App vs Rest Webservice
10) How did handle transaction in project?
11) How did you handle composit primary key in hibernate?
12) How did you handle many to many relationsip in hibernate?
13) What are the collections availbe in hibernate FW?
14) How did you handle optimistic locking in hibernate?
Question:
What is the requirements for a object to be used as a key on hashmap?Ans:
You need to override equals() and hashcode() methods of a class whose objects you want to use as Key in a hashmap... This is required because hashmap uses these 2 methods to retrieve the stored values... Read implementation of hashmap for more details... It will clear away your doubt completely.
When a class does not override the
equals() or hashCode() methods, the default implementations found on the Object class are used instead. In particular, equals() simply does a check for reference equality.
That immediately explains why your approach isn't working: the new
Key object clearly isn't referring to the old Key object.
If you'd like to be able to specify a new instance with the same property, then you should override the
equals() method with an implementation that meets your criteria for key equality. You should override hashCode() as well, to have full control over the key comparison process.Resource Link:
- https://www.quora.com/What-two-methods-do-you-need-to-implement-a-key-object-in-HashMap
- https://stackoverflow.com/a/9440415/2293534
3) What is difference betwen ConcurrentMap and SynchronizedMap?
---
|
Hashtable locks the object, while ConcurrentHashMap locks only the bucket.
Resource Link: https://stackoverflow.com/a/17776425/2293534
ConcurrentHashMap:
=================
1. use ConcurrentHashMap. It allows concurrent modification of the Map from several threads without the need to block them.
2. Use this, if performance is critical, and each thread only inserts data to the map, with reads happening less frequently.
Collections.synchronizedMap(map)
========
1. Collections.synchronizedMap(Map) - they use very simple synchronization, which means that only one thread can access the map at the same time.
2. As it creates a blocking Map which will degrade performance, albeit ensure consistency (if used properly).
3. Use this if you need to ensure data consistency, and each thread needs to have an up-to-date view of the map.
Resource Link: https://stackoverflow.com/questions/510632/whats-the-difference-between-concurrenthashmap-and-collections-synchronizedmap
The main difference between these two is that ConcurrentHashMap will lock only portion of the data which are being updated while other portion of data can be accessed by other threads. However, Collections.synchronizedMap() will lock all the data while updating, other threads can only access the data when the lock is released. If there are many update operations and relative small amount of read operations, you should choose ConcurrentHashMap.
Also one other difference is that ConcurrentHashMap will not preserve the order of elements in the Map passed in. It is similar to HashMap when storing data. There is no guarantee that the element order is preserved. While Collections.synchronizedMap() will preserve the elements order of the Map passed in. For example, if you pass a TreeMap to ConcurrentHashMap, the elements order in the ConcurrentHashMap may not be the same as the order in the TreeMap, but Collections.synchronizedMap() will preserve the order.
Furthermore, ConcurrentHashMap can guarantee that there is no ConcurrentModificationException thrown while one thread is updating the map and another thread is traversing the iterator obtained from the map. However, Collections.synchronizedMap() is not guaranteed on this.
Resource Link: https://stackoverflow.com/a/26958843/2293534
Monday, January 25, 2016
Preparation for Interview - Part 1
What do you know about Rakuten?
Ans:
Rakuten is one of the biggest e-commerce companies covering from shopping, travelling, credit card, banking, etc
https://www.hubspot.com/sales/follow-up-email-after-interview
Ans:
Rakuten is one of the biggest e-commerce companies covering from shopping, travelling, credit card, banking, etc
https://www.hubspot.com/sales/follow-up-email-after-interview
Subscribe to:
Posts (Atom)