Programming Tips 💡
48.5K members
66 photos
7 videos
28 files
292 links
Fun & Useful Programming :
Tips 💡
Articles 📕
Resources 👾
Design Patterns 💎
Software Principles ✅

Ads & Contact : @MoienTajik
Download Telegram
to view and join the conversation
Don't Create Objects That End With -ER ❌

Manager, Controller, Helper, Handler, Writer, Reader, Converter, Validator, Router, Dispatcher, Observer, Listener, Sorter, Encoder, Decoder. 🤯

This is the class names hall of shame. 🤷🏻‍♂️

Have you seen them in your code❔
In open source libraries you’re using❔
In pattern books❔

They are all wrong. ⚠️


What do they have in common❔

They all end in “-er.”
And what’s wrong with that ⁉️
They are not "classes", and the objects they instantiate are not objects. Instead, they are collections of procedures pretending to be classes. 🤦🏻‍♂️


[ Article ] : kutt.it/erobj

〰️〰️〰️〰️〰️〰️
#Objects #ObjectThinking
@ProgrammingTip
Apply for C# Back-End Developer at Alibaba 👨🏻‍💻 :

https://jobs.alibaba.ir/

〰️〰️〰️〰️〰️〰️
#Job #Opportunity
@ProgrammingTip
Using the ReferenceAssemblies NuGet package to build .NET Framework libraries on Linux, without installing Mono 💎

In this post I show how you can build .NET projects that target .NET Framework versions on Linux, without using Mono! 🤷🏻‍♂️

By using the new Microsoft.NETFramework.ReferenceAssemblies NuGet packages from Microsoft you don't need to install anything more than the .NET Core SDK! 🔥


[ Article ] : kutt.it/coremono

〰️〰️〰️〰️〰️〰️
#CSharp #DotNet #AspCore #NetCore
@ProgrammingTip
Don't Let the Internet Dupe You, Event Sourcing is Hard 🌈

I'm going to give it to you straight: Event Sourcing actually comes with drawbacks. 🤷🏻‍♂️

If you've read anything about the topic on the internet this will surely shock you. 🤨

After all, it's commonly sold as one big fat bag of sunshine and rainbows. ✨

You got some kind of a problem❓
Turns out its actually solved by event sourcing ❗️
In fact, most of your life troubles up till now were probably directly caused by your lack of event sourcing.

You, having been seduced by the internet, are probably off to start your event sourcing journey and begin living the good life. ✅

Well, before you do that, I'm here to ruin it for you and tell you that event sourcing is not actually a bag filled with pure joy, but instead a bag filled with mines designed to blow your legs off and leave you to a crippled life filled with pain. ♿️

Event Sourcing is Hard ‼️


[ Article ] : kutt.it/ESHard

〰️〰️〰️〰️〰️〰️
#EventSourcing #EventStore #Event
@ProgrammingTip
Running async tasks on app startup in ASP.NET Core 3.0 ⚡️

In this post, I describe how a small change in the ASP.NET Core 3.0 WebHost makes it easier to run asynchronous tasks on app startup using IHostedService. ✅

Unfortunately, in 2.x it wasn't possible to use any of the built-in ASP.NET Core primitives to achieve this ❌ :

• IStartupFilter has a synchronous API, so would require doing sync over async. 🤦🏻‍♂️

• IApplicationLifetime has a synchronous API and raises the ApplicationStarted event after the server starts handling requests. 🤷🏻‍♂️

• IHostedService has an asynchronous API, but is executed after the server is started and starts handling requests. 👍🏻

With ASP.NET Core 3.0, a small change in the WebHost code makes a big difference - we no longer need these solutions, and can use IHostedService without the previous concerns❗️


[ Article ] : kutt.it/asphost

〰️〰️〰️〰️〰️〰️
#AspNet #AspMvc #AspCore
@ProgrammingTip
Microservice Architecture at Medium 🌈

The goal of microservice architecture is to help engineering teams ship products faster, safer, and with higher quality. ⚡️

Decoupled services allow teams to iterate quickly and with minimal impact to the rest of the system. 👌🏻

At Medium, our technical stack started with a monolithic Node.js app back in 2012. We have built a couple of satellite services, but we haven’t created a strategy to adopt the microservice architecture systematically. 🧮

As the system becomes more complex and the team grows, we moved to a microservice architecture in early 2018. ✅

In this post, we want to share our experiences of doing it effectively and avoiding microservice syndromes. 🤷🏻‍♂️


[ Article ] : kutt.it/MicroMed

〰️〰️〰️〰️〰️〰️
#Microservice #Architecture
@ProgrammingTip
Why Do You Need To Know Package Cohesion Fundamentals? 🔊

Packages exist anywhere, and it's your job to organize them. ✅

It's pretty common to find projects where files are separated by the language they're written. 🗂

Without thinking about common reuse, it's hard for you to look at the contents of a package and know which related files can be reused together. ⚠️


[ Article ] : kutt.it/pckgCohesion

〰️〰️〰️〰️〰️〰️
#Packaging #Principles #Cohesion
@ProgrammingTip
Service boundaries identification example in e-commerce ✅

The code residing in system services might be perfect, but it doesn’t really matter if service boundaries are identified incorrectly, since there is no Business-IT alignment, that both DDD and SOA are striving for. And it means inevitable project failure ... ❌


[ Article ] : kutt.it/BContext

〰️〰️〰️〰️〰️〰️
#DDD #BoundedContext #Architecture
@ProgrammingTip
Event Modeling: What is it❓

