Skip to content

Commit

Permalink
Merge pull request #36 from olgaminaeva/olgaminaeva-patch-1
Browse files Browse the repository at this point in the history
Update 1-introduction-ai-coding.md
  • Loading branch information
olgaminaeva authored Nov 22, 2024
2 parents ea98a14 + f5a6f31 commit b0171b8
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions episodes/1-introduction-ai-coding.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ exercises: 0

- How do AI coding assistants work?
- What are the main AI coding assistants and what are their main characteristics?
- How to set up Codeium as coding assistant for the lesson?
- How to set up Codeium as a coding assistant for the lesson?

::::::::::::::::::::::::::::::::::::::::::::::::

Expand Down Expand Up @@ -39,15 +39,15 @@ Now let’s break down the *key characteristics* of how these models work:
| **Code understanding through ML** | AI coding assistants are built on models that analyze and learn from vast amounts of data, including open-source codebases, libraries, and developer behavior. These models break down code into a mathematical representation that the AI can interpret. They learn common patterns, best practices, syntax rules, and how developers approach specific tasks or problems. | When you start typing, the AI assistant predicts what you are likely to write next based on patterns it has learned. These predictions can be simple line completions or even more complex, multi-line code suggestions.|
| **Context awareness** | AI coding assistants are designed to understand context at multiple levels, including code, variables, and functions. This makes them able to suggest relevant code suggestions based on the context. | If you're writing a loop to iterate over a list of items, the AI can suggest the entire loop structure based on what it recognizes in the surrounding code.|
| **NLP** | AI models are both trained to understand code syntax and to interpret natural language. This is crucial for features like chat-based interaction or when a developer types a comment or command in plain English, expecting the AI to generate code. | If you write a comment like `"Create a function to fetch user data from an API"`, the AI can generate the function code based on that request. You can also ask questions, like `"How do I format dates in Python?"`, and the AI will provide an answer or relevant code snippet.
| **Learning from user interaction** | AI coding assistants also learn and improve from ongoing user interactions. Over time, they adjust to individual developer preferences and coding styles, offering more personalized and relevant suggestions. | As users accept or reject suggestions, the assistant refines its future outputs based on this feedback (so-called "feedback loop"). Many AI coding assistants can learn from private codebases (when privacy policies allow) to better align with specific project structures, libraries, or functions common to a particular team or organization (custom adaptations). |
| **Code generation and refactoring** | *Code generation*: Based on a high-level description of what you want, the assistant can write larger blocks of code.<br> *Code refactoring*: AI can help optimize and refactor your code. | You might describe a task such as, `“Create a function to handle user authentication using OAuth2”`, and the assistant will generate the appropriate code. You might also ask, `“Refactor this code to use async/await for better performance”`, and the AI will generate the necessary changes to convert synchronous functions into asynchronous ones.|
| **Multilanguage and multimodal support** | AI coding assistants are designed to support a wide variety of programming languages and paradigms, enabling them to work across different domains (e.g., web development, data science, system programming). They are trained on the syntax, idioms, and patterns of languages like Python, JavaScript, C++, and many others. | Codeium supports Assembly, C, C++, C#, Clojure, CMake, CoffeeScript, CSS, CUDA, Dart, Delphi, Dockerfile, Elixir, F#, Go, Groovy, Haskell, HCL, HTML, Java, JavaScript, Julia, JSON, Kotlin, LISP, Less, Lua, Makefile, MATLAB, Objective-C, pbtxt, PHP, Protobuf, Python, Perl, Powershell, R, Ruby, Rust, Sass, Scala, SCSS, shell, Solidity, SQL, Starlark, Swift, TypeScript, TSX, VBA, Vue, YAML. |
| **Learning from user interaction** | AI coding assistants learn and improve from ongoing user interactions. Over time, they adjust to individual developer preferences and coding styles, offering more personalized and relevant suggestions. | As users accept or reject suggestions, the assistant refines its future outputs based on this feedback (so-called "feedback loop"). Many AI coding assistants can learn from private codebases (when privacy policies allow) to better align with specific project structures, libraries, or functions common to a particular team or organization (custom adaptations). |
| **Code generation and refactoring** | *Code generation*: Based on a high-level description of what you want, the assistant can write larger code blocks.<br> *Code refactoring*: AI can help optimize and refactor your code. | You might describe a task such as, `“Create a function to handle user authentication using OAuth2”`, and the assistant will generate the appropriate code. You might also ask, `“Refactor this code to use async/await for better performance”`, and the AI will generate the necessary changes to convert synchronous functions into asynchronous ones.|
| **Multilanguage and multimodal support** | AI coding assistants are designed to support many programming languages and paradigms, enabling them to work across domains (e.g., web development, data science, system programming). They are trained on the syntax, idioms, and patterns of languages like Python, JavaScript, C++, and many others. | Codeium supports Assembly, C, C++, C#, Clojure, CMake, CoffeeScript, CSS, CUDA, Dart, Delphi, Dockerfile, Elixir, F#, Go, Groovy, Haskell, HCL, HTML, Java, JavaScript, Julia, JSON, Kotlin, LISP, Less, Lua, Makefile, MATLAB, Objective-C, pbtxt, PHP, Protobuf, Python, Perl, Powershell, R, Ruby, Rust, Sass, Scala, SCSS, shell, Solidity, SQL, Starlark, Swift, TypeScript, TSX, VBA, Vue, YAML. |

