How Far we are from AI (Artificial Intelligence)

This article is not a professional or technical discussion about AI (Artificial Intelligence), but a user experience sharing on AI.

A - Introduction

Since ChatGPT was released in November 2022, it got its Initial Growth to acquire 1 million users just 5 days while it took Instagram approximately 2.5 months to reach 1 million downloads and Netflix had to wait around 3.5 years to reach 1 million users.

By January 2023, ChatGPT had become what was then the fastest-growing consumer software application in history, gaining over 100 million users in two months and contributing to the growth of OpenAI's current valuation of $86 billion. That meant every 80 people, there is at least one existing person who has had the experience to use ChatGPT. 

Although I am not the person in the 1/80 group and did not pay much attention to actively learn AI, I did use or benefit from AI. I will share some examples I met or benefited from AI in the daily life. This is the contents of this article:

  • A - Introduction
  • B - Google and AI
  • C - GitHub Copilot
  • D - AI in Google
    • D.1 - Sample 1 --- Google Search AI answer
    • D.2 - Sample 2 --- Google Search AI answer
    • D.3 - Sample 3 --- Google Search AI answer
    • D.4 - Sample 4 --- Google Search AI answer
    • D.5 - Sample 5 --- Google Search AI answer
    • D.6 - Sample 6 --- Google Search AI answer

B - Google and AI

Although a lot of people have not paid attention to AI, but the Change in Google has already brought us into AI age. I will show more in the third section in this article. Here I will show what I felt the first time what AI existed. At the beggining of last year (2023), my wife had a chance to visit Milan, Italy. I got time to go with her together. I need to get the air ticket in days. What I did was searching on google with one click like this:in Google search, type 

  • from nyc usa to milan, italy

I got the result in seconds for all possibilities for the tickets from different air lines, the ticket I chosen was in three days later, the fare was $450 with $400 discount. At that time, I did not think about the differences, and i did not realize what time the one click search started (may be long time ago) compared to the one airline company by company search or one agent by agent search. Just when we entered the AI age, I realize that is an AI tool, in fact.

C - GitHub Copilot

Around beginning of this year, company requried to install GitHub Copilot, I did have some test run, but not use that in an operational work.

When I installed the GitHub Copilot half a year ago, I could install it in GitHub, or VS Code, as an extention. Now, I open VS Code, and type in Copilot for extentions, I can find so many Copilots that are definitely AI based:

D - AI in Google

We talked about Google and AI, there has been an implicitly built in AI in Google Chrom Browser since not late than the beginning of year 2023 (the time I realized those). Recently, the  explicit AI has been coming for some searching items. The following are some examples

Note:

The following search and link were obtained from each search. For the same searching stuff, in different day, or even in different search, the result could be different. Because the AI is working dynamically. 

D.1 - Sample 1 --- Google Search AI answer

Search on Google for how to update a nx-angular projectAI tells us: 

AI Overview (10/01/2024)

Learn more…Opens in new tab

To update an NX-Angular project, you can use the following commands:

  1. npx nx migrate latest: Updates dependencies in package.json and generates a migrations.json file
  2. npm install: Installs the new dependencies
  3. npx nx migrate --run-migrations: Executes the migration scripts based on migrations.json 

Nx migrations can streamline the process of updating an Angular and Nx workspace. However, they may not always cover every aspect, so you can refer to other projects for guidance. You can also create a new workspace with the latest version, compare the changes, and incorporate them into your existing workspace. 

Here are some other things to consider when updating an NX-Angular project: 

  • Nx plugins: Nx plugins can provide migrations for their specific areas of competency. For example, the Nx React plugin knows where to find React configuration files and how to apply changes when updating to a specific version of React. 
  • Skipped package updates: If you skip package updates, you can find a suggested command to run in the "Next steps" section. You can store this information so you can remember which version to run the migration from. 
  • Rerunning migrations: Nx migrate allows you to rerun the same migration multiple times. 
  • Reordering migrations: Nx migrate allows you to reorder migrations. 

D.2 - Sample 2--- Google Search AI answer

Search on Google for how to update a nx-angular project - Google SearchAI tells us: 

Note: this is a search in different day with the same stuff as sample 1.

AI Overview (10/07/2024)

Learn more…Opens in new tab

To update an NX-Angular project, you can use the following commands:

  1. Update dependencies: npx nx migrate latest updates dependencies in package.json and generates a migrations.json file
  2. Install new dependencies: npm install installs the new dependencies
  3. Run migrations: npx nx migrate --run-migrations executes the migration scripts based on migrations.json 

