[北京][20-40k]阿缪大夫招聘Node/全栈工程师,解题直接获得面试机会
发布于 8 年前 作者 marching118 7769 次浏览 最后一次编辑是 7 年前 来自 招聘

公司简介

北京阿缪(miào)大夫健康科技有限公司 —— 让医学变得简单

我们是一家创业期的医疗科技公司。 我们的目标是帮助医生建立品牌,帮助大众找到可信赖的医学信息。 我们的医学专家团队着力于构建可信的医学内容矩阵。我们以适应新阅读习惯的方式呈现医学知识,让更多人可以得益于医学科普。 我们的信息专家团队致力力于建设革命性的评价方法学,促进公众信息的“自净化”,降低可信信息的生产成本。 我们的用户体验设计(UED)团队努力使医学传道变得更加简单。 我们的微信公众号“小大夫漫画”是微信全科医学科普排名第一的自媒体。 我们的出版物《熊猫医生和二师兄漫画系列丛书》是广电总局推荐的2016年健康类十本优秀出版物之一。 我们的粉丝跨越各个行业,从明星到新闻主播,从医生到普通患者。

我们的产品

微信公众号: 妙医助手,小大夫漫画 APP: 妙医 挂号与视频咨询一体机

我们希望你

  1. 扎实的编程基础,良好的学习能力,技术涉猎广泛
  2. 良好的分析与解决问题的能力,可有独立开发
  3. 强烈的产品意识
  4. 有创业精神,有责任心

我们现在用到的

koa,PostgreSQL,redis,RabbitMQ,Elasticsearch,WebRTC, consul, angualr, react …

编程题目

感谢图普科技,是他们的帖子让我们决定将题目移到线上。 题目是由原先面试时的现场编程题改造而来,面试时限定的完成时间为30min。 通过并提交后,我们会查看你提交的代码,并尽快安排面试。 即使你只是想做做题娱乐一下我们也欢迎,并希望你能给我们的招聘提出宝贵意见。

原现场编程题目(仅供参考) 线上编程题目 要是做好了,即使是forFun也请提交代码,招聘结束后我们会把比较好的答案发布出来供大家交流。 虽然暂时没有漂亮的界面,但我们追求漂亮的js代码。

工作环境

工作地点:北京市朝阳区利泽中一路1号博雅国际中心A座2102 IMG_0097.jpg 新的办公室正在装修,环境大幅提升,明年初可以投入使用。

简历,问题,建议等,欢迎发邮件至zhangling@wedocare.com,我们会第一时间回复。

31 回复

然而没有高大上的页面,没人理了

@o6875461 说的是啊,设计师太重要了,自己做个难看的页面我也不好意思拿出来

要是做好了,即使是forFun也请提交代码,最后我们会把比较好的答案发布出来供大家学习交流

感觉没什么问题啊?为什么验证失败?

