像程序員一樣思考_如何像程序員一樣思考-解決問題的經驗教訓

像程序員一樣思考

by Richard Reis

理查德·里斯(Richard Reis)

如何像程序員一樣思考-解決問題的經驗教訓 (How to think like a programmer — lessons in problem solving)

If you’re interested in programming, you may well have seen this quote before:

如果您對編程感興趣,那么您可能之前已經看過以下引用:

“Everyone in this country should learn to program a computer, because it teaches you to think.” — Steve Jobs
“這個國家的每個人都應該學習編程計算機,因為它可以教您如何思考。” —史蒂夫·喬布斯

You probably also wondered what does it mean, exactly, to think like a programmer? And how do you do it??

您可能還想知道,像程序員一樣思考到底意味著什么? 以及你如何做到的?

Essentially, it’s all about a more effective way for problem solving.

本質上, 這都是解決問題的更有效方法

In this post, my goal is to teach you that way.

在這篇文章中,我的目標是教你這種方式。

By the end of it, you’ll know exactly what steps to take to be a better problem-solver.

到最后,您將確切地知道要成為一個更好的問題解決者應采取的步驟。

為什么這很重要? (Why is this important?)

Problem solving is the meta-skill.

解決問題是超能力。

We all have problems. Big and small. How we deal with them is sometimes, well…pretty random.

我們都有問題。 大和小。 有時,我們如何對待它們……相當隨機。

Unless you have a system, this is probably how you “solve” problems (which is what I did when I started coding):

除非您有系統,否則這可能就是您“解決”問題的方式(這是我開始編碼時所做的事情):

  1. Try a solution.

    嘗試解決方案。
  2. If that doesn’t work, try another one.

    如果那不起作用,請嘗試另一個。
  3. If that doesn’t work, repeat step 2 until you luck out.

    如果那不起作用,請重復步驟2,直到運氣好為止。

Look, sometimes you luck out. But that is the worst way to solve problems! And it’s a huge, huge waste of time.

看,有時候你運氣不好。 但這是解決問題的最糟糕的方法! 這是一個巨大的浪費時間。

The best way involves a) having a framework and b) practicing it.

最好的方法包括a)擁有框架,b) 實踐它。

“Almost all employers prioritize problem-solving skills first.
“幾乎所有雇主都將解決問題的技能放在首位。
Problem-solving skills are almost unanimously the most important qualification that employers look for….more than programming languages proficiency, debugging, and system design.
解決問題的技能幾乎是雇主所尋求的最重要的資質……不僅僅是編程語言的熟練程度,調試和系統設計。

Demonstrating computational thinking or the ability to break down large, complex problems is just as valuable (if not more so) than the baseline technical skills required for a job.” — Hacker Rank (2018 Developer Skills Report)

證明計算思維或解決大型復雜問題的能力與工作所需的基本技術技能同樣有價值(如果不是更多的話)。” -黑客排名( 2018開發人員技能報告 )

有一個框架 (Have a framework)

To find the right framework, I followed the advice in Tim Ferriss’ book on learning, “The 4-Hour Chef”.

為了找到合適的框架,我遵循了蒂姆·弗里斯(Tim Ferriss)關于學習的書“ 4小時廚師 ”中的建議。

It led me to interview two really impressive people: C. Jordan Ball (ranked 1st or 2nd out of 65,000+ users on Coderbyte), and V. Anton Spraul (author of the book “Think Like a Programmer: An Introduction to Creative Problem Solving”).

這使我采訪兩位真是令人印象深刻的人: C.喬丹·鮑爾 (排名第1或2日進行65,000+用戶Coderbyte )和V.安東Spraul (書“的作者認為象程序員:介紹創造性地解決問題 ”)。

I asked them the same questions, and guess what? Their answers were pretty similar!

我問了他們同樣的問題,你猜怎么著? 他們的答案非常相似!

Soon, you too will know them.

很快,您也將了解它們。

Sidenote: this doesn’t mean they did everything the same way. Everyone is different. You’ll be different. But if you start with principles we all agree are good, you’ll get a lot further a lot quicker.

旁注:這并不意味著他們以相同的方式做所有事情。 每個人都不一樣。 你會有所不同。 但是,如果您從原則入手,我們都同意是好的,那么您會更快地獲得更多。

“The biggest mistake I see new programmers make is focusing on learning syntax instead of learning how to solve problems.” — V. Anton Spraul

