Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

@codejoy/random-learner

SujithKandamuri357MIT2.0.0

A comprehensive interview preparation and learning companion with AI-powered questions, mock interviews, skill assessments, and company-specific question sets for technical job interviews

interview-preparation, mock-interviews, skill-assessment, company-questions, learning, quiz, education, ai, programming, electron, desktop-app, openai, gemini, questions, study, coding, java, python, database, oop, artificial-intelligence, google, amazon, meta, microsoft, apple, netflix, uber, faang, technical-interviews, coding-interviews, system-design, behavioral-interviews, weakness-detection, analytics, progress-tracking

readme

Random Learner 🧠 v2.0.0

npm version License: MIT Node.js Version

The Ultimate Interview Preparation & Learning Companion 🚀

A comprehensive desktop application that transforms your interview preparation with AI-powered mock interviews, skill assessments, company-specific question sets, and intelligent learning analytics. Perfect for developers preparing for technical interviews at top tech companies!

🎯 What's New in v2.0.0

🏢 Company-Specific Interview Prep

  • 8 Major Tech Companies: Google, Amazon, Meta, Microsoft, Apple, Netflix, Uber, Startups
  • AI-Generated Questions: Authentic company-style questions tailored to each company's interview process
  • One-Click Download: Get 25-60 questions per company with real-time progress tracking

🎯 Mock Interview System

  • 6 Interview Types: Technical General, Frontend, Backend, Full-Stack, Data Science, Quick Practice
  • Real-Time Scoring: Live performance tracking with detailed feedback
  • Company-Specific Modes: Practice with actual company interview styles and difficulty levels

🧠 AI-Powered Weakness Detection

  • Smart Analysis: AI identifies your knowledge gaps and weak areas
  • Targeted Practice: Automatically serves questions focused on your weaknesses
  • Progress Tracking: Monitor improvement in specific skill areas over time

🏆 Comprehensive Skill Assessment

  • Multi-Dimensional Evaluation: Technical, Problem-Solving, Speed, Communication skills
  • Experience Level Classification: Junior, Mid-Level, Senior, Expert with salary benchmarks
  • Interview Readiness Score: Data-driven assessment of your interview preparedness
  • Industry Benchmarking: Compare your skills against industry standards

📊 Advanced Learning Analytics

  • Interactive Dashboard: Beautiful charts and graphs showing your learning progress
  • Performance Metrics: Success rates, response times, topic mastery, and streaks
  • AI Insights: Personalized recommendations and study plans
  • Export Capabilities: Download your progress data and analytics

📦 Installation

npm install -g @codejoy/random-learner

Then run:

random-learner

Option 2: Clone and Run Locally

git clone https://github.com/codejoy-org/random-learner.git
cd random-learner
npm install
npm start

🚀 Quick Start

  1. Install the app: npm install -g @codejoy/random-learner
  2. Run it: random-learner
  3. Configure: Right-click the tray icon → Settings
  4. Add AI: Enter your OpenAI or Gemini API key (optional)
  5. Learn: Questions will start appearing automatically!

✨ Features

🎯 Core Learning Features

  • Random Question Popups: Questions appear randomly every 2-10 minutes
  • Multiple Choice Questions: Easy-to-answer format with clickable options
  • Instant Feedback: Get immediate results with explanations
  • Level-Based Learning: Beginner, Intermediate, and Advanced questions
  • Topic-Focused Questions: OOP, Java, Python, AI, and Databases

🤖 AI-Powered Features

  • OpenAI Integration: Generate unlimited questions using GPT
  • Custom Prompts: Customize how AI generates questions
  • Enhanced Feedback: AI-powered explanations for wrong answers
  • Dynamic Topics: Ask AI about any programming topic
  • Smart Validation: AI validates and explains your answers

⚙️ Customization & Settings

  • Comprehensive Settings Page: Configure every aspect of your learning
  • Topic Preferences: Choose which topics to focus on
  • Difficulty Selection: Select your preferred learning levels
  • Timing Controls: Customize popup intervals (2-120 minutes)
  • UI Preferences: Always on top, auto-close settings

🎨 User Experience

  • Beautiful Modern UI: Gradient-based design with smooth animations
  • Keyboard Shortcuts: Quick navigation (1-4 for options, Enter, Esc)
  • Menu Bar Integration: Easy access to settings and manual questions
  • Question Metadata: See topic, level, and source (static vs AI)
  • Enhanced Feedback: Visual indicators for AI-generated content