/1610/new-question==>: {“id”:“dc747e95-197a-47e9-845e-929737ae92c5”,“rootId”:1} /1610/questions/dc747e95-197a-47e9-845e-929737ae92c5/get-children/1==>: [2,3] /1610/questions/dc747e95-197a-47e9-845e-929737ae92c5/get-children/2==>: [4,5] /1610/questions/dc747e95-197a-47e9-845e-929737ae92c5/get-children/3==>: [6,7,8,9] /1610/questions/dc747e95-197a-47e9-845e-929737ae92c5/get-children/8==>: [23] /1610/questions/dc747e95-197a-47e9-845e-929737ae92c5/get-children/4==>: [10,11,12] /1610/questions/dc747e95-197a-47e9-845e-929737ae92c5/get-children/6==>: [16,17,18] /1610/questions/dc747e95-197a-47e9-845e-929737ae92c5/get-children/7==>: [19,20,21,22] /1610/questions/dc747e95-197a-47e9-845e-929737ae92c5/get-children/9==>: [24,25,26] /1610/questions/dc747e95-197a-47e9-845e-929737ae92c5/get-children/5==>: [13,14,15] /1610/questions/dc747e95-197a-47e9-845e-929737ae92c5/get-children/23==>: [] /1610/questions/dc747e95-197a-47e9-845e-929737ae92c5/get-children/11==>: [29,30,31] /1610/questions/dc747e95-197a-47e9-845e-929737ae92c5/get-children/16==>: [42,43] /1610/questions/dc747e95-197a-47e9-845e-929737ae92c5/get-children/17==>: [44,45,46] /1610/questions/dc747e95-197a-47e9-845e-929737ae92c5/get-children/10==>: [27,28] /1610/questions/dc747e95-197a-47e9-845e-929737ae92c5/get-children/20==>: [52,53,54,55] /1610/questions/dc747e95-197a-47e9-845e-929737ae92c5/get-children/24==>: [] /1610/questions/dc747e95-197a-47e9-845e-929737ae92c5/get-children/12==>: [32,33,34,35] /1610/questions/dc747e95-197a-47e9-845e-929737ae92c5/get-children/15==>: [39,40,41] /1610/questions/dc747e95-197a-47e9-845e-929737ae92c5/get-children/22==>: [] /1610/questions/dc747e95-197a-47e9-845e-929737ae92c5/get-children/18==>: [47,48,49] /1610/questions/dc747e95-197a-47e9-845e-929737ae92c5/get-children/14==>: [37,38] /1610/questions/dc747e95-197a-47e9-845e-929737ae92c5/get-children/13==>: [36] /1610/questions/dc747e95-197a-47e9-845e-929737ae92c5/get-children/19==>: [50,51] /1610/questions/dc747e95-197a-47e9-845e-929737ae92c5/get-children/21==>: [] /1610/questions/dc747e95-197a-47e9-845e-929737ae92c5/get-children/25==>: [] /1610/questions/dc747e95-197a-47e9-845e-929737ae92c5/get-children/26==>: [] /1610/questions/dc747e95-197a-47e9-845e-929737ae92c5/get-children/28==>: [] /1610/questions/dc747e95-197a-47e9-845e-929737ae92c5/get-children/52==>: [] /1610/questions/dc747e95-197a-47e9-845e-929737ae92c5/get-children/44==>: [] /1610/questions/dc747e95-197a-47e9-845e-929737ae92c5/get-children/27==>: [] /1610/questions/dc747e95-197a-47e9-845e-929737ae92c5/get-children/40==>: [] /1610/questions/dc747e95-197a-47e9-845e-929737ae92c5/get-children/38==>: [] /1610/questions/dc747e95-197a-47e9-845e-929737ae92c5/get-children/34==>: [] /1610/questions/dc747e95-197a-47e9-845e-929737ae92c5/get-children/46==>: [] /1610/questions/dc747e95-197a-47e9-845e-929737ae92c5/get-children/49==>: [] /1610/questions/dc747e95-197a-47e9-845e-929737ae92c5/get-children/42==>: [] /1610/questions/dc747e95-197a-47e9-845e-929737ae92c5/get-children/51==>: [] /1610/questions/dc747e95-197a-47e9-845e-929737ae92c5/get-children/54==>: [] /1610/questions/dc747e95-197a-47e9-845e-929737ae92c5/get-children/48==>: [] /1610/questions/dc747e95-197a-47e9-845e-929737ae92c5/get-children/35==>: [] /1610/questions/dc747e95-197a-47e9-845e-929737ae92c5/get-children/29==>: [] /1610/questions/dc747e95-197a-47e9-845e-929737ae92c5/get-children/32==>: [] /1610/questions/dc747e95-197a-47e9-845e-929737ae92c5/get-children/47==>: [] /1610/questions/dc747e95-197a-47e9-845e-929737ae92c5/get-children/53==>: [] /1610/questions/dc747e95-197a-47e9-845e-929737ae92c5/get-children/37==>: [] /1610/questions/dc747e95-197a-47e9-845e-929737ae92c5/get-children/39==>: [] /1610/questions/dc747e95-197a-47e9-845e-929737ae92c5/get-children/36==>: [] /1610/questions/dc747e95-197a-47e9-845e-929737ae92c5/get-children/30==>: [] /1610/questions/dc747e95-197a-47e9-845e-929737ae92c5/get-children/50==>: [] /1610/questions/dc747e95-197a-47e9-845e-929737ae92c5/get-children/33==>: [] /1610/questions/dc747e95-197a-47e9-845e-929737ae92c5/get-children/41==>: [] /1610/questions/dc747e95-197a-47e9-845e-929737ae92c5/get-children/55==>: [] /1610/questions/dc747e95-197a-47e9-845e-929737ae92c5/get-children/45==>: [] /1610/questions/dc747e95-197a-47e9-845e-929737ae92c5/get-children/43==>: [] /1610/questions/dc747e95-197a-47e9-845e-929737ae92c5/get-children/31==>: [] {“id”:1,“children”:[{“id”:2,“children”:[{“id”:4,“children”:[{“id”:10,“children”:[{“id”:27,“children”:[]},{“id”:28,“children”:[]}]},{“id”:11,“children”:[{“id”:29,“children”:[]},{“id”:30,“children”:[]},{“id”:31,“children”:[]}]},{“id”:12,“children”:[{“id”:32,“children”:[]},{“id”:33,“children”:[]},{“id”:34,“children”:[]},{“id”:35,“children”:[]}]}]},{“id”:5,“children”:[{“id”:13,“children”:[{“id”:36,“children”:[]}]},{“id”:14,“children”:[{“id”:37,“children”:[]},{“id”:38,“children”:[]}]},{“id”:15,“children”:[{“id”:39,“children”:[]},{“id”:40,“children”:[]},{“id”:41,“children”:[]}]}]}]},{“id”:3,“children”:[{“id”:6,“children”:[{“id”:16,“children”:[{“id”:42,“children”:[]},{“id”:43,“children”:[]}]},{“id”:17,“children”:[{“id”:44,“children”:[]},{“id”:45,“children”:[]},{“id”:46,“children”:[]}]},{“id”:18,“children”:[{“id”:47,“children”:[]},{“id”:48,“children”:[]},{“id”:49,“children”:[]}]}]},{“id”:7,“children”:[{“id”:19,“children”:[{“id”:50,“children”:[]},{“id”:51,“children”:[]}]},{“id”:20,“children”:[{“id”:52,“children”:[]},{“id”:53,“children”:[]},{“id”:54,“children”:[]},{“id”:55,“children”:[]}]},{“id”:21,“children”:[]},{“id”:22,“children”:[]}]},{“id”:8,“children”:[{“id”:23,“children”:[]}]},{“id”:9,“children”:[{“id”:24,“children”:[]},{“id”:25,“children”:[]},{“id”:26,“children”:[]}]}]}]} /1610/questions/dc747e95-197a-47e9-845e-929737ae92c5/check==>: {“pass”:false,“concurrency”:27,“time”:11317}