“我看到新程序員犯的最大錯誤是專注于學習語法,而不是學習如何解決問題。” — V.安東·斯普勞

So, what should you do when you encounter a new problem?

那么,遇到新問題該怎么辦?

Here are the steps:

步驟如下:

1.了解 (1. Understand)

Know exactly what is being asked. Most hard problems are hard because you don’t understand them (hence why this is the first step).

確切知道要問什么。 大多數棘手的問題之所以棘手,是因為您不理解它們(因此,這是第一步)。

How to know when you understand a problem? When you can explain it in plain English.

如何知道您何時了解問題? 當您可以用簡單的英語解釋它時。

Do you remember being stuck on a problem, you start explaining it, and you instantly see holes in the logic you didn’t see before?

您是否還記得被困在某個問題上,開始進行解釋并立即發現以前未曾發現的邏輯漏洞?

Most programmers know this feeling.

大多數程序員都知道這種感覺。

This is why you should write down your problem, doodle a diagram, or tell someone else about it (or thing… some people use a rubber duck).

這就是為什么您應該寫下問題,繪制圖表或將其他事情告訴別人的原因(或其他一些人使用橡皮鴨的事情)。

“If you can’t explain something in simple terms, you don’t understand it.” — Richard Feynman
“如果您不能用簡單的術語來解釋,那么您將無法理解。” —理查德·費曼(Richard Feynman)

2.計劃 (2. Plan)

Don’t dive right into solving without a plan (and somehow hope you can muddle your way through). Plan your solution!

不要沒有計劃就直接投入解決方案(以某種方式希望您能摸索到底)。 規劃您的解決方案!

Nothing can help you if you can’t write down the exact steps.

如果您無法寫下確切的步驟,沒有任何幫助。

In programming, this means don’t start hacking straight away. Give your brain time to analyze the problem and process the information.

在編程中,這意味著不要立即開始進行黑客攻擊。 給您的大腦時間分析問題并處理信息。

To get a good plan, answer this question:

為了獲得良好的計劃,請回答以下問題:

“Given input X, what are the steps necessary to return output Y?”

“考慮到輸入X,返回輸出Y需要采取什么步驟?”

Sidenote: Programmers have a great tool to help them with this… Comments!

旁注:程序員有一個很棒的工具來幫助他們。

3.劃分 (3. Divide)

Pay attention. This is the most important step of all.

請注意。 這是最重要的一步。

Do not try to solve one big problem. You will cry.

不要試圖解決一個大問題。 你會哭。

Instead, break it into sub-problems. These sub-problems are much easier to solve.

而是將其分解為多個子問題。 這些子問題更容易解決。

Then, solve each sub-problem one by one. Begin with the simplest. Simplest means you know the answer (or are closer to that answer).

然后,一個一個地解決每個子問題。 從最簡單的開始。 最簡單意味著您知道答案(或更接近答案)。

After that, simplest means this sub-problem being solved doesn’t depend on others being solved.

此后,最簡單的方法意味著要解決的子問題不依賴于要解決的其他問題。

Once you solved every sub-problem, connect the dots.

解決了每個子問題后,將點連接起來。

Connecting all your “sub-solutions” will give you the solution to the original problem. Congratulations!

連接所有“子解決方案”將為您解決原始問題。 恭喜你!

This technique is a cornerstone of problem-solving. Remember it (read this step again, if you must).

該技術是解決問題的基石。 記住這一點(如果需要,請再次閱讀此步驟)。

“If I could teach every beginning programmer one problem-solving skill, it would be the ‘reduce the problem technique.’
“如果我可以教每個新手程序員一種解決問題的技能,那將是'減少問題的技術'。”
For example, suppose you’re a new programmer and you’re asked to write a program that reads ten numbers and figures out which number is the third highest. For a brand-new programmer, that can be a tough assignment, even though it only requires basic programming syntax.
例如,假設您是一名新程序員,并且要求您編寫一個程序,該程序讀取十個數字,并弄清楚哪個數字是第三高的。 對于一個全新的程序員來說,即使只需要基本的編程語法,這也是一項艱巨的任務。
If you’re stuck, you should reduce the problem to something simpler. Instead of the third-highest number, what about finding the highest overall? Still too tough? What about finding the largest of just three numbers? Or the larger of two?
如果您遇到困難,則應將問題減少到更簡單的程度。 而不是第三高的數字,如何找到最高的整體呢? 還是太強硬了? 如何找出三個數字中的最大數字呢? 還是兩者中的較大者?