Installation

  1. Clone or download this project
  2. Install dependencies:
    npm install

🚀 Quick Start

  1. Install dependencies:

    npm install
  2. Start the application:

    npm start
  3. For development (with auto-restart):

    npm run dev

🎮 How to Use

Basic Usage

  • The app runs in the background after starting
  • Random questions popup every 2-10 minutes (configurable)
  • Click options or use keyboard shortcuts (1-4)
  • Press Enter to submit, Esc to skip
  • Windows auto-close after showing results

Accessing Settings

  • Menu: Random Learner → Settings
  • Keyboard: Cmd/Ctrl + Comma (,)
  • Configure OpenAI, topics, difficulty, timing, and UI preferences
  1. Get your API key from OpenAI Platform
  2. Open Settings (Cmd/Ctrl + ,)
  3. Enter your API key in the OpenAI section
  4. Enable "Use OpenAI for question generation"
  5. Optionally customize the generation prompt

Manual Questions

  • Menu: Random Learner → Show Question Now
  • Keyboard: Cmd/Ctrl + Q

📚 Built-in Question Bank

Topics Covered

  • Object-Oriented Programming (OOP): Classes, inheritance, polymorphism, encapsulation
  • Java: JVM, syntax, exceptions, keywords, best practices
  • Python: Data types, list comprehensions, functions, GIL, libraries
  • Artificial Intelligence: Machine learning, neural networks, algorithms
  • Databases: SQL, normalization, joins, ACID properties, NoSQL
  • General Programming: Web development, algorithms, version control

Difficulty Levels

  • Beginner: Basic concepts and terminology
  • Intermediate: Practical applications and deeper understanding
  • Advanced: Complex scenarios and expert-level knowledge

Total Questions: 60+ static questions across all topics and levels

Keyboard Shortcuts

  • 1, 2, 3, 4: Select answer options A, B, C, D
  • Enter: Submit selected answer
  • Escape: Skip question and close window

🛠 Advanced Configuration

Settings Management

  • Export/Import: Backup and share your settings (excluding API keys)
  • Reset to Defaults: Restore original configuration
  • Live Updates: Changes apply immediately without restart

OpenAI Prompt Customization

The default prompt can be customized in Settings. Use these placeholders:

  • {topic}: Will be replaced with the selected topic
  • {level}: Will be replaced with the difficulty level

Default Prompt Structure:

  • Requests specific question format (4 options, 1 correct)
  • Asks for concise explanations (2-3 sentences)
  • Focuses on practical, applicable knowledge
  • Ensures appropriate difficulty level

Adding Static Questions

Add questions to src/quizManager.js in the levelBasedQuestions object:

{
  id: 606,
  question: "Your question here?",
  options: ["Option A", "Option B", "Option C", "Option D"],
  correct: 0, // Index of correct answer (0-3)
  level: "intermediate", // beginner/intermediate/advanced
  topic: "databases", // oops/java/python/ai/databases
  explanation: "Explanation of the correct answer"
}

🔧 Technology Stack

  • Electron: Cross-platform desktop applications
  • Node.js: Backend runtime and logic
  • OpenAI API: AI-powered question generation and feedback
  • electron-store: Persistent settings storage
  • HTML/CSS/JavaScript: Modern frontend interface
  • IPC (Inter-Process Communication): Secure process communication

Project Structure

lerner/
├── package.json           # Project configuration and dependencies
├── README.md             # This documentation
└── src/
    ├── index.js          # Main Electron app with menu and IPC
    ├── quizManager.js    # Static question bank and quiz logic
    ├── openAIManager.js  # OpenAI integration and prompt management
    ├── settingsManager.js # Settings persistence and management
    ├── question.html     # Question popup UI
    └── settings.html     # Settings page UI

🤝 Contributing

Feel free to contribute by:

  • Adding Questions: Expand the static question bank
  • New Topics: Add support for more programming topics
  • UI/UX Improvements: Enhance the visual design and user experience
  • Advanced Features: Progress tracking, statistics, spaced repetition
  • Bug Fixes: Report and fix issues
  • OpenAI Prompts: Share effective prompt templates

🎯 Future Enhancements

  • Spaced Repetition: Questions repeat based on your performance
  • Progress Tracking: Statistics and learning analytics
  • Custom Topics: User-defined subject areas
  • Team Mode: Share questions and compete with colleagues
  • Mobile App: Companion mobile application
  • Plugin System: Extensible architecture for custom features

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.

