Introduction to Logistic Regression

Machine learning is a branch of artificial intelligence and computer science that focuses on using data and algorithms to imitate the way humans acquire knowledge and gradually improve its accuracy.

In a previous article, we have defined supervised learning and unsupervised learning. The training data for supervised learning has correct answers, while unsupervised learning does not. Supervised learning has two common types, regression, and classification. In regression analysis, the model is used to predict continuous outputs. Meanwhile, classification trains a model to assign data to specific categories.

In this article, we are going to walk through classification and explore logistic…

An introduction to the fetch-mock JavaScript library

Photo by Sigmund on Unsplash

A web application is software that runs on a web server and is accessed by users through web browsers. A user interface (UI) produces an environment to perform a series of operations, such as viewing a shopping list or adding or removing items into a shopping cart.

As UI is a tactile and visual component, the business logic is empowered by the backend. It is typical for a UI to make async calls, using fetch, axios, or GraphQL, etc.

During the UI development, the backend may not be available for a while. …

An introduction to popular machine learning algorithms

Photo by Egor Myznik on Unsplash

Machine learning, as a part of artificial intelligence, is the study of computer algorithms that can improve automatically through experience and by the use of data.

In 1959, Arthur Samuel, a pioneer in computer gaming and artificial intelligence, defined machine learning as the field of study that gives computers the ability to learn without being explicitly programmed.

Machine learning has advanced significantly in the last couple of decades. In 1997, IBM supercomputer Deep Blue defeated the Russian chess grandmaster, Garry Kasparov. In 2016, Google DeepMind AI program AlphaGo defeated the Go World Champion, Lee Sedol. …

Bazel — A Fast, Scalable Build and Test Tool

What is Bazel

Bazel is an open-source build and test tool that is similar to Make, Maven, and Gradle. It builds and tests software of any size, quickly and reliably.

Here is the Google trend for the past 5 years.

Ant forms facilitate managing web form’s style, layout, validation, and data

Photo by Christina @ on Unsplash

A web form allows us to enter data that is sent to a server for processing. For example, a form can be used to enter the shipping address and credit card information when we order a product. A form is enclosed in the HTML <form> element. It contains text fields, selects, checkboxes, radio buttons, and etc.

A form is a complicated element/component in HTML/React. In a previous article, we explained another aspect of the form: how form autofill works.

In this article, we are going to explore how Ant forms facilitate managing form’s style, layout, validation, and data.

Why Do We Need an Ant Form?

An Ant…

A closer look at how browsers manage autofill for generic fields, credit cards, addresses, and passwords

Photo by Kelly Sikkema on Unsplash

What is autofill?

When a user fills out a form on the web, the browser is smart enough to fill in the value based on similar values that the user has entered in the past.

What is autocomplete?

When a user fills out a form on the web, the browser is smart enough to show possible values based on similar values that the user has entered in the past. The user can select and accept a hint value.

Autofill or autocomplete applies to the username, password, phone number, address, email, credit card information, or any random fields.

The differences between autofill and autocomplete are subtle. It…

A step-by-step guide to setting up Chromatic and using it to publish Storybook and run visual regression testing

Photo by Leslie Lopez Holder on Unsplash.

Storybook is a UI tool to streamline component buildout for development, testing, and documentation. Chromatic is a cloud-based toolchain for Storybook. It streamlines the process of shipping UI components with higher quality.

In a previous article, we explained how to set up Storybook. Today, we will go through the steps to set up Chromatic and explore the following key features:

  • Execute one simple command to publish Storybook.
  • Enable visual regression testing.
  • Empower UX designers to review visual diffs.
  • Maintain a documented, versioned, and searchable library.
  • Integrate with GitHub and continuous integration (CI) services.

Set Up a Chromatic Account

In order to use Chromatic, it is…

Exploring new features since Storybook 6.0

Photo by Sigmund on Unsplash

Storybook is a tool for UI development. It makes development faster and easier by isolating components. This allows us to work on one component at a time. It streamlines UI development, testing, and documentation.

Storybook 6.3 was released in June 2021. Besides React 17, NPM 7, Yarn 2, and Webpack 5 support, the followings features have been supported since Storybook 6.0:

  • Zero-configuration setup
  • Dynamic component editing
  • Multiple Storybook Composition
  • Documentation improvement

In this article, we dive into the details of these features.

Zero-Configuration Setup

Storybook is complicated. It gets more difficult when there are more knobs to set up a complicated piece…

A walkthrough of HTTP/0.9, HTTP/1.0, HTTP/1.1, HTTP/2, and HTTP/3

Photo by Caspar Camille Rubin on Unsplash.

“The Hypertext Transfer Protocol (HTTP) is an application-level protocol for distributed, collaborative, hypermedia information systems. It is a generic, stateless, protocol which can be used for many tasks beyond its use for hypertext, such as name servers and distributed object management systems.” — W3

HTTP allows browsers and servers to communicate. It forms the basis of what a web server must do to perform the most basic operations. HTTP has gone through a number of stages. The latest draft of Hypertext Transfer Protocol Version 3 (HTTP/3) was published on May 27, 2021.

Let’s walk through HTTP’s history and explore the…

A living document of the new React features

Photo by Aaron Burden on Unsplash.

On June 8, 2021, React 18 Alpha was released. It is exciting to see what is coming in React 18.

The React 18 Working Group has been formed to provide information and support to the community through the release. React 18 Alpha can be installed with the following command:

npm i react@alpha react-dom@alpha

React 18 is a major release that brings changes on both the client side and server side. These are the new features:

  • Replacing render with createRoot.
  • Adding strict effects to StrictMode.
  • Automatic batching for fewer renders.
  • startTransition keeping UI responsive.
  • useDeferredValue generating a deferred value.
  • Concurrent Suspense

Jennifer Fu

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store