hello.js

var please = require('share');
console.log('thank you');

NEW !!!

Tuesday, 19 May, 2020 UTC

javascript: Leveraging Semigroups to Create Reusable Any & All Interfaces

This lesson extends upon our knowledge of semigroups and shows viewers how to create `Any` and `All` semigroups which provide us with an interface for comparing `boolean` values. [Fantasyland Docs - Semigroup](https://github.com/fantasyland/fantasy-land#semigroup) ... more


Tuesday, 19 May, 2020 UTC

javascript: Testing Semigroups to Ensure They Abide by the Law of Associativity

Semigroup Data Types provide users with a `.concat` function which must abide by the associative law. As a result of that, it doesn't matter how we append `.concat` as it will always produce the same result. [Fantasyland Docs - Semigroup](https://github.com/fantasyland/fantasy-land#semigroup) ... more


Tuesday, 19 May, 2020 UTC

javascript: Upgrading Semigroup Data Types to Monoids

In this lesson, we'll begin working with monoids by creating some of our own. Specifically, we will upgrade a previously defined semigroup (`Product`) so that it takes the form of a valid monoid. To ensure that we have a valid monoid, we will wrap up ... more


Tuesday, 19 May, 2020 UTC

javascript: Creating Semigroup Data Types from Scratch

Semi-groups are an important part of functional programming. They're not quite monoids, however, they provide us with the foundation we need to create monoids. In this video, we'll learn about semigroups and see how they provide us with a generic interface ... more


Sunday, 17 May, 2020 UTC

egghead: Install and set up the Prisma Framework for a new project

Prisma makes database access easy with an auto-generated and type-safe query builder. In this lesson, we will learn how to install all the necessary dependencies and set up Prisma for an existing npm project, with an empty PostgreSQL database running ... more


Sunday, 17 May, 2020 UTC

prisma: Install and Set up Prisma for a New Project

Prisma makes database access easy with an auto-generated and type-safe query builder. In this lesson, we will learn how to install all the necessary dependencies and set up Prisma for an existing npm project, with an empty PostgreSQL database running ... more


Sunday, 17 May, 2020 UTC

prisma: Install and set up the Prisma Framework for a new project

Prisma makes database access easy with an auto-generated and type-safe query builder. In this lesson, we will learn how to install all the necessary dependencies and set up Prisma for an existing npm project, with an empty PostgreSQL database running ... more


Friday, 15 May, 2020 UTC

react: Set Up Recoil in a new React App

We'll create a new React game with: ``` npx create-react-app paper-game cd paper-game ``` and then install Recoil with: ``` npm install recoil ``` and start the server: ``` npm start ``` Then, to wrap the entire app in the recoil root, we'll import `RecoilRoot` ... more


Friday, 15 May, 2020 UTC

javascript: Use the fs/promises node API to Serialize a Map to the Filesystem

We create a class called `MapStore` that serializes the [JavaScript Map object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map) to JSON and stores that on the filesystem using node 14's [fs/promises API](https://nodejs.org/api/fs.html#fs_fs_promises_api). ... more


Friday, 15 May, 2020 UTC

javascript: Serve a Basic Route with Express 5 and node 14

In this lesson we'll build a basic web server in 2 minutes using Express 5 and node 14's native ES module support. We'll start by creating a new project using `npm init` and then add `"type": "module"` to our package.json file to opt-in ... more


Friday, 15 May, 2020 UTC

javascript: Series Intro - Beginner Level Alpine JS

Welcome to this beginner level series on Alpine JS! 👋🏞 Alpine JS is a rugged, minimal framework for composing JavaScript behaviour in your markup. It brings declarative, reactive, data-driven nature of libraries like React or Vue to your HTML templates. ... more


Friday, 15 May, 2020 UTC

javascript: Up and Running with Deno

In this video, we start by going to Begin.com and creating a new Deno app. We then clone the repo, inspect the code, and modify the response from HTML to JSON data. Next, we deploy the updates in an automated CI / CD process by merging the updates to ... more


Friday, 15 May, 2020 UTC

javascript: Create a Model to Manage Data for an Express API

We'll create a `new Map()` data structure to store Notes that are passed into our API in memory. With that in place we'll create a model called `Note.js` that has the responsibility for saving and manipulating those notes and saving them back into our ... more


Friday, 15 May, 2020 UTC

javascript: Validating Input to an Express API

Whenever you're designing an API that receives input, there's a chance people are going to use it maliciously or incorrectly. This lesson will look at some common problems that can occur when we assume input exists that doesn't and how to pro-actively ... more


Friday, 15 May, 2020 UTC

javascript: Access Asynchronous Data in an Express API with async/await

This lesson will rely on the built-in support for async functions found in Express 5 to demonstrate how an API can easily work with data asynchronously. By the end of the lesson our API will have the ability to save its notes to disk as they're added ... more


Friday, 15 May, 2020 UTC

javascript: Sort and Return an Array of Objects with a Query Param in an Express API

We have an API that allows us to return a list of notes at `/notes`. We want to add the ability to sort that list by passing in the `sort` query param, which we read off of `req.query`. Once we know the expected sort order we pass a function to `Array.prototype.sort` ... more


Thursday, 14 May, 2020 UTC

alpine: Series Intro - Beginner Level Alpine JS

Welcome to this beginner level series on Alpine JS! 👋🏞 Alpine JS is a rugged, minimal framework for composing JavaScript behaviour in your markup. It brings declarative, reactive, data-driven nature of libraries like React or Vue to your HTML templates. ... more


Thursday, 14 May, 2020 UTC

javascript: Refetch API data when a state value changes with the `$watch` property in Alpine JS

In this lesson, we build a little app that fetches dog photos from the dog.ceo API, based on a "breed" search field. We want the API call to happen again when the search value changes, and to do so we use the `$watch` property from Alpine JS, ... more


Thursday, 14 May, 2020 UTC

javascript: Keep a DOM input and state value in sync with the `x-model` directive in Alpine JS

In this lesson, we see how the `x-model` directive makes achieving "two-way data binding" effortless in Alpine JS. We see what it would take to recreate the same functionality with an `x-bind` directive for the input value, as well as an `@input` ... more


Thursday, 14 May, 2020 UTC

javascript: Focus an input field on button click with `x-ref` and the `$refs` property in Alpine JS

In this lesson, we learn how to retrieve a DOM element via the `x-ref` directive in Alpine JS, which gives us a reference to the element it is applied on. In our case, an input field. We can then use the `$refs` object, and reach for the ref we need to ... more


Thursday, 14 May, 2020 UTC

javascript: Focus in input field on page load with `x-init` in Alpine JS

In this lesson, we learn how the `x-init` directive in Alpine JS lets us run a JavaScript expression once the component has initiated. We see the nuances that allow us to trigger that code before Alpine performs initial DOM updates, or after these updates ... more


Thursday, 14 May, 2020 UTC

javascript: Control enter and leave transitions with the `x-show.transition` modifier in Alpine JS

In this lesson, we smoothen the transitions between tabs by applying a `transition` modifier to our `x-show` directive. We see how we can ignore the leaving elements, and focus the animation on the entering elements. We tweak the transition duration and ... more


Thursday, 14 May, 2020 UTC

javascript: Toggle visibility and styles based on state with `x-show` and `x-bind` in Alpine JS

In this lesson, we create a set of tabs with Alpine JS, where only the content of the currently active tab is visible. To do this, we define an `activeTab` state value with `x-data. We then wire up our buttons to change the value of `activeTab` on click, ... more


Wednesday, 13 May, 2020 UTC

react: Use the `prefers-reduced-motion` media query to toggle CSS and JavaScript animations

In this lesson we focus on toggling animations on and off using the prefers-reduced-motion media query. The sample web app has 3 types of animations (CSS, SVG SMIL, and JavaScript) and we will toggle these animations using different techniques such as ... more


Wednesday, 13 May, 2020 UTC

javascript: Update a count state value with the x-on event listener directive in Alpine JS

In this lesson, we define a "count" state value with the `x-data` directive provided by Alpine JS. This defines a new scoped component, which can have access to this state. We then display the "count" value in our HTML with the `x-text` ... more


Wednesday, 13 May, 2020 UTC

javascript: Iterate through data with the `x-for` attribute in Alpine JS

In this lesson, we move the component definition to a function, defined in a script tag in the HTML document. We then iterate through an Array of Objects with the `x-for` directive in Alpine JS. We use a `` tag to wrap the HTML element we want to repeat ... more


Tuesday, 12 May, 2020 UTC

javascript: Revert Optimistic UI Updates when the Server Errors

Error handling in Optimistic UIs can be complex, since changes have already been made to the client-side cache by the time the server responds with an error. Let's look at one approach to dealing with errors in our todo app: removing our temporary todo ... more


Monday, 11 May, 2020 UTC

node: Make a zsh function alias to enforce using yarn commands when in a yarn project

When you or your team work on various npm or yarn projects it gets hard to remember which one is which. This lesson shows you how to create a custom `npm` zsh function alias to remind yourself to use yarn commands when there is a `yarn.lock` file in the ... more


Saturday, 9 May, 2020 UTC

javascript: Reusing Custom React Components by Passing Data Down as Props

To pass data from a parent react component to a child react component, we can supply "attributes" to the JSX tags like: ``` ``` That `name` attribute is then available in the `Greeting` component as a `prop` (which is an object passed in as ... more


Saturday, 9 May, 2020 UTC

javascript: Building a Tree of UI Components in React with Children or with Self-closing tags

You can reuse your custom react components multiple times and build them into a tree of components like this: ``` ``` Notice that the ` ` tag contains the `Greeting` tag as a child, but the `Greeting` tag contains no children - so it requires the trailing ... more