開源日報 每天推薦一個 GitHub 優質開源項目和一篇精選英文科技或編程文章原文,堅持閱讀《開源日報》,保持每日學習的好習慣。
今日推薦開源項目:《心理健康 awesome-mental-health》
今日推薦英文原文:《Notes on Learning To Code》
2019年2月20日:開源日報第342期
今日推薦開源項目:《心理健康 awesome-mental-health》傳送門:GitHub鏈接
推薦理由:不管是什麼時候,心理健康都是很重要的。這個項目就是關於軟體行業中心理健康的各種資源——包括推薦的書籍和演講,興許其中的一些正好能夠解決大家可能在工作中遇上的問題。不管工作有多麼累人,要記住自己的健康才是第一位的,如果因為工作而導致不管是心理還是身體上的不健康都是本末倒置。
今日推薦英文原文:《Notes on Learning To Code》作者:Bryan Jordan
原文鏈接:https://medium.com/streamplate/notes-on-learning-to-code-6893340ea470
推薦理由:推薦給自學編程者的一些提示

Notes on Learning To Code

Having taught myself how to code to build Streamplate a friend asked me,
2019年2月20日:開源日報第342期
So this is my response that I』ve generalised because I think others will be interested.
As with any concept, its structure can appear imposing because of its unfamiliarity. Consider the following:
2019年2月20日:開源日報第342期
With no understanding of electrical engineering let alone circuit schematics this is naturally confusing for anyone. Recognising that the confusion is a function of unfamiliarity is important in learning anything — because it points your attention towards the concepts that are out of your understanding.

Similarly, coding has the problem of being visually off-putting — because you don』t understand it — not because it』s inherently difficult to understand. They』re two separate problems and it』s important to repeatedly remind yourself that you always have the ability to change this state and learn how to code.

In short, coding is easy. Above is a simple Python script, program, code, whatever you want to call it. That』s it.

What makes coding easy is this:
  1. Write code,
  2. Run the code,
  3. See the mistakes,
  4. Fix the mistakes,
  5. Run the code again,
  6. Repeat until completion. Not many other industries have an ability to simulate their task』s execution before delivery. That isn』t to say that there aren』t areas of coding that aren』t hard — the readership here is supposed to be those learning to code. There』s plenty of ways code can become hard through optimisation techniques, pursuing languages that are designed to optimally work with hardware and less so with programmers, managing networks of competing code — eg. web-servers and their networks and so on.

    The point is that with coding you have the ability to fix any problems with relatively no cost — and so again, the burden is on your own willpower to do so.

    Keep your perspective in check when you』re faced with problems during development — you』re writing a simple program, not the code for the in-flight software for the Apollo and Skylab missions (Margaret Hamilton — the woman next to the stack of pages — all code).

    It should be obvious now that the most important challenge with self-teaching relates to motivation. If this crumbles or your own willpower falters, then there』ll be no drive to overcome some of the issues you face — and to a newcomer, they can be overwhelmingly brutal.

    As for coding itself — as a general recommendation without knowing your personal circumstances, I』d suggest Python.

    Coding is an interface — just like how writing on paper is our way of communicating to other people — this is how programmers speak to machines. And just like writing, there can be more efficient ways of speaking, whether that』s with slang, verbosity or abbreviations and so on, there』s different ways of programming.

    The key metric for programming is speed — the faster it can execute, the more code can be processed and hence the computer has greater utility value.
    2019年2月20日:開源日報第342期
Some languages can be processed faster by the machine because there』s less interpretation to be completed — yet they can be harder for a programmer to manage. Languages like this are, C, C++ and (somewhat) Go.

Languages that are easier for programmers to manage and aren』t generally as fast to execute (albeit this is a generalisation, there are ways to nearly-match speeds with C) are primarily Java, Python, JavaScript. JavaScript is mostly used for websites and some server-side operations while Python and Java are quite versatile and multi-purposeful.

To learn how to use Python you first need a way to write code through an app. My recommendation would be either Visual Studio Code or Atom, both free.

After you』ve installed either of these, you can begin coding.

To get you started, these are my recommendations for forums/search engines that are general enough to accommodate most queries:

YouTube — will provide video-based explanations and implementations of most of the problems/concepts you』ll encounter.
Stack Overflow — one of the few industries to have such an exact Q&A forum with such reliability and accessability. A Google search with your problem will most likely produce results linking to Stack Overflow. In fact if you want to know where your first step is into programming — here it is.
sentdex — a well-skilled programmer that works and documents really cool projects (using machine-learning for the cars in Grand Theft Auto 5 to become self-driving, financial modelling and web-crawling etc).
Google — naturally this will produce a range of options to consider, but most of these will link to either YouTube or Stack Overflow.
Depending on your level of motivation I think there』s a better way to learn how to code, yet it』s much harder. It forces you to understand concepts and also produce ideas rather than simply following guidelines and in a sense, colouring in between the lines.

I』m an advocate for practical, parallelised learning. Rather than a serial implementation as many teaching systems follow, for practical-based tasks such as programming, the final result rests on the delivered product, not the ideas behind it. The idea with this type of learning is that the implementation isn』t necessarily perfect each time, but you』re learning more faster and at each epoch in your education, your general understanding has grown rather than a siloed section of a concept.

As such, I think it』s better to begin independently coding as quickly as possible because it』s not hard, coding』s difficulty is grounded in its unfamiliarity. Overcoming this as quickly as possible produces much better results. Secondly, there』s nothing to suggest that learning the theory or modularising the concepts has to be mutually exclusive. Thirdly, programming lends itself nicely to 『trial by fire』. If your code doesn』t work — check the errors and fix your code accordingly.

So with this said, I think the best way to learn how to code is with a project in mind and exclusively pursuing this. If you don』t have one — then following this initially is a good start.

If you do have one, then you know the resources to use for any questions you have.
Good luck!
下載開源日報APP:https://openingsource.org/2579/
加入我們:https://openingsource.org/about/join/
關注我們:https://openingsource.org/about/love/