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

    ะšะตะปะตัั–