Typescript Basics

Static typing

let name: string; 
let id: number; 
let now: date;

Interface

interface IStudent {
    name: string, 
    id: number
}

// The following will give error coz it's missing id property
let john:IStudent = {
    name: 'John'
}

// To make the above statement to true, we add optional question 
// mark to id
interface IStudent {
    name: string, 
    id?: number
}

Class

class Student {
    name: string;
    id: number;
    constructor (name) {
        this.name = name;
    }
}

// Equivalent form
class Student {
    constructor (name, id)
}



// By default, all properties and members are public if not 
// specified. If private members intended, we need to add the 
// keyword
class Student {
    private name: string; 
    private id: number;
    constructor (name, id) {
        this.name = name;
        this.id = id;
    }
}

// Equivalent form
class Student {
    constructor (private name, private id)
}

let john = new Student ('John', 123)

Cross Shield Pendant

Quick review of the necklace:
Stainless Steel Two-Tone Cubic Zirconia Guardian Cross Shield with 24” Curb Chain

Not really sponsoring this necklace, but if anyone came for the review instead of some stupid paragraphs, the pendant just feels a bit heavy to around my neck after a few hours of wearing. Otherwise, it looks great to me (might not apply to you since art is too perspective and both my parents think it’s ugly 🙂 )

Continue reading

WordCamp Vancouver 2018

I missed the opening and keynote and also skipped the after party at a bar because I was just too tired and forgot to bring my driver’s license. Overall, the event was great! Foodies-wise, I had some fruits and 1 cupcake for breakfast, 2 sandwiches for lunch, 1 sprite and 3 cups of coffee throughout the day. Lots of cool swags! I don’t even know how this event was only $25. Some of these talks definitely value more than $25. A lot of thanks all those who made this happened!!

Anyways, here are some of my notes from the session that I’ve attended:

Continue reading

Green Cleaning Tips

Look for cleaning products that have environmental certification such as the Ecologo or Green Seal. Alternatively, for many cleaning tasks around the home, you can use products that you might already have on hand

  • A vinegar and water solution can be used to clean and freshen many surfaces around the home, including walls and cupboards. It also works well to clean windows.
  • Baking soda has many uses including absorbing odours, cleaning bathtubs, and deodourizing rugs and carpets.
  • Lemon juice can be used to help dissolve soap scum and hard water deposits. When added to a vinegar/water cleaning mixture, it also helps neutralize the vinegar smell.
  • Cornstarch (as well as baking soda) can be used to help deodorize rugs and carpets. Sprinkle about 1cup per room, then vacuum after 30 minutes.

Skateboarding is so much fun!

I don’t know what to write, but since it’s gonna be the last day of June and I have to end the month by visiting a dentist, I thought I might as well log something that’s more interesting.

So, up till this point, I’ve got 3 skateboards now and are used for the following purposes:

Skateboard Purpose
Grand Gopher To travel and cruise around places.
7″ Enjoi This one is just a looker. A decoration if I may. 🙂
Zero Actual board for learning tricks.

Since the day was kinda sunny/cloudy and the parking lot was empty, I had a bit fun cruising around in circle lol. I’m still super noob to this area, but I hope to be better someday. Fighting! 😛

Six Youtubers that Changed My Life

Here are a few people that I really look up to on Youtube. Most of them are life coaches, but regardless of what their careers in real life are, these are the people that I benefited a lot from marathoning around their channels. Most of them are trying to direct you to have the right mindset hence helping you to achieve more in life. I am extremely grateful for them to share their knowledge openly on YouTube. Hope their videos will inspire you as well.

Continue reading