惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

博客园 - 叶小钗
J
Java Code Geeks
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
阮一峰的网络日志
阮一峰的网络日志
爱范儿
爱范儿
量子位
N
Netflix TechBlog - Medium
博客园 - 聂微东
博客园 - Franky
aimingoo的专栏
aimingoo的专栏
The Cloudflare Blog
T
The Blog of Author Tim Ferriss
MyScale Blog
MyScale Blog
Google DeepMind News
Google DeepMind News
小众软件
小众软件
博客园 - 三生石上(FineUI控件)
C
Check Point Blog
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
B
Blog
Engineering at Meta
Engineering at Meta
Microsoft Azure Blog
Microsoft Azure Blog
博客园_首页
H
Hackread – Cybersecurity News, Data Breaches, AI and More
腾讯CDC

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant
Structure: A Local-First Interview IDE Powered by Gemma 4
Elliot Lee · 2026-05-31 · via DEV Community

This is a submission for the Gemma 4 Challenge: Build with Gemma 4

What I Built

Structure is a local-first macOS desktop IDE for technical interview practice. It is built with Qt 6 and C++, and it is designed around a simple idea: AI should help you become capable, not just hand you answers.

The app gives you a four-panel practice loop:

  • a problem statement with examples, constraints, tags, and target complexity
  • a C++ or Python editor
  • local sample and hidden test execution
  • a tutor/interviewer panel powered by a local Gemma 4 model

Structure has modes for Learn, Interview, Debug, Speedrun, and Review. The model behavior changes with the mode: in Learn mode it can ask Socratic questions and offer progressive hints; in Interview mode it is stricter and concise; in Debug mode it focuses on the first concrete failure; in Review mode it helps turn attempts into durable recall.

The app is intentionally local-first. Code, attempts, review cards, settings, and session history are stored in SQLite on the user's machine. Code execution happens locally through clang++ or python3. Gemma 4 runs locally through Ollama, so interview practice can happen without sending code or learning history to a hosted inference API.

A dark, native macOS desktop IDE with a four-panel coding interview workspace: a problem statement panel on the left, a central C++ code editor with syntax highlighting, a bottom test output panel showing local sample and hidden test results, and a right-side tutor panel with streaming AI feedback. The interface feels focused and local-first, with compact Qt-style controls, mode selectors for Learn/Interview/Debug/Speedrun/Review, a problem list, run and submit buttons, Big O inputs, and a progress dashboard for interview readiness.

Demo

Repository:

https://github.com/intelliot/structure-ide

Local demo path:

git clone https://github.com/intelliot/structure-ide.git
cd structure-ide

cmake -S . -B build -DCMAKE_PREFIX_PATH="$(brew --prefix qt)"
cmake --build build

scripts/setup-gemma4-local.sh
open build/Structure.app

In the app, the loop is:

  1. Pick a DSA problem from the built-in local problem pack.
  2. Write a C++ or Python attempt.
  3. Run visible samples and hidden local tests.
  4. Submit the attempt with your stated time and space complexity.
  5. Structure streams grounded feedback from Gemma 4, using the exact problem statement, code, run summary, expected output, actual output, and submitted Big O.

I verified the current build with:

cmake --build build
ctest --test-dir build --output-on-failure

Result:

[100%] Built target StructureSmokeTests
1/1 Test #1: smoke ............................   Passed   21.36 sec
100% tests passed, 0 tests failed out of 1

Code

The code is here:

https://github.com/intelliot/structure-ide

Some implementation pieces worth calling out:

  • src/ai/LocalLLMClient.cpp is the local model client. It supports OpenAI-compatible chat endpoints, but when it detects Ollama on port 11434, it switches to Ollama's native /api/chat endpoint so Structure can use streaming, think=false, keep_alive, response budgets, and a warm local model.
  • src/ai/PromptBuilder.cpp builds mode-specific tutoring context and feedback context. It includes the problem statement, local stdin/stdout examples, constraints, expected complexity, visible tests, submitted code, run results, and a response contract.
  • src/ai/TutorEngine.cpp connects the model to the learning workflow. It streams chat and submit feedback, limits long code context safely, and falls back to deterministic local feedback if the model endpoint is unavailable.
  • scripts/setup-gemma4-local.sh installs or starts Ollama, selects a Gemma 4 model profile, pulls the model, warms it, benchmarks it, and updates existing Structure settings.
  • src/storage/Database.cpp keeps the default local model settings stable: endpoint, model name, temperature, token budget, timeout, keep-alive, and startup warmup.

The project is licensed under MIT.

How I Used Gemma 4

Gemma 4 is the tutor and interviewer at the heart of Structure. It is not used as an autocomplete model. It is used after the app has collected the learning context that matters: the problem, the user's code, the local test results, the expected and actual outputs, the selected practice mode, and the user's claimed Big O.

Structure defaults to the small local Gemma 4 path, gemma4:e2b, because the most important UX requirement is responsiveness. In an interview-practice tool, the user asks short questions, requests hints, debugs one failure at a time, and expects feedback while their mental stack is still warm. E2B is the right default because it can stay resident, stream quickly, and preserve the privacy benefits of local inference.

There is also a quality path for larger local hardware. Users can override the model manually, and the setup script can select a larger Gemma 4 model when the machine has enough memory. That makes the model choice intentional instead of one-size-fits-all:

  • default to gemma4:e2b for fast local tutoring
  • allow a larger Gemma 4 model when hardware can support slower, higher-quality review
  • keep the same prompt and app contract across both paths

The prompt design is deliberately constrained so the model does real, focused work. For submit feedback, Structure tells Gemma 4 to ground every correctness claim in the run summary, compare expected versus actual output when a test fails, echo and judge the submitted complexity, avoid inventing bugs when tests pass, and give concrete C++ craft notes only when useful.

That model use maps directly to the app's goals:

  • Intentional model use: Gemma 4 is chosen for local, private, low-latency tutoring rather than generic generation.
  • Code quality: the model client, prompt builder, execution engine, repositories, and UI are separated into focused modules with smoke coverage.
  • Creativity: the app treats AI as an interview coach that reacts to real local execution, not as a code-writing shortcut.
  • UX: feedback streams in the same place where the user writes and runs code, so the learning loop stays tight.

The result is a small desktop practice environment where Gemma 4 helps a developer become faster and more precise at C++ interviews while keeping the code and learning history on their own machine.