承接 playground-sessions/php-code-exercise 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

playground-sessions/php-code-exercise

Composer 安装命令:

composer create-project playground-sessions/php-code-exercise

包简介

An API Coding Exercise.

README 文档

README

Scenario

Take this hypothetical situation.

We are making an iOS and Android app for teachers. A teacher will select a student to see all lessons, and whether that student completed each lesson.

Each app will get its data from the JSON REST API endpoint:

/student-progress/{userId}

Where {userId} is the user id of the student.

You inherit this codebase.

You remember how the data is structured:

  • Lessons contain several segments.
  • A user can create practice records for a segment.

You look over the codebase and realize that several problems exist in this endpoint.

  1. Business rules (eg. whether a user has completed a lesson) would be duplicated by each app.
  2. It is too slow, even with a reasonable amount of practice records.

Luckily, both front-end developers agree that the endpoint needs to change before it is used. You all agree to the following data structure for the response:

{
  "lessons": [
    {
      "id": 32,
      "difficulty": "Rookie",
      "isComplete": true
    }
  ]
}

Instructions

Solve all problems with this codebase.

  • Create a new data structure for the response.
  • Codify the following business rules.
    • A lesson is complete if each segment has at least one practice record with a score of 80% or more.
    • Difficulty categories ("Rookie", "Intermediate", "Advanced") are associated with difficulty numbers [1,2,3], [4,5,6], [7,8,9], respectively.
  • Ensure the response time for user id 1 is under 500ms for the given dataset. Right now the response time is about 2 seconds.

Code should be cleanly written in self-contained parts, each having one responsibility, according to the Single Responsibility Principle (SRP). For example, application logic (eg. extracting query parameters from a URL) should be separate from business logic (eg. determining whether a lesson is complete).

You have full reign over the codebase. You can add or remove any packages you like. Everything is fair game.

We are testing your ability to organize code cleanly, with SRP, not your knowledge of the Laravel/Lumen frameworks.

Try to commit often and with small changes, so we can see what you are doing.

If you have a particular strength (say documenting APIs), feel free show it off.

You might benefit from knowing that all 3 problems can be solved without use of a cache.

Deliverables

Email ben@playgroundsessions.com with a link to your git repository.

Getting Started

Getting started is simple with PHP's built-in web server.

  1. Have PHP 8.0 installed.
  2. Follow the Development Environment Setup

Go!

We look forward to seeing your code!

playground-sessions/php-code-exercise 适用场景与选型建议

playground-sessions/php-code-exercise 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 34 次下载、GitHub Stars 达 0, 最近一次更新时间为 2021 年 01 月 27 日, 在 PHP 生态内属于活跃度较高的组件。

我们在过去多个企业项目中使用过 playground-sessions/php-code-exercise 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 playground-sessions/php-code-exercise 我们能提供哪些服务?
定制开发 / 二次开发

基于 playground-sessions/php-code-exercise 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 34
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 2
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 4
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2021-01-27