前言

先说说我自己吧,90 后的 PHP 开发者,在上海工作 7 年,上家公司月收入 20.5K。

六月底的时候 HR 找到我,说劳动合同到期了,问我还继续签吗,涨工资肯定是没戏了!我说我考虑考虑,过了一天我还是跟 HR 提了离职,离职的原因有很多,当然最主要的可能是在这里做的不称心吧。

辞职后也投了些简历,总体来说机会还是有的,只是比往年都要难很多!面过百度、字节 和 米哈游等公司,结果都挂了!

之前也在网上看到很多数字游民的 UP 主,利用远程办公的优势实现地理套利,可以在小城市生活的没那么累,觉得挺向往那种工作和生活方式的。偶然在电鸭社区看到了 POPER 在招聘远程,抱着试一试的心态投递了简历。

让我没想到的是整个面试过程挺让人费解的,具体原因耐心看下文!

跟 HR 的对话

2023091401

好吧,我承认我吃回头草了:

2023091402

一面小测试题

第一轮的小测试还挺顺利,原题目的 PDF 链接在这里,以下是我的答案:

Q1-1:

Please create a program to find f(n).

<?php

function addStrings(string $num1, string $num2): string
{
    $len1 = strlen($num1);
    $len2 = strlen($num2);
    $carry = 0;
    $result = '';

    while ($len1 > 0 || $len2 > 0 || $carry > 0) {
        $digit1 = $len1 > 0 ? intval($num1[$len1 - 1]) : 0;
        $digit2 = $len2 > 0 ? intval($num2[$len2 - 1]) : 0;
        $sum = $digit1 + $digit2 + $carry;
        $carry = intval($sum / 10);
        $result = strval($sum % 10) . $result;
        $len1--;
        $len2--;
    }

    return $result;
}

function fibonacci(int $n): string
{
    $prevPrev = '0';
    $prev = '1';
    $result = '';

    for ($i = 2; $i <= $n; $i++) {
        $result = addStrings($prevPrev, $prev);
        $prevPrev = $prev;
        $prev = $result;
    }

    return $result;
}

Q1-2:

Use the program you created in (1) to find f(9292).

// The value of item 9292 Fibonacci number is: 
3661577246222677849785427206834745690320353572157656330500188244468089715055226822525574623888694874292151478596700484435570305109242313638033416669900444112247937728056211966758992460916419400444853615065999542615995870540182204923636128338003036402195497269318979305499067555417877218451841325150147307183407898442574610940236693637649259016140512151236060436731993551961323374694640088413329540217958532844994602127372986462480164986085899739239682944787995424271277467745382889616543410488579354418782072284268830659992928815496582634474475467254601183355700504643184963095650659016150303753725509080657414720402415839227967445769423409681729197862582729971824872388906214839490412361238387557198107844877079017174320960353286125955686041797566600910089428824579522915583067121845203670580431109038026031805366693865811657549114645180029223550684370620385942139952513596212989572901717566991028950391641339313551358249513768853983555921365314930744269060528453180853181277008706114560211720676164926069583198482669740034992505014190676786182619356298288614973174512790036679389133495600521574725844129972742430674736916672792625084641027990733249739459326440313013672649848254315756846997118764723139178365862765173488978551301801196364660097159749216505812815610240094570434388330501001490260829493982079774109976313795867953293232350445141140986017144615285056571297189775579577943476017486485426114739433921822640390808840316534298381708300360202292556716275696050116179146218599102060641783728510620700368611020522308508805066354267983031447439708738430830812299369590938039288063873607175095253952963248468206808754647017090147700831859035388796576278194027465866101615940691728994129932120206390739814141511226049882323886861245940252446697607680362853010694832168189803235002515372695099765714174685776789816323408545017065365758342146429980816094007713959447619038393467627366903822647919125618219011528539949951357869642550538579

Q2:

Please implement a program that lists the nodes of a random binary tree by nodes at the same depth.

<?php

class Node
{
    public int $value;
    public ?self $left;
    public ?self $right;

