The next major version of C# is C# 8.0. It’s been in the works for quite some time, even as we built and shipped the minor releases C# 7.1, 7.2 and 7.3, and I’m quite excited about the new capabilities it will bring. The current plan is that C# 8.0 will ship at the same time as .NET Core 3.0. However, the features will start to ...
Dzisiejszy post będzie trochę inny niż większość. Temat, który poruszę nie jest może jakoś mocno praktyczny i nie wykorzystasz go każdego dnia. Ale z drugiej strony może posłużyć jako ciekawy pomysł na pytanie rekrutacyjne, dlatego warto się nim zainteresować 🙂 Na początku zastanówmy się, czy klasa faktycznie może być prywatna. Chwila zastanowienia i prawdopodobnie myślisz sobie, że chyba nie. Po co w ogóle coś takiego byłoby potrzebne? Odpalasz Visual Stu...
Za każdym razem gdy definiujesz funkcję lokalną zadaj sobie pytanie czy nie lepiej dodać metodę lub właściwość do obiektu
Sztuka programowania 872 dni, 11 godzin, 57 minut temu 57 źrodło rozwiń
Jak się obejść bez Moq i NSubstitute - proste użyj Fake'ów
Sztuka programowania 903 dni, 11 godzin, 54 minuty temu 125 źrodło rozwiń
About two years ago I blogged about an upcoming experimental IO API in the .NET world - at the time provisionally called "Channels"; at the end of May 2018, this finally shipped - under the name System.IO.Pipelines. I am hugely interested in the API, and over the last few weeks I'm been consumed with converting StackExchange.Redis to use "pipelines", as part of our 2.0 library update. My hope in this series, then, is to discuss:what "pipelines" arehow to use them in terms of codewhen you might want to u...
Sztuka programowania 970 dni, 11 godzin, 46 minut temu 23 źrodło rozwiń
Posted on : By Grzegorz KotfisBlog Code A few days ago I resolved simple kata on Codewars – „Disemvowel Trolls” This particular kata is of type ‚remove vowels from the string’ – easy peasy. One of the many approaches to this kind of problem is:RegexString replacingLoop with checkLambda expression (in this case Linq) I’ve decided to give a shot Linq approach this time and what first came to mind? Use Except! Treat this string as a collection of chars and remove from it t...
Czasami async/await w lambda nie jest potrzebne
Sztuka programowania 987 dni, 5 godzin, 42 minuty temu 130 źrodło rozwiń
W artykule chciałem pokazać sposób na testowanie query GraphQL'owych za pomocą biblioteki FsCheck co pozwoli na wyłapanie błędów, które byłyby trudne do znalezienia przy manualnym testowaniu, bądź przy testach jednostkowych. Zapraszam do lektury :)
Sztuka programowania 1019 dni, 4 godziny, 50 minut temu 45 źrodło rozwiń
O mnie Posted on Mon 11 February 2019 in .NET With many great features C# 7 comes with new and shiny pattern matching. I know that this feature is less usable then in other languages, but it add new possibilities to coding. In this article I want to share with you my experiments with monads.Optional I believe that some of you know that null exception is big pain in developer life. I hear that even null creator say that this was a "billion-dollar mistake" to invent null. In other hand some l...
Sztuka programowania 1109 dni, 9 godzin, 53 minuty temu 165 źrodło rozwiń
Implementacja singletona w C# może być trudniejsza niż się wydaje...
Sztuka programowania 1238 dni, 12 godzin, 35 minut temu 291 źrodło rozwiń
Żeby sprawdzić poprawność adresu email, wcale nie trzeba męczyć się ze skomplikowanymi wyrażeniami regularnymi. W C# z pomocą przychodzi klasa MailAddress. Oczywiście jest to rozwiązanie wysokopoziomowe i wolne (rzuca wyjątki). Zapewnia jednak czytelność kodu.
I often work on applications whose sole task is to execute a script at certain time or day. You may approach it in several ways, eg.: Task Scheduler (Windows), SQL Job (if it is a SQL task) or CRON in Linux. You may also write application, which would run in background and execute a script at certain time. The only question is – do you really want do it? In this post, I would like to introduce other solution to tasks like this. ...
Programowanie rozproszone 1496 dni, 9 godzin, 35 minut temu 287 źrodło rozwiń
I’ve eventually decided to start using the *NIX system for the software development. Being a Windows user and the .NET developer for many years now, it might seem like a radical change, but let me tell you this – it was a great decision and here is the explanation.
In this post I will present the most popular Castle Windsor features encountered in typical enterprise applications.
Last time I wrote a post about the commands. Events are quite similar to the commands – the main difference between these 2 patterns is that the events are related to the things that have actually happened to our entity e.g. by invoking the command. They’re also a core part of the DDD (Domain Driven Desing) and can be easily implemented within our software solution.
Sztuka programowania 1664 dni, 5 godzin, 19 minut temu 164 źrodło rozwiń
How null's are handled in switch statement in C#, Java and JavaScript
Sztuka programowania 1686 dni, 10 godzin, 31 minut temu 146 źrodło rozwiń
[ENG] Składnia inicjalizatorów obiektów oraz kolekcji w C# (wraz z nową składnią inicjalizacji słowników z C# 6). Tekst raczej dla początkujących.
Sztuka programowania 1717 dni, 3 godziny, 36 minut temu 75 źrodło rozwiń
In this post I will try to introduce the concept of validation using the Chain of Responsibility pattern (CoR), which I use successfull for years
Sztuka programowania 1739 dni, 11 godzin, 54 minuty temu 223 źrodło rozwiń
Zawód programisty wiąże się z nieustannym wybieraniem pomiędzy złym, a gorszym. Nie inaczej jest ze słowem kluczowym var.
Sztuka programowania 1783 dni, 12 godzin, 9 minut temu 403 źrodło rozwiń
CQS stands for the command query separation. There’s a chance that you may have not heard about it, but on the other hand the CQRS might ring a bell. Even though these 2 patterns have very much in common, there is a significant difference (definitely a bigger one than the additional “R” character within the CQRS acronym) in how do they apply to the architecture of our system. In this post I’ll focus on the CQS – the older brother of the CQRS – that will help you understand how to design the software that...
Sztuka programowania 1809 dni, 7 godzin, 23 minuty temu 171 źrodło rozwiń