Tech Roundtable Meeting 4/5/23

Simple neural network diagram illustration.
Simple neural network diagram illustration.

April 5, 2023 Tech Roundtable meeting on Zoom

I did a demo of a short session using ChatGPT as a assistant to learn how to use HTML. Attendee uses of AI were discussed and evaluated. Attendees were also interesting in aspects of AI such as emotions. Medical imaging and customer support applications of AI were reviewed. I also explained my use of redirect email addresses when registering with websites. Apple release speculation and a brief preview of the Open AI Text Classifier happened in the After Hours segment.

Attendee Musings with AI

Bruce Arnold dug into AI with Bard posing a question about writing a Bash script.

Prompt: Create a bash script to start a process if not running and to stop the process if it is running.

Its answer was “I’m still learning coding skills, so at the moment I can’t help with this. I’m trained to do thinks like help you write lists about different topics, compare things, or build travel itineraries. Do you want to try any of those now?

I tried the same prompt with ChatGPT and the GPT-4 model and this is its response:

You can create a simple bash script to achieve this using the process name. In this example, I’ll use “your_process_name” as a placeholder for the actual process name you want to monitor. Replace it with the name of the process you’re interested in.

Here’s the bash script:

bash
#!/bin/bash

PROCESS_NAME="your_process_name"
PID=$(pgrep -x $PROCESS_NAME)

if [ -z "$PID" ]; then
    echo "Process not running. Starting the process..."
    # Replace this line with the command to start your process
    your_process_command &
else
    echo "Process is running. Stopping the process..."
    kill $PID
fi

Replace your_process_name with the name of the process you want to monitor, and replace your_process_command with the command used to start the process.

Save this script in a file, for example, “toggle_process.sh”, and make it executable by running:

bash
chmod +x toggle_process.sh

Now you can run the script by executing:

bash
./toggle_process.sh

Bruce prompted Bard with “Find z such that 64% of the standard normal curve lies between -z and z.

It came back with an answer that Bruce checked at other websites and found the answer he got was not correct.

To find z such that 64 percent of the standard normal curve lies between z and -z, we can use the standard normal table. The standard normal table shows the probability that a standard normal variable will be less than a certain value (z). We can use this table to find z by looking up the probability of 0.64, which is the area under the curve to the left of z.

The z-value that corresponds to a probability of 0.64 is 1.28. This means that 64% of the standard normal curve lies between z = 1.28 and z = -1.28.

Here is a diagram of the standard normal curve with the area of interest shaded between between z = 1.28 and z = -1.28.

Here is a diagram of the standard normal curve with the area of interest shaded between between z = 1.28 and z = -1.28:

[Image of a standard normal curve with the area of interest shaded between z = 1.28 and z = -1.28]

As you can see the area of interest is 0.64, which is the area under the curve to the left of z. The z-value that corresponds to this area is 1.28.

Bard does have a disclaimer that it could display inaccurate data.

Screenshot: disclaimer about potential inaccurate and offensive responses below the Bard prompt input field.
Bard prompt input field and disclaimer.

Also the FAQs make this same point.

Jack Sharp had asked Bard some political questions. His comment was that the answers were reasonable and what he expected.

Prompt: How should the USA respond to China regarding the data obtained from the spy balloon?

Response:

The United States should respond to China regarding the data obtained from the spy balloon by demanding that China return the data and cease all further espionage activities against the United States. The United States should also take steps to strengthen its own cyber defenses and to deter future Chinese
espionage attempts.

The United States has a long history of espionage, and it is not surprising that China would attempt to gather intelligence on the United States. However, China’s actions in this case are particularly egregious because they violate the sovereignty of the United States and pose a threat to national security.

The United States should demand that China return the data obtained from the spy balloon and cease all further espionage activities against the United States. The United States should also take steps to strengthen its own cyber defenses and to deter future Chinese espionage attempts. These steps could include increasing funding for cyber security research and development, improving coordination between the government and the private sector on cyber security issues, and working with allies to share information and develop joint strategies to counter Chinese espionage.

The United States should also take steps to address the underlying causes of Chinese espionage. These causes include China’s growing economic and military power, its desire to assert its influence in the world, and its deep-seated suspicion of the United States. The United States should engage China in dialogue and diplomacy to try to resolve these differences and build a more cooperative relationship.

I pointed out that the discussion with the AI can go further. Such as perhaps the statement, “The United States has a long history of espionage …”. You might want to know more about this history such as the top examples to cite.

Demo: Engage AI in Self Learning Process

I demonstrated using ChatGPT for learning HTML, the markup language for tagging the content you see on web pages. I used the GPT-4 model.

I guided the AI to provide an example and exercise.

Having taught HTML and developed online courses and videos on HTML I added a perspective as a teacher to guide the AI to what I thought was too much in an example and exercises. I pointed out if you were a student and did not know what was too much or too little, you could ask the AI to revise the example an exercise to your desire for either.

Here is a partial of the chat session:

Prompt: Create a basic example and exercise to as a starter learning lesson about HTML.

Response:

Let’s create a simple HTML page with a heading, a paragraph, and an image.

HTML
<!DOCTYPE html>
<html>
<head>
    <title>My First HTML Page</title>
</head>
<body>
    <h1>Welcome to My HTML Page</h1>
    <p>This is a simple paragraph of text.</p>
    <img src="https://example.com/image.jpg" alt="A beautiful scenery" width="300" height="200">
</body>
</html>

This code represents a basic HTML structure with a head and a body. Inside the body, we have an <h1> element for a heading, a <p> element for a paragraph, and an <img> element for an image. The image source, width, and height are defined using attributes.

Exercise:

