5 Rules for Writing Better and Cleaner DTOs 🧹
Crafting clean and maintainable DTOs is essential for keeping your codebase healthy and scalable. But let's face it, sometimes DTOs can morph into these complex beasts that leave you scratching your head.
Fear not, fellow developers!
This article (or the accompanying video!) dives into 5 key principles to help you write simpler, more understandable DTOs.
You'll learn about:
• Keeping things clear and concise
• Utilizing properties effectively ✨
• Crafting descriptive names that make sense
And also other tips to transform your DTOs from chaotic to crystal clear! By following these principles, you'll be well on your way to writing cleaner, more maintainable DTOs that make your code easier to understand for you and your team.
Ready to up your DTO game? Check out the full article or watch the video for examples and take your codebase to the next level!
[ Article ] : https://ardalis.com/5-rules-dtos
[ YouTube ] : https://www.youtube.com/watch?v=W4n9x_qGpT4
〰️〰️〰️〰️〰️〰️
#Dto #Dotnet #csharp #programming
@ProgrammingTip
Algorithm Series 🖍📄
Name: Bubble Sort
Type: Comparison sort
Best For: Small datasets
Complexity: O(n²) average and worst-case
How It Works: Repeatedly steps through the list, compares adjacent elements, and swaps them if they are in the wrong order. The pass through the list is repeated until the list is sorted.
〰️〰️〰️〰️〰️〰️
#Algorithm #BubbleSort
@ProgrammingTip
Embarking on Your Cloud Certification Journey in 2024: A Guide to Azure Certifications 🚀 🌥
• An overview of the certification options available.
• Introduction to the new open-book policy.
• Recommendations for courses based on firsthand experience with these exams.
• Essential tips for the exam day and the preparation leading up to it.
[ YouTube ] : https://www.youtube.com/watch?v=d59nAwmdoLk
〰️〰️〰️〰️〰️〰️
#Azure #CareerDevelopment #MicrosoftAzure #CloudCertification
@ProgrammingTip
💻 Are you looking for a virtual server with powerful DDoS protection? Look no further than Aéza!
Features:
– High-performance virtual servers up to 6.0 GHz on flagship processors
– A wide range of services, such as ready-made proxy rental in your account
– Powerful and professional DDoS protection
– Free Anycast DDoS protection for your websites
– Affordable market price starting from 4.94 euros for Ryzen 7950x3D
– 24/7 support chat
– Anonymous VPN from 1.9 euros with various locations included
– 15% cashback using the link
And this is not all Aéza can offer you!
🖥 Free servers!
Take a server from Aézа for 1 hour or explore our Terminator free rental program
No registration, SMS, or payment is required!
aeza.net
Bloom Filters 🆒
Imagine ensuring web safety by identifying malicious links without storing massive data. Traditional methods involve keeping a huge list of bad links, consuming substantial storage and bandwidth. Enter Bloom Filters - a genius method allowing us to significantly reduce storage needs (up to 82% smaller) with a minimal error rate. 👾
For instance, instead of a 20MB list for 1,000,000 links, a Bloom Filter achieves this with just 3.59MB, accepting a tiny error chance (0.0001%). Even more impressive, with a 0.1% error tolerance, the size shrinks to 1.8MB. This technique was even utilized by Google Chrome until 2012. ✔️
Bloom Filters offer a balance between efficiency and accuracy. For critical checks, it pairs with a database API for zero false positives. A practical, space-saving solution for modern web browsers! ⚡️
[ Article ] : https://samwho.dev/bloom-filters
〰️〰️〰️〰️〰️〰️
#Algorithm #BloomFilters
@ProgrammingTip
Browserless | Headless browser automation, without the hosting headaches 🆒
Browserless allows remote clients to connect and execute headless work, all inside of docker. It supports the standard, unforked Puppeteer and Playwright libraries, as well offering REST-based APIs for common actions like data collection, PDF generation and more. ✔
Sample 🐞:
import puppeteer from "puppeteer";
// Try changing this! 👇
const URL = "/channel/s/ProgrammingTip";
const main = async () => {
const browser = await puppeteer.connect({
browserWSEndpoint: `wss://chrome.browserless.io`,
});
const page = await browser.newPage();
await page.goto(URL);
return page.screenshot();
}
0xCAFE ☕️
Your daily dose of tech and science, tailored for the curious minds of software developers and tech enthusiasts! 🌐🚀
Features ✔️:
• 📰 Latest tech and science news
• 🛠️ Insights and in-depth analysis
• 👨💻 For software developers & tech buffs
• 🤖 Curated with the help of AI technology
• 🧠 Thought-provoking content
• 🗓️ Daily delivery to your inbox
• 📚 Access to newsletter archive
• 🌟 No spam, just quality content
Stay updated, stay ahead! 🚀
🔗 Subscribe here: https://0xcafe.news
🆕 Latest edition: https://archive.0xcafe.news/29-Jan-2024
〰️〰️〰️〰️〰️〰️
#TechNews #SoftwareDevelopment #Science
MeiliSearch: The Fast, Open-Source Search Engine 🔍🚀
MeiliSearch is a powerful, open-source search engine written in Rust. Designed for speed and ease of use, it's the perfect choice for developers looking to implement search capabilities in their applications. 🔝
Key Features:
• Lightning-fast search responses ⚡️
• Typo-tolerance for better user experience ✔️
• Simple to set up and integrate 🛠
• Customizable ranking rules for tailored search results 🔧
• Open-source and fully documented 📚
[ GitHub ] : https://github.com/meilisearch/meilisearch
〰️〰️〰️〰️〰️〰️
#MeiliSearch #SearchEngine
@ProgrammingTip
The System Design Primer ✔️
System design is a broad topic. There is a vast amount of resources scattered throughout the web on system design principles. 🎨
This repo is an organized collection of resources to help you learn how to build systems at scale.
Learn how to design large-scale systems. Prep for the system design interview. Includes Anki flashcards. 🆒
[ GitHub ] : https://github.com/donnemartin/system-design-primer
〰️〰️〰️〰️〰️〰️
#SystemDesign #Design #Scale #Interview
@ProgrammingTip
Finding developer jobs abroad 🌍
A friend of mine is operating the job board Relocate.me. The website is built around and focused entirely on tech jobs that offer visa/relocation assistance.
If working abroad is something you're interested in, consider checking it out.
Here's the link to view available international job opps:
🔗 https://relocate.me/search/
Also, make sure to subscribe to their Telegram channel to get alerts of new jobs, useful relevant tips, and more:
👉 @relocateme
⏳ "The future is purchased by the present." - Samuel Johnson
Are you simply spending today, or investing in tomorrow? With Oliver's three decades of trading insights, transform each financial decision into a step toward a brighter, self-crafted future.
⛓ Every day, messages pour in from followers who've broken their job chains thanks to my guidance. Isn't that the best thanks for my hard work?
🔗 Shape your tomorrow. Dive into Oliver's realm.
/channel/+PhUXi7FlaTlmYjQ0
.NET 8 - Keyed service dependency injection container support 🔝
Keyed services are useful when you have an interface/service with multiple implementations that you want to use in your app. What's more, you need to use each of those implementations in different places in your app. ☄️
Sample:var builder = WebApplication.CreateBuilder(args);
[ Article ] : https://andrewlock.net/exploring-the-dotnet-8-preview-keyed-services-dependency-injection-support
builder.Services.AddKeyedSingleton<INotificationService, SmsNotificationService>("sms");
builder.Services.AddKeyedSingleton<INotificationService, EmailNotificationService>("email");
builder.Services.AddKeyedSingleton<INotificationService, PushNotificationService>("push");
〰️〰️〰️〰️〰️〰️
#DotNet #DotNetCore #AspNetCore #CSharp
@ProgrammingTip
TONBanking Bug Bounty Program
PHASE II 💎
We are glad to announce our Smart Contracts Bug Bounty program and invite developers and security experts to participate and assist us.
Scope, rewards, duration:
• Scope: Smart contracts
• Severity levels: Low, Medium, High
• Phase II Prize pool: $10,000 (TONB equivalent)
• Total Prize pool: $30,000 (TONB equivalent)
• Duration of Phase II: 2 weeks
How to participate:
1. Register in the TONBanking Core chat in Telegram.
2. Get access to Smart Contracts in GitLab.
3. Select the smart contract(s) you wish to test from the list.
4. Review the code.
5. Report bugs via @tonbanking_bot.
6. Receive a reward once the bug is confirmed. 🙌
Key Links for TONBanking Bug Bounty Program:
1. Join devs community TONBanking CORE:
/channel/+cos1sHpRlxIzYjVi
For the complete TONBanking Bug Bounty Program rules, please visit the following link:
https://telegra.ph/TONBanking-SC-Bounty-Program-05-29
Check out https://chadview.com
It’s ChatGPT-powered copilot for Job Interviews, Technical Sales, and Voice support. Extension listens to your Zoom, Google Meet, and Teams calls in real-time and answers any questions instantly.
During the video call, simply press the "Ask" button, and you will receive answers to any questions. The extension continuously records the conversation. When you press the "Ask", it reviews the previous 30 seconds, identifies the question, and generates a response in 3-4 seconds.
They give a 15-minute free trial, which you can use to practice on a Zoom call or on any interview on YouTube. Then they charge a small fee $5 for every 30 minutes.
⏱💰🎉
Subscribe at @chadview
Check out new C# 12 preview features! ⚡️
Three new features for C# 12 😮 :
1️⃣- Primary constructors for non-record classes and structs :
public class Student(int id, string name, IEnumerable<decimal> grades)2️⃣- Using aliases for any type:
{
public Student(int id, string name) : this(id, name, Enumerable.Empty<decimal>()) { }
public int Id => id;
public string Name { get; set; } = name.Trim();
public decimal GPA => grades.Any() ? grades.Average() : 4.0m;
}
using Measurement = (string, int);3️⃣- Default values for lambda expression parameters:
public void F(Measurement x)
{ }
var addWithDefault = (int addTo = 2) => addTo + 1;
addWithDefault(); // 3
addWithDefault(5); // 6
[ Article ] : https://devblogs.microsoft.com/dotnet/check-out-csharp-12-previewThe guide to Git I never had 🎯
Understanding Git is crucial for any developer. Often overlooked in CVs, mastering Git's capabilities enhances your coding proficiency significantly. This guide covers everything from basic commands to advanced techniques, ensuring you can manage and track your code effectively. ✔️
In this comprehensive guide, we delve into branches, commits, merging, rebasing, and more to help you master this essential tool. ⚡️
[ Article ]: jake.page91/the-guide-to-git-i-never-had-a89048d4703a" rel="nofollow">https://medium.com/@jake.page91/the-guide-to-git-i-never-had-a89048d4703a
〰️〰️〰️〰️〰️〰️
#Git #VersionControl
@ProgrammingTip
🚀Ready to Track Your Application with Metrics? 📊
Looking to keep a close eye on your ASP.NET Core applications? With the latest update in .NET 8, you can now easily track various aspects of your application's performance and health through built-in metrics.
Here's why it's exciting:
• HTTP Request Insights: Get a detailed view of your HTTP requests, including counts, durations, and more.
• Real-time Alerts: Set up alerts to notify you if your app's performance exceeds predefined thresholds.
• Error Handling Diagnostics: Pinpoint and address issues faster with detailed error handling diagnostics.
•User-friendly .NET Aspire Dashboards: Access a user-friendly dashboard through .NET Aspire, making it easy to visualize and understand your app's metrics.
• Customizable Grafana Dashboards: Dive deep into your app's performance with customizable Grafana dashboards, tailored specifically for ASP.NET Core metrics
Excited to learn more? Dive into the details and revolutionize your app monitoring experience! 💻💡
[ Article ] : https://devblogs.microsoft.com/dotnet/introducing-aspnetcore-metrics-and-grafana-dashboards-in-dotnet-8/
〰️〰️〰️〰️〰️〰️
#DotNet #Metrics #Grafana #Dotnet_Aspire #Monitoring
@ProgrammingTip
Introducing WireMock.NET: Master HTTP API Testing 🚀
WireMock.NET simulates HTTP API behaviors, enabling seamless integration and testing for developers.
👌 Ideal Use Cases:
• HTTP Dependencies Not Ready: Leap over the hurdle of incomplete HTTP APIs in microservice architectures by mimicking their behavior with WireMock.Net.
• Unit Testing HTTP-Dependent Classes: Test classes that rely on HTTP APIs as a cohesive unit, ensuring your code communicates effectively with the actual APIs.
• Integration/End-to-End Tests: Overcome the challenges of testing with external HTTP APIs—like variable data, slow responses, and network restrictions—by employing WireMock.Net for consistent and swift testing.
public class ExternalService(HttpClient httpClient)
{
public async Task<string> GetAsync()
{
var response = await httpClient.GetAsync("/ping");
response.EnsureSuccessStatusCode();
return await response.Content.ReadAsStringAsync();
}
}
public class ExternalServiceTests
{
[Fact]
public async Task GetAsync_WhenCalled_ReturnsString()
{
// Arrange
var fakeServer = WireMockServer.Start();
fakeServer
.Given(Request.Create().WithPath("/ping").UsingGet())
.RespondWith(Response.Create()
.WithStatusCode(200)
.WithBody("pong")
);
var fakeClient = fakeServer.CreateClient();
var externalService = new ExternalService(fakeClient);
// Act
var response = await externalService.GetAsync();
// Assert
response.Should().Be("pong");
}
}
Amazon Interview Questions: The Ultimate Preparation Guide 🔖
Getting an interview at Amazon is a major accomplishment. With thousands of applicants every year and intense competition, securing an interview slot is an achievement in itself. Now you need to put in the work to make sure you ace the interview process. ✔️
In this comprehensive guide, we will cover everything you need to know to crush your Amazon interviews. ⚡️
[ Article ] : https://www.designgurus.io/blog/amazon-interview-questions-guide
〰️〰️〰️〰️〰️〰️
#Interview #Amazon
@ProgrammingTip
Vuestic Admin 3.0 🔑
Vuestic Admin is an open-source admin template based on Vue 3, Vite, Pinia, and Tailwind CSS, developed and supported by the Epicmax Team. It’s no longer just a collection of components; now, it’s packed with engaging, interactive pages designed to enhance your projects. 🚀
What pages do developers most often need? Dashboard, Settings Page, Profile, User and Project List, Login, Billing, Pricing Plans — they are all already in Vuestic Admin. ✔️
Features 🔧:
• Vue 3, Vite, Pinia, and Tailwind CSS - Fast and efficient development
• Dark Theme - Modern and eye-catching
• Global Configuration - Effortless customization
• Accessibility - Inclusive and user-friendly
• i18n Integration - Easy localization for global reach
• Educational Resource - Ideal for learning and improving skills
• Responsive Design - Adapts seamlessly to all devices
• Professional Support - Reliable help from the experts
• Highly Customizable - Tailor to your project’s style
[ Live Demo ] : https://admin.vuestic.dev
[ GitHub ] : https://github.com/epicmaxco/vuestic-admin
〰️〰️〰️〰️〰️〰️
#Vue #Vuestic #AdminPanel #Dashboard
@ProgrammingTip
The ultimate guide for making the best career choices in Tech 🧑🏻💻
Denilson Nastacio shares a structured framework for career success, likening it to Maslow's Hierarchy of Needs. He highlights the importance of aligning one's career with personal values and market demands, offering insights into the tech industry's evolving landscape. ✔️
Key Takeaways 🔑:
• Employability is foundational, emphasizing education, skills, and market relevance.
• Compensation & Stability ensure job adequacy and a supportive environment.
• Growth & Development demand continuous learning and skill enhancement.
• Work-Life Balance & Well-Being focus on mental and physical health.
• Purpose & Meaning represent the pinnacle, aligning personal values with professional careers.
[ Article ] : dnastacio/c18768d32598" rel="nofollow">https://medium.com/@dnastacio/c18768d32598
〰️〰️〰️〰️〰️〰️
#Tech #CareerPath #Growth
@ProgrammingTip
Spotube 🎸
Open source Spotify client that doesn't require Premium nor uses Electron! Available for both desktop & mobile! 🎧
Features ✔️:
• 🚫 No ads
• ⬇️ Downloadable tracks
• 🖥 📱 Cross-platform support
• 🪶 Small size & less data usage
• 🕵️ Anonymous/guest login
• 🕒 Time synced lyrics
• ✋ No telemetry, diagnostics or user data collection
• 🚀 Native performance
• 📖 Open source/libre software
• 🔉 Playback control is done locally, not on the server
[ GitHub ] : https://github.com/KRTirtho/spotube
〰️〰️〰️〰️〰️〰️
#OpenSource #Spotify
@ProgrammingTip
🔍 Challenge: Create a compact Maze Game in C# under 2KB without .NET Runtime, Small enough to fit in a QR Code 🤔
👨💻 Process:
• Self-Contained: Includes all necessary components to run on any OS. ✔️
• Game Type: A graphical maze, utilizing Win32 APIs, avoiding WinForms. ⭐️
• Size Reduction Steps:
1- Initial Size: 64MB (with CoreCLR)
2- Post-Compression: 35.2MB
3- IL Trimming Applied: 10MB
4- Native AOT Compilation: 1.13MB
5- Removing Unused Features: 923KB
6- Using bflat Compiler: 882KB
7- bflat with Zerolib: 9KB
8- Direct PInvoke: 8KB
9- Eliminating Debugging and Relocations: 7KB
10- Targeting x86 Architecture: 6.5KB
11- Final Step with Crinkler Linker: 1,936 Bytes
🎉 Outcome: Achieved a C# game small enough to fit in a QR code!
[ Full Article 🔗 ] : https://migeel.sk/blog/2024/01/02/building-a-self-contained-game-in-csharp-under-2-kilobytes
〰️〰️〰️〰️〰️〰️
#CSharp #DotNet #Optimization #LowLevel
@ProgrammingTip
📉 BTC above $44k – time for a big short?
Many public traders have become emotional, so I want you to see a different perspective. 50 Satoshi identified several strong signals indicating a soon correction.
He is sharing this info for free. Follow his channel to stay informed - @fifty_satoshi
Introducing .NET Aspire: Simplifying Cloud-Native Development with .NET 8 🔥
.NET Aspire is an opinionated stack for building resilient, observable, and configurable cloud-native applications with .NET. It includes a curated set of components enhanced for cloud-native by including service discovery, telemetry, resilience, and health checks by default. 👍
Sample Usage:
var builder = DistributedApplication.CreateBuilder(args);
var cache = builder.AddRedisContainer("cache");
var apiservice = builder.AddProject<Projects.AspireApp_ApiService>("apiservice");
builder.AddProject<Projects.AspireApp_Web>("webfrontend")
.WithReference(cache)
.WithReference(apiservice);
builder.Build().Run();
🚀 For those aiming to manage web & mobile apps in their .NET project, discover Bit. Experience seamless integration, PWA, SSR, SEO-friendly, optimized project templates, and a set of standard components. An open-source gem with an MIT license, tailored just for C# .NET enthusiasts.
Love it? Check out their GitHub repo and give them a ⭐!
Repository Link
Recently, I've been trying something crazy called ⚡ SuperCoder ⚡
An autonomous AI coding agent built using the SuperAGI framework. Currently, it can build simple coding projects and browser-based games.
As a whole, the SuperAGI open-source project enables users to build, manage and run multiple autonomous AI agents to work for you and interact with everyday tools like Slack, GitHub, DALL-E, etc. It's basically AutoGPT on Steroids
Check out the repo on GitHub (https://github.com/TransformerOptimus/SuperAGI) and Star ⭐ the project if you find it useful.
Here's a working personal finance calculator made using the SupeCoder tool:
https://youtu.be/diwEMh1UH5g
Money doesn't grow on trees, but don't worry friend, it grows on our trading accounts! 🤑
Every day I get messages from my subscribers that they are quitting their jobs because of me. Isn't that the best thanks for my hard work?
🚀 For a limited time only, the first 30 subscribers will have free access to our VIP channel. After that, there will be a fee to enter.
👇 Click on the link below to join our Telegram channel and start trading smarter today!
/channel/+ooEDLZy7E684ZjI0
Raycast 🔥
Raycast is a blazingly fast, totally extendable launcher for MacOS. It lets you use AI (ChatGPT) directly from your launcher, complete tasks, calculate, share common links, and much more. 🔝
[ Website ] : https://www.raycast.com
〰️〰️〰️〰️〰️〰️
#MacOS #Launcher #RayCast
@ProgrammingTip
WireMock.NET 😮
WireMock.NET is a .NET library for stubbing and mocking HTTP services. With WireMock.NET, you can define the expected responses for particular requests, and the library will intercept and manage those requests for you. ✔️
This allows for easy testing of the code that makes HTTP requests, without having to rely on the actual external service being available and without hacking HttpClient. 🆒
Sample code snippet:
[Test][ Blog ] : https://cezarypiatek.github.io/post/mocking-outgoing-http-requests-p1
public async Task sample_WireMock_usage()
{
// Setup WireMock.Net server
using var wireMock = WireMockServer.StartWithAdminInterface(port: 1080, ssl: false);
// Setup WebApplicationFactory
await using var appFactory = new WebApplicationFactory<Program>().WithWebHostBuilder(builder =>
{
builder.ConfigureAppConfiguration(configurationBuilder =>
{
// Override downstream service addresses pointing to WireMock address
configurationBuilder.AddInMemoryCollection(new Dictionary<string, string>
{
["ExternalServices:WeatherService"] = "http://localhost:1080"
});
});
});
// Prepare stub for outgoing request
wireMock
.Given(
Request.Create()
.WithPath("/api/v1.0/weather")
.WithParam("lat", "10.99")
.WithParam("lon", "44.34")
.UsingGet()
)
.RespondWith(
Response.Create()
.WithStatusCode(200)
.WithHeader("Content-Type", "application/json; charset=utf-8")
.WithBodyAsJson(new
{
temp = 298.48,
feels_like = 298.74,
temp_min = 297.56,
temp_max = 300.05,
pressure = 1015,
humidity = 64
})
);
// Automate tested app
}