Загрузка страницы

Singleton Design Pattern | Implementation with details & code ✌🏻

Really really wanted my first YouTube 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!

𝐂𝐡𝐞𝐜𝐤 𝐨𝐮𝐭 𝐄𝐝𝐮𝐜𝐚𝐭𝐢𝐯𝐞 𝐡𝐞𝐫𝐞-
http://educative.io/keerti

Educative Unlimited-
Educative.io/unlimited

You can get 𝐃𝐈𝐒𝐂𝐎𝐔𝐍𝐓𝐒 using code "KEERTI" -
➡️ On 𝐂𝐨𝐝𝐢𝐧𝐠 𝐍𝐢𝐧𝐣𝐚𝐬 - https://bit.ly/CodingNinjas-12
➡️ On 𝐈𝐧𝐭𝐞𝐫𝐯𝐢𝐞𝐰𝐑𝐞𝐚𝐝𝐲 - https://get.interviewready.io/?_aff=KEERTI
➡️ On 𝐄𝐝𝐮𝐜𝐚𝐭𝐢𝐯𝐞 - http://educative.io/keerti
➡️ On all 𝐆𝐞𝐞𝐤𝐬𝐅𝐨𝐫𝐆𝐞𝐞𝐤𝐬 paid courses - https://practice.geeksforgeeks.org/courses

Please 𝐬𝐮𝐛𝐬𝐜𝐫𝐢𝐛𝐞 here - https://www.youtube.com/c/KeertiPurswani

You can also connect with me on-
𝐈𝐧𝐬𝐭𝐚𝐠𝐫𝐚𝐦 (for not so professional, chill side of my life) - https://www.instagram.com/keerti.purswani/?hl=en
𝐓𝐞𝐥𝐞𝐠𝐫𝐚𝐦 Channel - https://t.me/keertipurswani
𝐓𝐰𝐢𝐭𝐭𝐞𝐫 - https://twitter.com/KeertiPurswani?s=09
𝐋𝐢𝐧𝐤𝐞𝐝𝐈𝐧 - https://www.linkedin.com/in/keertipurswani/

𝐂𝐡𝐞𝐜𝐤 𝐨𝐮𝐭 𝐭𝐡𝐞𝐬𝐞 𝐩𝐥𝐚𝐲𝐥𝐢𝐬𝐭𝐬-
𝐌𝐨𝐜𝐤 𝐈𝐧𝐭𝐞𝐫𝐯𝐢𝐞𝐰𝐬 - https://www.youtube.com/watch?v=MFkqnGiCCiU&list=PLliXPok7Zonn3pcQp2TzNYnIKq1jPoLM8
𝐃𝐞𝐬𝐢𝐠𝐧 𝐏𝐚𝐭𝐭𝐞𝐫𝐧𝐬 -
https://www.youtube.com/watch?v=w_SAy69I2vQ&list=PLliXPok7ZonlZJuAN0hvUnf5ovFepjxU0
𝐃𝐒𝐀 - https://www.youtube.com/watch?v=yD7wV8SyPrc&list=PLliXPok7ZonkjkMqpzMTgof1yj8KNievn
𝐃𝐲𝐧𝐚𝐦𝐢𝐜 𝐏𝐫𝐨𝐠𝐫𝐚𝐦𝐦𝐢𝐧𝐠 - https://www.youtube.com/watch?v=zfgZtcDQAxw&list=PLliXPok7ZonkJL2Wxb8CDXsDk193wOsdc
𝐇𝐨𝐧𝐞𝐬𝐭 𝐂𝐨𝐧𝐯𝐞𝐫𝐬𝐚𝐭𝐢𝐨𝐧𝐬 -
https://www.youtube.com/watch?v=_7oibmQBdGg&list=PLliXPok7Zonn2Lhsd3_N-Aq2gLsJ433iN
𝐂++ - https://www.youtube.com/watch?v=47ZP-0iBicI&list=PLliXPok7ZonkJEe0cUbVZ3umyKbFA-Dd9
𝐁𝐚𝐬𝐢𝐜𝐬 𝐨𝐟 𝐈𝐧𝐯𝐞𝐬𝐭𝐦𝐞𝐧𝐭𝐬 - https://www.youtube.com/watch?v=atm_9VNCqk0&list=PLliXPok7ZonliApS46SDRd-QUj23TNAJa
𝐋𝐢𝐟𝐞 𝐚𝐭 𝐈𝐧𝐭𝐮𝐢𝐭 - https://www.youtube.com/watch?v=BlgvjQmsVYw&list=PLliXPok7ZonlqcSx7-UpoqWnw2sSOUasL
𝐒𝐡𝐨𝐫𝐭𝐬 - https://www.youtube.com/watch?v=1awaU7n0uXs&list=PLliXPok7Zonmtn7MzXqnClQvcrIVxVGz9
𝐂++ 𝐒𝐓𝐋 - https://www.youtube.com/watch?v=fk5KtV1EP3M&list=PLliXPok7Zonl8JvKc-paNnzTHxa1IqZYS
𝐓𝐫𝐞𝐞𝐬 & 𝐆𝐫𝐚𝐩𝐡𝐬 - https://www.youtube.com/watch?v=uF9qnHOLB8c&list=PLliXPok7ZonkJ3M-LR8seehrVr6QFJuE_
𝐖𝐢𝐭𝐡 𝐏𝐚𝐩𝐚 - https://www.youtube.com/watch?v=Ei2zOVYIyKE&list=PLliXPok7Zonky-MYVuTeUfpBgLcV9E2wD
𝐒𝐲𝐬𝐭𝐞𝐦 𝐃𝐞𝐬𝐢𝐠𝐧 - https://www.youtube.com/watch?v=tv54FY48Vio&list=PLliXPok7ZonmCHlRckbY4ZRH0_AmnAbPw
𝐏𝐚𝐢𝐧𝐭𝐢𝐧𝐠𝐬 - https://www.youtube.com/watch?v=ZrqZVu3XKeE&list=PLliXPok7Zonle-w-u52zy0RT30qAvHDbA
𝐕𝐥𝐨𝐠𝐬 - https://www.youtube.com/watch?v=QaEFZ5xUfLQ&list=PLliXPok7ZonkiX25OxTFWFRRXVuSFYWE2

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

