Sometimes you need to run multiple .NET services without debugging them — for example, spin up several microservices so you can debug something else that depends on them.
I’ve written a cross-platform shell script that runs all matching .NET projects (e.g., all *API* services under sharedservices/**) — no extra tools needed.
Just CLI with bash support, works on any OS.
- Linux terminals (default)
- macOS Terminal (default)
- Windows with Git Bash, WSL (Windows Subsystem for Linux), or Cygwin
Great for quick local setups:
https://gist.github.com/0x49D1/d8b35be4e438a84794a3c41e0b804522
#dotnet #utilities
We've moved the whole infrastructure to microservices, but sometimes we still need to do some remote debug tasks... In the scope of "how to do that with linux based containers" wrote the article
https://dpursanov.medium.com/how-to-enable-remote-debugging-in-a-docker-container-for-rider-and-visual-studio-5a535d4f036a
Kevin Cox humorously dissects the shortcomings of Cross-Origin Resource Sharing (CORS). He argues that CORS is an overcomplicated solution to web security issues that primarily stem from outdated practices like implicit credentials (e.g., cookies). Cox believes we’re stuck with CORS as a "necessary evil," but advocates for moving towards better, modern security practices that don't rely on such convoluted mechanisms. Fun read for anyone frustrated by web security quirks.
https://kevincox.ca/2024/08/24/cors/
Check out Damien Bod's guide on creating secure hashes in .NET. The post covers key techniques like SHA256, Argon2, and HMAC, with practical examples and clear explanations. A must-read for developers looking to implement effective hashing in their applications.
https://damienbod.com/2024/07/01/creating-hashes-in-net/
Ever wondered how Super Nintendo works? There were no "standards" during that dark ages :) Very interesting read about the decisions they were making for chips to render the way they wanted:
https://fabiensanglard.net/snes_ppus_why/
Or how graphics system works:
https://fabiensanglard.net/snes_ppus_how/
There are also many other parts of the system design on same blog, just check the references...
Check out this PostSharp (meeh tool for now, but..) blog post on optimizing MemoryCache. It dives into how caching can boost efficiency, reduce memory leaks, and avoid unnecessary object creation. The article provides smart tips and practical examples to help you make the most of caching in your .NET applications. It’s all about getting your app to run faster and smoother—what’s not to love?"
https://blog.postsharp.net/memorycache
Hmm... Did you know about "Conventional Commits"? It's an attempt to make commit messages in source control to be standard + to generate kind of "Release Notes" right from your commit history. This is not a new concept, just I discovered it now; sharing :) Can be used in tech guidelines, like: "commit message can be: fix: something was changed, according to the specification of conventional commits". For example JetBrains uses them as one of their prompts for automatic commit generator...
https://www.conventionalcommits.org/en/v1.0.0/
Common Types
feat: A new feature
fix: A bug fix
docs: Documentation changes
style: Code style changes (formatting, missing semi-colons, etc.), without affecting code functionality
refactor: A code change that neither fixes a bug nor adds a feature
perf: A code change that improves performance
test: Adding or correcting tests
chore: Maintenance tasks (build process, auxiliary tools, etc.)
ci: Changes to the CI configuration or scripts
build: Changes that affect the build system or external dependencies
revert: Revert a previous commit
Very good article with clear samples about usages of SPF, DKIM, DMARC records with their proc/cons in simple language.
SPF, DKIM, and DMARC are complementary systems. SPF and DKIM are used by email servers as indicators of whether or not an email is spam. DMARC then does two things: it tells email servers how important SPF and DKIM are, and what to do when an email fails to pass their tests.
This probably doesn't make much sense yet - that's fine. Let's dig a little deeper.
https://simonandrews.ca/articles/how-to-set-up-spf-dkim-dmarc
Just an important news about source control services. Probably now GitHub (Microsoft) just kills their opponents
Hi HN, I'm the CEO of GitHub. Everyone at GitHub is really excited about this announcement, and I'm happy to answer any questions.
We've wanted to make this change for the last 18 months, but needed our Enterprise business to be big enough to subsidize the free use of GitHub by the rest of the world. I'm happy to say that it's grown dramatically in the last year, and so we're able to make GitHub free for teams that don't need Enterprise features.
We also retained our Team pricing plan for people who need email support (and a couple of other features like code owners).
In general we think that every developer on earth should be able to use GitHub for their work, and so it is great to remove price as a barrier.
https://news.ycombinator.com/item?id=22867627
Google just launched its BETA (for Google products are mostly infinitely in beta stage) of the natural language API. For now it can work with English, Spanish or Japanese. You can use it to extract information from the text automatically about places, events, people and more to build decisions based on that models.
https://cloud.google.com/natural-language/
https://techcrunch.com/2016/07/20/google-launches-new-api-to-help-you-parse-natural-language/
Microsoft has published REST API design guidelines they use inside the company. Defenetely worth reading: http://dev.office.com/blogs/rest-api-design-guidelines
Читать полностью…
Seems like a nice resource for training in AI: https://gym.openai.com/ . There are samples with agents that can play pong and go.
OpenAI Gym is compatible with algorithms written in any framework, such as Tensorflow and Theano. The environments are written in Python, but we'll soon make them easy to use from any language. We originally built OpenAI Gym as a tool to accelerate our own RL research. We hope it will be just as useful for the broader community.
AFTER LOSING ON MOBILE, CAN MICROSOFT WIN THE NEXT BATTLE?
AI / NCL are trends right now (personally I think that they are more closer to average people, unlike IOT, as a services, of course, not as complex math models), so this longread should be interesting to read.
Microsoft argues that it has the best "brain," built on nearly two decades of advancements in machine learning and natural language processing, for delivering a future powered by artificial intelligence. It has a head start in building bots that resonate with users emotionally, thanks to an early experiment in China. And among the giants, Microsoft was first to release a true platform for text-based chat interfaces — a point of pride at a company that was mostly sidelined during the rise of smartphones.
http://www.theverge.com/2016/7/7/12111028/microsoft-bot-framework-artificial-intelligence-satya-nadella-interview
To comment or not to comment... Yes, its personal, but the advice to write small micro functions with proper naming for the single action is really good practice for proper design of the whole modules. So.. If you can write the comments for some block of code - may be its better to refactor it into a method with proper title that is reflecting the previously written comments (sure it does ;))?
https://blog.codinghorror.com/coding-without-comments/
You wanted to know if regular programming can be rocket science?.. Here you go: source code of the original Apollo 11 mission on GitHub https://github.com/chrislgarry/Apollo-11
Читать полностью…
Recently I fully migrated to Linux (Ubuntu) and living the life of dotnet developer there for probably a month already. Learned so much new stuff, so I really suggest everyone to try this out...
Here is the blog-instructions on how to mount a network attached storage in GUI, so that it works almost with the same speed as any directory on our internal drive. I've added this, because discovered how slow was network attachment compared to this (which is also NETWORK attachment, but done differently and uses different programs for interaction)
https://0x49d1.github.io/2025/04/30/nas-linux.html
Several days ago we had a talk in the team about importance of the right code review practices. We have specific tech guidelines and sure everyone must follow them, but there are still important questions like: how deep to do code review? Should the reviewer fully understand the logic? Will it be reviewer's fault if there will be a bug on production after the review?
I decided to write general checklist for code review with practices and tools for example to follow. I use C# as a sample, but this is applicable to any language actually.
https://dpursanov.medium.com/completing-a-code-review-e23df4f2ca3d
Delegates are powerful tools that enable developers to encapsulate methods as objects, allowing for flexible and dynamic method invocation. While their primary purpose is to represent references to methods with a specific signature, delegates offer several interesting and advanced usages in modern C# programming.
https://dpursanov.medium.com/exploring-usage-of-delegates-in-c-40e9f88da47c
#dotnet #pattern
Was discussing authentication topics with my interns and found out that OWASP has resources about authentication (in cheetsheet series):
https://cheatsheetseries.owasp.org/cheatsheets/Authentication_Cheat_Sheet.html
Nice checklist to have... Also if are not using their "standards" - at least recheck them sometimes.
Dive into how C# language features facilitate the use of the Iterator design pattern in this post by Liam Mooney. The article offers practical examples and insights on implementing iterators in your code, making it a valuable resource for developers looking to strengthen their grasp of C# design patterns.
https://endjin.com/blog/2024/07/csharp-design-patterns-iterator-language-features
If you ever had the performance problems with data retrieval - sure you already know that some indexing can help there. But maybe you, like me, wanted to go deeper; here is the article (part research, part from practice) on shortly how indexing works with samples for MariaDB (actually the same can be applied to other engines too).
https://dpursanov.medium.com/how-indexing-works-in-mariadb-and-why-it-helps-with-optimization-58b098c82d56
#mariadb #optimization
Did several small refactorings the other day and used pattern matchings in one of the actions. It appeared quite elegant, so here is a small article for beginners on the topic:
https://dpursanov.medium.com/exploring-the-power-of-pattern-matching-in-c-c24c9df291d6
The technic is not widely used as I see, but when it is - it definitely makes the code more expressive with complex conditions, for example:
C#
public string DescribeAge(int age) => age switch
{
< 0 => "Unborn",
>= 0 and < 13 => "Child",
>= 13 and < 20 => "Teenager",
>= 20 and < 65 => "Adult",
>= 65 => "Senior",
_ => "Unknown"
};
Valuable tool from GitHub:
Code scanning, which is a developer-first, GitHub-native approach to easily find security vulnerabilities before they reach production. We’re thrilled to announce the general availability of code scanning.
Code scanning helps you prevent security issues in code.
Exciting results so far!
• Since introducing the beta in May, we’ve seen tremendous adoption within the community:
We’ve scanned over 12,000 repositories 1.4 million times, and found more than 20,000 security issues including remote code execution (RCE), SQL injection, and cross site scripting (XSS) vulnerabilities.
• Developers and maintainers fixed 72% of reported security errors identified in their pull requests before merging in the last 30 days. We’re proud to see this impact, given industry data shows that less than 30% of all flaws are fixed one month after discovery.
• We’ve had 132 community contributions to CodeQL’s open sourced query set.
• We’ve partnered with more than a dozen open source and commercial security vendors to allow developers to run CodeQL and industry leading solutions for SAST, container scanning, and infrastructure as code validation side-by-side in GitHub’s native code scanning experience.
https://github.blog/2020-09-30-code-scanning-is-now-available/
One of the best terminals for windows just got another nice update: https://devblogs.microsoft.com/commandline/windows-terminal-preview-v0-10-release/?WT.mc_id=reddit-social-thmaure
no, really, in case you've not tried it yet - just try: it's rendering with the help of DirectX is smooth and fast, works with WSL without any significant concerns! Really seems like another "Visual Studio Code" like project, with interesting new features and Microsoft's recent passion with Linux.
Another alternatives:
https://conemu.github.io/ - ConEmu; nice little thing, but has sudden hang issues. The development is stuck a bit lately.
https://cmder.net/ - Cmder; another emulator built on top of ConEmu with additional bugfixes.
A nice addition from Bitbucket: Git LFS (Large File Storage). Now we can store even large binaries without growing the size of the actual repository: bitbucket stores the large files in the cloud and the references to them in repository, so that when you are checking out some version - it will pull only the relevant binary for that version.
Why should you care about Git LFS?
Git was optimized for source – it’s easily merged and compressed and is relatively small, so it is perfectly feasible to store all history everywhere, but this makes it inefficient and slow when trying to track large binary files. For example, If your designer stores a 100 MB image in your Git repository and modifies it nine times, your repository could bloat to almost 1 GB in size, since binary deltas often compress poorly. Every developer, build agent, and deploy script cloning that repository would then have to download the full 1 GB history of changes, which may lead to drastically longer clone times. Just imagine what would have happened if your designer made 99 changes to that file.
https://blog.bitbucket.org/2016/07/18/git-large-file-storage-now-in-bitbucket-cloud/
Here are not that obvious rules facts about threading in .NET. Saved the article, because there was a moment in my career when one of them saved me lots of time (bugs in multi-thread are sometimes hard to catch before going to production in case you don't normally understand the subject).
Have you ever spent a few hours on trying to debug a non-deterministic problem occurring in your multi-threading application? If so, then you should definitely read this article. If not it is anyway a good way of revising your current knowledge about threading challenges in C#. Being aware of some common facts about threading can help you considerably in building well-designed, error-proof multi-threading applications in the future.
http://blog.goyello.com/2014/01/21/threading-in-c-7-things-you-should-always-remember-about/
Epic article about how relational databases work in general. Easy to read and VERY valuable, just because of the fact that in depth there is too much academic math and raw documentations where you must know what are you searching for when you are reading it (sure its OK, but not for newbies). http://coding-geek.com/how-databases-work/
Читать полностью…
Not directly related to the IT, but related to the information we need to process. Rush is almost always a loose when you want to understand and learn something new. The bad news is that we are already spoiled by 'scanning' through Facebook/Twitter posts.
With 1,500 – 2,000 TV shows aired, 600,000 – 1 million books published, 1 billion active websites & approximately 200 billion tweets posted every year, we live in a world packed with information. In our pockets, a thumb-press away, we carry libraries so vast that even imagining them would be an impossibility... https://blog.todoist.com/2016/04/25/read-less-learn-more/
Some recommendations for the developers of any skillset:
Try https://www.manning.com/books/c-sharp-in-depth-third-edition
in case the "depth" is the right word for your curiosity in C#.
If you're a .NET developer, you'll use C# whether you're building an advanced enterprise application or just slamming out a quick app. In C# 5 you can do amazing things with generics, lambda expressions, dynamic typing, LINQ, iterator blocks, and other features. But first you have to learn it in depth.
C# in Depth, Third Edition has been thoroughly revised to cover the new features of C# 5, including the subtleties of writing maintainable asynchronous code. You'll see the power of C# in action, learning how to work with high-value features that you'll be glad to have in your toolkit. And you'll learn to avoid hidden pitfalls of C# programming with the help of crystal clear explanations of "behind the scenes" issues.
In short: this one is the best human readable book about the language from the #1 stackoverfloow .NET superhero Jon Skeet.
A nice article in russian about a story of indie game company, who tried to be self published in XBOX/Steam Greenlight
https://m.habrahabr.ru/post/302848