::::::::::::::::::::::::::::::::::::: callout

Not all AI-powered code assistance tools rely on generative AI. Many utilize traditional machine learning techniques to enhance coding efficiency, such as identifying errors, suggesting optimizations, or automating repetitive tasks. These tools often focus on static analysis, pattern recognition, or rule-based systems to provide real-time support without generating new content. By complementing human expertise, these AI tools streamline development workflows and help maintain code quality, offering reliable solutions for a wide range of programming needs.
Not all AI-powered code assistance tools rely on generative AI. Many utilize traditional machine learning techniques to enhance coding efficiency, such as identifying errors, suggesting optimizations, or automating repetitive tasks. These tools often focus on static analysis, pattern recognition, or rule-based systems to provide real-time support without generating new content. By complementing human expertise, these AI tools streamline development workflows and help maintain code quality, offering reliable solutions for various programming needs.

For instance, [PMD] (https://pmd.github.io/), an open-source static code analyzer to find code issues, that focuses on maintainability. [SonarQube] (https://www.sonarsource.com/products/sonarqube/) analyzes code to identify bugs, vulnerabilities, and code smells using static analysis techniques. Finally, [Snyk Code] (https://docs.snyk.io/scan-with-snyk/snyk-code) uses AI to suggest improvements and detect security issues in code.
For instance, [PMD](https://pmd.github.io/), an open-source static code analyzer to find code issues, that focuses on maintainability. [SonarQube](https://www.sonarsource.com/products/sonarqube/) analyzes code to identify bugs, vulnerabilities, and code smells using static analysis techniques. Finally, [Snyk Code](https://docs.snyk.io/scan-with-snyk/snyk-code) uses AI to suggest improvements and detect security issues in code.

::::::::::::::::::::::::::::::::::::::::::::::::

Expand All @@ -62,11 +62,11 @@ With a foundation of how AI models for coding assistants function — how they a
| **Key Features** | Integration with GitHub ecosystem<br><br> Multilingual support<br><br> Acts as a virtual pair programmer | Advanced code completions<br><br> Code refactoring capabilities<br><br> Supports multiple programming languages | Code recommendations<br><br> Security scans for vulnerabilities<br><br> Real-time documentation assistance<br><br> Multilingual support | Robust autocompletion<br><br> Learns from codebase to suggest relevant snippets and APIs<br><br> Extensive language support | Open-source model integration<br><br> High flexibility in deployment<br><br> Supports diverse coding environments |
| **Pricing** | Free for verified students (via GitHub Student Pack)<br><br> Monthly subscription fee, often with a free trial month | Free version with basic features<br><br> Paid version for full access to advanced features and higher usage limits | Free tier with basic features<br><br> Paid tiers with additional features, higher usage limits, and advanced support | Free version with limited features<br><br> Pro version subscription-based, available monthly or yearly<br><br> Discounts for team licenses | Free access to open-source models<br><br> Paid options for advanced support and additional features |

Now that we've compared some of the top AI coding assistants, you can see that each tool offers unique features and benefits. For this lesson, we’ll focus on teaching you how to use AI coding assistants with Codeium as our primary example. Codeium offers a powerful, beginner-friendly experience that helps you speed up coding through intelligent completions, refactoring suggestions, and support for multiple programming languages.

Now that we've compared some of the top AI coding assistants, you can see that each tool offers unique features and benefits. For this lesson, we’ll focus on how to use AI coding assistants with Codeium as our primary example. Codeium offers a powerful, beginner-friendly experience that helps you speed up coding through intelligent completions, refactoring suggestions, and support for multiple programming languages.

For setting up Codeium, you can follow the instructions on [this lesson's setup page](https://olgaminaeva.github.io/gen-ai-coding/#setting-up-codeium).


### Using Codeium as your Coding Assistant ###

In this lesson, we will learn about the three ways Codeium can assist with coding: *Autocomplete*, *Chat*, and *Command*.
Expand Down

0 comments on commit b0171b8

Please sign in to comment.