    public function __construct($value)
    {
        $this->value = $value;
        $this->left = null;
        $this->right = null;
    }
}

function generateRandomBinaryTree(int $depth): ?Node
{
    if ($depth == 0) {
        return null;
    }

    $value = rand(1, 100);
    $node = new Node($value);

    if ($depth > 1) {
        $node->left = generateRandomBinaryTree($depth - 1);
        $node->right = generateRandomBinaryTree($depth - 1);
    }

    return $node;
}

function printNodesAtSameDepth($root): void
{
    if ($root === null) {
        return;
    }

    $queue = [];
    $queue[] = [$root, 1];
    $currentDepth = 1;

    while (!empty($queue)) {
        [$node, $depth] = array_shift($queue);

        if ($depth > $currentDepth) {
            echo "\nDepth $depth: " . $node->value . " ";
            $currentDepth = $depth;
        } else {
            echo $node->value . " ";
        }

        if ($node->left !== null) {
            $queue[] = [$node->left, $depth + 1];
        }
        if ($node->right !== null) {
            $queue[] = [$node->right, $depth + 1];
        }
    }
}

// Generate a random binary tree of depth 4
$tree = generateRandomBinaryTree(4);

// List nodes at the same depth
echo "Nodes at the same depth:";
printNodesAtSameDepth($tree);

Q3-1:

Imagine you are playing a board game. You roll a 6-faced dice and move forward the same number of spaces that you rolled . If the finishing point is “n” spaces away from the starting point, p lease implement a program that calculates how many possible ways there are to arrive exactly at the finishing point.

function ways($n): string
{
    $A = bcpow('3', strval($n+6));
    $M = bcsub(bcsub(bcsub(bcsub(bcsub(bcsub(bcpow($A, '6'), bcpow($A, '5')), bcpow($A, '4')), bcpow($A, '3')), bcpow($A, '2')), $A), '1');
    return bcmod(bcpowmod($A, bcadd(strval($n), '6'), $M), $A);
}

$ways = ways(10); // 492 ways

03-2

If n=610, how many possible ways are there to arrive exactly at the finishing point?

14527490260516100855695859704819627818108010882741117227956927412305738742399171256642436462028811566617818991926058940988565927870172608545709804976244851391054850231415387973537361

Q4

Please tell us about the technologies you frequently use.

Levels of competencyName of programming Language(Year of experience) Example: Java (3years)
Most Proficient (Please give one answer only)PHP (7 years)
Familiar with
Minimal experience
QuestionAnswer
On which platform do you have the most development experience (e.g. iOS apps, Android apps, Linux server, Windows server, etc.)?Linux server, macOS
On which platforms are you interested in developing (regardless of experience) (e.g. iOS apps, Android apps, Linux server, Windows server, etc.)?Linux server, macOS
CategoryExampleYour Experience
Object ContainersEJB, Spring Framework, Guice, Seasar2Laravel
MVCSpring MVC, Struts 2, Play, GrailsLaravel, Yii
ORMMyBatis, HibernateEloquent, ActiveRecord
TestingJUnit, TestNG, Cucumber, Selenium, WebDriverPHPunit, Pest
IDE/EditorEclipse, IntelliJ IDEA, vim, Emacs, Sublime Text, Atom, Visual Studio, Netbeansvim, Visual Studio, PhpStorm, Goland, WebStorm
UML/DiagramEnterprise Architect, Rational, XDE, LucidChartG2, OmniGraffle
SCMCVS, Subversion, Git, Mercurial, Perforce, Visual SourceSafeGit, SVN
BuildsAnt, Maven, Gradle, Ivy, sbtGitlab Runner
CI/QualityJenkins, Bamboo, Sonar, CircleCIGithub Action, Gitlab Pipeline, Deployer
Java ProfilersEclipse TPTP, YourKit, JProfiler
Web Applications Performance ProfilersJMeter, GrinderSentry, OpenTelemetry
Issue TrackersJIRA, Redmine, Bugzilla, TrelloGitlab Issue
Agile ProcessesScrum, XP, KanbanGithub, Gitlab Plan
Social Coding Code ReviewGitHub, Bitbucket, Stash, Crucible/FishEyeGithub, Gitlab, Bitbucket

