Singleton Design Pattern | Implementation with details & code โ๐ป
Really really wanted my first KZread video this year to be a Tutorial! Itโs a symbol that this year is going to be filled with a LOT of tutorials - starting with finishing ๐๐๐ฌ๐ข๐ ๐ง ๐๐๐ญ๐ญ๐๐ซ๐ง ๐๐๐ซ๐ข๐๐ฌ.
Todayโs video is on ๐๐ข๐ง๐ ๐ฅ๐๐ญ๐จ๐ง ๐๐๐ฌ๐ข๐ ๐ง ๐๐๐ญ๐ญ๐๐ซ๐ง. I know most people think they know this design pattern as itโs a basic and common one, but there are details to it that we end up missing. Making the code thread safe and efficient is important when it comes to implementing the code.
So, obviously. I have covered everything with code in detail. Link is in comments. Please keep sharing your feedback.
If you guys really want educators to be motivated and create a lot of tutorials, please do support us - just a like, share or subscribe can mean a lot to us. Trust me - a LOT of effort goes behind these videos!
๐๐ก๐๐๐ค ๐จ๐ฎ๐ญ ๐๐๐ฎ๐๐๐ญ๐ข๐ฏ๐ ๐ก๐๐ซ๐-
educative.io/keerti
Educative Unlimited-
Educative.io/unlimited
You can get ๐๐๐๐๐๐๐๐๐ using code "KEERTI" -
โก๏ธ On ๐๐จ๐๐ข๐ง๐ ๐๐ข๐ง๐ฃ๐๐ฌ - bit.ly/CodingNinjas-12
โก๏ธ On ๐๐ง๐ญ๐๐ซ๐ฏ๐ข๐๐ฐ๐๐๐๐๐ฒ - get.interviewready.io/?_aff=K...
โก๏ธ On ๐๐๐ฎ๐๐๐ญ๐ข๐ฏ๐ - educative.io/keerti
โก๏ธ On all ๐๐๐๐ค๐ฌ๐
๐จ๐ซ๐๐๐๐ค๐ฌ paid courses - practice.geeksforgeeks.org/co...
Please ๐ฌ๐ฎ๐๐ฌ๐๐ซ๐ข๐๐ here - / keertipurswani
You can also connect with me on-
๐๐ง๐ฌ๐ญ๐๐ ๐ซ๐๐ฆ (for not so professional, chill side of my life) - keerti.purs...
๐๐๐ฅ๐๐ ๐ซ๐๐ฆ Channel - t.me/keertipurswani
๐๐ฐ๐ข๐ญ๐ญ๐๐ซ - KeertiPurswani?s=09
๐๐ข๐ง๐ค๐๐๐๐ง - / keertipurswani
๐๐ก๐๐๐ค ๐จ๐ฎ๐ญ ๐ญ๐ก๐๐ฌ๐ ๐ฉ๐ฅ๐๐ฒ๐ฅ๐ข๐ฌ๐ญ๐ฌ-
๐๐จ๐๐ค ๐๐ง๐ญ๐๐ซ๐ฏ๐ข๐๐ฐ๐ฌ - โข Mock Coding Interview ...
๐๐๐ฌ๐ข๐ ๐ง ๐๐๐ญ๐ญ๐๐ซ๐ง๐ฌ -
โข Intro to Design Patter...
๐๐๐ - โข Median of 2 Sorted Arr...
๐๐ฒ๐ง๐๐ฆ๐ข๐ ๐๐ซ๐จ๐ ๐ซ๐๐ฆ๐ฆ๐ข๐ง๐ - โข Burst Balloon Problem ...
๐๐จ๐ง๐๐ฌ๐ญ ๐๐จ๐ง๐ฏ๐๐ซ๐ฌ๐๐ญ๐ข๐จ๐ง๐ฌ -
โข Meet Hiring Manager at...
๐++ - โข VTable & VPointers - V...
๐๐๐ฌ๐ข๐๐ฌ ๐จ๐ ๐๐ง๐ฏ๐๐ฌ๐ญ๐ฆ๐๐ง๐ญ๐ฌ - โข What are IPOs? How to ...
๐๐ข๐๐ ๐๐ญ ๐๐ง๐ญ๐ฎ๐ข๐ญ - โข Meet my Manager at Int...
๐๐ก๐จ๐ซ๐ญ๐ฌ - โข Floor, Ceil use for Pr...
๐++ ๐๐๐ - โข What is C++ STL? Why d...
๐๐ซ๐๐๐ฌ & ๐๐ซ๐๐ฉ๐ก๐ฌ - โข BFS, DFS|Explanation w...
๐๐ข๐ญ๐ก ๐๐๐ฉ๐ - โข Explaining OOPs concep...
๐๐ฒ๐ฌ๐ญ๐๐ฆ ๐๐๐ฌ๐ข๐ ๐ง - โข Factory Design Pattern...
๐๐๐ข๐ง๐ญ๐ข๐ง๐ ๐ฌ - โข Wall Art | SwitchBoard...
๐๐ฅ๐จ๐ ๐ฌ - โข Best Ladakh Bike Trip ...
The video contains following parts-
0:00-1:45 - Intro of Singleton Design Pattern
1:45-2:08 - Educative Promotion
2:08-4:45 - Simple Logger Class Code
4:45-6:33 - Count instances of Logger
6:33-7:25 - Restrict Logger Instantiation
7:25-11:52 - Simple Singleton Implementation
11:52-15:32 - Code fails in MultiThreading Case
15:32-17:20 - Thread Safe Singleton
17:20-19:03 - Double-checked Locking
19:03-20:15 - Points to keep in mind!
#designpatterns #singleton #systemdesign #softwareengineering
ะัะบััะปะตั: 139