Dev to be curious (@devtobecurious) profile picture

Redonner du sens, notre place à notre beau métier : dev, ops !

france
Joined August 2019
Photo by Dev to be curious (@devtobecurious)Photo by Dev to be curious (@devtobecurious)Photo by Dev to be curious (@devtobecurious)Photo by Dev to be curious (@devtobecurious)Photo by Dev to be curious (@devtobecurious)
Dev to be curious retweeted
The adventure begins November 20th, 2025. Coming Soon 👾
12
57
5
376
20,753
Dev to be curious retweeted
🧪 Inspired by my last post, I've built a prototype extending Angular's proposed Resource API: - rxResource: For data fetching with extended support for observables and custom fetching behavior - rxMutation: A complementary API for handling create/update/delete operations with built-in status tracking Code: github.com/markostanimirovic… RFC comment: github.com/angular/angular/d… #angular
1
8
2
64
5,340
Dev to be curious retweeted
Here it is, @Angular v19.1 is out! 🚀 - HMR for templates by default 🤯 - Automatic removal of unused imports - SSR improvement for i18n And more! Check out our blog post: blog.ninja-squad.com/2025/01…
1
29
2
102
3,752
Yet another nice example of template literal types, spotted in the AI SDK codebase. This forces the 'size' property in generateImage to match `${number}x${number}`. Beautiful.
27
26
3
639
39,832
Dev to be curious retweeted
Upgrade to @angular v19.1 and run this command to remove all unused imports: ng generate @angular/core:cleanup-unused-imports
5
31
1
194
7,955
Dev to be curious retweeted
.NET 9 is the best platform for Microservices. Here's why: 1. Resilience built-in Microservices need to handle transient failures gracefully. .NET has production-ready resilience strategies out of the box. 2. Observability The more Microservices you have, the harder it is to keep track of what's happening in your system. OpenTelemetry instrumentation solves this major pain point. 3. .NET Aspire Aspire is a cloud-native stack for building distributed applications. 4. Service Discovery Instead of hardcoding service URLs, you can use logical names. At runtime, wire up the real URLs through configuration. 5. API Gateway YARP is a robust reverse proxy that can serve as a load balancer and API gateway. It requires only a few lines of code to set up. You can save weeks of development by using .NET for your Microservices. Learn more: milanjovanovic.tech/blog/dot…
5
48
2
293
15,546
TIL that Node has a built-in setTimeout that you can AWAIT... No more custom 'sleep' function...
46
160
15
1,676
151,485
🅰️📢Angular 18.1 has just been released! It has Typescript 5.5 with the new "Inferred type predicates" feature which improves the type narrowing: @angular #angular #javascript #typescript #AngularAddicts
6
51
1,722
🅰️📢 Angular 18.1 has just been released! It introduces the new @let syntax for declaring local variables in the templates: #angular #javascript #typescript #AngularAddicts @angular
25
1
99
5,508
Dev to be curious retweeted
𝗖𝗹𝗲𝗮𝗻 𝗰𝗼𝗱𝗲 𝘁𝗶𝗽: Replace complex if statement with descriptive method. It isn't easy to read complex if statements. The more conditions, the harder it is. And it tends to grow out of control. But you can fix this with a bit of refactoring. Move the condition into a method (or variable) with a descriptive name. The method name should be as detailed as possible. It's a significant improvement in code readability. 𝗤𝘂𝗲𝘀𝘁𝗶𝗼𝗻: How would you make the method from the example testable? Bonus points if you can explain why it's not testable currently. --- Subscribe to my weekly newsletter to accelerate your .NET skills: milanjovanovic.tech/?utm_sou…
11
21
1
208
17,546
Dev to be curious retweeted
75% of developers will fail this SQL question. What's wrong with this script? The first time I faced this question, I jumped into the SQL syntax like crazy. But the syntax was OK; the problem was in the data and related to a concept called Cardinality. Cardinality refers to the number of unique values in a column relative to a table's total number of rows. • High Cardinality means the column has many unique values. • Low Cardinality means the column has few unique values. Creating an index on a column with low Cardinality is most of the time ineffective because: 1. Low Cardinality means each indexed value points to many rows, reducing the index's ability to narrow down the search. 2. Maintaining an index has a cost of storage and update time. For low cardinality columns, this overhead might outweigh the benefits. 3. Database query optimizers are smart; they know column statistics, including Cardinality. When they detect a low cardinality index, they often ignore it and perform a full table scan instead. A simple Example Consider a table "Employees" with 1 million records. Let's examine indexing on different columns: • ID: High Cardinality (1 million unique values). An index here would be very effective. • Name: High Cardinality (many unique names). An index could be helpful in searches. • Department: Medium Cardinality (10-20 unique values). An index might sometimes be useful but less effective than an ID or Name. • Gender: Very low cardinality (2-3 unique values). The query optimizer would likely ignore an index here. When to consider a Low Cardinality column? There are scenarios where indexing a low cardinality column might be beneficial. For example, combining low and high cardinality columns can be effective. 'CREATE INDEX idx_dept_emp ON Employees(Department, ID);' Now you know the basics about Cardinality! Save this post; it might help in your next interview.
31
185
7
1,234
162,674
Dev to be curious retweeted
Why do we need background tasks in .NET? Let's say I want to move some work in my application to the background. I want this background work to run outside the normal application flow. Here are a few examples: - Sending an email after completing a sale - Processing messages from a queue - Clearing stale cache items Background tasks can improve overall performance, and here's why. Let's take the example of sending an email after a sale. I don't want to slow down the API response by waiting for the email. Instead, I can queue an email and process it in the background. You can set up a background task in .NET within minutes. The most straightforward approach is using the BackgroundService class. With .NET 8, we can also start these background services concurrently. What do you think about the built-in support for background jobs in .NET? --- Subscribe to my weekly newsletter to accelerate your .NET skills: milanjovanovic.tech/?utm_sou…
5
42
238
16,118
TS 5.5 makes your type guards SO much more composable. Writing an 'isArrayOfStrings' function before 5.5 came out would have been MUCH more verbose.
2
23
2
372
30,910
Dev to be curious retweeted
How does SQL execution order work, and why is it so important? A SQL query executes its statements in the following order: 1. FROM / JOIN 2. WHERE 3. GROUP BY 4. HAVING 5. SELECT 6. DISTINCT 7. ORDER BY 8. LIMIT / OFFSET The techniques you implement at each step help speed up the following steps. This is why it's important to know their execution order. To maximize efficiency, focus on optimizing the steps earlier in the query. With that in mind, let's take a look at some optimization tips: 1) Maximize the WHERE clause This clause is executed early, so it's a good opportunity to reduce the size of your data set before the rest of the query is processed. 2) Filter your rows before a JOIN Although the FROM/JOIN occurs first, you can still limit the rows. To limit the number of rows you are joining, use a subquery in the FROM statement instead of a table. 3) Use WHERE over HAVING The HAVING clause is executed after WHERE & GROUP BY. This means you're better off moving any appropriate conditions to the WHERE clause when you can. 4) Don't confuse LIMIT, OFFSET, and DISTINCT for optimization techniques It's easy to assume that these would boost performance by minimizing the data set, but this isn’t the case. Because they occur at the end of the query, they make little to no impact on its performance. If you want to create efficient queries, it's a good idea to understand how things work under the hood otherwise your efforts may be wasted. While these tips work best in most cases, you should consider your unique use case when choosing the best course of action. ~~ A big thank you to our partner Postman who keeps our content free to the community. Who doesn’t love a custom theme? Postman released custom themes in their v11 release. Check it out: drp.li/postman-custom-themes…
13
202
6
826
39,331
Dev to be curious retweeted
𝗣𝗮𝘁𝘁𝗲𝗿𝗻𝘀 𝗼𝗳 𝗘𝘃𝗲𝗻𝘁-𝗗𝗿𝗶𝘃𝗲𝗻 𝗔𝗿𝗰𝗵𝗶𝘁𝗲𝗰𝘁𝘂𝗿𝗲 An event-driven architecture uses events to communicate between decoupled components. EDA is common in microservices systems. Event-driven systems have three key components: producers, consumers, and routers. Producers publish events to the router, which pushes the events to the respective consumers. But what is an event? An event is an immutable fact, something that has happened in the past and cannot be changed. When we say event-driven, it's important to distinguish that we mean driven by business events. You are event-driven if you are using at least one of these patterns. - Event sourcing - Event notifications - Event-carried state transfer - CQRS Event sourcing is a pattern for persisting the system's state through a series of events. Applying all the events in a stream produces the system's current state. Event-carried state transfer uses events to distribute data across multiple services. Event notifications are used to communicate (notify) that something significant occurred in the system. CQRS is a pattern that separates the components for reading data (queries) from the components for writing data (commands). Commands can produce events that generate the read model. What do you think about event-driven architecture? --- Subscribe to my weekly newsletter to accelerate your .NET skills: milanjovanovic.tech/?utm_sou…
3
99
512
54,658
Dev to be curious retweeted
🅰️💥Angular 18.1 will introduce the new @let syntax for declaring local variables in the templates: @angular #angular #javascript #typescript #AngularAddicts
4
28
146
7,984
Dev to be curious retweeted
Fastest Way to Convert Enum to String. Do This! There is a significant difference between run-time and compile-time code evaluations. Use it to your advantage! --- For more Awesome .NET Content, consider subscribing to my .NET Newsletter: newsletter.codewithmukesh.co…
3
20
137
7,894
Dev to be curious retweeted
✨ I've been investigating a simpler way to animate in Angular apps! Using the lightweight animation library Motion One - created by Matt Perry - who is also the creator of the very popular Framer Motion (for React). In Angular, we can use directives for this purpose.
2
4
72
4,369
Dev to be curious retweeted
We merged a preview C# 13 feature into VS 17.11 (preview 3): partial properties. ``` partial class C { // Definition public partial string Prop { get; set; } // Implementation public partial string Prop { get => ...; set => ...; } } ``` github.com/dotnet/csharplang…
6
26
2
72
6,736