An AI coding assistant can suggest completions or generate code from a prompt. This guide follows a workflow using Ollama to run language models locally and Continue as a VS Code extension, then explores coding tasks that such tools can support.
Local models, privacy, and hardware
A local model may keep inference on your own computer and reduce reliance on a hosted model service. Local execution alone does not guarantee privacy: check the extension, model, telemetry, network, and code-context settings before using sensitive code. Local models also require suitable storage and memory; larger models generally need more resources and may run more slowly on limited hardware.
Comparisons among an Intel Core i9 processor, Apple M3 hardware, and Windows systems need care: these are different kinds of hardware or platform labels, not a like-for-like benchmark. Model size, parameter count, and quantization all affect memory use and performance. Smaller language models can be more practical on limited hardware, while a larger model may offer different capabilities at a greater resource cost.
Install Ollama and choose a model
Ollama provides a way to download and run local models. The lesson introduces model management, listing available models, checking active processes, and starting a model. Choose a model based on the task and the computer available, and benchmark it with representative work rather than assuming that the largest model is always the best fit.
Use Continue in VS Code
Continue brings AI-assisted coding into VS Code. The workflow covers installing the extension, using its interface, creating a demo project, and customizing prompt templates with variables. Clear prompts that state an action and a use case can make requests easier to interpret; refine them iteratively when the first result is not useful.
Examples of coding tasks
- Generate or complete code inline, then review, edit, accept, or reject suggestions.
- Ask for a simple HTML game, a Go “Hello, World!” program, or a Fibonacci function.
- Draft unit tests and comments, then run and review them.
- Use AI to help interpret terminal errors, while checking suggested fixes before applying them.
- Work with SQL by drafting a table, inserting and selecting data, and connecting a Go program to a database.
Give the assistant useful code context
Embeddings and indexing can help a coding assistant retrieve relevant parts of a codebase. Configure codebase context deliberately and check what files are included. Generated code and database queries still need human review, testing, and appropriate security checks.
For a free financial consultation, contact the team on LINE. You can also scan the QR code to add the team on LINE.
