Node.js Learning Path: Unit 5 – The Event Loop

Hey everyone! If you want to learn Node.js, then check out my Node.js Learning Path, which you can find only at IBM Developer.

The Event Loop is the key to Node’s scalability.

Unit 5 of the LP is about the Event Loop, and in it you’ll learn stuff like:

  • The phases of the Event Loop
  • How to write code that runs in the various phases (so you know when your code will run)
  • The Node Events API
  • Node Streams

There’s a quiz to help you deepen your understanding of the material, and a video too:

Ready to dive into the Node Event Loop? Then click here to jump right to Unit 5.

Want to take the entire course? Then click here to start at the beginning, with Unit 1.

Either way, have fun, good luck, and thanks for reading!

–jsp

Node.js Learning Path – Unit 3: Node.js Architecture

Hey everyone! If you want to learn Node.js, then check out my Node.js Learning Path, which you can find only at IBM Developer.

Unit 3 of the Learning Path starts with an overview of the Node.js architecture: the Node API, the Node Core, the Event Loop, and the JavaScript engine (Chrome’s V8 engine).

You’ll learn about ECMA Script (ES), and how the different versions get their names (Q: is it ES6 or ES2015? A: Yes).

You’ll learn the key to Node’s impressive scalability (spoiler alert: non-blocking I/O via the Event Loop), and even write some code using the Node Read-Eval-Print-Loop (REPL).

You’ll also get a tour of Node’s package manager, npm.

There’s even a video (just when you thought it couldn’t get any better):

Click here to start your Node journey, or here to jump right to Unit 3 of the Node Learning Path.

Thanks for reading!

–jsp

Node.js Learning Path – Unit 2 – Install Node

Hey everyone! If you want to learn Node.js, you should check out my Node.js Learning Path, which you can find only at IBM Developer.

Unit 2 of the LP shows you how to install the software you need, like:

When you’ve completed Unit 2 you’ll have the software on your computer you need to complete the Learning Path.

Ready to install Node? Then click here.

Thanks for reading!

–jsp

Node.js Learning Path – Unit 1

Hey everyone! If you want to learn Node.js, you should check out my Node.js Learning Path, which you can find only at IBM Developer.

Unit 1 is the overview, where I answer the question: “Why Node?” and show you a detailed outline of the Learning Path.

The Learning Path has two major parts:

  • Part One: Learn Node – Units 1-9
  • Part Two: Apply What You’ve Learned – Units 10-14

The Learning Path will be published unit-by-unit over the next several weeks.

Ready to start your Node.js journey? Then Click here.

Thanks for reading!

–jsp

 

Android Hello, World Video Tutorial

Check out my latest video Tutorial on YouTube!

In this video I show you how to:

  • Create an Android Studio project
  • Create an Android Virtual Device (AVD)
  • Run the Hello World program
  • Add custom behavior to the program
  • Add a string resource to strings.xml

Below is the main source code for the project.

MainActivity.java:

package com.makotogo.mobile.helloworld;

import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;

public class MainActivity extends AppCompatActivity {

 @Override
 protected void onCreate(Bundle savedInstanceState) {
   super.onCreate(savedInstanceState);
   setContentView(R.layout.activity_main);

   // Add button
   Button helloButton = (Button)findViewById(R.id.helloButton);

   helloButton.setOnClickListener(new View.OnClickListener() {
     @Override
     public void onClick(View v) {
       TextView textView = (TextView)findViewById(R.id.textView);
       textView.setText(R.string.seriouslyHelloWorld);
     }
   });
 }
}

activity_main.xml:

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
   xmlns:android="http://schemas.android.com/apk/res/android"
   xmlns:tools="http://schemas.android.com/tools"
   android:layout_width="match_parent"
   android:layout_height="match_parent"
   android:paddingBottom="@dimen/activity_vertical_margin"
   android:paddingLeft="@dimen/activity_horizontal_margin"
   android:paddingRight="@dimen/activity_horizontal_margin"
   android:paddingTop="@dimen/activity_vertical_margin"
   tools:context="com.makotogo.mobile.helloworld.MainActivity">

 <TextView
   android:layout_width="wrap_content"
   android:layout_height="wrap_content"
   android:text="@string/helloWorld"
   android:id="@+id/textView"
   android:layout_alignParentTop="true"
   android:layout_alignRight="@+id/helloButton"
   android:layout_alignEnd="@+id/helloButton"/>

 <Button
   android:layout_width="wrap_content"
   android:layout_height="wrap_content"
   android:text="Click Me!"
   android:id="@+id/helloButton"
   android:layout_marginTop="76dp"
   android:layout_below="@+id/textView"
   android:layout_centerHorizontal="true"/>

</RelativeLayout>

strings.xml:

<resources>
  <string name="app_name">HelloWorld</string>
  <string name="helloWorld">Hello, World!</string>
  <string name="seriouslyHelloWorld">Seriously, HELLO, WORLD!!</string>
</resources>

I hope you enjoy the video!

–jsp