Reduce the problem to the point where you know how to solve it and write the solution. Then expand the problem slightly and rewrite the solution to match, and keep going until you are back where you started.” — V. Anton Spraul

將問題減少到知道如何解決并編寫解決方案的程度。 然后稍微擴大問題范圍,重新編寫匹配的解決方案,然后繼續進行下去,直到回到起點為止。” — V.安東·斯普勞

4.卡住了嗎? (4. Stuck?)

By now, you’re probably sitting there thinking “Hey Richard... That’s cool and all, but what if I’m stuck and can’t even solve a sub-problem??”

現在,您可能正坐在那里,想著“嗨,理查德……這很酷,但是如果我被困住甚至不能解決子問題怎么辦?”

First off, take a deep breath. Second, that’s fair.

首先,深呼吸。 第二,這很公平。

Don’t worry though, friend. This happens to everyone!

朋友,請不要擔心。 這發生在每個人身上!

The difference is the best programmers/problem-solvers are more curious about bugs/errors than irritated.

不同之處在于,最好的程序員/問題解決者對錯誤/錯誤的好奇大于對錯誤的好奇。

In fact, here are three things to try when facing a whammy:

實際上,面對混亂時,可以嘗試以下三件事:

  • Debug: Go step by step through your solution trying to find where you went wrong. Programmers call this debugging (in fact, this is all a debugger does).

    調試:逐步解決您的解決方案,以查找錯誤的地方。 程序員將其稱為調試 (實際上,這是調試器的全部工作)。

“The art of debugging is figuring out what you really told your program to do rather than what you thought you told it to do.”” — Andrew Singer
“調試的技巧在于弄清您真正告訴程序要執行的操作,而不是您認為要執行的操作。” –安德魯·辛格(Andrew Singer)
  • Reassess: Take a step back. Look at the problem from another perspective. Is there anything that can be abstracted to a more general approach?

    重新評估: 退后一步。 從另一個角度看問題。 有什么可以抽象為更通用的方法的嗎?

“Sometimes we get so lost in the details of a problem that we overlook general principles that would solve the problem at a more general level. […]
“有時候,我們對問題的細節迷失了,以至于忽略了可以從更一般的層面解決問題的一般原則。 […]

The classic example of this, of course, is the summation of a long list of consecutive integers, 1 + 2 + 3 + … + n, which a very young Gauss quickly recognized was simply n(n+1)/2, thus avoiding the effort of having to do the addition.” — C. Jordan Ball

當然,這方面的經典示例是一長串連續整數的總和,即1 + 2 + 3 +…+ n,一個非常年輕的高斯很快就認出了n(n + 1)/ 2,因此避免了進行添加的工作。” — C.喬丹·鮑爾

Sidenote: Another way of reassessing is starting anew. Delete everything and begin again with fresh eyes. I’m serious. You’ll be dumbfounded at how effective this is.

旁注:重新評估的另一種方法是重新開始。 刪除所有內容,然后重新開始。 我是認真的。 您將不知該如何有效。

  • Research: Ahh, good ol’ Google. You read that right. No matter what problem you have, someone has probably solved it. Find that person/ solution. In fact, do this even if you solved the problem! (You can learn a lot from other people’s solutions).

    研究: 啊,Google不錯。 您沒看錯。 無論您遇到什么問題,都可能有人解決了。 找到那個人/解決方案。 實際上,即使您解決了問題,也要這樣做! (您可以從其他人的解決方案中學到很多東西)。

Caveat: Don’t look for a solution to the big problem. Only look for solutions to sub-problems. Why? Because unless you struggle (even a little bit), you won’t learn anything. If you don’t learn anything, you wasted your time.

警告:不要為大問題尋找解決方案。 只尋找子問題的解決方案。 為什么? 因為除非您奮斗(一點點),否則您將不會學到任何東西。 如果您什么都不學,那您就浪費了時間。

實踐 (Practice)

Don’t expect to be great after just one week. If you want to be a good problem-solver, solve a lot of problems!

僅僅一周之后,別指望它會變得很棒。 如果您想成為一個好的問題解決者,請解決很多問題!

Practice. Practice. Practice. It’ll only be a matter of time before you recognize that “this problem could easily be solved with <insert concept here>.”

實踐。 實踐。 實踐。 認識到“使用“在此處插入概念”可以輕松解決此問題”只是時間問題。