Q5

Please answer the questions below.

QuestionAnswer
What specifically do you want to achieve at Comiru?Become a digital nomad.
What kind of Web or smartphone applications are you interested in? * Please name at least one app that you always use, and at least one that you have found out about within the last year.AFFiNe, OrbStack, Multi, Raycast, Warp terminal
List up to 3 kinds of technology you have gotten interested in recently, and why you are interested in them.1. Rust: Because of its superior performance and safe memory management. 2.WebAssembly: Because it can bring subversive changes in both the front-end and the back-end. Compared with the current container technology in the back-end, it can further reduce the time-consuming problem of container scheduling. 3. IaC(Infrastructure as Code): The time cost from development to deployment can be reduced as much as possible, and the flexibility of the architecture can be improved.
What is the most technically difficult or interesting thing you have experienced in development or programming so far?The two-way synchronization between MongoDB cross-regional clusters has encountered a catastrophic synchronization problem before, which caused the full synchronization of the database to cover the data. This is almost catastrophic. Fortunately, we have a full backup of the database!
Why did you find it difficult / interesting?Because there are many uncertain factors in cross-border data synchronization, such as submarine optical cables, etc. In addition, although there is such a demand, MongoDB does not officially support it, but realizes it through third-party open source projects. We have also experienced many setback!
What was your solution, and how did you implement it? (Please answer in as much detail as possible)Because we are using the Alibaba Cloud MongoDB database, we must first enable the global binlog ID. The purpose of this is to cause data duplication due to two-way synchronization. Second, start the mongoshake service on overseas nodes and configure two-way synchronization settings. Finally, it replaces the way of timing task execution script synchronization!
Public repository URLs (e.g.: GitHub, Bitbucket, etc.)Github: https://github.com/betterde
Public social accounts (if applicable; e.g.: Twitter, Facebook, etc.)Twitter: https://twitter.com/GeorgeBornAgain
Which 3 technical books or articles have made a big impact on you?Rework, Steve JobsHow an Economy Grows and Why It Crashes

视频技术二面

然后顺利进入二面:

2023091403

三面技术课题

需求如下: 2023091407

涉及的前后端项目源码仓库如下:

到这里都没什么问题,然后开始三面的课题:

2023091404

大概花了五六天的时间把整个项目的前后端开发完成,然后在群里通知原本的技术负责人 Ken, 然后他拉了个人(应该不是技术)进来,从这里开始我感觉像是在对接业务需求了!

2023091405

有 Bug 需要该,这个我认了,但是后面开始题需求了,这里的操作让我感到很莫名奇妙,我当时的想法如下:

  1. 在最开始我对需求有疑问时,Ken 给我的答复就是根据自己的理解来,需求不明确,让开发人员完全主管发挥,我的理解是能实现大致逻辑证明能实现业务就行了;
  2. 让非技术人员对最终实现效果做评定,而不是通过源代码来分析!如果你只给个泛泛的开发目标,最终 UI 和交互效果都要开发来保证的话,我觉得就很离谱,最后还以达不到效果为借口,否定我提交的项目;
  3. 对于测试环境要发送邮件通知,在没有提供 SMTP 账户的情况下,我用自建的 Mailpit 作为查看测试邮件的方式,这虽然体验可能不好,但是并不是功能缺陷,而且作为开发人员应该都知道,这就是配置个 SMTP 账户的事!

提出质疑

2023091406

我针对我上面的想法提出了质疑,最开始 Ken(负责技术的)现在一声不吭了,HR 的回答让我觉得很扯淡!

项目最终效果图

2023091408 2023091408 2023091408 2023091408 2023091408 2023091408 2023091408 2023091408 2023091408 2023091408 2023091408

Laravel Admin 管理后台

2023091408 2023091408 2023091408 2023091408 2023091408

总结

这一路面试下来,大概已经十来天了,且不说是不是白嫖劳动力,就冲他们这个技术面试的审核方式,我觉得各位有意向的开发者都要三思!!!