Dart Null's

Dart Null's

Null's in Dart

What is NULL?

Null is a universal non value indicator that a specific variable does not hold something.

Up to version 2.12, you could assign anything to be null.

Before 2.12 The type of errors that come from using nulls, is that if you try to use to get for example the length of the string while it’s null will cause problems.

Dart Basics

Dart Basics

Declaring variables (final, var, const, dynamic)

There are several ways of declaring variables, and this can be done by using:

Typescript, undefined and null

Typescript, undefined and null

In Typescript, undefined and null are sub-types of any other type (string, boolean, number, void), which means that you can use undefined or null to replace any other type.

SendGrid and Phoenix Framework

SendGrid and Phoenix Framework

This is a small tutorial explaining how to use SendGrid to send emails in Phoenix Framework (1.4)

React and Redux

React and Redux

Most important words in Redux architecture:

  • Store
  • Dispatch
  • Actions
  • Reducer
  • State
My first milkshake, made by me

My first milkshake, made by me

I’ve been drinking a lot of milkshakes latelly, not does kind of full of chocolate or something like that, but the ones that kind of more healthy with fruits, vegetables, etc

Basic Swift, part 3 - Optionals

Basic Swift, part 3 - Optionals

Swift Optionals

Optional is an instance variable that may or may not have a value.

In Swift is not possible to use a variable that is empty. Variables cannot be nil (will crash program if it happens). So by setting a variable to be optional, Swift is creating a bubble around that variable to protect it from ever being nil.

So if there is a variable that is possible that in some point in time will be nil, we have to declare it has optional, like this:

Basic Swift, part 2 - Operators

Basic Swift, part 2 - Operators

Swift operators

Unary Minus Operator

Reverts the value to a negative value

1
2
let two = 2
let minusTwo = -two // (-) unary operator, returns -2