How to practice? There are options out the wazoo!

怎么練習? wazoo有多種選擇!

Chess puzzles, math problems, Sudoku, Go, Monopoly, video-games, cryptokitties, bla… bla… bla….

國際象棋難題,數學問題,數獨,圍棋,專賣,視頻游戲,加密小貓,等等……等等……等等……。

In fact, a common pattern amongst successful people is their habit of practicing “micro problem-solving.” For example, Peter Thiel plays chess, and Elon Musk plays video-games.

實際上,成功人士中的常見模式是他們練習“解決微觀問題”的習慣。 例如,彼得·泰爾(Peter Thiel)下棋,埃隆·馬斯克(Elon Musk)玩電子游戲。

“Byron Reeves said ‘If you want to see what business leadership may look like in three to five years, look at what’s happening in online games.’
“拜倫·里夫斯(Byron Reeves)說:“如果您想了解三到五年內業務領導者的模樣,請看一下在線游戲中正在發生的事情。”

Fast-forward to today. Elon [Musk], Reid [Hoffman], Mark Zuckerberg and many others say that games have been foundational to their success in building their companies.” — Mary Meeker (2017 internet trends report)

快進到今天。 Elon [Musk],Reid [Hoffman],Mark Zuckerberg和許多其他人說,游戲是成功建立公司的基礎。” — Mary Meeker( 2017年互聯網趨勢報告 )

Does this mean you should just play video-games? Not at all.

這是否意味著您應該只玩視頻游戲? 一點也不。

But what are video-games all about? That’s right, problem-solving!

但是電子游戲到底是什么呢? 是的,解決問題!

So, what you should do is find an outlet to practice. Something that allows you to solve many micro-problems (ideally, something you enjoy).

因此,您應該做的是找到一個練習的出口。 使您能夠解決許多微問題的事物(理想情況下,您喜歡的事物)。

For example, I enjoy coding challenges. Every day, I try to solve at least one challenge (usually on Coderbyte).

例如,我喜歡編碼方面的挑戰。 每天,我都會嘗試解決至少一個難題(通常在Coderbyte上 )。

Like I said, all problems share similar patterns.

就像我說的,所有問題都有相似的模式。

結論 (Conclusion)

That’s all folks!

那是所有人!

Now, you know better what it means to “think like a programmer.”

現在,您更好地了解了“像程序員一樣思考”的含義。

You also know that problem-solving is an incredible skill to cultivate (the meta-skill).

您還知道解決問題是一種不可思議的技能(超能力)。

As if that wasn’t enough, notice how you also know what to do to practice your problem-solving skills!

如果這還不夠,請注意您還知道如何去練習解決問題的技能!

Phew… Pretty cool right?

ew……挺酷的吧?

Finally, I wish you encounter many problems.

最后,祝您遇到許多問題。

You read that right. At least now you know how to solve them! (also, you’ll learn that with every solution, you improve).

您沒看錯。 至少現在您知道如何解決它們了! (此外,您將了解到每種解決方案都可以改進)。

“Just when you think you’ve successfully navigated one obstacle, another emerges. But that’s what keeps life interesting.[…]
“只要您認為自己已經成功克服了一個障礙,就會出現另一個障礙。 但這就是讓生活變得有趣的原因。[…]
Life is a process of breaking through these impediments — a series of fortified lines that we must break through.
生活是克服這些障礙的過程,這是我們必須突破的一系列防御性路線。
Each time, you’ll learn something.
每次,您都會學到一些東西。
Each time, you’ll develop strength, wisdom, and perspective.
每次,您都會發展力量,智慧和遠見。

Each time, a little more of the competition falls away. Until all that is left is you: the best version of you.” — Ryan Holiday (The Obstacle is the Way)

每次,更多的競爭就會消失。 剩下的只有你:你最好的版本。” -Ryan Holiday( 《障礙就是路》 )

Now, go solve some problems!

現在,去解決一些問題!

And best of luck ?

祝你好運?

Special thanks to C. Jordan Ball and V. Anton Spraul. All the good advice here came from them.

特別感謝 C. Jordan Ball和V. Anton Spraul 。 這里所有好的建議都來自他們。

Thanks for reading! If you enjoyed it, test how many times can you hit in 5 seconds. It’s great cardio for your fingers AND will help other people see the story.

謝謝閱讀! 如果喜歡,請測試您可以在5秒鐘內擊中多少次。 這對您的手指來說是很好的心臟鍛煉,并且可以幫助其他人看到這個故事。

