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!
𝐂𝐡𝐞𝐜𝐤 𝐨𝐮𝐭 𝐄𝐝𝐮𝐜𝐚𝐭𝐢𝐯𝐞 𝐡𝐞𝐫𝐞-
[ Ссылка ]
Educative Unlimited-
Educative.io/unlimited
You can get 𝐃𝐈𝐒𝐂𝐎𝐔𝐍𝐓𝐒 using code "KEERTI" -
➡️ On 𝐂𝐨𝐝𝐢𝐧𝐠 𝐍𝐢𝐧𝐣𝐚𝐬 - [ Ссылка ]
➡️ On 𝐈𝐧𝐭𝐞𝐫𝐯𝐢𝐞𝐰𝐑𝐞𝐚𝐝𝐲 - [ Ссылка ]
➡️ On 𝐄𝐝𝐮𝐜𝐚𝐭𝐢𝐯𝐞 - [ Ссылка ]
➡️ On all 𝐆𝐞𝐞𝐤𝐬𝐅𝐨𝐫𝐆𝐞𝐞𝐤𝐬 paid courses - [ Ссылка ]
Please 𝐬𝐮𝐛𝐬𝐜𝐫𝐢𝐛𝐞 here - [ Ссылка ]
You can also connect with me on-
𝐈𝐧𝐬𝐭𝐚𝐠𝐫𝐚𝐦 (for not so professional, chill side of my life) - [ Ссылка ]
𝐓𝐞𝐥𝐞𝐠𝐫𝐚𝐦 Channel - [ Ссылка ]
𝐓𝐰𝐢𝐭𝐭𝐞𝐫 - [ Ссылка ]
𝐋𝐢𝐧𝐤𝐞𝐝𝐈𝐧 - [ Ссылка ]
𝐂𝐡𝐞𝐜𝐤 𝐨𝐮𝐭 𝐭𝐡𝐞𝐬𝐞 𝐩𝐥𝐚𝐲𝐥𝐢𝐬𝐭𝐬-
𝐌𝐨𝐜𝐤 𝐈𝐧𝐭𝐞𝐫𝐯𝐢𝐞𝐰𝐬 - [ Ссылка ]
𝐃𝐞𝐬𝐢𝐠𝐧 𝐏𝐚𝐭𝐭𝐞𝐫𝐧𝐬 -
[ Ссылка ]
𝐃𝐒𝐀 - [ Ссылка ]
𝐃𝐲𝐧𝐚𝐦𝐢𝐜 𝐏𝐫𝐨𝐠𝐫𝐚𝐦𝐦𝐢𝐧𝐠 - [ Ссылка ]
𝐇𝐨𝐧𝐞𝐬𝐭 𝐂𝐨𝐧𝐯𝐞𝐫𝐬𝐚𝐭𝐢𝐨𝐧𝐬 -
[ Ссылка ]
𝐂++ - [ Ссылка ]
𝐁𝐚𝐬𝐢𝐜𝐬 𝐨𝐟 𝐈𝐧𝐯𝐞𝐬𝐭𝐦𝐞𝐧𝐭𝐬 - [ Ссылка ]
𝐋𝐢𝐟𝐞 𝐚𝐭 𝐈𝐧𝐭𝐮𝐢𝐭 - [ Ссылка ]
𝐒𝐡𝐨𝐫𝐭𝐬 - [ Ссылка ]
𝐂++ 𝐒𝐓𝐋 - [ Ссылка ]
𝐓𝐫𝐞𝐞𝐬 & 𝐆𝐫𝐚𝐩𝐡𝐬 - [ Ссылка ]_
𝐖𝐢𝐭𝐡 𝐏𝐚𝐩𝐚 - [ Ссылка ]
𝐒𝐲𝐬𝐭𝐞𝐦 𝐃𝐞𝐬𝐢𝐠𝐧 - [ Ссылка ]
𝐏𝐚𝐢𝐧𝐭𝐢𝐧𝐠𝐬 - [ Ссылка ]
𝐕𝐥𝐨𝐠𝐬 - [ Ссылка ]
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
![](https://i.ytimg.com/vi/oeQWxhlnCHM/maxresdefault.jpg)