🚀 Publishing & Development

Development Setup

git clone https://github.com/codejoy-org/random-learner.git
cd random-learner
npm install
npm run dev  # Runs with nodemon for auto-restart

Publishing to npm

# Build and test
npm run build
npm test

# Publish (requires @codejoy npm organization access)
npm publish

🙏 Acknowledgments

  • Built with Electron for cross-platform desktop support
  • Uses OpenAI GPT and Google Gemini for intelligent question generation
  • Inspired by the need for continuous learning in our busy lives

📞 Support


Happy Learning! 🚀

changelog

Changelog

All notable changes to Random Learner will be documented in this file.

The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.

[2.0.0] - 2024-12-19

🚀 Major Release: Interview Preparation & Advanced Analytics

This is a major release that transforms Random Learner from a simple quiz app into a comprehensive interview preparation platform with AI-powered features.

📋 What's New in v2.0.0

  • 🎯 Mock Interview System with 6 interview types and company-specific preparation
  • 🧠 AI-Powered Weakness Detection that identifies knowledge gaps and provides targeted practice
  • 🏆 Comprehensive Skill Assessment with detailed reports and industry benchmarking
  • 🏢 Company Question Sets with AI-generated questions for 8 major tech companies
  • 📊 Enhanced Analytics Dashboard with interview readiness scoring and progress tracking
  • 🎮 Gamification Features with achievements, streaks, and performance metrics

🔧 Technical Improvements

  • Complete UI/UX overhaul with modern, responsive design
  • Advanced AI integration with OpenAI GPT-3.5-turbo and Google Gemini
  • Robust error handling and offline capabilities
  • Comprehensive data export/import functionality
  • Real-time progress tracking and analytics

🎯 Mock Interview System

  • Comprehensive Mock Interviews: Full-featured interview simulation with multiple types:
    • Technical General: 45-minute comprehensive technical assessment
    • Frontend Focused: React, JavaScript, CSS, and web technologies
    • Backend Focused: System design, databases, APIs, and scalability
    • Full-Stack: End-to-end development skills assessment
    • Data Science: ML algorithms, statistics, and data analysis
    • Quick Practice: 15-minute rapid skill assessment
  • Company-Specific Preparation: Tailored interview styles for:
    • Google: Algorithmic problem-solving with optimization focus
    • Amazon: Leadership principles + technical depth
    • Meta: Product thinking + technical execution
    • Microsoft: Collaborative problem-solving approach
    • Startup: Practical problem-solving and adaptability
  • Real-Time Interview Features:
    • Live Timer: Session and per-question timing with visual countdown
    • Progress Tracking: Phase indicators (Warm-up → Technical → Advanced → Behavioral)
    • Pause/Resume: Interview session management with time adjustment
    • Performance Scoring: Multi-dimensional scoring (accuracy, timing, completion)
  • Interview Analytics: Detailed performance reports with improvement recommendations

🧠 AI-Powered Weakness Detection

  • Intelligent Analysis: Advanced pattern recognition to identify knowledge gaps
  • Concept Mapping: 50+ interconnected programming concepts with dependency tracking
  • Weakness Scoring: Multi-factor analysis considering accuracy, response time, and confidence
  • Targeted Practice: 70% of questions now focus on identified weak areas
  • Root Cause Analysis: "You struggle with recursion because you miss base cases"
  • Spaced Repetition: Optimal timing for revisiting weak concepts
  • Progress Monitoring: Visual tracking of improvement in weak areas

🏆 Comprehensive Skill Assessment

  • Multi-Dimensional Evaluation: 4 core categories with weighted scoring:
    • Technical Skills (40%): Programming fundamentals, data structures, algorithms, system design
    • Problem Solving (25%): Analytical thinking, optimization, debugging
    • Coding Proficiency (20%): Code quality, best practices, testing
    • Communication (15%): Technical communication, collaboration
  • Experience Level Classification: Automatic classification with confidence scoring:
    • Beginner (< 1 year): Basic programming competency
    • Entry Level (0-2 years): $50k-$75k salary range
    • Mid Level (2-5 years): $75k-$120k salary range
    • Senior Level (5-8 years): $120k-$180k salary range
    • Expert Level (8+ years): $180k-$300k salary range
  • Interview Readiness Assessment: Company and role-specific readiness scores
  • Certification System: Bronze 🥉, Silver 🥈, Gold 🥇, Platinum 💎 skill certifications
  • Industry Benchmarking: Compare skills against industry standards and salary expectations

📊 Enhanced Learning Analytics

  • Interview Readiness Dashboard: Real-time assessment of interview preparedness
  • Skill Category Breakdown: Detailed performance analysis across all skill areas
  • Weakness Analysis Integration: Live tracking of improvement areas and targeted questions
  • Progress Predictions: "At current pace, interview-ready in 6 weeks"
  • Success Rate Estimation: Data-driven interview success probability
  • Personalized Recommendations: AI-generated study plans and focus areas

🏢 AI-Powered Company Question Sets

  • Company-Specific Question Generation: AI generates tailored questions for 8 major companies:
    • Google: Algorithmic optimization and scalability focus
    • Amazon: Leadership principles + technical depth
    • Meta: Product thinking + technical execution
    • Microsoft: Collaborative problem-solving approach
    • Apple: Design excellence and user experience
    • Netflix: Streaming technology and data-driven decisions
    • Uber: Real-time systems and marketplace dynamics
    • Startup: Practical problem-solving with resource constraints
  • One-Click Download: Download 25-60 questions per company with single button click
  • Question Type Variety: Coding, System Design, Behavioral, and company-specific categories
  • Real-Time Progress: Live download progress with detailed status updates
  • Smart Integration:
    • Mock Interviews: Automatically uses company questions during company-specific interviews
    • Regular Practice: 20% chance to show company questions during normal learning
    • Targeted Practice: Company questions integrated with weakness detection
  • Complete Management: Export, import, delete, and organize company question sets
  • Offline Storage: All downloaded questions stored locally for offline practice
  • Download Analytics: Track download history, success rates, and question statistics

Enhanced Features

  • Next Question Button: Continue learning without closing the window - perfect for study sessions
  • Enhanced Auto-Close Dialog: Choose to load next question, extend window, or close after answering
  • Improved Keyboard Shortcuts:
    • Press 'N' to load next question (when available)
    • Enhanced Enter key behavior for seamless navigation
  • Continuous Learning Mode: Keep the learning momentum going with instant question transitions
  • Better User Experience: Extended auto-close timer (15 seconds) with more intuitive options
  • Question Source Tags: Visual indicators showing question source (🤖 OpenAI, ✨ Gemini, 📚 Static, ⚠️ AI Fallback)
  • Topic Icons: Beautiful programming language and topic icons in question window:
    • Languages: Python, Java, JavaScript, C++, C#, PHP, Ruby, Go, Rust, Swift, Kotlin
    • Categories: Database, Web Development, Mobile, Algorithms, Security, DevOps, AI/ML
    • Smart Detection: Automatically detects topic from question content
  • Comprehensive AI Explanations: Single API call now generates detailed explanations for ALL answer options
  • Smart Fallback System: AI → AI Cache → Static questions with proper fallback hierarchy
  • Google Gemini Setup Guide: Complete documentation for getting free Gemini API key (GEMINI_API_SETUP.md)
  • 🎯 Learning Analytics Dashboard: Comprehensive progress tracking and insights system:
    • Progress Tracking: Questions answered, accuracy rates, response times, streaks
    • Visual Analytics: Interactive charts showing weekly progress and topic performance
    • Topic Analysis: Detailed breakdown of performance by programming language/topic
    • Achievement System: Unlock achievements for milestones and consistent performance
    • AI-Powered Insights: On-demand personalized learning recommendations and analysis
    • Data Export: Export analytics data for external analysis or backup

Changed

  • Question Window Flow: After answering, users can immediately continue with next question
  • Button Layout: Dynamic button visibility based on current state (Submit → Next Question → Close)
  • Auto-Close Behavior: More user-friendly with focus on continuous learning rather than just closing
  • AI Question Fallback Logic: Improved hierarchy - AI → AI Cache → Static (with proper fallback to static when AI completely fails)
  • Answer Validation: Now uses pre-generated explanations instead of additional API calls for better performance
  • Question Generation: Single API call now includes question, options, and detailed explanations for all choices

Enhanced

  • Learning Session Support: Designed for extended study sessions with minimal interruption
  • Keyboard Navigation: More intuitive shortcuts for power users
  • Visual Feedback: Better button states and transitions for clearer user guidance
  • AI Question Fallback System: Improved multi-tier fallback system for cached AI questions:
    • 🥇 First: Try fresh AI generation
    • 🥈 Second: Use cached questions with same topic/level
    • 🥉 Third: Use cached questions from same topic
    • 🏅 Fourth: Use cached questions from same level
    • 🎯 Fifth: Use any available cached AI questions
    • 📚 Final: Fall back to static questions if AI completely unavailable
  • API Efficiency: Reduced API calls by 50% - single call generates question + all explanations
  • Better Answer Feedback: Detailed explanations for both correct and incorrect choices, showing why each option is right/wrong and where it's used
  • Visual Question Identification: Instant recognition of programming languages and topics through color-coded icons with authentic brand colors
  • Smart Analytics Tracking: Automatic recording of all learning activities with detailed performance metrics
  • Streak Management: Intelligent streak tracking that motivates consistent learning habits

[1.0.2] - 2024-01-15

Added

  • AI-powered question generation using OpenAI and Google Gemini
  • Intelligent question caching system for offline usage
  • Enhanced feedback with AI-powered explanations
  • Support for multiple AI providers (OpenAI, Gemini)
  • Custom prompt configuration for personalized learning
  • Question cache management with export/import functionality
  • Auto-extension dialog for keeping question windows open
  • Keyboard shortcuts for quick navigation (1-4 for options, Enter to submit, Escape to close)

Enhanced

  • Improved tray icon with multiple fallback options
  • Better system tray integration with status indicators
  • Enhanced settings window with AI provider configuration
  • Responsive question window design for different screen sizes
  • Auto-close confirmation with countdown timer

Fixed

  • Tray icon display issues across different operating systems
  • Question window positioning and focus handling
  • Settings persistence and reload functionality

[1.0.1] - 2024-01-10

Added

  • System tray integration for background operation
  • Pause/Resume functionality for question scheduling
  • Settings window for configuration management
  • Question timing customization (min/max intervals)
  • Topic and difficulty level preferences
  • Always-on-top window option

Enhanced

  • Improved question display with better formatting
  • Enhanced UI with gradient backgrounds and animations
  • Better error handling and fallback mechanisms

Fixed

  • Window management issues on macOS
  • Question scheduling reliability
  • Settings validation and error handling

[1.0.0] - 2024-01-05

Added

  • Initial release of Random Learner
  • Random popup quiz questions for programming concepts
  • Multiple choice questions covering:
    • Java programming
    • Python programming
    • Object-Oriented Programming (OOP)
    • Database concepts
    • General programming principles
  • Configurable question intervals
  • Cross-platform support (Windows, macOS, Linux)
  • Electron-based desktop application
  • Beautiful, modern UI with animations
  • Question feedback with explanations

Features

  • Smart Scheduling: Random intervals between questions to avoid predictability
  • Topic Coverage: Comprehensive programming topics for well-rounded learning
  • Difficulty Levels: Questions ranging from beginner to advanced
  • Instant Feedback: Immediate explanations for both correct and incorrect answers
  • Cross-Platform: Works on Windows, macOS, and Linux
  • Lightweight: Minimal system resource usage
  • Background Operation: Runs quietly in the system tray

[1.0.2] - 2024-11-15

Added

  • Basic AI question generation with OpenAI and Google Gemini support
  • Static question bank with programming topics
  • System tray integration
  • Basic settings management
  • Question caching system

Features

  • Random popup questions at configurable intervals
  • Multiple choice questions with explanations
  • Basic analytics tracking
  • Settings window for configuration
  • Support for multiple AI providers

[1.0.1] - 2024-11-01

Added

  • Initial release with basic functionality
  • Static question bank
  • System tray integration
  • Basic popup questions

[1.0.0] - 2024-10-15

Added

  • Initial version with core functionality
  • Basic question display system
  • System tray integration

Release Notes Format

Each release includes:

  • Added: New features and capabilities
  • Changed: Modifications to existing functionality
  • Enhanced: Improvements to existing features
  • Fixed: Bug fixes and issue resolutions
  • Deprecated: Features that will be removed in future versions
  • Removed: Features that have been removed
  • Security: Security-related improvements

Upcoming Features

Stay tuned for future releases that may include:

  • More programming languages and topics
  • Custom question creation
  • Learning progress tracking
  • Spaced repetition algorithms
  • Integration with popular learning platforms
  • Mobile companion app
  • Team/classroom features
  • Advanced analytics and insights