翻譯自: https://www.freecodecamp.org/news/how-to-think-like-a-programmer-lessons-in-problem-solving-d1d8bf1de7d2/

像程序員一樣思考

本文來自互聯網用戶投稿,該文觀點僅代表作者本人,不代表本站立場。本站僅提供信息存儲空間服務,不擁有所有權,不承擔相關法律責任。
如若轉載,請注明出處:http://www.pswp.cn/news/394732.shtml
繁體地址,請注明出處:http://hk.pswp.cn/news/394732.shtml
英文地址,請注明出處:http://en.pswp.cn/news/394732.shtml

如若內容造成侵權/違法違規/事實不符,請聯系多彩編程網進行投訴反饋email:809451989@qq.com,一經查實,立即刪除!

相關文章

CF908G New Year and Original Order 數位DP

傳送門 看到數據范圍到\(10^{700}\)毫無疑問數位DP。那么我們最重要的問題是如何有效地維護所有數位排序之后的數的值。 對于某一個數\(x\)&#xff0c;設\(f_{x,i} (i \in [1,9])\)表示\(x\)中的所有數位的值\(\geq i\)的數位數量&#xff0c;比如說\(f_{6345982 , 7} 2 , f_…

銳捷亮相GITC:請互聯網企業為我點個贊!

【51CTO.com原創稿件】GITC全球互聯網技術大會已成功舉辦四屆&#xff0c;今年的會議現場依然是摩肩接踵圍觀者眾。圍繞互聯網熱點技術&#xff0c;眾人根據云、大數據、安全、運維、基礎架構的不同主題&#xff0c;各自聚成小圈子展開深入交流。 銳捷的展位在主會場的內側&…

c語言匯編混合編程方法,C語言和匯編語言混合編程方法

摘要&#xff1a; C語言是一種高級的面向過程的開發語言&#xff0c;匯編語言是一種低級的面向機器的編程語言。兩者在程序設計開發方面各有優劣&#xff0c;目前兩者的混合編程得到了廣泛的應用。本文通過具體的實例&#xff0c;說明了混合編程的基本方法&#xff0c;為C語言應…

WPF Slider設置整數

IsSnapToTickEnabled"True" 轉載于:https://www.cnblogs.com/Fred1987/p/6038608.html

api代理提取_了解提取API

api代理提取Interested in learning JavaScript? Get my ebook at jshandbook.com有興趣學習JavaScript嗎&#xff1f; 在jshandbook.com上獲取我的電子書 Since IE5 was released in 1998, we’ve had the option to make asynchronous network calls in the browser using X…

react.lazy 路由懶加載_React lazy/Suspense使用及源碼解析

React v16.6.0已經發布快一年了&#xff0c;為保障項目迭代發布&#xff0c;沒有及時更新react版本&#xff0c;最近由于開啟了新項目&#xff0c;于是使用新的react版本進行了項目開發。項目工程如何搭建&#xff0c;如何滿足兼容性要求&#xff0c;如何規范化等等這里不作為介…

Dart編程語言入門

Dart基礎入門語法介紹&#xff0c;詳細說明可以查看相關視頻《Dart編程語言入門》。 變量與常量 變量 1.使用 var 聲明變量,默認值為 null var a;//null a 10;2.顯示類型聲明 int a;//null a 10;3.使用 var 聲明&#xff0c;可賦予不同類型的值 var a; //null a 10; //int a…

《PHP精粹:編寫高效PHP代碼》——1.1節為什么要使用面向對象編程

本節書摘來自華章社區《PHP精粹&#xff1a;編寫高效PHP代碼》一書中的第1章&#xff0c;第1.1節為什么要使用面向對象編程&#xff0c;作者&#xff1a;&#xff08;美&#xff09;  Davey Shafik&#xff0c;更多章節內容可以訪問云棲社區“華章社區”公眾號查看 1.1 為什…

c語言數據結構系統化,C語言數據結構+數據庫+操作系統

http://cv.qiaobutang.com/post/55c419b20cf2009bd4607795第二部分是專業相關的C &#xff0c;數據庫&#xff0c;操作系統&#xff0c;數據結構。http://c.biancheng.net/cpp/u/shuju/數據(Data)是信息的載體&#xff0c;它能夠被計算機識別、存儲和加工處理。它是計算機程序加…

c語言判斷一個序列是不是另一個的子序列

