An open API service indexing awesome lists of open source software.

https://github.com/mgrl39/vfy

A tool for practicing C programming exercises with little verification.
https://github.com/mgrl39/vfy

development

Last synced: 11 months ago
JSON representation

A tool for practicing C programming exercises with little verification.

Awesome Lists containing this project

README

          



# 🚀 VFY - Verify Your Code

Language C
Platform
License MIT
Version

**A tool for practicing C programming exercises with automatic verification.**

---

## 📋 Table of Contents

- [🌟 Features](#-features)
- [🛠️ Installation](#️-installation)
- [📝 Usage](#-usage)
- [⚙️ Configuration](#️-configuration)
- [🧩 Creating Exercises](#-creating-exercises)
- [🔄 Examples](#-examples)
- [🗑️ Uninstallation](#️-uninstallation)

---

## 🌟 Features

VFY (Verify Your Code) is designed to make learning C programming more fun and effective with:

- **📚 Structured Learning** - Exercises organized by skill levels
- **✅ Automatic Verification** - Instant feedback on your solutions
- **📋 Code Templates** - Quick start with helpful boilerplate code
- **🎨 Attractive Interface** - Colorful and user-friendly terminal UI

## 🛠️ Installation

Installation is very simple:

```bash
# Clone the repository
git clone https://github.com/mgrl39/vfy.git
cd vfy

# Install the core program (requires sudo)
sudo make install

# Download exercises
sudo make get-subjects
```

To update exercises later:

```bash
sudo make update-subjects
```

## 📝 Usage

VFY provides an intuitive command-line interface:

| Command | Description |
|---------|-------------|
| `vfy help` | Show all available commands |
| `vfy list` | List all available exercise levels |
| `vfy list ` | List exercises in a specific level |
| `vfy get ` | Get a random exercise from a level |
| `vfy edit` | Open current exercise in your editor |
| `vfy check` | Verify your solution against expected output |
| `vfy status` | Show current exercise status |

## ⚙️ Configuration

You can use environment variables to customize VFY:

```bash
# Define exercises location
export VFY_EXERCISES_DIR=~/my_exercises

# Define subjects location
export VFY_SUBJECTS_DIR=~/my_subjects

# Define compiler
export CC=gcc
```

## 🧩 Creating Exercises

You can create exercises manually:

1. Create a directory at `~/.vfy/subjects/level_X/exercise_name`
2. Add the following files:
- `subject.txt`: Exercise description
- `expected_output.txt`: Expected program output
- `template.c`: Template code for users

For more exercises, check out our separate exercises repository:
[VFY Exercises Repository](https://github.com/mgrl39/vfydb)

## 🔄 Examples

Here's how a typical workflow looks:

```bash
# Get a random exercise from level 1
vfy get 1

# The exercise details will be displayed
# A working directory is created with a template

# Open the exercise in your editor
vfy edit

# After coding your solution
vfy check

# If correct, you'll see:
# ✅ Your solution is correct!

# If not, you'll see:
# ❌ Output doesn't match expected result.
# With a detailed diff of what went wrong
```

## 🗑️ Uninstallation

```bash
# Uninstall (requires sudo)
sudo make uninstall
```

---



**Created for C programming enthusiasts**