Skip to content

Latest commit

 

History

History
227 lines (156 loc) · 7.11 KB

File metadata and controls

227 lines (156 loc) · 7.11 KB

Acknowledgements & AI Usage Disclosure

Project Context

MiniDB was developed as a submission for the Pesapal Junior Dev Challenge '26, a coding competition designed to assess software engineering skills, problem-solving abilities, and understanding of database fundamentals.

Developer: Collins Odhiambo (Collins Otieno)
Challenge: Pesapal Junior Dev Challenge 2026
Submission Date: January 2026


AI Tool Usage

In accordance with the challenge guidelines and principles of academic integrity, this section provides full transparency regarding the use of AI-assisted development tools.

Tools Used

The following AI assistants were utilized during development:

  1. Google Gemini 2.0 Flash Thinking - Primary development assistant
  2. Claude (Anthropic) - Code review and optimization suggestions
  3. ChatGPT (OpenAI) - Documentation and test case generation

Scope of AI Assistance

1. Architecture & System Design

Human-Led

  • Database architecture (4-layer design)
  • Module separation and responsibilities
  • Data flow and component interactions
  • Technology stack selection (Python, Flask, JSON)

AI Role: Provided feedback on design patterns and best practices


2. SQL Parser (regex-based)

AI-Assisted ⚙️

  • Initial regex patterns for SQL command matching
  • Boilerplate parsing logic structure
  • Pattern extraction and grouping

Human Contribution:

  • Defined exact SQL syntax requirements
  • Added support for JOIN, DESCRIBE/DESC, and WHERE operators
  • Debugged edge cases and refined patterns
  • Integrated parser with database engine

3. Flask Web Application

AI-Assisted ⚙️

  • Boilerplate Flask route definitions
  • HTML template structure (Bootstrap-based)
  • Basic CRUD endpoint scaffolding

Human Contribution:

  • Designed UI/UX flow and navigation
  • Implemented /report route for JOIN demonstration
  • Added error handling and validation
  • Customized styling and user experience

4. Hash Join Algorithm

AI-Optimized ⚙️

  • Initial implementation used Nested Loop Join (O(N²))
  • AI suggested Hash Join optimization (O(N+M))
  • AI provided algorithm pseudocode and implementation

Human Contribution:

  • Understood and verified algorithm correctness
  • Implemented bidirectional optimization (smaller table selection)
  • Added collision handling for duplicate join keys
  • Integrated with existing table selection logic
  • Performance tested and validated results

5. Storage Layer & Atomic Writes

AI-Assisted ⚙️

  • Suggested fsync and temporary file approach
  • Provided atomic write implementation pattern

Human Contribution:

  • Implemented error handling and rollback logic
  • Added index rebuilding after data modifications
  • Tested crash scenarios and data integrity

6. Unit Testing

AI-Assisted ⚙️

  • Generated test case scaffolding
  • Suggested edge cases and test scenarios
  • Created test file structure

Human Contribution:

  • Defined test requirements and coverage goals
  • Debugged failing tests
  • Added custom test cases for unique constraints
  • Verified all tests pass

7. Documentation

Collaborative 🤝

  • AI generated initial README structure
  • AI assisted with SQL syntax guide
  • AI helped format technical documentation

Human Contribution:

  • Defined documentation requirements
  • Reviewed and edited all content for accuracy
  • Added architecture diagrams
  • Wrote this acknowledgements section

Development Process

What AI Did Well

Boilerplate Code Generation: Saved significant time on repetitive code
Algorithm Suggestions: Provided optimized data structure recommendations
Documentation Templates: Created well-structured markdown files
Debugging Assistance: Helped identify syntax errors and logic bugs

What Required Human Expertise

🧠 System Architecture: Overall design and module interactions
🧠 Business Logic: Understanding database semantics and SQL behavior
🧠 Integration: Connecting all components into a cohesive system
🧠 Testing & Validation: Ensuring correctness and edge case handling
🧠 Code Review: Verifying AI-generated code quality and security


Verification & Responsibility

Code Review Process

Every line of AI-generated code underwent the following review:

  1. Functionality Check: Does it work as intended?
  2. Correctness Verification: Is the logic sound?
  3. Security Review: Are there any vulnerabilities?
  4. Performance Analysis: Is it efficient?
  5. Integration Testing: Does it work with other modules?
  6. Code Quality: Is it maintainable and readable?

Author's Statement

I, Collins Odhiambo (Collins Otieno), certify that:

  • I understand every component of this codebase
  • I can explain the purpose and functionality of each module
  • I have tested all features and verified their correctness
  • I take full responsibility for the final implementation
  • All AI-generated code has been reviewed and validated
  • This disclosure is complete and accurate

Learning Outcomes

Through this project, I gained hands-on experience with:

  • Database Internals: Understanding how RDBMS systems work under the hood
  • Algorithm Optimization: Learning the difference between O(N²) and O(N) complexity
  • Data Structures: Implementing hash maps for indexing and joins
  • File I/O: Atomic writes and crash recovery mechanisms
  • Regex Parsing: Building a SQL parser from scratch
  • Web Development: Creating a Flask-based admin dashboard
  • Testing: Writing comprehensive unit tests for data systems
  • AI Collaboration: Effectively using AI tools while maintaining code ownership

Ethical Considerations

Why This Disclosure Matters

Transparency in AI usage is crucial for:

  1. Academic Integrity: Honest representation of work
  2. Fair Evaluation: Allowing judges to assess actual skills
  3. Industry Standards: Preparing for professional AI collaboration
  4. Learning Validation: Demonstrating understanding, not just code generation

AI as a Tool, Not a Replacement

This project demonstrates that AI is a productivity multiplier, not a substitute for:

  • Critical thinking
  • System design skills
  • Debugging expertise
  • Domain knowledge
  • Code ownership

Conclusion

MiniDB represents a balance between leveraging modern AI tools for efficiency and maintaining deep technical understanding. The use of AI accelerated development while ensuring that all architectural decisions, integration work, and final verification remained firmly in human hands.

This approach reflects the future of software engineering: humans and AI working together, with developers maintaining full ownership and responsibility for their code.


Project Repository: MiniDB
Developer: Collins Odhiambo Otieno Contact: otienocollins0549@gmail.com
Challenge: Pesapal Junior Dev Challenge '26
Date: January 2026


This disclosure is provided in the spirit of transparency, academic integrity, and professional ethics.