1 #include <stdio.h>2 #include <string.h>//添加字符串頭文件3 4 int Subsequence(char s[], char t[]) 5 {6 int m,n,i,j;7 n strlen(s); //n表示序列S的長度8 m strlen(t); //m表示序列T的長度9 i0; 10 j0; 11 if (m>…

linux中python如何調用matlab的數據_特征錦囊:如何在Python中處理不平衡數據

今日錦囊特征錦囊&#xff1a;如何在Python中處理不平衡數據? Index1、到底什么是不平衡數據2、處理不平衡數據的理論方法3、Python里有什么包可以處理不平衡樣本4、Python中具體如何處理失衡樣本印象中很久之前有位朋友說要我寫一篇如何處理不平衡數據的文章&#xff0c;整理…

源碼安裝zabbix遇到的報錯集錦

報錯1&#xff1a;checking for mysql_config... configure: error: MySQL library not found 解決辦法&#xff1a;查找mysql_config #find / -name "mysql_config*" /usr/local/mysql/bin/mysql_config 在配置時將原有的 --with-mysql 改為 --with-mysql/usr/loca…

pso算法c++語言代碼,一C++PSO(PSO)算法

收集和變化PSO算法&#xff0c;它可用于參考實施&#xff1a;#include #include #include #include #include #define rand_01 ((float)rand() / (float)RAND_MAX)const int numofdims 30;const int numofparticles 50;using namespace std;//typedef void (*FitnessFunc)(fl…

Hadoop不適合哪些場景 哪些場景適合?

Hadoop設計的目的主要包括下面幾個方面&#xff0c;也就是所謂的適用場景&#xff1a; 1&#xff1a;超大文件 可以是幾百M&#xff0c;幾百T這個級別的文件。 2&#xff1a;流式數據訪問 Hadoop適用于一次寫入&#xff0c;多次讀取的場景&#xff0c;也就是數據復制進去之后&a…

微服務 邊界服務_遵循這些實用原則以獲取精心設計的微服務邊界

微服務 邊界服務by Jake Lumetta杰克盧米塔(Jake Lumetta) 遵循這些實用原則以獲取精心設計的微服務邊界 (Follow these practical principles to get well-designed microservices boundaries) 如何避免使微服務太小和緊密耦合 (How to avoid making your microservices too …

ShareEntryActivity java.lang.ClassNotFoundException | Android類找不到問題

錯誤堆棧&#xff1a; Process: com.mci.smagazine, PID: 23265java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.mci.smagazine/com.mci.smagazine.apshare.ShareEntryActivity}: java.lang.ClassNotFoundException: com.mci.smagazine.apshare…

阿里Android p6準備,項目經歷準備篇——如何準備阿里巴巴P6/P7前端面試

項目經歷準備篇——如何準備阿里巴巴P6/P7前端面試在上次的校招文章之后&#xff0c;有很多同學問有沒有社招相關的東西可以寫一篇&#xff0c;現在它來了。比起校招&#xff0c;社招更加看重項目經歷項目經歷反應的思考。本文針對的是想進入阿里的P6/P7同學&#xff0c;著重講…

for in for of區別_Python 第4課:for…in循環黃金搭檔之range()函數

樂學趣學Py● 04&#xff1a;for…in循環黃金搭檔之range()函數●Python趣味小百科Python中的繪圖模塊為什么叫Turtle海龜&#xff0c;而不是cat ,dog,bird呢&#xff1f;原來Python引用了麻省理工大學教授開發的logo海龜制圖語言,能通過繪圖直觀地教大家學習編程。實踐是最好的…

《游戲設計師修煉之道:數據驅動的游戲設計》一3.8小結

3.8小結 在玩游戲期間使用的數學知識通常相當簡單&#xff0c;盡管代碼中使用的數學知識可能非常復雜。玩家不希望由于在玩游戲期間不得不處理許多數字而分心&#xff0c;因為他們的大腦必須從控制角色的動作轉換到記住數字的含義。許多游戲回避了數字&#xff0c;而是通過像計…

ubuntu下安裝配置nfs

sudo apt-get install nfs-kernel-server sudo /nfs_root vim /etc/exports 在這個文件末尾添加 /nfs_root *(rw,sync,no_root_squash) 保存退出 重啟nfs服務 sudo /etc/init.d/rpcbind restart sudo /etc/init.d/nfs-kernel-server restart 測試 sudo mount 192.168.2.1:/nf…