程序员 写作_如何经常写作可以使您成为更好的程序员

程序员 写作

I’ve been coding professionally for around 5 years now and I’ve continued to work on my writing for more or less the same amount of time, although in a much smaller capacity. In this time, I’ve learnt to see some key similarities between the two crafts. Despite how different the two fields seem on the surface, I truly believe that working on my writing skills continues to have a spill over effect on my how I think about code as well.

我从事专业编码已有大约5年的时间,尽管工作量要小得多,但我继续从事写作工作的时间大致相同。 这一次,我学会了看到这两种Craft.io之间的一些关键相似之处。 尽管从表面上看这两个领域有多么不同,但我确实相信,在写作技巧方面的工作仍然会继续影响我对代码的看法。

Although they sit on the opposite ends of the spectrum of how creative/technical they are, at their core, writing and programming are both fundamentally about communication — only with vastly different audiences.

尽管他们处于创造力/技术水平的相反端,但从本质上讲,写作和编程都是与沟通有关的,而仅仅是与非常不同的受众交流。

As a writer, I’ve learnt, your job is to communicate your thoughts and ideas in a way that is digestible by a broad audience. You need to lay down your arguments, or construct your story, so that it flows effortlessly from start to finish. Your writing needs to be clear and concise, without too many unnecessary deviations. The golden rule of writing, we’re told, is to keep things simple, and that less is always more.

作为一名作家,我了解到,您的工作是通过广泛的读者可以理解的方式交流您的思想和观念。 您需要放下您的论据或构建您的故事,以便故事从头到尾毫不费力地进行。 您的文字必须简洁明了,没有太多不必要的偏差。 有人告诉我们,写作的黄金法则是保持简单, 少即是多

Programming is quite similar, once you appreciate who your audience actually is. 9 times out of 10, your target audience isn’t a computer but rather the people reading your code. Your teammates. People who will maintain your code years down the line. And as bizarre as it sounds, maybe even your own future self. I’m frankly embarrassed by the number of times I’ve read my own code only a couple of weeks after writing it and completely failed to understand any of it.

一旦欣赏了观众的真实身份,编程就非常相似。 十分之九的受众不是计算机,而是阅读代码的人。 您的队友。 那些将您的代码维护多年的人。 听起来很奇怪,甚至可能是您自己未来的自我。 坦白地说,我在编写代码仅几周后才阅读自己的代码,却完全无法理解其中的任何内容,这让我感到尴尬。

A huge part of your job as a software developer is to write code that is easy to understand for someone with absolutely no prior context. Often, your goal is to model entities in the real world through programming concepts and architectures.

作为软件开发人员,工作的很大一部分是编写对于绝对没有先验背景的人来说易于理解的代码。 通常,您的目标是通过编程概念和体系结构为现实世界中的实体建模。

Programming languages are, after all, languages. They define a syntax and a vocabulary, just like real life languages. They give you a large set of tools to work with when building your applications. And it is your responsibility to find the best possible constructs and syntax to express your logic every step of the way. Just like you would find the right words when expressing yourself through your writing.

毕竟,编程语言是语言 。 它们定义语法和词汇,就像现实生活中的语言一样。 它们为您提供了构建应用程序时要使用的大量工具 您有责任找到最佳的结构和语法来表达您的逻辑。 就像您通过写作表达自己时会找到正确的单词一样。

Now, I’m not suggesting that you get Stephen King to write your next Super Scalable Million Dollar App. Nor am I suggesting that software developers should suddenly abandon their careers and pursue becoming a NYT bestselling author. I don’t want to minimize the importance of writing high performant code, architecting and managing complex systems, or possessing specialized technical knowledge — all of which require years, if not decades, of experience. And all of which contribute to being an effective developer.

现在,我不建议您让Stephen King编写您的下一个超级可扩展百万美元应用程序。 我也不建议软件开发人员突然放弃他们的职业,而成为纽约时报的畅销书作者。 我不想最小化编写高性能代码,架构和管理复杂系统或拥有专门技术知识的重要性,而所有这些都需要数年甚至数十年的经验。 所有这些都有助于成为一名有效的开发人员。

But I do believe that having a mental model for good code serves as a great foundation. And I believe that writing of any form helps reinforce that mental model. Especially when you’re in the weeds and writing code day in and day out. And often times, high performing code doesn't necessarily equal ugly code. There are usually ways of striking a compromise between the two. But you do have to actively strive towards it.

但我确实相信,拥有良好代码的思维模型可以为您奠定良好的基础。 而且我相信,任何形式的写作都有助于巩固这种思维模式。 特别是当您在杂草丛中并日复一日编写代码时。 通常,高性能代码不一定等于丑陋的代码。 通常 ,有两种方法可以在两者之间达成折中。 但是您必须积极地朝着它努力。

Ultimately, in order to do either of these two things well, you need to develop clarity in your thought. And that is something that sticks with you, regardless of what you do. I’ve definitely found writing to be a valuable asset for me in a lot of different ways, and I’d encourage more people to dabble with it!

最终,为了做好这两件事中的任何一项,您需要在思路上变得清晰。 是什么,与你棒,不管你做什么。 我肯定已经发现写作对我来说是一种宝贵的财富,可以通过许多不同的方式来实现,并且我鼓励更多的人涉猎它!

On a semi related note, it’s usually insights like these that make me value diversity in the workforce, especially engineering. We tend to think of engineering as a highly technical profession with little to no room for creativity. But that isn’t entirely true. Folks with creative backgrounds often bring their own unique experiences and intuition and are probably even more uniquely positioned to contribute to the product as a whole.

从半相关的角度来看,通常是这些洞察力使我珍视劳动力(尤其是工程技术)的多样性。 我们倾向于将工程学视为一项高科技行业,几乎没有创造空间。 但这并非完全正确。 具有创作背景的人们通常会带来自己独特的体验和直觉,甚至可能在为整个产品做出贡献方面处于更加独特的地位。

Unsurprisingly, my go to book recommendation for new developers (but also for programmers of any skill level, really) is Clean Code, by Robert Martin. Highly recommend you check it out.

毫不奇怪,我为新开发人员(实际上也包括任何技能水平的程序员)推荐的书是Robert Martin的Clean Code 。 强烈建议您检查一下。

翻译自: https://levelup.gitconnected.com/how-writing-more-often-can-make-you-a-better-programmer-46694d75225

程序员 写作

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值