@178220709 验证那步是要发送{root:。。。},不知道你是不是把根节点直接提交了

@marching118 {“error”:“root needed”} ,如果root没有,是这个错误.

@178220709 你可以再试试,现在服务器上如果提交不成功会保存。当然如果你觉得可能是服务器的问题也欢迎直接将代码和个人信息发送给zhangling@wedocare.com

http://hr.amiaodaifu.com:50000/1610/questions/524a93d5-6931-42ff-8159-a0ee9223e380/check => { pass: true, concurrency: 1, time: 8739 } { pass: true, concurrency: 1, time: 8739 } http://hr.amiaodaifu.com:50000/1610/questions/524a93d5-6931-42ff-8159-a0ee9223e380/submit => { msg: ‘thank you!’ } { msg: ‘thank you!’ } 可以提交的!

@178220709 我们确实是验证顺序的,但是我看你贴出来的东西,我也没看出有什么问题。

@178220709 我查看了服务器上的记录,我们在题目里面说了,要求所有请求使用json(因为服务器代码只是简单使用了“app.use(require(‘koa-body’)());”),我看你应该是用form提交的,嵌套的解析除出了问题,请再用json提交一次。

@marching118 嗯,是的改成json就通过了. 我被request官方示例坑了, json: true这句话没用啊. node写得少.

