Simulating Target Type Inference in C#
Alexey Golub
by
9M ago
Above everything else in software development, I really enjoy building frameworks that enable other developers to create something cool. Sometimes, when chasing that perfect design I have in mind, I find myself coming up with weird hacks that push the C ..read more
Visit website
Reverse-Engineering YouTube: Revisited
Alexey Golub
by
1y ago
Back in 2017 I wrote an article in which I attempted to explain how YouTube works under the hood, how it serves streams to the client, and also how you can exploit that knowledge to download videos from the site. The primary goal of that write-up was to ..read more
Visit website
Monadic Comprehension Syntax via LINQ in C#
Alexey Golub
by
3y ago
If you ask a C# developer to list the reasons why they enjoy working with the language, they will most likely put LINQ somewhere at the top. LINQ is an extremely convenient set of language tools that provide ways to query and transform data sequences of arbitrary shapes and origins, in a fluent, lazy, and efficient manner. LINQ itself is made up of multiple pieces, but from the consumer perspective it mainly comes in two forms: extension methods for IEnumerable and IQueryable interfaces ..read more
Visit website
Fluent Generics in C#
Alexey Golub
by
3y ago
Generics is a powerful feature available in many statically typed languages. It offers a way to write code that seamlessly operates against many different types, by targeting the features they share rather than the types themselves. This provides the means for building flexible and reusable components without having to sacrifice type safety or introduce unnecessary duplication. Even though generics have been around in C# for a while, I still sometimes manage to find new and interesting ways to ..read more
Visit website
Prefer Fakes Over Mocks
Alexey Golub
by
3y ago
The primary purpose of software testing is to detect any potential defects in a program before it reaches its intended consumers. This is typically achieved by establishing functional requirements which define supported user interactions as well as expected outcomes, and then validating them using (automated) tests. Consequentially, the value provided by such tests is directly dependent on how well the scenarios they simulate resemble the way the software is actually used. Any deviation therein ..read more
Visit website
Pure-Impure Segregation Principle
Alexey Golub
by
3y ago
About two months ago I published an article titled “Unit Testing is Overrated” where I shared my thoughts on how developers place way too much faith in that testing approach and why it often isn’t the best tool for the job. While I didn’t expect that post to do particularly well, in three weeks it managed to get over 100K views and 1000 comments, even despite its controversial nature (or, perhaps, owing to it?). It was really interesting to follow the discussions that unfolded, given the vast ..read more
Visit website
Unit Testing is Overrated
Alexey Golub
by
4y ago
The importance of testing in modern software development is really hard to overstate. Delivering a successful product is not something you do once and forget about but is rather a continuous recurring process. With every line of code that changes, software must remain in a functional state, which implies the need for rigorous testing. Over time, as the software industry evolved, testing practices have matured as well. Gradually moving towards automation, testing approaches have also influenced ..read more
Visit website
Simulating Return Type Inference in C#
Alexey Golub
by
4y ago
Above everything else in software development, I really enjoy building frameworks that enable other developers to create something cool. Sometimes, when chasing that perfect design I have in mind, I find myself coming up with weird hacks that really push the C# language to the limit. One such case happened not so long ago, when my coworker and I were looking at how to avoid specifying generic arguments, in places where the compiler should seemingly be able to guess it based on the return type ..read more
Visit website
Working with Expression Trees in C#
Alexey Golub
by
4y ago
Expression trees is an obscure, although very interesting feature in .NET. Most people probably think of it as something synonymous with object-relational mapping frameworks, but despite being its most common use case, it’s not the only one. There are a lot of creative things you can do with expression trees, including code generation, transpilation, metaprogramming, and more. In this article I will give an overview of what expression trees are and how to work with them, as well as show some ..read more
Visit website
Refactoring C# Code Using Partial Classes
Alexey Golub
by
4y ago
As our code grows, we regularly find ourselves seeking new ways to keep it well structured and organized. Systematic refactoring is a necessity but often doesn’t come very easily. One of the challenges we often face is deciding how to group different parts of a bigger class together. Even with a good degree of separation, sometimes we end up with classes that might be a bit too much to reason about. From the earliest versions of the language, C# provided a construct called regions. Although it ..read more
Visit website

Follow Alexey Golub on FeedSpot

Continue with Google
Continue with Apple
OR