The migrations.json file contains the migrations to be run based on the workspace configuration. You can inspect and adjust the file before running the migrations. You can also remove the migrations.json file or keep it to re-run the migration in different Git branches. 

If you're having trouble updating, you can try deleting the node_modules folder and installing the dependencies again. 

D.3 - Sample 3 --- Google Search AI answer

Search on Google for update an nx-angular projectAI tells us: 

AI Overview (10/07/2024)

Learn more…Opens in new tab

To update an NX-Angular project, you can use the nx migrate command to update the workspace tools, packages, and source code:

  1. Update dependencies: Run npx nx migrate latest to update dependencies in package.json and generate a migrations.json file
  2. Install new dependencies: Run npm install to install the new dependencies
  3. Execute migration scripts: Run npx nx migrate --run-migrations to execute the migration scripts based on migrations.json 

The nx migrate command is an improved version of ng update that gives you more control over the migration process. You can:

  • Rerun, reorder, or skip migrations
  • Fix migrations that "almost work"
  • Commit a partially migrated state
  • Change package versions to match organization requirements
  • Opt out of Angular updates when updating Nx versions 

After running nx migrate latest, you can inspect and adjust the migrations.json file before running nx migrate --run-migrations. You can also remove the migrations.json file or keep it to re-run the migration in different Git branches. 

D.4 - Sample 4 --- Google Search AI answer

Search on Google for update an nx-angular projectAI tells us: 

Note: this is a search in different day with the same stuff as sample 3.

AI Overview (10/08/2024)

Learn more…Opens in new tab

To update an Nx-Angular project, you can use the nx migrate command: 

  1. Run npx nx migrate latest to create a migrations.json file 
  2. Review and modify the migrations.json file 
  3. Run nx migrate --run-migrations to execute the migrations 

The nx migrate command is an improvement on ng update because it gives you more control over the migration process. You can:

  • Rerun migrations multiple times
  • Reorder migrations
  • Skip migrations
  • Fix migrations that are almost working
  • Commit a partially migrated state
  • Change package versions to match organization requirements
  • Opt out of Angular updates when updating Nx versions 

After updating, you can check for linting issues and testing problems. You can also create a new workspace with the latest version, compare the changes, and incorporate them into your existing workspace. 

D.5 - Sample 5 --- Google Search AI answer

Search on Google for how to update a nx-angular app - Google SearchAI tells us: 

AI Overview (10/07/2024)

Learn more…Opens in new tab

Updating an Nx Angular app involves updating both Nx and Angular packages. Here's a step-by-step guide:

Step 1: Update Nx

Use the Nx migrate command.

Code

nx migrate latest

Bash

Copy

This command updates your package.json with the latest Nx dependencies and generates a migrations.json file containing the necessary migration scripts. Install new dependencies.

Code

npm install

Bash

Copy

Run migrations.

Code

nx migrate --run-migrations

Bash

Copy

This command executes the migration scripts defined in migrations.json, updating your workspace configuration and code as needed. Update community plugins (if applicable).

Code

nx report

Git

Copy

This command lists all installed plugins. Then, update each plugin individually if they provide migration scripts:

Code

nx migrate <plugin-name>

Markup

Copy

Step 2: Update Angular

Update Angular packages.

Code

ng update @angular/cli @angular/core

Markup

Copy

This command updates Angular CLI and core packages to their latest versions. You can also update specific packages:

Code

ng update <package-name>

Markup

Copy

Address any migration issues.

Angular updates might require manual code changes. Follow the instructions provided by the Angular CLI to resolve any issues.

Step 3: Test your app

Run tests.

Code

nx run-many --target=test --all

YAML

Copy

Thoroughly test your application to ensure that the updates haven't introduced any regressions.

Step 4: Commit changes

Commit your changes.

Code

git add .
git commit -m "Update Nx and Angular"

Git

Copy

Commit your changes to your version control system.

Important Considerations:

  • Update one major version at a time:

    To avoid potential issues, it's recommended to update one major version of Nx and Angular at a time.

  • Check Nx and Angular documentation:

    Always refer to the official Nx and Angular documentation for specific instructions and any breaking changes.

  • Use a branch:

    It's a good practice to create a new branch for updating your application. This allows you to test the updates thoroughly before merging them into your main branch. 

 

References:

Up Next
    Ebook Download
    View all
    Learn
    View all