开源日报 每天推荐一个 GitHub 优质开源项目和一篇精选英文科技或编程文章原文,坚持阅读《开源日报》,保持每日学习的好习惯。
今日推荐开源项目:《新的力量 public-apis》
今日推荐英文原文:《How to choose a programming language?》

今日推荐开源项目:《新的力量 public-apis》传送门:GitHub链接
推荐理由:在开发软件的时候兴许会需要一些特殊的功能,比如说发一张猫的图片之类的,在不是用于自己学习而是以做出成果为优先的时候,兴许借用现成的会更加节省时间一些。这个项目就是一些可以用在软件开发中的 api,比如各种动物图片和日程表这些,兴许这里面有一些正好是在开发中用得上的。
今日推荐英文原文:《How to choose a programming language?》作者:Kamil Lelonek
原文链接:https://blog.lelonek.me/how-to-choose-a-programming-language-7805da7ec588
推荐理由:决定选择什么编程语言的各种因素

How to choose a programming language?

If you are here, there’s a big chance that, during your career, you’ve been wondering at least once what language you should pick. Or maybe you’ve been even thinking about it before actually starting your programming life. It’s good to have you here then.

I personally do that often (maybe even too much) and I don’t only think about it but I try many different technologies in practice with better or worse results.

Over the last couple of years, I used the following languages:
  • Bash
  • IBM RPG
  • Java
  • Scala
  • C#
  • C++
  • Ruby
  • JavaScript, CoffeeScript
  • Clojure
  • Objective-C
  • Elixir
  • GO
And by using I don’t mean just going through some tutorials but, at least, working for a full year commercially and building one production project.

If I considered some pet-applications, student projects, bootcamps, and workshops, I could count in even more:
  • Pascal
  • PHP
  • Swift
  • Kotlin
  • Groovy
  • Python
  • TypeScript
  • Crystal
  • OCaml
  • MATLAB
  • Visual Basic
  • Solidity

Having said that, I believe I can present my opinion regarding picking a new programming language and the most important aspects worth to consider.

Moreover, according to CliftonStrengths assessment, I’m pretty good at analyses so I feel even more competent in that area:


I’ll give you a checklist, a set of questions to be asked by yourself about any new technology you want to start learning.

Adoption

  • What kind of companies use it?
  • In what areas it is being used exactly?
  • What is its general purpose?
