Skip to content

PickNikRobotics/graph-review-screen

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Thread-safe Graph — code review

include/graph.hpp is a Graph class written by a junior engineer, with a demo (src/graph_demo.cpp) they added "to show it works." It's up for review.

Review it the way you'd review a teammate's pull request: run it, decide whether you'd approve it, and get it into a state you'd actually merge. There's no separate spec — the code and the demo are the only description of intended behavior, so where something is underspecified, decide what should happen and say why.

Use AI to get this done — that's the whole point of the exercise. Reach for whatever assistant you like: the AI chat built into this Codespace, or your own setup. We're not checking whether you can write a graph from memory; we're watching how you drive the AI — how you prompt it, what you hand it, and how you check its work before you trust it. Lean on it, and think out loud as you go.

Build & run

# configure + build (fetches GoogleTest on first run; the devcontainer pre-builds it)
cmake --preset default
cmake --build build/default

# run the demo
./build/default/demo

# run the test suite
ctest --test-dir build/default --output-on-failure

Sanitizers are set up as presets — reach for them if they'd help:

cmake --preset asan && cmake --build build/asan   # AddressSanitizer + UBSan
cmake --preset tsan && cmake --build build/tsan   # ThreadSanitizer

Where to work

  • include/graph.hpp — the implementation under review.
  • tests/graph_tests.cpp — one passing test plus a few stub tests that fail until you write them (the suite is red until they're filled in). Fill the stubs in before you call this done, then add any other cases you'd want green before approving.
  • src/graph_demo.cpp — run it first.

There's no trick and no single "right" answer. Start wherever you like.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors