2025

  • AI-powered Leetcode Revision Scheduler - TypeScript, Redis, MongoDB, GCP Built a distributed backend using TypeScript, Cloud Run, and MongoDB Atlas to generate adaptive spaced-repetition schedules for algorithm practice.

    • Implemented revision filtering logic to exclude questions based on frequency, recency, and suspension status, using ISO timestamp comparisons and date-based metrics.

    • Integrated Redis as an in-memory cache to optimize retrieval of user revision stats and reduce database latency.

    • Automated email delivery with embedded code snippets and one-time access tokens for secure API calls and personalized reminders.

    • Designed a resumable scheduling pipeline supporting concurrent users, retry logic, and dynamic revision intervals generated by an AI model.

    • Deployed and managed services on Google Cloud Run behind a static IP proxy to securely connect to MongoDB Atlas with IP whitelisting.

  • Horse Racing Probability Model
    • Built a data-driven horse racing prediction model inspired by Bill Benter’s methodology to estimate win probabilities and identify value bets.
    • Aggregated and cleaned HKJC race data using Puppeteer, MongoDB, and Python for automated scraping and structured storage of race metadata and results.
    • Engineered competitor-aware race-level features, such as jockey/trainer performance, class, track conditions, and standard times, to improve prediction accuracy.
    • Trained and validated a multinomial logistic regression model to output calibrated win probabilities across all horses in each race.
    • Evaluated model performance using metrics like pseudo R² and expected vs. actual returns against public odds benchmarks.
    • Designed end-to-end ETL pipelines for continuous data updates and retraining, improving model reliability over time.
  • Custom Anrdroid Keyboard
    • Built a fully custom Android IME (Input Method Editor) using InputMethodService and KeyboardView with real-time text composition and cursor tracking.
    • Implemented a Pinyin-to-Chinese word suggestion system, supporting multi-character suggestions, ranking, and continuation chains
    • Designed a cursor-aware text model, handling manual cursor movement, pasting, deletions, and composition commits without losing uncommitted input.
    • Developed an optimized onUpdateSelection() logic to track selection changes and maintain consistent state between currentInput, existingText, and the UI.
    • Integrated efficient debouncing and asynchronous suggestion updates for smoother typing experience.
    • Added visual feedback (highlighting, key press animations) and improved rendering performance by tuning onDraw() refresh rates.
    • Managed dynamic permissions and text access within Android’s IME sandbox, ensuring compatibility with modern Android security policies.