Story telling is something that enables humans to pass knowledge on to subsequent generations and relies heavily on how we store memories - whether logical, visual, auditory or other. This is important because there is a parallel with how information systems were constructed. There is a “memory” of all your visits to the doctor. It’s the ledger of the forms that are filled in with each visit. 🧠

Specifications by example are a way to show how something is supposed to work. This can be seen in successful practices in software such as Behaviour Driven Development. This works well because we communicate by stories more effectively. It ties back to story telling as a way to keep information in society. Our brains are built for it more than they are built for flow-charts and other formats. ✅


[ Article ] : kutt.it/EventModel

〰️〰️〰️〰️〰️〰️
#EventModeling #EventStorming
@ProgrammingTip
Understanding The Mindset of Event Sourcing 🧠

As Event Sourcing (ES) becomes more and more mainstream, usually bundled with DDD and CQRS, it's important for domain modellers, application architects and etc to understand the paradigm behind the recipe. ✅

In the 'classical' approach, the domain state is seen as a data structure or a collection of data structures (entities data). 🗂

In ES we see the domain state as a collection of changes. ♻️

You may wonder how we've got here and why this is the preferred way of working for many DDD practitioners ⁉️


[ Article ] : kutt.it/Es

〰️〰️〰️〰️〰️〰️
#EventSourcing
@ProgrammingTip
Never Serve Raw Chicken! 🍗

The issue with raw chicken is that you might get sick from eating it. Chefs serving raw chicken are generally considered unprofessional. 🤷🏻‍♂️

That’s why professional chefs don’t deliver raw chicken. Professional chefs don’t want to harm their customers and their business. Professional chefs take pride in what they do! ✅

If the restaurant was a Scrum Team, the owner would be the Product Owner, the chefs would be the Development Team and the businesswoman would be their user.

The raw chicken burger would be an Increment of a product that isn’t done. Development Teams delivering Increments that aren’t “Done” are generally considered unprofessional.

[ Read More ] : kutt.it/raw-chicken

〰️〰️〰️〰️〰️〰️
#Scrum #Agile #DoD
@ProgrammingTip
Bounded Context Canvas V3: Simplifications and Additions ✅

How do we break a large system into smaller, more manageable modular components? This article describing a workshop recipe you can use. 🗂

In Domain-Driven Design, a large system is decomposed into bounded contexts, which become natural boundaries in code as microservices and as teams in the organisation. 🏢

There is no shortcut to identifying good boundaries. Both a wide and deep knowledge of the business and domain is essential.


[ Article ] : kutt.it/bc-canvas

〰️〰️〰️〰️〰️〰️
#DDD #BoundedContext
@ProgrammingTip
EasyCompressor 📦

EasyCompressor is an open-source compression abstraction library that supports and implements many compression algorithms such as Zstd, LZMA, LZ4, Snappy, Brotli, GZip and Deflate. 🗂

It is very useful for using along with Distributed Caching or storing files in database. ✅

[ GitHub ] : github.com/mjebrahimi/EasyCompressor

〰️〰️〰️〰️〰️〰️
#Compression #CSharp #DotNet
@ProgrammingTip
Domain-Driven Design: A Recipe for a Pragmatist 🦒

Why are DDDs usually approached from the wrong side? And which side do you want? What do giraffes and platypuses have to do with all this?

In this article, I will tell you what Domain-Driven Design is and what is its essence.

[ Article ] : kutt.it/ddd-recipe

〰️〰️〰️〰️〰️〰️
#DDD
@ProgrammingTip
Blazor WebAssembly 3.2.0 now available 🚀

I’m thrilled to announce that Blazor WebAssembly is now officially released.

This is a fully-featured and supported release of Blazor WebAssembly that is ready for production use. ✅

Full stack web development with .NET is now here! ⚡️

[ Article ]: https://devblogs.microsoft.com/aspnet/blazor-webassembly-3-2-0-now-available/

〰️〰️〰️〰️〰️〰️
#Blazor #DotNet #Core
@ProgrammingTip
Bootstrap 5 alpha! 🎉

Bootstrap
is one of the open source that many developers love, including me. So what do we expect of the new changes when Bootstrap 5 is released?

Features ✨:
• jQuery removed
• Updated forms
• Enhanced grid system
• CSS custom properties by dropping support for Internet Explorer

Comming soon: RTL, offcanvas, and more 💎

Head to https://v5.getbootstrap.com to explore the new release. 🔥

〰️〰️〰️〰️〰️〰️
#Bootstrap #CSS
@ProgrammingTip
The S.O.L.I.D Principles in Pictures 🤖

There are so many great articles online about SOLID but I rarely see any examples with pictures. This makes it a bit difficult for visual learners like me to learn while staying engaged.

So the main aim of this article is to get a better understanding of these principles using illustrations and emphasizing the goal for each principle. 🌈

[ Article ] : kutt.it/solid

〰️〰️〰️〰️〰️〰️
#SOLID #Principles
@ProgrammingTip
Why I created another React component library 🌈

[ Article ] : https://kutt.it/ARC
[ Github ] : https://github.com/sha-el/sha-el-design

〰️〰️〰️〰️〰️〰️
#React #JavaScript
@ProgrammingTip
Secrets of a .NET Professional 👾

In this post, we’ll go through technical and non-technical ideas that have helped me through some of my toughest projects.

[ Article ] : https://kutt.it/DotSec

〰️〰️〰️〰️〰️〰️
#DotNet
@ProgrammingTip
Awesome Microservices .NET Core Resources 😎

The best resources for Microservices in .NET Core 👾

[ Github ] : kutt.it/dotnet-aws

〰️〰️〰️〰️〰️〰️
#DotNet #DotNetCore #AspNetCore #Microservice
@ProgrammingTip