Now, it’s your turn to create an HTML page with the following elements:

  1. A title in the head: “Learning HTML”
  2. An <h1> element containing the text: “My First HTML Exercise”
  3. A paragraph (<p>) with the text: “HTML is the standard markup language for creating web pages.”
  4. Another paragraph containing the text: “I am learning HTML to build my own website.”
  5. An image with the source “https://example.com/cat.jpg” and an alternative text “A cute cat”. Set the width to 400 and the height to 300.

Remember to use the appropriate opening and closing tags, as well as attributes for each element.

This response could be to advanced or too basic depending on the user. So the next steps would be to ask questions to help clarify and learn. For example ask to explain the lines in the code example, an example, an attribute or anything you needed to learn if you did not understand it.

Prompt: What is an element?

Response: An HTML element refers to a component or building block of a web page that represents a specific type of content or structure. HTML elements are created using opening and closing tags, which surround the content of the element. Some elements, known as empty or self-closing elements, do not have a closing tag or content. Elements can also have attributes that provide additional information or modify the behavior or appearance of the element.

For example, consider the following HTML elements:

    HTML
    <h1>This is a Heading</h1>
    
      HTML
      <p>This is a paragraph of text.</p>
      1. <img>: Represents an image. This is an empty element, and its source, alternative text, and dimensions are defined using attributes.
      HTML
      <img src="https://example.com/image.jpg" alt="A description of the image" width="300" height="200">

      HTML elements can be nested within other elements to create a more complex web page structure. The combination of various elements and their attributes defines the content and layout of a web page.

      Then I pointed out how you could go on to things such as entering your exercise example and getting an evaluation. Here is the result of a rather terrible job at completing the exercise.

      Prompt: Can you check my exercise for the last assignment:

      HTML
      <!DOCTYPE html>
      <html>
      <head>
          <title>My first HTML exercise</title>
      </head>
      <body>
          <h1>My HTML Exercise Example<h1>
          <p>This is a simple paragraph of text.</p>
          <img src="https://mysite.com/image.jpg alt="Banner image" wid="300" height="200">
      </body>
      </html>

      Some positive reinforcement:

      You did a great job, but there are a few minor issues that need to be corrected. Here’s the corrected version of your exercise:

      HTML
      <!DOCTYPE html>
      <html>
      <head>
          <title>Learning HTML</title>
      </head>
      <body>
          <h1>My First HTML Exercise</h1>
          <p>HTML is the standard markup language for creating web pages.</p>
          <p>I am learning HTML to build my own website.</p>
          <img src="https://example.com/cat.jpg" alt="A cute cat" width="400" height="300">
      </body>
      </html>

      Then the explanation of what was wrong.

      1. The title should be “Learning HTML” instead of “My first HTML exercise”.
      2. The text inside the <h1> tag should be “My First HTML Exercise” instead of “My HTML Exercise Example”.
      3. You need to add another paragraph element <p> with the text “I am learning HTML to build my own website.”
      4. The image source should be “https://example.com/cat.jpg” instead of “https://mysite.com/image.jpg“.
      5. The alternative text for the image should be “A cute cat” instead of “Banner image”.
      6. The width attribute should be spelled correctly as “width” instead of “wid”.
      7. The width and height of the image should be set to 400 and 300 respectively, instead of 300 and 200.

      Additionally, make sure to close the <h1> tag properly. In your original code, the closing tag is missing a forward slash: </h1>

      There were other parts of the chat session I shared. The bottom line was to instill how chat AI can be thought of as an assistant or tool versus just a query tool.

      Another possibility is to follow a tutorial or course and use the AI to help you with the lessons either by clarifying or expanding depending on your learning desire

      After Hours Segment

      The after hours segment discussed some speculation on Apple event in April and WWDC in June. Also a preview to the AI Text Classifier.

      Apple Prognostications

      Ken Powell clarified my misconception from reading articles on Apple sales being down and M2 chip production being halted that Apple was going to release an Apple silicon version of the MacBook Pro since there is already one released. I put some of those articles in the Links section.

      He pointed out that the speculation was about the Mac Pro with Apple silicon.

      Also there is a possibility that there is a M3 chip in the works and might show up before end of the year.

      The recently introduced Mac Studio is likely to be phased out as well.

      AI Text Classifier Preview

      I gave a brief preview to the OpenAI’s Text Classifier. It is a tool to check if a piece of text was generated from AI. We took a sample of AI generated text and text we knew was not AI generated to see how it worked. A link to an OpenAI block article and the tool are in the Links section.

      Links

      By Lon Hosford

      Internet and Mobile Development Educator and Consultant Independent software developer with practical engineering project experience for clients such as AT&T, Avis, Bristol Myers Squibb, Ortho BioTech, Chanel, Avaya, Green Birdie Video, Aztec Learning Systems and Verizon Wireless. Lon is well known for translating client needs into useful applications. An interesting aspect of Lon's consulting work was the creation of industry jobs that did not exist before. That lead to hiring and training college students who were taught dead technologies at a time academia was woefully behind on the paradigm shifts in personal computing, the internet and today the distributed device environment often called mobile. Lon has taught thousands of students internet web development, animation and programming topics over two decades both privately and academically. He developed Multimedia Associated Degree program and courses for Raritan Valley Community College in the 1990s at a time when Macromedia Authorware and Director were tools. He is the founder, developer and educator for Raritan Valley Community College Web Developer Certification program also having its roots in the 1990s at the dawn of the internet. He also was a key curriculum developer and instructor for one of the Nation's first Web Developer Certification program offered through New Jersey Institute of Technology. Lon was also a technology instructor at the University of Phoenix Online. Lon over the years has produced educational video for topics including Paradox, Cobol, Java, Jasmine, C, C++, Linux, Flash, Cocos 2d and HTML. These courses were distributed and taught in Universities internationally when global was an emerging term.