本人亲身经历,哪怕是forFun也是受益匪浅,能大大增强对JS以及ES6的理解

const getNode = (id) => keys[id] ? Promise.resolve({ id, children: tree[id] || [] }) : Promise.resolve(null);

const getTree = id => { return getNode(id) .then( node => { return Promise.map(node.children, _c => {return getTree(_c)}) }) .then( children => ({ id: id, children: children })) }; 蛮有意思

@mario56 之前现场就是盼着有可以写出你这样的代码的人出现啊 要是 .then( node => { return Promise.map(node.children, _c => {return getTree(_c)}) }) 写成 .then( node => Promise.map(node.children, getTree)) 就更好看一些。

对我们有兴趣不?没有的话有没有人可以推荐给我们?

@mario56 后台看到你留下了神奇的记录,怎么做到的?

@marching118 不好意思。。估计把你们服务器搞坏了。在想怎么实现concurrency 限制为5。

@mario56 倒不是服务器坏了,主要是看你的提交在数据库显示运行了四个小时,并发是827,说明我的服务器代码里题目的超时应该是有问题,我只用了个setTimeout,竟然会有问题。

表示对“现场编程题目”就已经蒙圈了!自己太菜了

自己顶一下,我们还需要两个人

{“msg”:“thank you!”} 返回这个消息,应该是完成本题了。 说说几个要点吧: 1,生成树,这是对一个程序员算法功底的最基本的考核,包括深度优先,或者广度优先。 2,客户端 get/post 的调用,包括要处理 post 的数据要是 json 格式的 3,request 的次数是无法确定的,所以这为回调带来了更大的挑战,当然能用 promise 来实现肯定会更艺术 4,最后提交的报文中有中文的“测试”2字,不知道是楼主故意埋的坑,还是这本身就是一个考察点,中文会有计算 post 的 content-length产生影响 5,关于如何保证并发在5次以内,个人觉得可以用类似 async.limit 类似的算法。当然自己通过代码去控制并发的数量也不难。 总的来说,非常的新颖,有意思。 PS:小弟以前是搞java的,从0开始学node16个月。现在做了一个公众号,后台node+mysql+公众号API调用。

@liumoujie 说的很对啊。1,3,5是我计划的考察点。对于2和4其实并没有考虑到,因为我们允许使用现成的库(比如request)的。

说话算话,果然HR打电话来叫去面试^_^

是大四的学生可怎么办。。。

@l2xBrain 实习我们也欢迎的,可以先把题做了

很新颖的面试题目啊。

@178220709 嗨,哥们,我也遇到的同样的问题,你是怎么解决的。 ’’’ JSON.stringify({root:obj}) //obj是我的结果 ’’' 下面的是我的JSON串

{“root”:{“id”:“1”,“children”:[{“id”:2,“children”:[{“id”:4,“children”:[{“id”:11,“ children”:[{“id”:25,“children”:[]}]}]},{“id”:5,“children”:[{“id”:12,“children”:[ {“id”:26,“children”:[]},{“id”:27,“children”:[]}]},{“id”:13,“children”:[{“id”:28, “children”:[]}]},{“id”:14,“children”:[{“id”:29,“children”:[]}]},{“id”:15,“childr en”:[{“id”:30,“children”:[]},{“id”:31,“children”:[]},{“id”:32,“children”:[]},{“i d”:33,“children”:[]}]}]},{“id”:6,“children”:[{“id”:16,“children”:[{“id”:34,“chil dren”:[]},{“id”:35,“children”:[]},{“id”:36,“children”:[]}]}]},{“id”:7,“children” :[{“id”:17,“children”:[{“id”:37,“children”:[]},{“id”:38,“children”:[]}]},{“id”:1 8,“children”:[{“id”:39,“children”:[]},{“id”:40,“children”:[]}]}]}]},{“id”:3,“chi ldren”:[{“id”:8,“children”:[{“id”:19,“children”:[{“id”:41,“children”:[]},{“id”:4 2,“children”:[]},{“id”:43,“children”:[]}]},{“id”:20,“children”:[{“id”:44,“childr en”:[]},{“id”:45,“children”:[]},{“id”:46,“children”:[]}]},{“id”:21,“children”:[] }]},{“id”:9,“children”:[{“id”:22,“children”:[]},{“id”:23,“children”:[]}]},{“id”: 10,“children”:[{“id”:24,“children”:[]}]}]}]}}

