The Landscape of AI-Assisted Coding

Author

Kwok-leong Tang

Published

February 5, 2025

Modified

February 5, 2025

Today, we continue with some interesting Google AI tools. Then we will delve into the concept of coding, examine its major components, and discuss the latest trends in AI-assisted coding.

Class Notebook: https://docs.google.com/document/d/1i_GltAIlFEeWTM-6CmWGNoVh22dOGsPvCoynfSd5Bd8/edit?usp=sharing

Google AI Studio

Google AI Studio is a platform that allows users to experiment with AI tools and models. It provides a user-friendly interface for users to explore and test different AI tools and models.

Important terms in LLMs

Let’s got to “Create Prompt” on the left sidebar. You will find the following terms on the right sidebar:

  • Model: The type of model used for the prompt, e.g., “Gemini 2.0 Flash Experiment”, “Gemini 1.5 Pro”, etc.
  • Token: The unit of text that is used by the model, e.g., “word”, “character”, etc.
  • Temperature: The level of randomness in the output, e.g., “0.7”, “1.0”, etc.

We will explore more in the future:

  • Structured output: The output is structured and has a specific format, e.g., “JSON”.
  • Function call: The model can invoke functions, e.g., “generate code”, “generate text”, etc.

System Instructions/System Prompt

The system prompt is the first prompt in the prompt list. It is used to guide the model’s behavior, e.g., “You are a helpful assistant.” In the “System Instructions” section, enter the following:

Answer all the questions with the tones and styles of Lu Xun and Oscar Wilde.

Then try asking any question and see if the responses are in the style of Lu Xun and Oscar Wilde.

How to set a system prompt with a regular chatbot interface?

API Key

An API key is a unique identifier used to authenticate requests to an API, ensuring that only authorized users can access its resources. It is typically a long string of characters that must be included in API requests to verify identity and permissions. Keeping the API key secure is crucial, as unauthorized access can lead to misuse of the API and potential security risks.

  • Click “Get API Key”.
  • Click “Create API Key”.
  • Copy the API key and store it in a secure place.
  • If you don’t need the API key anymore, you can delete it on this page.

Ask yourself: What is the system prompt? What is an API key?

Using Google Sheet for Bulky Data Processing

Please visit this website: https://www.kwokleongtang.net/GenAI/use-with-other-tools/google-sheet-with-llm-api/

Coding and Programming

I asked a chatbot: “What are the differences between coding and programming?”

The terms “coding” and “programming” are often used interchangeably, but they have distinct meanings: Coding refers specifically to the act of writing code in a programming language. It involves translating logic and algorithms into a syntax that a computer can understand. Coding is often seen as a subset of programming, focusing on the technical aspects of writing code. Programming encompasses a broader range of activities, including coding, but also involves problem-solving, designing algorithms, and planning the overall structure of a software application. It includes debugging, testing, and maintaining code, as well as understanding the requirements and specifications for a project. Programming is about creating a complete solution to a problem, not just writing code. In summary, coding is a part of programming, but programming involves a wider scope of activities beyond just writing code.

Intergrated Development Environment (IDE)

An IDE, or Integrated Development Environment, is a software application that provides comprehensive tools for software development. It typically includes a code editor, a debugger, and build automation tools, all integrated into a single interface to streamline the development process. IDEs enhance productivity by offering features like syntax highlighting, code completion, version control integration, and project management capabilities, making it easier for developers to write, test, and debug their code efficiently.

Did you install Visual Studio Code (VSCode)?

Let’s use the web version of VSCode: https://vscode.dev/

Pop quiz! Can you find the following components in VSCode?

  • Toggle Sidebars
  • Code Editor
  • Debug Console
  • Terminal
  • Extension Management

Windsurf

Windsurf is an AI-powered IDE based on VSCode. It operates on a subscription model, costing $15 per month. However, Codeium, the creators of Windsurf, are offering us a one-month free trial. Additionally, Windsurf provides a 50% discount for students after the free trial period. The EALC Department will cover the subscription costs until the end of this semester. For the remainder of today’s class, we will set up Windsurf and arrange for the bill payment.