add scripts
This commit is contained in:
parent
7ebbe78263
commit
5e69b171e3
@ -11,7 +11,7 @@ label common_chapter_2_1:
|
||||
|
||||
ShallowOut公司内,Linux开发组的[bl.name]坐在工位上专注地工作中。
|
||||
|
||||
这时,同事[zz.name]从旁边走了过来。
|
||||
同事[zz.name]从旁边走了过来。
|
||||
"""
|
||||
|
||||
zz "[bl.name],HR那边让你过去面试一下新人。"
|
||||
@ -19,26 +19,34 @@ label common_chapter_2_1:
|
||||
|
||||
bl "好好,我到时间就去。"
|
||||
|
||||
bl """
|
||||
(又到了这个时间啊。公司又要来新人了。)
|
||||
|
||||
(最近组里工作还真挺多的,希望能来一两个有点能力的新人顶一下啊。)
|
||||
"""
|
||||
公司又来新人了啊,希望面试顺利吧。
|
||||
"""
|
||||
|
||||
bl "时间到了,该去了。"
|
||||
|
||||
#play effect writing
|
||||
|
||||
label common_chapter_2_2:
|
||||
|
||||
scene bg interview
|
||||
with fade
|
||||
|
||||
"""
|
||||
午后3点,我的面试已经进行了一段时间了。
|
||||
|
||||
面试房间非常素净。白色的墙壁,素雅的白色灯光。
|
||||
|
||||
身处其中,不免地紧绷思绪,但也不至于紧张。
|
||||
"""
|
||||
|
||||
hr "请你简单介绍一下为什么会选择我们Linux开发部门吧。"
|
||||
w "因为我是SE专业的,想找一个对口的。"
|
||||
w "因为我是SE专业的,想找一个对口的工作,所以我选择了贵司的Linux开发部门。"
|
||||
|
||||
"""
|
||||
咚咚。。。
|
||||
|
||||
响起了两声敲门声,随即一个面色圆润的青年走了进来。看起来有些发福,但也不至于说胖。
|
||||
我回答完问题后,响起了两声敲门声。
|
||||
|
||||
门开后,一个面色圆润的青年走了进来。看起来有些发福,但也谈不上胖这个字。
|
||||
"""
|
||||
|
||||
hr "好的,我的面试部分就到这里了。"
|
||||
@ -47,18 +55,22 @@ label common_chapter_2_2:
|
||||
w "好的。"
|
||||
|
||||
"""
|
||||
我说话的同时点了点头,表示了解。那位青年则径直走到我面前的那个空座椅那里坐下。
|
||||
我说话的同时点了点头,表示了解。那位面试官则径直走到我面前的那个空座椅那里坐下。
|
||||
|
||||
我没有从他的眼神等各个方面读出他的任何感情。但也没有那种不怒自威的威压。感觉是一个很平和的人。
|
||||
|
||||
这就是我以后的同事吗?
|
||||
|
||||
我如此幻想着,但首先我得通过这场面试才可以。
|
||||
他没有那种久居职位的油腻感,相反,他给我的感觉是一个很平和的人。
|
||||
"""
|
||||
|
||||
bl "这位同学你好。"
|
||||
|
||||
"青年开口说话。但声音与我想象的略有出入,看着他圆润的体型,还以为说话的音调会更低一些。"
|
||||
"""
|
||||
面试官开口说话了,但声音与我想象的略有出入。
|
||||
|
||||
看着他的体型,我本以为他说话的音调会更低一些。
|
||||
|
||||
但事实并不是,他的声音非常的普通,言语中满是和外形不符的感受。
|
||||
"""
|
||||
|
||||
bl "那我们之间的面试现在就开始了。"
|
||||
|
||||
if is_open_source_project:
|
||||
bl "你的简历上写着参加过一些开源软件的开发,可以简单介绍一下吗?"
|
||||
@ -68,20 +80,20 @@ label common_chapter_2_2:
|
||||
"""
|
||||
第一个问题猝不及防地抛了过来。
|
||||
|
||||
不行不行,我要专注于眼前的面试。
|
||||
不行不行,不能再关注面试官了,我要专注于眼前的面试。
|
||||
|
||||
没想到一上来就针对我简历里的项目经历发问,我该怎么回答才好?
|
||||
"""
|
||||
|
||||
# lose 1 point:
|
||||
# - use template
|
||||
# get 1 point:
|
||||
# - truth introduction & open source project
|
||||
# not changed:
|
||||
# - truth introduction & embedded project
|
||||
# switch 1: how to introduce your project written in CV
|
||||
menu switch_project_introduce:
|
||||
"背诵模板糊弄过去":
|
||||
# decrease bl score
|
||||
$ bl_score -= 1
|
||||
# set wrong answer
|
||||
$ is_wrong_switch_project_introduce = True
|
||||
|
||||
# use different answer for different project
|
||||
if is_open_source_project:
|
||||
w """
|
||||
好的面试官,我简单介绍一下我参与的这些开源项目。
|
||||
@ -107,10 +119,11 @@ label common_chapter_2_2:
|
||||
。。。(略)
|
||||
"""
|
||||
|
||||
# but use the same monologue
|
||||
"""
|
||||
我不紧不慢地按照面试模板套路一路背诵了下来。自我感觉滴水不漏,还好来之前有复习这个。
|
||||
|
||||
背诵完模板后,我稍微观察了一下青年的表情。
|
||||
背诵完模板后,我稍稍观察了一下面试官的表情。
|
||||
|
||||
说不上有什么负面情感,但也完全没有对我回答满意的意思。
|
||||
|
||||
@ -118,8 +131,14 @@ label common_chapter_2_2:
|
||||
"""
|
||||
|
||||
"认真介绍":
|
||||
# set correct answer
|
||||
$ is_wrong_switch_project_introduce = False
|
||||
|
||||
# use different answer and monologue for different project.
|
||||
if is_open_source_project:
|
||||
# only open source project and increase bl score.
|
||||
$ bl_score += 1
|
||||
|
||||
w """
|
||||
好的面试官,我简单介绍一下我参与的这些开源项目。
|
||||
|
||||
@ -135,7 +154,7 @@ label common_chapter_2_2:
|
||||
|
||||
但这是面试,所以我尽可能精简地说明我的这些开源工程。尽可能让面试官了解到他可能感兴趣的部分。
|
||||
|
||||
我稍微观察了下青年的表情,似乎与进来时的心情有所不同。
|
||||
我稍稍观察了下面试官的表情,似乎与进来时的心情有所不同。
|
||||
|
||||
虽然他的面目上仍然没有显露出任何明显的情绪。但他的眉宇在我回答后稍微舒展了一些。
|
||||
|
||||
@ -155,7 +174,7 @@ label common_chapter_2_2:
|
||||
"""
|
||||
我对介绍学校的课设毫无信心,我确信它不可能吸引到面试官,但我还是得硬着头皮介绍。
|
||||
|
||||
介绍完毕,我稍微观察了下青年的表情。
|
||||
介绍完毕,我稍微观察了下面试官的表情。
|
||||
|
||||
毫无变化。
|
||||
|
||||
@ -164,13 +183,9 @@ label common_chapter_2_2:
|
||||
可能他对此并不感兴趣,只是例行一问吧。
|
||||
"""
|
||||
|
||||
# if user choose open source project, it will answer correctly,
|
||||
# otherwise it will answer wrongly.
|
||||
# lose 1 point:
|
||||
# - answer wrongly
|
||||
if not is_open_source_project:
|
||||
$ bl_score -= 1
|
||||
|
||||
# switch 2: how to answer project question
|
||||
# there is no manual switch.
|
||||
# this switch is done automatically by previous switch.
|
||||
if is_open_source_project:
|
||||
bl "好的,那既然你编写了这些开源项目,可以说一下这些项目用的是什么构建系统吗?"
|
||||
w "我的这些项目都是在Windows上运行的。因此使用的是Visual Studio。"
|
||||
@ -178,14 +193,14 @@ label common_chapter_2_2:
|
||||
bl "好的,那既然你参与了这个项目,可以说一下这个项目用的是什么构建系统吗?"
|
||||
w "不好意思,我不太清楚。"
|
||||
bl "不太清楚?"
|
||||
"也许是我的回答在他的意料之外,青年换了一个姿势,并以疑惑的语句反问我。"
|
||||
"也许是我的回答在他的意料之外,面试官换了一个姿势,并以疑惑的语句反问我。"
|
||||
bl "你涉及到编写项目的代码了吗?"
|
||||
w "有的。"
|
||||
bl "那你是你用什么编写代码的?"
|
||||
w "打开编辑器编码"
|
||||
bl "什么编辑器?"
|
||||
w "Visual Studio"
|
||||
"青年提问的语速越来越快,言语间透露出一丝不耐烦。"
|
||||
"面试官提问的语速越来越快,言语间透露出一丝不耐烦。"
|
||||
|
||||
bl "好的,现在假设我们有一个main.cpp的文件,里面有一个写好的hello world程序。"
|
||||
bl "那么我需要怎么做才可以将它变成一个可执行文件?"
|
||||
@ -199,42 +214,45 @@ label common_chapter_2_2:
|
||||
具体的使用方法我不太清楚,但可以查手册。
|
||||
"""
|
||||
|
||||
"青年微微点了点头,他似乎对我的回答还算满意。"
|
||||
"虽然只有那么一瞬,面试官微微点了点头,他似乎对我的回答还算满意。"
|
||||
else:
|
||||
w "直接编译。"
|
||||
bl "你说的编译是指打开Visual Studio,创建项目,导入文件,点击编译按钮?"
|
||||
w "是的。"
|
||||
bl "这也是步骤的一部分,你刚才应该把我说的这些描述出来的。"
|
||||
"青年言语中透露着不满,看来我回答的实在是太差了。"
|
||||
"面试官言语中透露着不满,看来我回答的实在是太差了。"
|
||||
w "对不起,是我的问题。"
|
||||
"我不知道该如何是好,嘴里不自觉地冒出来道歉的话语。"
|
||||
"青年看起来也没有心思继续这个话题了。"
|
||||
"面试官看起来也不耐烦了,没有心思继续这个话题了。"
|
||||
|
||||
# lose 1 point:
|
||||
# - answer correctly
|
||||
# get 1 point:
|
||||
# - answer wrongly
|
||||
# switch 3: build on linux
|
||||
bl """
|
||||
那好,我们换一个问题。
|
||||
我们换一个问题。
|
||||
|
||||
如你所知,我们是Linux开发部门,我们未来会在Linux下进行编程工作。
|
||||
如你所知,我们是Linux开发部门,我们未来会在Linux下进行编程工作,Linux下没有Visual Studio可以用。
|
||||
|
||||
Linux下没有Visual Studio可以用,那么还是刚才那个问题。
|
||||
|
||||
我们有一个写好的hello world程序放在main.cpp的文件里面。
|
||||
那么还是刚才那个问题,我们有一个写好的hello world程序放在main.cpp的文件里面。
|
||||
|
||||
我需要怎么做才可以将它变成一个可执行文件?
|
||||
"""
|
||||
|
||||
menu switch_linux_build:
|
||||
"直接make":
|
||||
# decrease bl score and set wrong answer
|
||||
$ bl_score -= 1
|
||||
$ is_wrong_switch_linux_build = True
|
||||
|
||||
# say dialog
|
||||
w "执行make"
|
||||
bl "这个文件夹下就一个main.cpp,没有别的文件,就直接执行make就可以了吗?"
|
||||
w "是"
|
||||
|
||||
"先编写编译脚本":
|
||||
# increase bl score and set correct answer
|
||||
$ bl_score += 1
|
||||
$ is_wrong_switch_linux_build = False
|
||||
|
||||
# say dialog
|
||||
w """
|
||||
先编写相应的编译脚本。
|
||||
|
||||
@ -245,6 +263,7 @@ label common_chapter_2_2:
|
||||
比如Makefile就执行make,CMakeLists.txt就先执行cmake进行配置,再执行make等。
|
||||
"""
|
||||
|
||||
# switch 4: output in GNU make
|
||||
bl """
|
||||
好的,下一个问题。
|
||||
|
||||
@ -258,7 +277,7 @@ label common_chapter_2_2:
|
||||
"""
|
||||
|
||||
"""
|
||||
青年转过桌旁的那部笔记本,指了指,暗示我可以过去。
|
||||
面试官转过桌旁的那部笔记本,指了指,暗示我可以过去。
|
||||
|
||||
我带着椅子移动到电脑面前,打开浏览器开始查询。
|
||||
|
||||
@ -266,42 +285,146 @@ label common_chapter_2_2:
|
||||
"""
|
||||
|
||||
menu switch_make_output:
|
||||
"aa":
|
||||
"std::fputs(stdout, \"666\\n\")":
|
||||
# decrease bl score and set wrong answer
|
||||
$ bl_score -= 1
|
||||
$ is_wrong_switch_make_output = True
|
||||
# say dialog
|
||||
w """
|
||||
使用vi打开文件写一个C++的hello world。
|
||||
|
||||
w ""
|
||||
然后把C++的hello world输出改成666。
|
||||
|
||||
"bb":
|
||||
然后按:wq编译。
|
||||
"""
|
||||
|
||||
w ""
|
||||
bl "那你知道:wq是什么意思吗?"
|
||||
w "w是保存,q不知道"
|
||||
|
||||
"$(info \"666\")":
|
||||
# increase bl score and set correct answer
|
||||
$ bl_score += 1
|
||||
$ is_wrong_switch_make_output = False
|
||||
# say dialog
|
||||
w """
|
||||
打开编译脚本文件Makefile。
|
||||
|
||||
然后在正确的位置,一般是目标下,添加$(info \"666\")语句来输出。
|
||||
|
||||
输出字符串可以根据需要任意替换。
|
||||
"""
|
||||
|
||||
"message(NOTICE \"666\")":
|
||||
# this is CMake output method, not GNU make.
|
||||
# it's correct but not suit for this question.
|
||||
# so bl score is not changed, but set answer is correct.
|
||||
$ is_wrong_switch_make_output = False
|
||||
# just say dialog
|
||||
w """
|
||||
打开编译脚本文件CMakeLists.txt。
|
||||
|
||||
然后需要输出的部分添加message(NOTICE \"666\")语句来输出。
|
||||
|
||||
输出字符串可以根据需要任意替换。
|
||||
"""
|
||||
|
||||
# switch 5: online search
|
||||
bl "好的,那假设我现在不知道make的用法,我应该怎么查?"
|
||||
menu switch_online_search:
|
||||
"去CSDN查询":
|
||||
|
||||
w ""
|
||||
|
||||
$ bl_score -= 1
|
||||
$ is_wrong_switch_online_search = True
|
||||
w "去CSDN查询,或者稀土掘金,简书之类的。"
|
||||
"去博客园查询":
|
||||
$ is_wrong_switch_online_search = False
|
||||
w "去cnblog博客园查询。"
|
||||
"去Stack Overflow查询":
|
||||
$ bl_score += 1
|
||||
$ is_wrong_switch_online_search = False
|
||||
w "当然是去Stack Overflow查询。"
|
||||
|
||||
w ""
|
||||
|
||||
|
||||
# switch 6: offline search
|
||||
bl "那假如公司断网了,但是可以访问当前系统仓库的所有软件包,那我有办法查询吗?"
|
||||
menu switch_offline_search:
|
||||
"应该是去软件仓库查询":
|
||||
|
||||
w ""
|
||||
|
||||
"应该直接去去软件仓库查询":
|
||||
$ bl_score -= 1
|
||||
$ is_wrong_switch_offline_search = True
|
||||
w "应该是去软件仓库,直接能查到。"
|
||||
"应该使用man命令查询":
|
||||
$ bl_score += 1
|
||||
$ is_wrong_switch_offline_search = False
|
||||
w "使用man指令,后面跟上想要查询的内容。"
|
||||
bl "man这个软件很复杂,我不会用怎么办?"
|
||||
w "那可以直接使用man man指令,用man来查看man的使用方法。"
|
||||
|
||||
w ""
|
||||
bl "。。。"
|
||||
bl "我这边的面试就结束了。"
|
||||
|
||||
label common_chapter_2_1:
|
||||
"""
|
||||
面试官沉思了几秒钟后向我如此说道。我并不知道他在思考什么,也许是我的面试是否合格吧。
|
||||
|
||||
面试官在我回答最后几个问题的时候没有任何回应,只是单纯地提问,也不知道我的回答是不是正确的。
|
||||
|
||||
面试官对我说完后就转向旁边的来自HR的面试官,看来是在征求他的意见。
|
||||
"""
|
||||
|
||||
hr "那这次的面试就先到这里,你可以回去等通知了。"
|
||||
|
||||
"""
|
||||
来自HR的面试官没有什么犹豫,结束了这次面试。
|
||||
|
||||
看来部门职员的面试是最后一部分。
|
||||
"""
|
||||
|
||||
w "谢谢面试官。"
|
||||
|
||||
"""
|
||||
我起身感谢了面试官。
|
||||
|
||||
做了一个标准的退场程序后,我离开了ShallowOut面试间,结束了我的面试。
|
||||
"""
|
||||
|
||||
label common_chapter_2_3:
|
||||
|
||||
scene bg office
|
||||
with fade
|
||||
#scene overlay another view
|
||||
|
||||
bl "唉,这面试面的我头大啊。"
|
||||
bl "还是摸鱼睡觉吧。"
|
||||
if is_entering_branch_good():
|
||||
bl """
|
||||
来面试的这个人看起来不错啊。
|
||||
|
||||
虽然有些地方说的不是很完美,但是总体来说比那些培训班出来的好太多了。
|
||||
|
||||
招进来稍微调教一下也许就可堪大用了。
|
||||
|
||||
也许我可以和他单独再联系联系。
|
||||
"""
|
||||
else:
|
||||
bl "唉,这面试面的我头大啊。"
|
||||
bl "这人真的是SE专业的吗,怎么感觉在面试小白。"
|
||||
|
||||
if is_wrong_switch_make_output:
|
||||
bl """
|
||||
:wq什么时候成编译按钮了?
|
||||
|
||||
编译日志为什么要去改C++的输出?
|
||||
|
||||
唯一勉强说得过去的是还知道wq的w是写入的意思。
|
||||
"""
|
||||
if is_wrong_switch_online_search:
|
||||
bl """
|
||||
查询make用法,稀土掘金和简书就先不说了,CSDN?
|
||||
|
||||
你是几个意思?最不济也得是cnblog博客园吧。
|
||||
"""
|
||||
if is_wrong_switch_offline_search:
|
||||
bl """
|
||||
我问你软件仓库里怎么查用法,你跟我说在软件仓库里查。
|
||||
|
||||
你是在问我吗?
|
||||
"""
|
||||
|
||||
bl "跟你这样的人在一起怎么能搞好Linux开发!?"
|
||||
|
||||
return
|
||||
|
@ -12,11 +12,17 @@ default is_open_source_project = False
|
||||
default open_source_switch_counter = 0
|
||||
default bl_score = 0
|
||||
|
||||
default is_wrong_switch_project_introduce = False
|
||||
default is_wrong_switch_linux_build = False
|
||||
default is_wrong_switch_make_output = False
|
||||
default is_wrong_switch_online_search = False
|
||||
default is_wrong_switch_offline_search = False
|
||||
|
||||
init python:
|
||||
def is_entering_branch_good() -> bool:
|
||||
return bl_score >= 2
|
||||
return bl_score >= 4
|
||||
def is_entering_branch_normal() -> bool:
|
||||
return bl_score > 0 and bl_score < 2
|
||||
return bl_score > 0 and bl_score < 4
|
||||
def is_entering_branch_bad() -> bool:
|
||||
return bl_score < 0
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user