@178220709 已经解决了。打扰了

现在还在招人么

早起练一发,并发控制挺有意思的,过去这么久了,不影响招聘吧:)

const request=require("request");
const co=require("zco");
const log=console;
const MAX_CONCURRENCY=5;
/**
 * 获取问题
 * */
const getQuestion=function () {
    return co(function *(next) {
        let option={
            "url":"http://hr.amiaodaifu.com:50000/1610/new-question",
            "method":"POST",
            "form":{
                "mail":"xxxxxxxx@163.com"
            }
        };
        let [err,res,body]=yield request(option,next);
        if(err){
            log.error(err,"获取题目失败");
            throw err;
        }
        return JSON.parse(body);
    })
}



/**
 * 一个简单的并发锁,基于node是单线程的实际
 * */
let ConcurrencyMutex=function (Max) {
    return {
        "current_running":0,
        "unLock":function () {
            this.current_running--;
            this._awake();
        },
        "lock":function () {
            this.current_running++;
        },
        "busy":function () {
            return this.current_running>Max-1;
        },
        "waitFree":function (callback) {
            this._reply_pool.push(callback);
            this._awake();
        },
        "_reply_pool":[],
        "_awake":function () {
            if(this.current_running<Max){
                let func=this._reply_pool.shift();
                if("function"==typeof func){
                    func();
                }
            }
        }
    }
}

const mutex=ConcurrencyMutex(MAX_CONCURRENCY);

/**
 * 获取子节点ID
 * */

const getChildren=function (question_id,parent_id) {
    return co(function *(next,defer) {

        defer(function *() {
            /**
             *释放锁
             * */
            mutex.unLock();
        });

        let option={
            "url":`http://hr.amiaodaifu.com:50000/1610/questions/${question_id}/get-children/${parent_id}`,
            "method":"GET"
        };

        /**
         * 并发控制,如果当前正忙,则等待
         * */

        if(mutex.busy()){
          yield mutex.waitFree(next);
        }

        mutex.lock();

        let [err,res,body]=yield request(option,next);
        if(err){
            log.error(err,"获取子节点失败");
            throw err;
        }
        return JSON.parse(body);
    });
}

const buildTree=function (question_id,parent_id) {
    return co(function *() {
          let [err,child_ids]=yield getChildren(question_id,parent_id);
          if(err){
              throw err;
          }
          if(child_ids.length==0){
              return [];
          }


          let tasks=child_ids.map(function (it) {
              return buildTree(question_id,it);
          });

          let [err2,subTrees]=yield co.all.apply(null,tasks);
        
          if(err2){
              throw err2;
          }

          return subTrees.map(function (it,index) {
            return {
                "id":child_ids[index],
                "children":it
            }
          });
    });
}
 
const answerQuestion=function () {
    return co(function *() {
        let [err,question]=yield getQuestion();
        
        if(err){
           throw err;
        }
        let root={
           "id":question.rootId,
           "children":""
        };
        let [err2,subtree]=yield buildTree(question.id,question.rootId);
        if(err2){
            throw err2;
        }
        root.children=subtree;
       
        return {
            "qustion_id":question.id,
            "root":root
        };
    });
}

answerQuestion()((err,answer)=>{
    if(err){
        console.log(err);
    }else{
        console.log(JSON.stringify(answer.root));
    }
});

@yyrdl 写的真不错,应该不影响,我已经不在这个公司了,这个帖子现在是历史了。

回到顶部