做IT,需要一种情怀,thougthworks

Martin Flower & thougthworks

我打算聊一聊我对Martin Flower的崇拜,以及对thougthworks的向往。

还是2016年年底的时候,公司的栋神指导我去学习一本书: 《重构:改善既有代码的设计》

它的作者 Martin Flower,我相信大家都不陌生,如果你和我一样,喜欢简约,喜欢java,一定读过它。这是一本对我影响很深的一本书,它不只是告诉我如何去写代码,而教会了我如何去慢慢提升自己的代码能力,更更要的是指导了我一种思维方式。

伴随书的追随,我看了Martin Flower的很多博客和文章 (博客: https://martinfowler.com/)。

除此之外,我后续又读了它的《UML精粹》,这本书市场上已经没有卖的了,虽然讲的是UML 1.0的知识,但是由于Martin对我的影响,我去淘宝影印了这本书。

后来,得知Marin去了thougthworks公司做了首席科学家,就引起了我对于thougthworks的好奇。

thougthworks有很强大的博客,里边满满的知识,特别让人陶醉。

每年公司组织去的技术大会,比如CSDN、TOP100等等,我都会看到thougthworks的技术雷达图,它也伴随着我技术的成长和眼界的开阔。

从此便爱上了Martin Flower和它所在的公司 thougthworks。

我一直以为thougthworks只有在西安和武汉才有,因为在天津,离它们实在太远了。每每冲动的想去,都又放弃了。

偶然的机会,我在BOSS直聘中看到了thougthworks的名字,鼓起勇气联系了HR小MM。 这样才有了我去北京的面试经历。

面试过程

HR电话沟通

2018.05.30,下午5点,我接到了HR的电话沟通。聊的很愉快。 时间大概40分钟。

问题如下:

1. 你现在在天津,为什么考虑来北京?
2. 你所在的公司职位是什么?
3. 为什么想来thougthworks?
4. 你希望thougthworks能给你带来什么?
5. 你觉得你如何领导项目人员的?
6. 你在项目上,你觉得最有突破的事情是什么?
7. 如果你来thougthworks,你希望的薪资是多少?

HR小MM说是要占用半个小时的时间,可能聊的太兴奋了,我们聊了40+分钟。
对于问题的回答,我还是比较满意的。

homework

2018.05.31,我收到了HR发来的homework,就是给你一个课下的作业,让你按照自己的思维方式和逻辑完成功能,一共有三道题,任选一个。

因为我比较相信我的能力,所以我只看了第一题,然后就开始写了。

当然因为工作原因,我只能在周日(2018.06.03)写了。

从开始到结束,一共花了6个小时左右(早上9点-下午3点),写好后,我就提交了答案。当然,题目不难,但是需要重构几次的。

我选的题目如下:

Problem one: Trains

The local commuter railroad services a number of towns in Kiwiland.  Because of monetary concerns, all of the tracks are 'one-way.'  That is, a route from Kaitaia to Invercargill does not imply the existence of a route from Invercargill to Kaitaia.  In fact, even if both of these routes do happen to exist, they are distinct and are not necessarily the same distance!

The purpose of this problem is to help the railroad provide its customers with information about the routes.  In particular, you will compute the distance along a certain route, the number of different routes between two towns, and the shortest route between two towns.

Input:  A directed graph where a node represents a town and an edge represents a route between two towns.  The weighting of the edge represents the distance between the two towns.  A given route will never appear more than once, and for a given route, the starting and ending town will not be the same town.

Output: For test input 1 through 5, if no such route exists, output 'NO SUCH ROUTE'.  Otherwise, follow the route as given; do not make any extra stops!  For example, the first problem means to start at city A, then travel directly to city B (a distance of 5), then directly to city C (a distance of 4).
The distance of the route A-B-C.
The distance of the route A-D.
The distance of the route A-D-C.
The distance of the route A-E-B-C-D.
The distance of the route A-E-D.
The number of trips starting at C and ending at C with a maximum of 3 stops.  In the sample data below, there are two such trips: C-D-C (2 stops). and C-E-B-C (3 stops).
The number of trips starting at A and ending at C with exactly 4 stops.  In the sample data below, there are three such trips: A to C (via B,C,D); A to C (via D,C,D); and A to C (via D,E,B).
The length of the shortest route (in terms of distance to travel) from A to C.
The length of the shortest route (in terms of distance to travel) from B to B.
The number of different routes from C to C with a distance of less than 30.  In the sample data, the trips are: CDC, CEBC, CEBCDC, CDCEBC, CDEBC, CEBCEBC, CEBCEBCEBC.

Test Input:
For the test input, the towns are named using the first few letters of the alphabet from A to D.  A route between two towns (A to B) with a distance of 5 is represented as AB5.
Graph: AB5, BC4, CD8, DC8, DE6, AD5, CE2, EB3, AE7
Expected Output:
Output #1: 9
Output #2: 5
Output #3: 13
Output #4: 22
Output #5: NO SUCH ROUTE
Output #6: 2
Output #7: 3
Output #8: 9
Output #9: 9
Output #10: 7

做法,也比较简单,去看一下有向图的知识就可以解出来了。

如果从学习的角度(不是专门对thougthworks面试使用),你想要我的源码,进行学习,可以发邮件找我要(dreamfly@126.com)。

Pair Coding

2018.06.04,我接到了thougthworks的Office Interview通知,我们约了周三(2018.06.06)下午3点面试。

我到了之后,简单的介绍后,来了一个精神的小伙,要和我一起Pair Coding.

当然,先是对于我的代码(之前的homework),让我讲解一下,然后它拿出了我选的题目的后续功能,要求我们一起30分钟之内完成。

题目大概意思如下:
站台之间,每到一站要停2分钟,每个路程距离要花费1分钟,然后重新计算homework的十道题。

很庆幸的是,我和他聊的很顺利,并且我做的很快,他也给了我一写比较好的建议,比如如何重构现有的代码。

我们一起讨论了几个问题:

  1. 类的命名问题
  2. thougthworks是TDD导向的,如何TDD的去写程序
  3. 是否可以使用新的技术,比如jdk8的stream进行重构
  4. 常量是否可以见名知意
  5. 全局变量有线程安全问题,是否可以通过线程栈进行解决

这个面试也是我对整个面试流程最满意的面试环节了。

senior java 远程视频面试

pair coding之后,紧接着是远程的senior javaer进行面试。

我们讨论了如下问题:

  1. JVM 的 minorGC和fullGC会产生什么问题? 如何进行优化?
  2. 微服务的事件驱动,事件源的变化,如何控制?
  3. 团队scrum是如何实施的?
  4. 老系统如何想微服务进行转型的? 如何规划的?
  5. 如何解决I/O密集型以及CPU密集型应用的瓶颈?
  6. 如何使用并发解决效率问题?
  7. 数据一致性如何保证?

还有很多问题,都围绕比较高层级的问题进行讨论的。

这次讨论安排时间是1小时30分钟。 我再次超时了,HR过来提醒了2次,我们的面试才算结束。

HR聊天

最后一轮面试,HR过来找我谈谈刚才的面试流程,问我一些问题:

  1. 整个的面试流程你感觉怎么样?有哪里觉得不行的?
  2. 你想在thougthworks做什么?
  3. 你的职业规划是什么?
  4. 你为什么想来thougthworks?
  5. 你平时的工作和学习是如何提高的?
  6. 你期望的薪资是多少?

和HR聊完之后,终于结束了整个thouthworks的行程。

面试通过

转天(2018.06.07),我接到了HR的电话。问了我两个问题:

  1. 可以给的薪资是30W/年,你可以接受吗?
  2. 先做开发,2年后转咨询,可以吗?

对于这两个问题,我都是拒绝的。一个是薪资没有达到预期,第二个是2年时间转咨询,时间太长。

HR让我再想一下,然后做决定。

经过几天的思想斗争,今天(2018.06.11),我还是发微信委婉解决了thougthworks的邀请。

结束语

我从没去北京面试过,更没想去北京找工作,这是我第一次,也是唯一一次,为了想去的一家公司而去外地面试。

这次面试的经历,我认为是对martin flower的一种崇拜,也是对thougthworks的一种向往。

所以,

做IT,需要一种情怀!

坚持原创技术分享,您的支持将鼓励我继续创作!