Zone of Development

by Damiano Abballe

C# – Events

In this post, we will see what an Event is and how we can use it.First of all, what is an Event?From Microsoft web site:“An event is a message sent by an object to signal the occurrence of an action. The action can be caused by user interaction, such as a button click, or it […]

Read More

Node.js – Create a web site with express

In this post, we will see how to create a web site in Node.js using express. First of all, we open an editor (in my case Visual Studio Code), select the folder where we want to create our project and from the terminal we run the command npm init: Then, we run the command npm […]

Read More

C# – Dynamic Type

In this post, we will see what a Dynamic Type is and how to use it. Dynamic Type was introduced in C# 4.0 and it avoids compile-time type checking.It escapes type checking at compile-time and it resolves type a run time.A dynamic type variable is defined using the dynamic keyword.Let see some examples: DEFINING A […]

Read More

SwiftUI – How to display an Enum in a Picker

In this post, we will see how to display an Enum in a Picker.First of all, we start creating a new project called ViewEnum where we will add a file called LstCars, used to define an Enum consisting of a list of car brands: [LstCars.swift] Finally, we define a Picker in the file ContentView where […]

Read More

C# – Delegates

In this post, we will see what Delegates are and how to use them.First of all, what is a Delegate?From Microsoft web site: “A delegate is a type that safely encapsulates a method, similar to a function pointer in C and C++. Unlike C function pointers, delegates are object-oriented, type safe, and secure. The type of a […]

Read More

SwiftUI – How to show an Alert

In this post, we will see how to implement an Alert in SwiftUI. We create a project called AlertTest and add this code in the file ContentView: [ContentView.swift] This is all and now, if we run the application, this will be the result:

Read More

MongoDB – How to install it on macOS

In this post, we will see how to install and configure MongoDB on macOS. First of all, we open the Terminal and run the command /bin/bash -c “$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)” , in order to install Homebrew brew. Then, we run the command brew tap mongodb/brew, in order to download the official Homebrew formulae for MongoDB and […]

Read More

Python – Try/Except

In this post, we will see how to manage Try/Except in Python. Just to remember what try/except is: Try/Except is a statement marks a block of statements to try and specifies a response should an exception be thrown.In detail, in Try/Except we have three blocks:Try,  used to test a block of code for errors.Except, used […]

Read More

SwiftUI – Tips for button

In this post, we will see three tips that might help us to create buttons in our applications. First of all, we open Xcode, we create an iOS project called TestButton and we add three buttons: Then, we create a new Swift file called ButtonStyleCustom where we will define the style that we will use […]

Read More

C# – TDD

In this post, we will see how to create a simple Console application (a calculator), using TDD.But first of all, what is TDD?From Wikipedia:“Test-driven development (TDD) is a software development process that relies on the repetition of a very short development cycle: requirements are turned into very specific test cases, then the code is improved […]

Read More