Asynchronous programming is a form of programming that prevents blocking of our application by allowing time-consuming work – like downloading data from a network – to be decoupled from the main thread. For our implementation, in principal, it requires to hand over a callback to the asynchronous method, that in turn will invoke the callback when it has finished its work.
With C# 5, the async and await keywords have been introduced. These fundamentally improved how we can write and consume asynchronous methods. Basically, the structure of our code can remain almost the same compared to a synchronous implementation, but the compiler takes over a whole lot of work to restructure our code into mentioned callbacks to make it stateful and non-blocking. This, though, only worked for void and single-result methods using Task and Task<T> as return type.
Methods producing streams of data – a.k.a. IEnumerable<T> – were left out, and required custom code to be written. However, such requirements are quite popular, thinking of working with cloud applications, collecting data from IoT sensors, or receiving data from databases. Hello, C# 8 and IAsyncEnumerable!
With Rider, we can create and work with Xamarin projects to develop applications targeting Android and/or iOS devices. We can write code and make use of code analysis, coding assistance, refactoring and debugging features, built-in tools like Version Control and the NuGet client, and deploy and debug our apps on emulated or real devices.
In this blog post, we want to provide an overview of how to get started and what tooling is available. And while we’ll be targeting Android, keep in mind that targeting iOS is very similar. Continue reading →
Getting started with Test Driven Development (TDD) can be very challenging. It requires a different mindset and approach to writing and developing code. However, once in that mindset, it is very difficult not to write tests first.
But why bother writing tests first?
In this session, we will go through the reasons for writing tests before coding, look at architecture and design principles, such as SOLID and see how it all comes together to create a more testable and maintainable application.
I will show you how to get started writing tests first with practical examples on how to reprogram a T800 series Terminator so you can start using TDD in your own applications (or killer robots from the future).
What does C# code with good style look like? While it depends somewhat on the individual or team, there are a few popular staples of style when it comes to C#, and you’ll read about those here. Regardless of what’s popular or recommended, code with good style always has two qualities: It’s easy to read and consistent. Consistency is key in programming, and that really shows when it comes to programming style.
This post is part of a series around finding a coding style that fits you like a glove, and how Rider can help:
JetBrains Rider offers several advantages over the standard tools for Xamarin developers. We will explore the various ways Rider can help you improve your coding speed and quality so you can ship faster!
Ahhh, September. It’s such a great month that it’s been memorialized in a popular song by Earth, Wind, and Fire. In many places, school starts again and autumn will soon be upon us (for the north half of the world). As the weather becomes milder, it’s nice to sit outside and catch up on some technical reading. Besides, once the kids go back to school you can actually get some reading done.
This October, the JetBrains .NET team is coming to Australia, visiting Sydney, Melbourne and Brisbane. Our .NET Developer Advocates Matt Ellis and Maarten Balliauw will be visiting NDC Sydney and be part of several local events. We’ll talk about best practices when using Rider, and memory management in .NET.
Here’s where you can find us:
On Tuesday, October 15th, we are hosting a JetBrains Night in Sydney where Matt and Maarten are joined by local speaker Rob Pearson who will ship ASP.NET Core apps without Windows, using JetBrains Rider and Octopus Deploy.