@oleshkomyroslav Зуйню кажеш - цей плагін дозволяє компілювати код Kotlin для кількох платформ, таких як JVM, JavaScript і різноманітних нативних цілей, використовуючи одну кодову базу. Плагін надає інструменти для налаштування, створення та тестування коду Kotlin для цих платформ.
𝗗𝗼 𝘆𝗼𝘂 𝗵𝗮𝘃𝗲 𝗮 𝗳𝗶𝘅𝗲𝗱 𝗺𝗶𝗻𝗱𝘀𝗲𝘁?
If you have it, you think you cannot be better or have a better job or life.
This is a prejudice that constrains you from growing further.
More outstanding achievement and well-being have all been associated with having a growth mindset, a mentality that one's talents can be developed through work and learning.
As it requires confronting rooted ideas and thought habits, shifting one's mentality can be time- and effort-consuming.
But you can start today and improve yourself in every way.
The future still needs to be written. It's up to you to write it.
Anything is possible!
I wish you a great week ahead 👋.
#technology #softwareengineering #techworldwithmilan #careers #personaldevelopment
How do you migrate from Monolith to Microservices architecture?
Bad way:
- Start building a monolith without a plan
- End up writing a tightly coupled mess
- Realize you have a problem
- Save face by moving to microservices
- End up with a distributed monolith 💩
Smart way:
- Start building a Modular Monolith
- Define module boundaries well
- Make modules loosely coupled
- Isolate database dependencies
- Migrate to Microservices by extracting modules
Modular design >>> Tightly coupled mess
𝗧𝗵𝗲 𝗗𝗼𝗺𝗮𝗶𝗻 𝗹𝗮𝘆𝗲𝗿 𝗳𝗼𝗹𝗱𝗲𝗿 𝘀𝘁𝗿𝘂𝗰𝘁𝘂𝗿𝗲 𝘀𝗵𝗼𝘂𝗹𝗱 𝗲𝘅𝗽𝗿𝗲𝘀𝘀 𝗶𝗻𝘁𝗲𝗻𝘁.
I didn't understand this a few years ago.
The Domain sits at the core of Clean Architecture.
It's where you define your entities and the most important business logic.
So, I want to share a situation I ran into recently.
I was looking at a project I built many years ago.
The folder structure in the Domain layer bothered me.
I was focusing on technical concerns instead of features.
The symptoms of this are folders with names like:
- Entities
- Enumerations
- Exceptions
- Repositories
- ValueObjects
I'm sure you've done (or seen) this at some point.
What's the problem with grouping by type?
This folder structure doesn't tell you anything about the Domain.
So what did I do?
I reorganized the folders to group them by "feature".
When you do this, domain concepts start appearing in the folder structure.
The benefits of this approach are:
- Better cohesion
- High coupling for a single feature
- Low coupling between unrelated features
If you ever heard of Vertical Slice Architecture, it's a similar concept.
P.S. If you liked this, consider joining The .NET Weekly - my newsletter with 28,000+ engineers that teaches you how to improve at .NET and software architecture.
Subscribe here → https://t.co/dCEi48iXpl
What do you think about this approach?
How to implement Singleton class lazy loaded in C#?
Create a sealed class, with a private constructor and with a public instance that returns lazily instantiated members.
𝗪𝗵𝘆 𝘀𝗲𝗮𝗹𝗲𝗱
- We want only one instance of our class
- No class should be able to inherit from this
𝗪𝗵𝘆 𝗰𝗼𝗻𝘀𝘁𝗿𝘂𝗰𝘁𝗼𝗿 𝗶𝘀 𝗽𝗿𝗶𝘃𝗮𝘁𝗲
- To avoid multiple instance creation
𝗪𝗵𝘆 𝗹𝗮𝘇𝘆
- Lazy is thread-safe
- It can improve performance
- Delays instantiation of class until needed
𝗔𝗿𝗲 𝘆𝗼𝘂 𝘀𝘂𝗿𝗲 𝗼𝗻𝗲 𝗶𝗻𝘀𝘁𝗮𝗻𝗰𝗲 𝗶𝘀 𝗯𝗲𝗶𝗻𝗴 𝗰𝗿𝗲𝗮𝘁𝗲𝗱
- With sealed no chance of being inherited
- No direct instantiation constructor is private
- Read-only ensures that the lazy property is initialized once
𝗛𝗼𝘄 𝘀𝗼
Either during the static constructor or before the class is first accessed, and is never modified again. But only a read-only keyword does not guarantee it is right!
That's why we have made the property of only getter type you would note it does not have a setter in it.
𝗛𝗼𝘄 𝗶𝘀 𝘁𝗵𝗲 𝘀𝗲𝗰𝗼𝗻𝗱 𝗶𝗺𝗽𝗹𝗲𝗺𝗲𝗻𝘁𝗮𝘁𝗶𝗼𝗻 𝗱𝗶𝗳𝗳𝗲𝗿𝗲𝗻𝘁 𝘁𝗵𝗮𝗻 𝗳𝗶𝗿𝘀𝘁
- Gets rid of the lock; too costly.
- Lazy<T> class will make sure that only it would be created when it is needed and one time
𝗕𝘂𝘁 𝘁𝗵𝗶𝘀 𝗶𝘀 𝘀𝘁𝗶𝗹𝗹 𝗻𝗼𝘁 𝗯𝗲𝘀𝘁
Because the inversion of control is more appropriate compared to the instantiation of class through properties
📌 𝗣.𝗦:- Join my weekly .NET Newsletter with 𝟲𝟬𝟬𝟬+: https://t.co/TDNkmIWiPq.
Repost ♻️ would be appreciated.
Top 10 System Design Concepts
➡️Load balancers
➡️APIs
➡️Caches
➡️Databases
➡️Network Protocols
➡️Message queues
➡️CDNs
➡️High-level details about ML and Big data
➡️CAP Theorem
➡️Monitoring and analytics
read - https://t.co/wR2asRpocW
"aha, hmm, ok"
Google Soundstorm is scarily good
Human-like audio
Multiple speakers
Long dialogues
Voice cloning
100x faster
🔊 Listen to the sample below
They plan to release it to the public like ChatGPT
Prediction for uses when it's out:
⤍ YouTube Automation 2.0
⤍ Sell "voices" for voiceovers
⤍ Automated Interview Podcasts
Check out more of their demos on their research paper