Elevation

Everyone should have this, he thought, and perhaps, at the end, everyone does. Perhaps in their time of dying, everyone rises.

Let me tell you a story, the first book from Stephen King I read was Desperation, it was in high school and it is funny because I was not into horror books, I would never have read a horror book at that time in my life; but this book came to me, literally I found this book abandoned and what was I supposed to do, leave it? It was in my hands and the curiosity was stronger than the terror.

Since then, I discovered horror books to be enjoyable and Stephen King become one of my favorite authors.

I just read Elevation and it has null of horror in it, fortunately for me, supernatural > horror. I really enjoyed it, it was a very quick read, it is a novella, and it felt good; it delivers a message of unity, tolerance, and elevation, it made me smile and truly engage with characters, and despite being one of the ‘quietest’ novels I’ve read, it reinvigorated me.

Azure ❤️ Containers

Mustafa Toroman, MVP for Microsoft Azure, shared with us the talk “Azure loves Containers” as part of AP’s Dev Talks Meetup. I enjoyed it a lot so I just felt like sharing.

Enjoy!

Mustafa published several books on cloud technologies. Lately, his focus is on designing new solutions in the cloud and migrating existing ones to the cloud. Mustafa possesses over 40 Microsoft certifications. Also, he has held the MCT title for many years and has been awarded the MVP for Microsoft Azure for the last four years in a row. He often speaks at international conferences about cloud technologies and now it’s time for Dev Talks Meetup where he will cover topic ‘Azure Loves Containers’.

Containers are the latest big thing in the cloud. They are light, fast, and consistent. And they fit very well into DevOps. Azure offers multiple container options to choose from. And each one of them makes deployment of our applications easy. Let’s see how to build your containers and deploy them anywhere.

C# Tuple

I have recently found this C# feature and found it interesting, let’s take a look.

C# tuples are types that you define using a lightweight syntax. Basically, it gives you the opportunity to define data structures with multiple fields without the complexity of using classes.

Please look at the following example.

(string, int) tuple = ("Hello", 1);
Console.WriteLine($"Tuple with elements {tuple.Item1} and {tuple.Item2}.");
// Output:
// Tuple with elements Hello and 1.

Optionally, you can define the field names.

(string Text, int Count) tuple = ("Hello", 1);
Console.WriteLine($"Tuple with elements {tuple.Text} and {tuple.Count}.");
// Output:
// Tuple with elements Hello and 1.

Another interesting feature of tuples is the support for equality operators.

(string Text, int Count) left = ("Hello", 1);
(string Text, int Count) right = ("Hello", 1);
Console.WriteLine(left == right);
// Output:
// True

Also, you can assign tuples to each other. Keep in mind that tuples must have the same number of fields and the values must be implicitly converted.

(int, double) tuple1 = (17, 3.14);
(double First, double Second) tuple2 = (0.0, 1.0);
tuple2 = tuple1;
Console.WriteLine($"{nameof(tuple2)}: {tuple2.First} and {tuple2.Second}");
// Output:
// tuple2: 17 and 3.14

Now, I must say that you should not go crazy with tuples; replacing separate classes with tuples because you will save a few lines of code it is not a good idea, so before implementing tuples in your code base make sure to document their usage for scenarios where they could be helpful without sacrificing your code quality.

A tiny overview at tuples, but share your thoughts.

For more information about tuples visit Tuple types – C# reference | Microsoft Docs.