編程程序的名稱要記住嗎
by Kurt
由庫爾特
學習編程時要記住的5件事 (5 Things to Remember When You’re Learning to Program)
Learning to program is challenging. Aside from choosing a language or setting up a development environment that you know nothing about, there are thousands of articles and tutorials out there that quite simply will make you feel dumb, demotivate you or make you think that everything you have learnt so far was a waste of time and that you’ve been doing everything wrong.
學習編程具有挑戰性。 除了選擇一種語言或建立一個您一無所知的開發環境外,還有成千上萬的文章和教程,它們很容易使您感到愚蠢,沮喪,或者使您認為到目前為止所學的一切都是浪費時間,您做錯了所有事情。
I’ve been there, so I thought I’d put together a short list of things you should keep in mind when learning to program to stop you from thinking that you are mentally challenged, or from making people feel mentally challenged when reading your tutorials.
我去過那里,所以我想我整理了一些簡短的清單,在您學習編程時應該記住的事情,以防止您認為自己受到精神上的挑戰,或者使人們在閱讀教程時感到精神上的挑戰。
1.請記住您正在上網。 (1. Remember you’re on the internet.)
You don’t believe all the news you read is legit or that the photos you see aren’t Photoshopped, so don’t take everything that you read literally. Just because it’s about programming does not mean it’s reliable or correct. It was written by a person, and people make mistakes and are biased.
您不相信所閱讀的所有新聞都是合法的,或者您所看到的照片不是經過Photoshop處理的,因此不要將所閱讀的一切都當作字面意思。 僅僅因為它是關于編程的,并不意味著它是可靠或正確的。 它是由一個人寫的,人們會犯錯誤并且有偏見。
2.唯一真正糟糕的代碼是無法正常工作或無法正常工作的代碼。 (2. The only code that is truly bad is code that does not work or do what it should.)
You’ll come across a lot of articles that start something like if you… you’re doing it wrong. The vast majority of these are just opinions. Focus on your code returning the correct result first.
您會遇到很多文章,這些文章的開頭就像是……如果您 做錯了 。 其中絕大多數只是意見 。 關注您的代碼,首先返回正確的結果。
You can write a simple function that returns the same result in almost any language in a hundred different ways; if their way of doing it is so “right”, what makes the other ninety-nine wrong? And what’re they grading it by — readability? Execution time? It’s all relative to what you need when you code.
您可以編寫一個簡單的函數,以幾乎任何一種語言以一百種不同的方式返回相同的結果。 如果他們的做法如此“正確”,是什么使其他九十九個錯誤呢? 他們對可讀性的評分如何? 執行時間處理時間? 一切都與您編寫代碼時所需的內容有關。
Bad naming conventions, indentation and documentation are more likely to produce “bad” code than the method you choose for a loop.
與為循環選擇的方法不同,不良的命名約定,縮進和文檔更有可能產生“不良”代碼。
3.程序員有使別人感到愚蠢的訣竅。 (3. Programmers have a knack for making other people feel dumb.)
Two common concepts in programming are obfuscation (obscuring of intended meaning in communication, making the message confusing, wilfully ambiguous, or harder to understand) and abstraction, and for some reason this seems to carry through to a lot of stuff that programmers write about.
編程中的兩個常見概念是混淆(混淆通信中的預期含義,使消息混亂,故意模棱兩可或難以理解)和抽象,并且由于某種原因,這似乎可以影響程序員編寫的許多內容。
They tend to use very large words, or terms that only relate to the field of programming when they’re writing. If you have to google a word fifteen times while reading an article, keep in mind you’re not dumb. On the contrary, the writer most likely wanted to you to think he was really clever and impress you.
他們傾向于使用非常大的單詞或僅在編寫時與編程領域相關的術語。 如果您在閱讀文章時必須用Google單詞搜索15次,請記住您不要傻。 相反,作家很可能想讓您認為他真的很聰明,給您留下了深刻的印象。
What he didn’t realize is that when reading an article with big words people in general tend to think the writer is normal and they are dumb.
他沒有意識到的是,在閱讀帶有大詞的文章時,人們通常會認為作者是正常的, 而且很愚蠢。
4.沒有“不良”的流行編程語言。 (4. There are no “bad” popular programming languages.)
When you meet a fellow programmer, the first question they’re likely to ask you is,
當您遇到一名程序員程序員時,他們可能會問您的第一個問題是,
“What language do you code in?”
“您使用哪種語言編碼?”
Your answer then generally forms their initial opinion of your expertise and skill level. I can’t express just how biased this is! There’s a good chance that they’ve never even touched the language they’re judging you on, or that they can’t properly justify their opinion. All languages have strengths and weaknesses.
然后,您的答案通常會形成他們對您的專業知識和技能水平的初步看法。 我不能表示這有多偏見! 他們很有可能甚至從未觸及過要評判您的語言,或者他們無法適當地證明自己的觀點。 所有語言都有優點和缺點。
Programming is a trade and a programming language is the same to a good programmer as a tool is to a mechanic. It is his choice to select the best tool from his box for the task at hand, and I’ve never heard anyone say, “Don’t ever use that spanner!”
編程是一種職業,對于熟練的程序員而言,編程語言與對機械師而言是相同的。 從他的盒子中選擇最佳工具來完成手頭的任務是他的選擇,而且我從未聽過有人說過“永遠不要使用那把扳手!”
5.學習概念,數據結構,設計模式和理論比了解語法更重要。 (5. Learning concepts, data structures, design patterns and theory is more important than knowing syntax.)
Programming concepts are all relatively similar. If you know your stuff, you’ll be familiar with the term ‘Array’, you’ll know what it is, what built-in methods it’s likely to have, and can then look up the syntax for it in any language in a heartbeat.
編程概念都相對相似。 如果您了解自己的知識,就會熟悉術語“數組”,它將了解它的含義,可能具有的內置方法,然后可以使用任何語言在其中查找語法。心跳。
All popular languages are based on programming theory, concepts and principles, and usually they try to build on and add to them. Knowing and understanding this allows you to transcend the limitations of a single programming language, and instead use the best tool for the job… even if you need to Google a little to get there.
所有流行語言都基于編程理論,概念和原則,通常它們會嘗試在其基礎上加以補充。 了解和理解這一點可以使您超越單一編程語言的局限性,而可以使用最佳的工具來完成工作……即使您需要一點點Google才能到達那里。
I hope this helps you learn and stay motivated.
我希望這可以幫助您學習和保持動力。
Oh and FYI — remember EVERY programmer has spent a few hours pulling out his/her hair debugging a typo and they are lying if they deny it.
哦,僅供參考-請記住, 每個程序員都花了幾個小時抽出他/她的頭發調試錯字,如果他們拒絕,他們就會撒謊。
If you enjoyed this post take a look at some other stuff I’ve written…
如果您喜歡這篇文章,請看一下我寫的其他內容……
Preventative Programming — how fix to bugs before they happen…and why Sherlock Holmes would have been a brilliant programmermedium.comHow I Became a Programmer. And When I Started Calling Myself OneI’ve wanted to start blogging about programming for months now and like so many others before me I set off full of…medium.comHow to write a jQuery like library in 71 lines of code — Learn about the DOMJavaScript frameworks are all the rage. Chances are that any JavaScript related news feed you open will be littered…medium.comMaking it rain code — Matrix StyleAn introduction to HTML 5 canvas animationsmedium.comTurning code to cash — How to make money as a Web Developer and live to tell the tale.So you just learnt to code. You’re eager and anyone who can’t code thinks you’re a genius, word gets out and all of a…medium.com
預防性編程—如何在錯誤發生之前對其進行修復 ……以及為什么Sherlock Holmes會成為出色的程序員 media.com, 我如何成為一名程序員。 當我開始自稱一個人時, 我已經想開始寫博客有關編程的事情已經有幾??個月了,而在我之前,我和其他許多人一樣,開始寫滿了... medium.com 如何用71行代碼編寫類似jQuery的庫—了解有關DOM JavaScript框架風靡一時。 機會是任何JavaScript相關的新聞養活你打開將散落...... medium.com 讓降雨碼-矩陣式 的介紹HTML 5畫布動畫 medium.com 談到代碼以現金-如何賺錢作為Web開發人員和現場到講故事。 因此,您剛剛學習編碼。 您很熱衷,任何無法編寫代碼的人都認為您是個天才,言出必行,所有...
翻譯自: https://www.freecodecamp.org/news/5-things-you-should-keep-in-mind-when-learning-to-program-and-shouldn-t-repeat-when-teaching-it-1ed8e734b04f/
編程程序的名稱要記住嗎