Видео Singleton Design Pattern | Implementation with details & code ✌🏻 канала Keerti Purswani
Показать
Комментарии отсутствуют
Введите заголовок:

Введите адрес ссылки:

Введите адрес видео с YouTube:

Зарегистрируйтесь или войдите с
Информация о видео
6 января 2022 г. 19:10:54
00:21:09
Другие видео канала
10. Most people do this by DFS only | BFS DFS-C++,JAVA | LeetCode 547-No of Provinces with Intuition10. Most people do this by DFS only | BFS DFS-C++,JAVA | LeetCode 547-No of Provinces with Intuition15. Surrounded Regions | LeetCode Question 130 | Intuition with Easy C++, JAVA Code | MUST DO Algos!15. Surrounded Regions | LeetCode Question 130 | Intuition with Easy C++, JAVA Code | MUST DO Algos!12. Variations you should NOT miss - LeetCode 1254 - Number of Closed Islands |C++, JAVA | Intuition12. Variations you should NOT miss - LeetCode 1254 - Number of Closed Islands |C++, JAVA | IntuitionWhat is C++ STL? Why do we need it? Is it important?What is C++ STL? Why do we need it? Is it important?3. Introduction to DFS and BFS | Why is Stack/Queue used? Develop Intuition| Tree Vs Graph Traversal3. Introduction to DFS and BFS | Why is Stack/Queue used? Develop Intuition| Tree Vs Graph Traversal1. Introduction to Graphs | Types of Graphs - Sparse, Dense, Cyclic, Directed, Connected…1. Introduction to Graphs | Types of Graphs - Sparse, Dense, Cyclic, Directed, Connected…Artists' kind of Home Tour | Personal Exhibition | All paintings at my homeArtists' kind of Home Tour | Personal Exhibition | All paintings at my homeHow Zoom handles Video-Calls? System Design Charcha with @gkcsHow Zoom handles Video-Calls? System Design Charcha with @gkcsMap in JS | Higher Order FunctionMap in JS | Higher Order Function2. Representation of Graphs - Adjacency List, Matrix with Comparison of Space and Time Complexity!2. Representation of Graphs - Adjacency List, Matrix with Comparison of Space and Time Complexity!Optimise DP solutions with very small code change - Solve hard questions with me 😊Optimise DP solutions with very small code change - Solve hard questions with me 😊Observer Design Pattern Use Cases and Examples! #shortsObserver Design Pattern Use Cases and Examples! #shortsBFS, DFS|Explanation with examples, Comparison, Complexity, Tricky Questions|Trees, Graphs TraversalBFS, DFS|Explanation with examples, Comparison, Complexity, Tricky Questions|Trees, Graphs TraversalEdge Cases for Questions involving numbers | Handle Corner Cases 😇😇 ⏱️⌛ Learn in a min ⏱️⌛ #ShortsEdge Cases for Questions involving numbers | Handle Corner Cases 😇😇 ⏱️⌛ Learn in a min ⏱️⌛ #ShortsIntro to Design Patterns | What, Why, Types | Explained in very easy way | Get your basics clear! ✌️Intro to Design Patterns | What, Why, Types | Explained in very easy way | Get your basics clear! ✌️Dead Letter Queue! Simple but Important concept of HLD that you should know! With Example!Dead Letter Queue! Simple but Important concept of HLD that you should know! With Example!Sets, Multisets - C++ STL | When to use? Comparison, ImplementationSets, Multisets - C++ STL | When to use? Comparison, ImplementationMy mental/emotional journey of becoming Software Engineer-How can we all help each other? Let's talkMy mental/emotional journey of becoming Software Engineer-How can we all help each other? Let's talkSingleton Design Pattern Use Cases & Examples! #shortsSingleton Design Pattern Use Cases & Examples! #shortsThank you! Forever Grateful! #100ksubscribers #teacher #softwaredeveloperThank you! Forever Grateful! #100ksubscribers #teacher #softwaredeveloperPreparation Strategy to get in your Dream Company!!Preparation Strategy to get in your Dream Company!!
Яндекс.Метрика