1.1. AI About

  • Jakie są dostępne modele językowe,

  • Który model wybrać,

  • Jak tworzyć kod używając modeli językowych,

  • Jakie edytory kodu oraz IDE wspierają tworzenie kodu przez AI,

  • Jak weryfikować czy wygenerowany kod jest poprawny,

  • Jak tworzyć testy do napisanego kodu,

  • Jak refaktorować kod napisany przez AI,

  • Jak AI może refaktorować kos napisny przez Ciebie.

1.1.1. Available language models

Models [1]:

  • GPT-4o is an excellent choice for routine coding needs, but developers tackling complex projects might prefer the enhanced depth offered by GPT-o1. Balancing speed, accuracy, and cost is key when choosing between the two.

  • Tabnine is known for its lightweight, AI-driven code completion tailored for developers seeking seamless integration with their IDEs. Its focus on privacy and offline capabilities makes it appealing to enterprises with stringent data security requirements.

  • Codeium offers developers a no-cost solution for code suggestions and completion. It shines in its accessibility and fast integration into various environments, providing a solid option for those seeking functionality without subscription fees.

  • Replit AI-powered code generation integrates directly into its cloud-based IDE, making it a standout tool for collaborative coding projects. Its focus on education and team projects distinguishes it from traditional LLMs.

  • Claude Sonnet 3.5 from Anthropic emphasizes safety and long-context handling, making it ideal for projects requiring complex logic over extended interactions. Its ethical coding focus ensures safe and responsible AI assistance.

Future:

  • Increased Accuracy Future iterations of popular LLMs are expected to enhance basic language understanding significantly, reducing the frequency of coding errors.

  • Broadened Language Support We may anticipate LLMs that can not only understand newer programming languages as they come into play but can also adapt to emerging paradigms such as no-code and low-code frameworks.

  • Personalized Learning The potential for more personalized AI coding assistants that adapt to individual developer styles and preferences will make coding assistants even more valuable.

  • Improved Collaboration Features Future models are likely to emphasize collaborative tools that support remote work dynamics among teams.

1.1.2. Copilot

GitHub Copilot was initially powered by the OpenAI Codex, which is a modified, production version of the Generative Pre-trained Transformer 3 (GPT-3), a language model using deep-learning to produce human-like text. The Codex model is additionally trained on gigabytes of source code in a dozen programming languages.

Copilot’s OpenAI Codex is trained on a selection of the English language, public GitHub repositories, and other publicly available source code. This includes a filtered dataset of 159 gigabytes of Python code sourced from 54 million public GitHub repositories.

OpenAI’s GPT-3 is licensed exclusively to Microsoft, GitHub’s parent company.

In November 2023, Copilot Chat was updated to use OpenAI's GPT-4 model.

1.1.3. Choosing a model

  • Why choose one model over another

  • Metrics to consider when choosing a model

  • How to evaluate a model

Considerations when choosing a model [1]:

  • Training Data LLMs are trained on extensive datasets that consist of publicly available code repositories, technical documentation, and other relevant sources.

  • Code Generation When given a prompt or instruction, the LLM can generate code snippets, functions, or entire modules relevant to the context.

  • Inline Suggestions Many coding assistants can be integrated into popular Integrated Development Environments (IDEs) to provide real-time code suggestions as developers work.

  • Debugging Assistance LLMs can analyze existing code to identify potential errors, suggest fixes, and provide explanations for why certain solutions may work better.

  • Dynamic Learning Some LLMs can be fine-tuned with specific organizational data, allowing them to contextualize their advice according to the unique coding practices of a team or project.

1.1.4. Creating code using language models

  • Autocomplete

  • Code generation

  • Chat-based code generation

1.1.5. IDEs and code editors that support AI code generation

  • PyCharm

  • VS Code

  • Zed

1.1.6. Verifying generated code

  • How to verify that generated code is correct

  • Hallucinations in generated code

  • Most common errors in generated code

  • Weakest points of AI-generated code

1.1.7. Creating tests for generated code

  • Types of tests (unit, integration, end-to-end)

  • Testing frameworks

  • Cyclomatic complexity and code coverage

  • Mutation testing

  • Development tools ecosystem and CI/CD pipeline

  • How to create tests for generated code

  • How to test generated code

  • How to test AI-generated code

  • AI-generated tests

1.1.8. Refactoring code generated by AI

1.1.9. Refactoring code written by you using AI

1.1.10. Further Reading

1.1.11. References