👉 𝟭𝟬 𝗚𝗼𝗹𝗱𝗲𝗻 𝗥𝘂𝗹𝗲𝘀 𝗳𝗼𝗿 𝗦𝗼𝗹𝘃𝗶𝗻𝗴 𝗖𝗼𝗱𝗶𝗻𝗴 𝗤𝘂𝗲𝘀𝘁𝗶𝗼𝗻𝘀 𝗶𝗻 𝗜𝗻𝘁𝗲𝗿𝘃𝗶𝗲𝘄 💯.
📍If we are dealing with top/maximum/minimum/closest ‘K' elements among 'N' elements, we will be using a Heap.
📍If the given input is a sorted array or a list, we will either be using Binary Search or the Two Pointers.
📍If we need to try all combinations (or permutations) of the input, we can either use Backtracking or Breadth First Search.
📍Most of the questions related to Trees or Graphs can be solved either through Breadth First Search or Depth First Search.
📍Every recursive solution can be converted to an iterative solution using a Stack.
📍For a problem involving arrays, if there exists a solution in O(n^2)time and O(1) space, there must exist two other solutions :
1. Using a HashMap or a Set for O(n) time and O(n) space .
2. Using sorting for O(n log n) time and O(1) space.
📍 If a problem is asking for optimization (e.g., maximization or minimization), we will be using Dynamic Programming.
📍If we need to find some common substring among a set of strings, we will be using a HashMap or a Trie.
📍If we need to search/manipulate a bunch of strings, Trie will be the best data structure.
📍If the problem is related to a LinkedList and we can't use extra space, then use the Fast & Slow Pointer approach.
➖➖➖➖➖➖➖➖➖
🔰 @gopher_academy
📍If we are dealing with top/maximum/minimum/closest ‘K' elements among 'N' elements, we will be using a Heap.
📍If the given input is a sorted array or a list, we will either be using Binary Search or the Two Pointers.
📍If we need to try all combinations (or permutations) of the input, we can either use Backtracking or Breadth First Search.
📍Most of the questions related to Trees or Graphs can be solved either through Breadth First Search or Depth First Search.
📍Every recursive solution can be converted to an iterative solution using a Stack.
📍For a problem involving arrays, if there exists a solution in O(n^2)time and O(1) space, there must exist two other solutions :
1. Using a HashMap or a Set for O(n) time and O(n) space .
2. Using sorting for O(n log n) time and O(1) space.
📍 If a problem is asking for optimization (e.g., maximization or minimization), we will be using Dynamic Programming.
📍If we need to find some common substring among a set of strings, we will be using a HashMap or a Trie.
📍If we need to search/manipulate a bunch of strings, Trie will be the best data structure.
📍If the problem is related to a LinkedList and we can't use extra space, then use the Fast & Slow Pointer approach.
➖➖➖➖➖➖➖➖➖
🔰 @gopher_academy
❤3👍1
𝗪𝗵𝗮𝘁 𝗶𝘀 𝗖𝗹𝗲𝗮𝗻 𝗔𝗿𝗰𝗵𝗶𝘁𝗲𝗰𝘁𝘂𝗿𝗲?
The Clean Architecture philosophy emphasizes the importance of separating concerns in software design and creating code that is 𝗺𝗼𝗱𝘂𝗹𝗮𝗿, 𝘁𝗲𝘀𝘁𝗮𝗯𝗹𝗲, 𝗮𝗻𝗱 𝗺𝗮𝗶𝗻𝘁𝗮𝗶𝗻𝗮𝗯𝗹𝗲. It is developed by software engineer and consultant Robert C. Martin.
At its core, Clean Architecture promotes the idea that software systems should be designed with the primary goal of 𝗯𝗲𝗶𝗻𝗴 𝘂𝗻𝗱𝗲𝗿𝘀𝘁𝗼𝗼𝗱 𝗮𝗻𝗱 𝗺𝗮𝗶𝗻𝘁𝗮𝗶𝗻𝗲𝗱 𝗯𝘆 𝗱𝗲𝘃𝗲𝗹𝗼𝗽𝗲𝗿𝘀 over the long term.
To achieve this goal, Clean Architecture proposes a layered architecture with 𝗰𝗹𝗲𝗮𝗿 𝗯𝗼𝘂𝗻𝗱𝗮𝗿𝗶𝗲𝘀 𝗯𝗲𝘁𝘄𝗲𝗲𝗻 𝗱𝗶𝗳𝗳𝗲𝗿𝗲𝗻𝘁 𝗰𝗼𝗺𝗽𝗼𝗻𝗲𝗻𝘁𝘀 𝗼𝗳 𝘁𝗵𝗲 𝘀𝘆𝘀𝘁𝗲𝗺, so we can achieve independence of frameworks, UI, databases, and delivery mechanisms, as well as the possibility to test in isolation.
The Clean Architecture philosophy defines a 𝘀𝗲𝘁 𝗼𝗳 𝗹𝗮𝘆𝗲𝗿𝘀, starting with the most general and abstract layers and moving toward the most concrete and specific layers. These layers include:
🔹 𝗘𝗻𝘁𝗶𝘁𝗶𝗲𝘀: The fundamental objects in the system, which represent the core business logic and data. They encapsulate the most general and high-level rules.
🔹 𝗨𝘀𝗲 𝗰𝗮𝘀𝗲𝘀: The high-level interactions between the system and its users or other external systems, containing application-specific business rules. It is not expected in this layer to affect the entities or external systems.
🔹 𝗜𝗻𝘁𝗲𝗿𝗳𝗮𝗰𝗲𝘀: The mechanisms by which the system communicates with external systems or users. Here we can have an MVC architecture of a GUI.
🔹 𝗖𝗼𝗻𝘁𝗿𝗼𝗹𝗹𝗲𝗿𝘀: The components responsible for managing the flow of data between the other layers of the system.
🔹 𝗣𝗿𝗲𝘀𝗲𝗻𝘁𝗲𝗿𝘀: The components responsible for presenting data to users or other systems.
🔹 𝗜𝗻𝗳𝗿𝗮𝘀𝘁𝗿𝘂𝗰𝘁𝘂𝗿𝗲: The components responsible for interacting with external systems or services, such as databases or APIs.
An 𝗮𝗽𝗽𝗹𝗶𝗰𝗮𝘁𝗶𝗼𝗻 𝘀𝘁𝗿𝘂𝗰𝘁𝘂𝗿𝗲 with Clean Architecture could look like, this for POS App:
📁 Source
| 📁 Core
| 📁 Application
| 📁 Domain
| 📁 Infrastructure
| 📁 Identity
| 📁 Persistence
| 📁 Shared
| 📁 Api
| 📁 ...
In comparison to 𝗢𝗻𝗶𝗼𝗻 𝗔𝗿𝗰𝗵𝗶𝘁𝗲𝗰𝘁𝘂𝗿𝗲, Clean Architecture offers a clearer separation of concerns and a better comprehension of boundaries. They support similar ideals but with various levels, and they are close relatives. Clean architecture makes it crystal clear why each layer is necessary and what each one's roles are, which is why it is often referred to as 𝘀𝗰𝗿𝗲𝗮𝗺𝗶𝗻𝗴 𝗮𝗿𝗰𝗵𝗶𝘁𝗲𝗰𝘁𝘂𝗿𝗲.
➖➖➖➖➖➖➖➖➖
🔰 @gopher_academy
The Clean Architecture philosophy emphasizes the importance of separating concerns in software design and creating code that is 𝗺𝗼𝗱𝘂𝗹𝗮𝗿, 𝘁𝗲𝘀𝘁𝗮𝗯𝗹𝗲, 𝗮𝗻𝗱 𝗺𝗮𝗶𝗻𝘁𝗮𝗶𝗻𝗮𝗯𝗹𝗲. It is developed by software engineer and consultant Robert C. Martin.
At its core, Clean Architecture promotes the idea that software systems should be designed with the primary goal of 𝗯𝗲𝗶𝗻𝗴 𝘂𝗻𝗱𝗲𝗿𝘀𝘁𝗼𝗼𝗱 𝗮𝗻𝗱 𝗺𝗮𝗶𝗻𝘁𝗮𝗶𝗻𝗲𝗱 𝗯𝘆 𝗱𝗲𝘃𝗲𝗹𝗼𝗽𝗲𝗿𝘀 over the long term.
To achieve this goal, Clean Architecture proposes a layered architecture with 𝗰𝗹𝗲𝗮𝗿 𝗯𝗼𝘂𝗻𝗱𝗮𝗿𝗶𝗲𝘀 𝗯𝗲𝘁𝘄𝗲𝗲𝗻 𝗱𝗶𝗳𝗳𝗲𝗿𝗲𝗻𝘁 𝗰𝗼𝗺𝗽𝗼𝗻𝗲𝗻𝘁𝘀 𝗼𝗳 𝘁𝗵𝗲 𝘀𝘆𝘀𝘁𝗲𝗺, so we can achieve independence of frameworks, UI, databases, and delivery mechanisms, as well as the possibility to test in isolation.
The Clean Architecture philosophy defines a 𝘀𝗲𝘁 𝗼𝗳 𝗹𝗮𝘆𝗲𝗿𝘀, starting with the most general and abstract layers and moving toward the most concrete and specific layers. These layers include:
🔹 𝗘𝗻𝘁𝗶𝘁𝗶𝗲𝘀: The fundamental objects in the system, which represent the core business logic and data. They encapsulate the most general and high-level rules.
🔹 𝗨𝘀𝗲 𝗰𝗮𝘀𝗲𝘀: The high-level interactions between the system and its users or other external systems, containing application-specific business rules. It is not expected in this layer to affect the entities or external systems.
🔹 𝗜𝗻𝘁𝗲𝗿𝗳𝗮𝗰𝗲𝘀: The mechanisms by which the system communicates with external systems or users. Here we can have an MVC architecture of a GUI.
🔹 𝗖𝗼𝗻𝘁𝗿𝗼𝗹𝗹𝗲𝗿𝘀: The components responsible for managing the flow of data between the other layers of the system.
🔹 𝗣𝗿𝗲𝘀𝗲𝗻𝘁𝗲𝗿𝘀: The components responsible for presenting data to users or other systems.
🔹 𝗜𝗻𝗳𝗿𝗮𝘀𝘁𝗿𝘂𝗰𝘁𝘂𝗿𝗲: The components responsible for interacting with external systems or services, such as databases or APIs.
An 𝗮𝗽𝗽𝗹𝗶𝗰𝗮𝘁𝗶𝗼𝗻 𝘀𝘁𝗿𝘂𝗰𝘁𝘂𝗿𝗲 with Clean Architecture could look like, this for POS App:
📁 Source
| 📁 Core
| 📁 Application
| 📁 Domain
| 📁 Infrastructure
| 📁 Identity
| 📁 Persistence
| 📁 Shared
| 📁 Api
| 📁 ...
In comparison to 𝗢𝗻𝗶𝗼𝗻 𝗔𝗿𝗰𝗵𝗶𝘁𝗲𝗰𝘁𝘂𝗿𝗲, Clean Architecture offers a clearer separation of concerns and a better comprehension of boundaries. They support similar ideals but with various levels, and they are close relatives. Clean architecture makes it crystal clear why each layer is necessary and what each one's roles are, which is why it is often referred to as 𝘀𝗰𝗿𝗲𝗮𝗺𝗶𝗻𝗴 𝗮𝗿𝗰𝗵𝗶𝘁𝗲𝗰𝘁𝘂𝗿𝗲.
➖➖➖➖➖➖➖➖➖
🔰 @gopher_academy
👍2🔥1🎉1🕊1
یه اپ کوچیک و جمع و جور برای ترجمه زبان آدمیزادی به SQL. میشه بهش schema هم داد از رو اون کوئری بسازه :)
https://www.sqltranslate.app
➖➖➖➖➖➖➖➖➖
🔰 @gopher_academy
https://www.sqltranslate.app
➖➖➖➖➖➖➖➖➖
🔰 @gopher_academy
👍4
دوستان تصمیم گرفتم یک روز در هفته داخل گروه تماس گروهی داشته باشیم جدا از مسائل کاری باهم تجربیاتمون رو به اشتراک بزاریم و بیشتر باهم آشنا شیم، به همین منظورم کدام روز و ساعت مناسبه؟ در خصوص نرم افزار برای فضای گفتگو هم نظر بدین؟
Final Results
14%
۵ شنبه ساعت ۹ شب (تلگرام)
35%
۵ شنبه ساعت ۹ شب (میتینگ گوگل)
8%
جمعه ساعت ۹ شب (تلگرام)
35%
جمعه ساعت ۹ شب (میتینگ گوگل)
8%
نظرم را داخل کامنت اعلام میکنم
طبق نتایج آرا جهت جلسه میتینگ : https://t.me/gopher_academy/1619
تصمیم بر این شد جمعه ها ساعت ۹ شب داخل گوگل میتینگ، دوستانی که مایل هستند شرکت کنند لطفا ایمیل گوگل خود را داخل کامنت این پست بفرستند.
تا به تقویم گوگل تان اضافه شود.
در ضمن این جلسه دائمی هست و سعی میکنیم هر هفته حضور داشته باشیم.
➖➖➖➖➖➖➖➖➖
🔰 @gopher_academy
تصمیم بر این شد جمعه ها ساعت ۹ شب داخل گوگل میتینگ، دوستانی که مایل هستند شرکت کنند لطفا ایمیل گوگل خود را داخل کامنت این پست بفرستند.
تا به تقویم گوگل تان اضافه شود.
در ضمن این جلسه دائمی هست و سعی میکنیم هر هفته حضور داشته باشیم.
➖➖➖➖➖➖➖➖➖
🔰 @gopher_academy
👍8👎2
درود به همه گوفری ها عزیز نظرتون در مورد محتویاتی که توی سال ۱۴۰۱ توی کانال گوفر آکادمی منتشر شده چیه؟
🍾اگه انتقادی پیشنهادی دارید برامون کامنت بزارید سپاس🍾
🍾اگه انتقادی پیشنهادی دارید برامون کامنت بزارید سپاس🍾
Final Results
38%
عالی
44%
خوب
19%
متوسط
10%
ضعیف
🕊1
Gopher Academy pinned «درود به همه گوفری ها عزیز نظرتون در مورد محتویاتی که توی سال ۱۴۰۱ توی کانال گوفر آکادمی منتشر شده چیه؟
🍾اگه انتقادی پیشنهادی دارید برامون کامنت بزارید سپاس🍾»
🍾اگه انتقادی پیشنهادی دارید برامون کامنت بزارید سپاس🍾»
✅ تجربه مصاحبه تکنیکال
دوستانی که مایل هستند تو بحث مهندسی نرم افزار خودشان را محک بزنند و یک مصاحبه تکنیکال را تجربه کنند تا نقاط ضعف خود را پیدا کنند.
می توانند با بنده هماهنگ کنند تا بصورت رایگان یک مصاحبه تکنیکال داشته باشیم تا سطح و نقاط ضعفشان را راحت پیدا کنند.
جهت اطلاعات بیشتر داخل تلگرام می توانید پیام بدین : @Ja7adR
➖➖➖➖➖➖➖➖➖
🔰 @gopher_academy
دوستانی که مایل هستند تو بحث مهندسی نرم افزار خودشان را محک بزنند و یک مصاحبه تکنیکال را تجربه کنند تا نقاط ضعف خود را پیدا کنند.
می توانند با بنده هماهنگ کنند تا بصورت رایگان یک مصاحبه تکنیکال داشته باشیم تا سطح و نقاط ضعفشان را راحت پیدا کنند.
جهت اطلاعات بیشتر داخل تلگرام می توانید پیام بدین : @Ja7adR
➖➖➖➖➖➖➖➖➖
🔰 @gopher_academy
❤18🕊2
سالی به مهربانی میترا ، به نیکی زرتشت
، به اقتدار کوروش، داشته باشید، نوروز 2582 فرخنده باد
➖➖➖➖➖➖➖➖➖
🔰 @gopher_academy
، به اقتدار کوروش، داشته باشید، نوروز 2582 فرخنده باد
➖➖➖➖➖➖➖➖➖
🔰 @gopher_academy
❤21🎉3🔥2🤣2👎1🍾1💊1
✅ کتابخانه zapper نوشتن لاگ اما آسان
کتابخانه zapper یک نمونه wrap شده از کتابخانه zap می باشد که امکان پیاده سازی انواع لاگ ها را برای شما فراهم می کند. کتابخانه zapper دارای چندین هسته آماده برای پیاده سازی لاگ در محیط های مختلف می باشد و کار با zap را برایتان ساده تر میکند.
قابلیت ها :
- دارای هسته console, file, sentry, json
- نمایش stacktrace در لاگ ها با تعیین Level لاگ
- امکان پیاده سازی فایل لاگ بصورت rotation
- ارسال لاگ به سرویس سنتری
- راه اندازی همزمان چندین هسته در کنار هم برای نگه داری و مدیریت لاگ ها
- خروجی لاگ سازگار با ELK (هسته json)
- ذخیره اطلاعات سرویس برای تفکیک لاگ براساس سرویس (service discovery)
- مناسب برای سناریوهای مختلف در معماری های نرم افزار نظیر ماکروسرویس
مخزن : https://github.com/GoFarsi/zapper
داکیومنت : https://pkg.go.dev/github.com/GoFarsi/zapper
➖➖➖➖➖➖➖➖➖
🔰 @gopher_academy
کتابخانه zapper یک نمونه wrap شده از کتابخانه zap می باشد که امکان پیاده سازی انواع لاگ ها را برای شما فراهم می کند. کتابخانه zapper دارای چندین هسته آماده برای پیاده سازی لاگ در محیط های مختلف می باشد و کار با zap را برایتان ساده تر میکند.
قابلیت ها :
- دارای هسته console, file, sentry, json
- نمایش stacktrace در لاگ ها با تعیین Level لاگ
- امکان پیاده سازی فایل لاگ بصورت rotation
- ارسال لاگ به سرویس سنتری
- راه اندازی همزمان چندین هسته در کنار هم برای نگه داری و مدیریت لاگ ها
- خروجی لاگ سازگار با ELK (هسته json)
- ذخیره اطلاعات سرویس برای تفکیک لاگ براساس سرویس (service discovery)
- مناسب برای سناریوهای مختلف در معماری های نرم افزار نظیر ماکروسرویس
مخزن : https://github.com/GoFarsi/zapper
داکیومنت : https://pkg.go.dev/github.com/GoFarsi/zapper
➖➖➖➖➖➖➖➖➖
🔰 @gopher_academy
❤3💊1
دولت عید امسال اختلالات اینترنت رو شدید تر کرده و خب اگه این مدت تعطیلات رو کار میکنید احتمالا توی نصب پکیج های npm به مشکل بخورید. برای رفع این مشکل میتونید از دستور زیر استفاده کنید:
npm set strict-ssl false --global
yarn config set strict-ssl false --global
DevTwitter | <Pesar/>
➖➖➖➖➖➖➖➖➖
🔰 @gopher_academy
npm set strict-ssl false --global
yarn config set strict-ssl false --global
DevTwitter | <Pesar/>
➖➖➖➖➖➖➖➖➖
🔰 @gopher_academy
🍾12
What linux distro you are using for workstation now?
Anonymous Poll
55%
Ubuntu
8%
Fedora
10%
Manjaro
6%
Arc
3%
Mint
6%
Debian
1%
Deepin
1%
Elementary
2%
Zorin
8%
Other
🕊1
دورهمی هفتگی
دوستان امشب ساعت ۹ اولین جلسه دورهمی هست، دوستانیکه ایمیل فرستادن، داخل تقویم گوگل بررسی کنند و لینک میتینگ داخل event قرار دارد.
- لطفا میکروفون خود را mute و حالت Push to talk بزارید.
- اگر قصد صحبت دارید گزینه بلند کردن دست را بزنید.
➖➖➖➖➖➖➖➖➖
🔰 @gopher_academy
دوستان امشب ساعت ۹ اولین جلسه دورهمی هست، دوستانیکه ایمیل فرستادن، داخل تقویم گوگل بررسی کنند و لینک میتینگ داخل event قرار دارد.
- لطفا میکروفون خود را mute و حالت Push to talk بزارید.
- اگر قصد صحبت دارید گزینه بلند کردن دست را بزنید.
➖➖➖➖➖➖➖➖➖
🔰 @gopher_academy
👍3🌭2🍌2🍾2🕊1