My favorite part of an interview, to the surprise of no one that knows me here, is: OOP Theory and Design
This is the sixth thread of the series: Interview Preparation!
https://abs.twimg.com/emoji/v2/... draggable="false" alt="🧵" title="Thread" aria-label="Emoji: Thread">THREAD
https://abs.twimg.com/emoji/v2/... draggable="false" alt="🧵" title="Thread" aria-label="Emoji: Thread">
This is the sixth thread of the series: Interview Preparation!
First, you need to get comfortable with the basics & Principles of OOP:
- Object, Message, Methods
- References, State, Properties
- Encapsulation, scope, interfaces
- Classes & Constructors
- Inheritance
- Diagrams
I got you covered for these topics
https://www.youtube.com/watch?v=Mf-VAaMxuiU
https://www.youtube.com/watch... class="Emoji" style="height:16px;" src=" https://abs.twimg.com/emoji/v2/... draggable="false" alt="⬇️" title="Pfeil nach unten" aria-label="Emoji: Pfeil nach unten">
- Object, Message, Methods
- References, State, Properties
- Encapsulation, scope, interfaces
- Classes & Constructors
- Inheritance
- Diagrams
I got you covered for these topics
https://www.youtube.com/watch?v=Mf-VAaMxuiU
- Interfaces vs Abstract classes:
Interfaces are contracts, define boundaries, help you design to extend, and not modify
Abstract classes are "incomplete" classes, and therefore they can& #39;t be instantiated. You need to derive from them and complete its definition
https://abs.twimg.com/emoji/v2/... draggable="false" alt="⬇️" title="Pfeil nach unten" aria-label="Emoji: Pfeil nach unten">
Interfaces are contracts, define boundaries, help you design to extend, and not modify
Abstract classes are "incomplete" classes, and therefore they can& #39;t be instantiated. You need to derive from them and complete its definition
- Polymorphism: You should code a solution that uses polymorphism.
It is basically the possibility to treat several objects of different types via 1 interface.
A key idea is that the benefits of the polymorphism is perceived by the user that generalizes the usage.
https://abs.twimg.com/emoji/v2/... draggable="false" alt="⬇️" title="Pfeil nach unten" aria-label="Emoji: Pfeil nach unten">
It is basically the possibility to treat several objects of different types via 1 interface.
A key idea is that the benefits of the polymorphism is perceived by the user that generalizes the usage.
Another two key topics borderline with FP are mutability and Working with collections.
For collections you want to be comfortable using:
- filter, map, reduce,
- forEach, find, forAll, any
Or whatever equivalents there are in your preferred language.
https://abs.twimg.com/emoji/v2/... draggable="false" alt="⬇️" title="Pfeil nach unten" aria-label="Emoji: Pfeil nach unten">
For collections you want to be comfortable using:
- filter, map, reduce,
- forEach, find, forAll, any
Or whatever equivalents there are in your preferred language.
Practice, practice practice!
Search for exercise online, or imagine your own scenarios:
- How would you model a supermarket?
- What about a Factory?
- And a shopping cart?
Try things out and design solutions following design principles!
https://abs.twimg.com/emoji/v2/... draggable="false" alt="⬇️" title="Pfeil nach unten" aria-label="Emoji: Pfeil nach unten">
Search for exercise online, or imagine your own scenarios:
- How would you model a supermarket?
- What about a Factory?
- And a shopping cart?
Try things out and design solutions following design principles!
Then I would recommend you to read some books or material related to:
- Design patterns (I have content coming your way 4 this)
- Refactoring
- Testing
There is always a couple of questions regarding those 3 topics!
https://abs.twimg.com/emoji/v2/... draggable="false" alt="⬇️" title="Pfeil nach unten" aria-label="Emoji: Pfeil nach unten">
- Design patterns (I have content coming your way 4 this)
- Refactoring
- Testing
There is always a couple of questions regarding those 3 topics!
"Design patterns are solutions for repetitive problems we find while developing software.
Each pattern has a name for reference, the problem for which it should be applied, and a high-level solution"
Clear and short definition
You can read more here:
https://www.codejourneyclub.com/design-patterns-the-holy-grail/
https://www.codejourneyclub.com/design-pa... class="Emoji" style="height:16px;" src=" https://abs.twimg.com/emoji/v2/... draggable="false" alt="⬇️" title="Pfeil nach unten" aria-label="Emoji: Pfeil nach unten">
Each pattern has a name for reference, the problem for which it should be applied, and a high-level solution"
Clear and short definition
You can read more here:
https://www.codejourneyclub.com/design-patterns-the-holy-grail/
For refactoring the idea is to change the design and implementation without modifying the functionality
Then why change it?
To make it cleaner, more scalable, more extensible & overall to improve the quality
A trigger for refactoring are code smells:
https://www.codejourneyclub.com/does-your-code-smell/
https://www.codejourneyclub.com/does-your... class="Emoji" style="height:16px;" src=" https://abs.twimg.com/emoji/v2/... draggable="false" alt="⬇️" title="Pfeil nach unten" aria-label="Emoji: Pfeil nach unten">
Then why change it?
To make it cleaner, more scalable, more extensible & overall to improve the quality
A trigger for refactoring are code smells:
https://www.codejourneyclub.com/does-your-code-smell/
Regarding testing, you should learn about:
- Manual vs Automated testing
- Unit tests
- Integration tests
- Test coverage
- Mocks & Stubs
- Assertions
- Frameworks
And much more!
I recommend you to follow @dmokafa & @macerub, both amazing at this!
https://abs.twimg.com/emoji/v2/... draggable="false" alt="⬇️" title="Pfeil nach unten" aria-label="Emoji: Pfeil nach unten">
- Manual vs Automated testing
- Unit tests
- Integration tests
- Test coverage
- Mocks & Stubs
- Assertions
- Frameworks
And much more!
I recommend you to follow @dmokafa & @macerub, both amazing at this!
That will be all for this thread, we covered from the very basics and fundamentals to some complex topics of OOP and design principles!
Thank you for reading, sorry for taking 2 gap days, and I will see you tomorrow for some Backend & SQL!
https://abs.twimg.com/emoji/v2/... draggable="false" alt="⬇️" title="Pfeil nach unten" aria-label="Emoji: Pfeil nach unten">
Thank you for reading, sorry for taking 2 gap days, and I will see you tomorrow for some Backend & SQL!