2014-04-25 00:41
题目:怎么测试一支笔?(Pen?您老说的是钢笔?)
解法:这种简约而不简单的题目,实在是面试官最喜欢,面试者最头疼的类型了。面试官可以只花三秒,以一种灰常高贵冷艳的语气甩出这道题。然后头疼脑热的就是你了。怎么做呢?Brainstorming,找特征,分解问题,关联问题和特征,然后按规矩解题。我个人觉得这类题其实不是考察创意,而是考察发现问题、分析问题、解决问题的思路是否够清晰,就算解不出来也没事的。
代码:
1 // 12.5 How would you test a pen? 2 // Answer: 3 // 1. A pen uses ink. 4 // 2. A pen usually writes on paper. 5 // 3. The volume of ink in the pen is usually small. 6 // 4. Sometimes when the pen is used for too long, we wash the pen with water and dry it. 7 // 5. When drawing ink from the ink bottle, we squeeze the ruber tube and releases it to draw the ink up into the pen. 8 // Above all the things, there are a few things to be tested: 9 // 1. the ruber tube which contains the ink. 10 // 1.a. is it elastic enough? 11 // 2. a very thin pipe, from which ink flows into the pen. 12 // 2.a. is it easily blocked? 13 // 2.b. does it break easily? 14 // 3. the upper cover, which protects the ruber tube inside it. 15 // 3.a. can the whorl fit tight? 16 // 3.b. is the cover firm enough? does it crack easily? 17 // 4. the tip of the pen, through which the ink flow out. 18 // 4.a. it is actually a pipe, does it block easily? 19 // 4.b. write it on different paper textures, does it write smoothly? 20 // 4.c. it is steel, does it rust easily? 21 int main() 22 { 23 return 0; 24 }
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· AI与.NET技术实操系列(二):开始使用ML.NET
· 记一次.NET内存居高不下排查解决与启示
· 探究高空视频全景AR技术的实现原理
· 理解Rust引用及其生命周期标识(上)
· 浏览器原生「磁吸」效果!Anchor Positioning 锚点定位神器解析
· 全程不用写代码,我用AI程序员写了一个飞机大战
· DeepSeek 开源周回顾「GitHub 热点速览」
· 记一次.NET内存居高不下排查解决与启示
· MongoDB 8.0这个新功能碉堡了,比商业数据库还牛
· .NET10 - 预览版1新功能体验(一)