You have to consider what field is a particular technology used in. Maybe this is mostly automotive (e.g. C++), ML/AI (Python), low-level and server-related things (GO), web applications (Ruby), enterprise projects (Java/C#) and so on.

You need to think what your interests are, whether you want to work in startups, small software houses, big corporations, fin-techs or governmental organizations and find suitable technologies there.

If you see that, for example, .NET is mostly used in corporate areas, but you prefer small companies, you may want to consider Ruby instead.

Community

Developers



Have you ever wondered how many developers of a particular technology are out there? Are there many people using Rust or F#? Have you ever thought why it matters? Let me explain — to get support from others.

From what I see, lots of programmers, in case of encountering any kind of problem, usually reach to StackOverflow or look for answers on various blogs. And that all wouldn't ever be possible if there were only a few developers of a particular technology. They would probably have different problems and not many of them would share that on the web.

The more programmers there are, the more problems are encountered and the more solutions are posted in the Internet. If you are using some well-known language you may haven’t even experienced such an issue. Give some exotic technology a try and you will immediately start struggling with errors you don’t understand, can’t fix on your own and no one can help you.

Recruitment


I know this aspect is rarely considered by developers, especially when you are a beginner, but you have to keep it in mind when you think about your product and company in general.

Sometimes you may be in the role of CTO, tech- or team lead and your responsibilities are to pick tools, technologies and recruit new people to your project. It’s obvious that when you choose some fancy language (e.g. Elm), you may have troubles in finding experienced people to join you.

The situation might be similar when you are looking for a new job and the only skills you have are some unknown and not so popular technologies. You may find it problematic to shuffle job offers and find that one which will satisfy you.

Supporters

Creator

  • Who exactly is the creator?
  • How does the creator commit to the community?
  • Is the creator opinionated?
It’s also an important aspect of technology. Its creator may take an active part in the community but he may also withdraw from it.

Consider Elixir for example. José Valim, the co-founder & creator of Elixir lang is really involved in the development of the language. He replies as much as he can on GitHub, he gives his feedback on Elixir forum and he attends even small meetups and local conferences to engage and encourage people to use Elixir.

Back in 2012, when I was programming in Scala, Martin Odersky, a designer of Scala language, was rarely seen in some small communities, not to mention programmers meetings. Of course, he was giving some talks from time to time, and it wasn’t like he completely separated himself from the developers, but it looked like there was a big distance between him and all the programmers using Scala. Fortunately, from what I know from my colleagues, things have changed and now it’s much better in this field.

When you look at Ruby on Rails, you will see a quite opinionated but very charismatic leader. He likes to express subjective statements.

Company

  • What is the main company that supports the language?
  • What are the changes that the language will “die” soon?
  • How much money is put into the language?
  • How dynamic is its evolution?
Sometimes, it might be important to consider what company supports a particular language. Is it Google who advocates GO? Or maybe Facebook that stands behind React? Rust is backed by Mozilla, C# comes from Microsoft and Swift is developed by Apple. On the other hand, Clojure and Python are said to be community-driven which may bring their own pros and cons.

It’s important to think about how much money is provided to support language expansion. If you are sure that Oracle will be evolving Java year after year, you don’t have to worry about your future, market needs and availability of job offers. If you see that Angular will be released every 6 months, you can feel safe that new features will appear frequently and you will be able to schedule required upgrades.

That’s why you have to think about this aspect as well which is not that obvious at the very beginning and requires some research then.

Libraries

  • How many libraries are available out there?
  • What are the integrations provided by different services?

If you, for example, consider Ruby or JavaScript, you can be almost 100% sure that every tool has some integrations with these languages. You don’t have to worry about writing your own tools or wrappers around some APIs. You will find all, even official, libraries to integrate with Twitter, Twillio, GitHub, Dropbox and so on. If you, however, choose Elixir, for example, you may have troubles with finding well-maintained community libraries, to say nothing of official ones. It’s better now than it was like 4 years ago, but it’s still an issue sometimes and it needs to be verified definitely.

So if you plan to build a tool that will heavily rely on external APIs and combine multiple integrations, you may want to consider some less exotic technologies to do so. Mind you, your goal is to build products and deliver business features, not to develop other libraries or integrations (unless this is your actual business of course).

Salary

  • Are the programmers of this language well paid?
  • What is the market demand for this technology?
  • Is there a high competition among developers?

How is it currently?

Cobol now is a well-paid technology but have you considered why exactly? Is it because it’s very promising, super popular and widely adopted or it’s just old but many systems rely on it and there are no specialists?

This is always worth considering how much you will be paid using a specific language. You may like Elm very much, but after some research, and hopefully not diving into it too deeply, it will turn out that no one is willing to pay you for it a lot.

Trends

Sometimes, the language is not well-paid yet, but considering market demands, the trend is promising. Have a look at Rust for example.


If you strongly believe that some language will grow rapidly in the future, you may invest in it your time right now, and once it becomes popular, you will be an expert already. It brings a risk of course because the technology may not be adopted well but imagine what will happen otherwise. You will have an experience that nobody will have and you will be able to work as an expert. It’s just a matter of following trends and making wise choices now for your future.

Complexity



It’s a pretty individual thing but still, it’s worth considering to check how you like the syntax of a language. How error handling is done there, how much code you need to achieve concurrency or parallelizm, how quickly you can read and understand others code.

Consider Ruby or Python for example, which are languages that every english-speaking person can easily understand. Have a look at C-based languages and you may struggle to grasp what exactly is happening there. Java and C# are also pretty verbose while Clojure, on the other hand, might be sometimes overcomplicated.

Of course, with time, you start understanding any syntax more and more, but still, you may feel more confident with Elixir rather than GO in some cases. From what I observe, the more low-level a language is, the more flexibility and tolerance developers have. The more abstraction it allows, the more declarative it becomes.

Tooling



Except having libraries available, there’s is an important part around the language which are available tools to support development. They may include different builders, compilers, static analyzers, formatters, testing and deployment tools.

Think for a while how hard it is to bootstrap a single project, write some code, test it and deploy to production. How much time it takes to release a new application version after linting your codebase. How simple it is to migrate your database, download and upgrade dependencies or build a single executable package.

After a while, you probably have a set of scripts that do the job but think about juniors or newcomers. Will they be able to do all of these things as easily as you? Are these features provided by a language itself or each developer has to prepare their own tooling? The syntax is one thing but at the end of the day, you have to expose your application to the world. How much will it cost you?

Summary

As you can see, there are a lot of things to consider. If your time is limited and expensive you may want to think twice what you will spend it on.

The set of questions, you’ve just read, will definitely help you to make the right choice and be satisfied with your decision.

Let me know whether you’ve recently chosen a new technology, how have you analyzed it, and how happy you are with the selection you made.
下载开源日报APP:https://openingsource.org/2579/
加入我们:https://openingsource.org/about/join/
关注我们:https://openingsource.org/about/love/