R — Recognize
Recognize is the first step of The RAMP Method. It's about quickly scanning a codebase to identify patterns, structure, and conventions before diving into details.
Why Recognize First?
Most developers make the mistake of diving straight into code. They start reading a file, get confused, follow an import, get more confused, and end up lost in a maze of unfamiliar code.
Recognize first means:
- Get the lay of the land before exploring
- Build a mental map before going deep
- Understand the "shape" of the codebase
Think of it like arriving in a new city. You wouldn't start walking random streets—you'd look at a map first.
What to Recognize
1. Folder Structure
Scan the top-level folders. Most projects follow predictable patterns:
src/
├── components/ # UI components (React, Vue)
├── pages/ # Route handlers / page components
├── services/ # Business logic
├── models/ # Data structures
├── utils/ # Helper functions
├── hooks/ # React hooks (if applicable)
├── api/ # API routes or client
└── types/ # TypeScript types
Questions to answer:
- Where does business logic live?
- Where are UI components?
- Where is data fetching handled?
2. Entry Points
Find where execution begins:
| Project Type | Common Entry Points |
|---|---|
| React app | index.tsx, App.tsx, main.tsx |
| Next.js | pages/_app.tsx, app/layout.tsx |
| Node backend | index.js, server.js, app.js |
| Python | main.py, app.py, __main__.py |
| CLI tool | bin/, cli.js, cli/index.ts |
3. Configuration Files
These reveal a lot about a project:
| File | What It Tells You |
|---|---|
package.json | Dependencies, scripts, project type |
tsconfig.json | TypeScript setup, path aliases |
.env.example | Required environment variables |
docker-compose.yml | Services and infrastructure |
Makefile | Common operations |
4. Naming Conventions
Scan a few files to identify patterns:
- Files:
UserService.tsvsuser-service.tsvsuser_service.py - Functions:
getUserByIdvsget_user_by_id - Components:
Button.tsxvsbutton.tsxvsButtonComponent.tsx
5. Common Patterns
Look for architectural patterns:
| Pattern | Signs |
|---|---|
| MVC | models/, views/, controllers/ |
| Repository | repositories/, *Repository.ts |
| Service Layer | services/, *Service.ts |
| Redux | store/, slices/, reducers/ |
| API Routes | api/, routes/, handlers/ |
How Long to Spend
| Codebase Size | Recognize Time |
|---|---|
| Small (under 10k LOC) | 15-30 minutes |
| Medium (10k-100k LOC) | 30-60 minutes |
| Large (100k+ LOC) | 1-2 hours |
Rule: Don't spend more than 10% of your first week on Recognize. It's meant to be fast.
Recognize Checklist
After scanning, you should be able to answer:
- Where is the main entry point?
- What are the 3-5 main folders and what do they contain?
- What framework/libraries are used?
- What naming conventions are followed?
- Where would I add a new feature?
If you can't answer these, spend more time scanning.
Commands for Recognize
# See top-level structure
ls -la
# See folder tree (2 levels deep)
tree -L 2 -d
# Find entry points
cat package.json | grep "main\|start"
# Find largest/most important files
find . -name "*.ts" -exec wc -l {} + | sort -n | tail -20
# See most frequently changed files
git log --pretty=format: --name-only | sort | uniq -c | sort -rn | head -20
Using Ramp for Recognize
# Get an AI-generated overview
ramp explore
# Ask about structure
ramp ask "What is the folder structure of this project?"
ramp ask "What are the main entry points?"
ramp ask "What patterns does this codebase use?"
After Recognize
Once you've recognized the patterns, move to the next step: Ask. Start asking questions to fill in the gaps that scanning couldn't answer.
Related Pages
Ready to recognize patterns faster? Try Ramp free →