WriteAsync .NET

Testing, coding, in that order.

Letter Boxed: out with the old

Software rot is inevitable if projects are not maintained with care. It is nice to think that in today’s write once, run anywhere world, a rock-solid application with no planned changes can continue to work perhaps without even recompiling; of…

By Brian Rogers | 15 March, 2021 | cross-platform, games, legacy, scripts | 2 Comments |
Read more

Cross-platform without complexity: finishing up

Our cross-platform project has interoperable C++ and .NET code. However, the command line and IDE experience still only accounts for the C++ side. Let’s start with the IDE. First, a bit of bad news — there doesn’t seem to be…

By Brian Rogers | 14 August, 2020 | cross-platform, scripts | No Comments |
Read more

Cross-platform without complexity: .NET interop

The cross-platform project has a shared library now. Wouldn’t it be fun to try to build an interop project using P/Invoke with this library? To account for the addition of .NET projects, we’ll need to revisit the project structure: inc…

By Brian Rogers | 12 August, 2020 | cross-platform, tdd | 2 Comments |
Read more

Cross-platform without complexity: shared libraries

Continuing from our cross-platform project skeleton, let’s try to add a shared library. Windows users may know these as dynamic link libraries (DLLs), while Linux users would recognize them as shared objects (.so). To make things even trickier, most Windows…

By Brian Rogers | 10 August, 2020 | cross-platform, native | 1 Comment |
Read more

Cross-platform without complexity: command line

At this point we have a Windows build and remote Linux build working from Windows in the Visual Studio IDE. This is all good and it’s hard to beat VS in terms of productivity while actively developing the code. However,…

By Brian Rogers | 7 August, 2020 | cross-platform, native | No Comments |
Read more

Cross-platform without complexity: remote Linux

Previously, we showed how to enable the Visual Studio IDE to work with an ostensibly cross-platform CMake project. Today we will prove that the project indeed can work on a non-Windows platform — at least as much as is possible…

By Brian Rogers | 5 August, 2020 | cross-platform, native | No Comments |
Read more

Cross-platform without complexity: VS IDE

Let’s say you want to start a modern C++ project. However, you have some requirements in mind that may be hard to achieve. First, the project should support development in the Visual Studio IDE but also provide a simple command…

By Brian Rogers | 3 August, 2020 | cross-platform, native, tdd | 3 Comments |
Read more

Switch expression performance: part 2

Previously we looked at the performance of simple switch statements and expressions. Today we will consider switch expressions with when clauses. This example shows a simple letter grade calculator as might be defined for a US high school: The first…

By Brian Rogers | 26 May, 2020 | performance | No Comments |
Read more

Switch expression performance: part 1

Being the good multi-paradigm language that it is, C# has adopted features from across the programming spectrum. One recent addition of the functional programming variety is pattern matching, first arriving in C# 7.0 with enhancements in C# 8.0. The latter…

By Brian Rogers | 25 May, 2020 | performance | 1 Comment |
Read more

Null operator performance

The null-conditional (AKA “Elvis”) operator and null-coalescing operators were introduced in C# 6.0 and C# 2.0 respectively. They’ve been with us for years and help make our code more concise. But have you ever wondered about their effect on performance,…

By Brian Rogers | 24 May, 2020 | performance | No Comments |
Read more
  • « Previous
  • Next »
Copyright ©2025 WriteAsync .NET | Theme by: Theme Horse | Powered by: WordPress