编程风格是否重要?如何重要? [英] Is Programming Style important? How Important?

查看:162
本文介绍了编程风格是否重要?如何重要?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

去年,我对团队成员的代码进行了故障排除,缺少缩进和注释。我和他谈论告诉他这不是一个好主意,但他得罪了。他比我聪明,或者更有教育。



从那时起,我发现他应用到微软,当他们做了一个双向链表实现,他没有缩进或评论,说他没有时间担心风格。 (这是一封电子邮件提交,有2小时完成)



Microsoft没有打电话回来.....你认为他们如何回应,


div class =h2_lin>解决方案

没有程序员是一个岛。有人会有一天要读他们的代码。在此之前重复了很多次:


始终如同结束
的人维护代码一样是一个
的暴力精神病患者,他知道你
的存在位置。

- Martin Golding (也许) / p>

这就是说,如果他们的风格是足够的,还有其他更重要的事情要评估时雇用一个程序员。但是,如果他们完全拒绝使用评论或试图让他人的代码可读的别人,它是一个交易断路器。


Last year I was troubleshooting a team member's code and it was lacking indents and comments. I was talking to him about it telling him it was not a good idea but he got offended. He was/is smarter than me or certainly more educated.

Since then I found out he applied to Microsoft and when they had him do a doubly linked list implementation, he wrote it without indentation or comments, stating that he did not have time to worry about style. ( It was an email submission for which there were 2 hours to complete )

Microsoft did not call him back..... How do you think they responded, how would you respond?

Anyone from Microsoft on here that can suggest what they would do in this case?

解决方案

No programmer is an island. Someone is going to have to read their code one day. It's been repeated here many times before:

Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live. -- Martin Golding (maybe)

That said, if their style is adequate, there are other much more important things to evaluate when hiring a programmer. But if they utterly refuse to use comments or attempt to make their code readable to others, it is a deal-breaker.

这篇关于编程风格是否重要?如何重要?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