开源日报 每天推荐一个 GitHub 优质开源项目和一篇精选英文科技或编程文章原文,坚持阅读《开源日报》,保持每日学习的好习惯。
今日推荐开源项目:《韭(jiu)菜的自我修养 the-self-cultivation-of-leeks》
今日推荐英文原文:《Don’t be a one trick pony》

今日推荐开源项目:《韭(jiu)菜的自我修养 the-self-cultivation-of-leeks》传送门:GitHub链接
推荐理由:相信不少人对割韭菜这个词都或多或少的在某个地方听过,但是韭菜究竟指的是什么呢?实际上,韭菜这个词是从交易中产生的,而这个项目也介绍了如何去做交易,如何去选择等等,它们并不是只能用在交易上,很多时候这些规律能够应用在几乎任何地方,比如这一条——“自己做决定”。
今日推荐英文原文:《Don’t be a one trick pony》作者:Alexander Curtis
原文链接:https://medium.com/@alexc73/dont-be-a-one-trick-pony-7badad9da2d5
推荐理由:语言和框架终究是一个工具,而你不会希望你的工具箱里只有一个工具的。

Don’t be a one trick pony

I recently went to a conference where during one of the talks the speaker said “Some people say Javascript isn’t for Machine Learning. I’m here to tell you that it is….”

That got me thinking. Why are people so precious about which language can be used for a particular problem? Why focus on the language not the problem? Then I realised — we make a big investment when we learn a programming language, to the point where the language defines us. We think of ourselves as “Javascript developers,” “Java developers,” “Ruby developers.” It is the language, not the methodology nor the problem domain, that forms our identity as devs.

Imagine if learning a new programming language were trivial. If we could pick it up in half an hour. Then when someone says “Have you heard about this great new Tensor Flow library for machine learning” we don’t immediately think “curse those Python users, I want one in Javascript” we say “wow, let’s have a go!”

A few years ago recruiters were all on the lookout for “polyglot” developers — people who could program in more than one language. This seems to have waned, perhaps rightly so, but I do think there is great value in knowing several programming languages. Learning even one extra language broadens your horizons.

For example, if all you know is Javascript :
  1. You identify as a Javascript dev. Other people have their languages but this one is yours. You defend your language.
  2. The problems you solve are limited to JS problems. You probably do lots of web development, and not much embedded programming, for example.
  3. You aren’t seeing the full developer landscape. Did you know that 25% developers use Linux as their primary operating system? It’s installed on their laptops and that’s what they use to surf the web, read emails, write code, run apps. As a web dev you would be forgiven for thinking that everyone uses a Mac. In fact Linux and Mac each have 25% and Windows gets 50% of all devs.
  4. You run the risk of solving problems in a particular way. JS is great for event driven programming but that doesn’t fit every domain (for example writing an installation script in JS is more fiddly than in other languages.) Functional programming is having an influence, but many JS developers are still focused on objects, side effects, and imperative programming, unaware of the troubles they contain. You concentrate on unit tests, but may not have heard of generative testing.
It’s a pity that many conferences seek to differentiate themselves based on programming language. Several offer the same set of talks, but spun for their particular language. If you are looking for an idea for a talk, try some combination of “How to do (microservices, functional programming, machine learning, $TRENDY_TECHNOLOGY_X) in (Javascript, Ruby, Python, Java, $CONFERENCE_LANGUAGE_Y)”

Learning a new programming language isn’t difficult, it just takes time, and ideally a non-trivial project to work on to turn theory into practice. I think companies should offer this to their developers as part of their career development. It’s time we concentrated more on good software engineering and less on defending our choice of programming language.
下载开源日报APP:https://openingsource.org/2579/
加入我们:https://openingsource.org/about/join/
关注我们:https://openingsource.org/about/love/