extjs 實用開發指南
Learning is a journey that never ends. At every point in your career, you will keep learning, re-learning, and un-learning. ?
學習是一個永無止境的旅程。 在職業生涯的每個階段,您都會不斷學習,重新學習和不學習。
The ability to find answers to problems is key, and these answers can be gotten by either debugging, googling or asking questions. These are skills everyone should learn.
找到問題答案的能力是關鍵,可以通過調試,谷歌搜索或提問來獲得這些答案。 這些是每個人都應該學習的技能。
While asking questions is great, doing it the wrong or less effective way might lead to many hours of unproductive work. In this article show you how to ask effective questions, become a better googler, and hone your problem-solving skills.
提出問題固然很好,但以錯誤或較無效的方式進行提問可能會導致許多小時的非生產性工作。 在本文中,您將了解如何提出有效的問題,如何成為一名更好的Googler以及如何提高解決問題的能力。
讀取搜索詢問方法 (The Read Search Ask Method)
freeCodeCamp came up with this amazing method for their students called the Read Search Ask method where you can solve your problems efficiently while respecting other people’s time, too.
freeCodeCamp為他們的學生提供了一種名為“ 閱讀搜索提問”方法的驚人方法,您可以在尊重他人時間的同時高效地解決問題。
It is expected that you follow these steps in order before you ask a question.
提出問題之前,應按順序執行以下步驟。
Read the error or documentation
閱讀錯誤或說明文件
Search Google or Stackoverflow
搜索 Google或Stackoverflow
Ask for help
求人
🔬📚閱讀您的錯誤 (🔬📚 Read your errors)
The first step to finding a solution(s) to your problem is to understand the problem itself. Many developers ask questions without understanding the problem. Remember you want to ask questions efficiently and also respect the time of the individual you will be asking.
找到問題的解決方案的第一步是了解問題本身。 許多開發人員在不了解問題的情況下提出問題。 記住,您要高效地提出問題,同時也要尊重要詢問的個人的時間。
Most often, the answers to your bugs are in the errors itself. It's not considerate to ask questions that you could have solved yourself if you had read the error itself.
通常,錯誤的答案就在于錯誤本身。 如果您已經讀過錯誤本身,可以提出一些本可以解決的問題,這不是很體貼的事情。
One great way to debug your errors is to log the error on your console or terminal and read the errors. Five things can happen at this stage:
調試錯誤的一種好方法是在控制臺或終端上記錄錯誤并讀取錯誤。 在此階段可能發生五件事:
- You identify the bug 您找出錯誤
- You determine the location of the bug (possible a file or section of your code) 您確定錯誤的位置(可能是文件或代碼的一部分)
- You understand the cause(s) of the bug 您了解錯誤的原因
- You outline possible fixes of the bug 您概述了該錯誤的可能修復
- You implement the possible fixes 您實施可能的修復
Most often, just this step alone can help you solve your problem. The more you practice this, the better you become at debugging and fixing issues. Some bugs might be more complex than your capacity, and then you need to seek external help or resources.
通常,僅此一步就可以幫助您解決問題。 練習的越多,您越能調試和解決問題。 有些錯誤可能比您的能力更復雜,然后您需要尋求外部幫助或資源。
閱讀文檔 (Read the Documentation)
Let's assume you couldn't fix your issues from the first step (but you were able to identify the bug at least). Then you need to read some documentation.
假設您從第一步開始就無法解決問題(但至少能夠識別該錯誤)。 然后,您需要閱讀一些文檔。
This might not apply to all bugs, but make sure to run your issue through this step before moving to the next. After identifying your bug, it's time to determine the cause and outline possible fixes.
這可能并不適用于所有錯誤,但是請確保在執行此步驟之前先解決您的問題,然后再進行下一步。 在確定您的錯誤之后,該是確定原因并概述可能的修復程序的時候了。
Documentation is a set of documents provided on paper, or online, or on digital or analogue media, such as audio tape or CDs. Examples are user guides, white papers, on-line help, quick-reference guides. Paper or hard-copy documentation has become less common. ~ Wikipedia
文檔是在紙上,在線或數字或模擬媒體(例如錄音帶或CD)上提供的一組文檔。 示例包括用戶指南,白皮書,在線幫助,快速參考指南。 紙質或紙質文檔越來越不常見。 ? 維基百科
Documentation serves as the official guide of a particular programming language, framework, library or technology. The best place to get the first-hand resource on a specific issue is to check the official help guide of the technology.
文檔充當特定編程語言,框架,庫或技術的正式指南。 獲取有關特定問題的第一手資源的最佳位置是查看該技術的官方幫助指南。
You might have misconfigured something, installed some wrong package or forgot to import something. But when you read the docs of the tech responsible for the bug it can help you find a fix quickly.
您可能配置錯誤,安裝了錯誤的軟件包或忘記了導入。 但是,當您閱讀負責該錯誤的技術文檔時,它可以幫助您快速找到修復程序。
Recently I was working on a Gatsby project, and I ran into some console errors and blank white page in production. But this didn't occur in development.
最近,我正在從事Gatsby項目,但在生產中遇到了一些控制臺錯誤和空白頁。 但這在開發中并未發生。
TypeError: t.test is not a function
So vague right? After identifying the bug location, reading the docs and trying out several fixes, I discovered something: in the Gatsby Google analytics plugin configuration, I left the array meant to avoid sending pageview hits from custom paths empty.
那么含糊吧? 在確定了錯誤的位置,閱讀了文檔并嘗試了一些修復程序之后,我發現了一些東西:在Gatsby Google Analytics(分析)插件配置中,我將數組保留為避免從自定義路徑發送綜合瀏覽量。
plugins: [{resolve: `gatsby-plugin-google-analytics`,options: {trackingId: 'UA-XXXXXXXX-1',head: false,anonymize: true,respectDNT: true,exclude: [''],pageTransitionDelay: 0,}
]
After 3 hours of reading the error, trying to identify the bug and reading Gatsby docs, I figured out that the exclude[]
option had no values in it. Removing this fixed my issue since I didn't need to exclude any page after all.
讀取錯誤3個小時,嘗試識別錯誤并閱讀Gatsby文檔后,我發現exclude[]
選項中沒有任何值。 刪除此問題解決了我的問題,因為我根本不需要排除任何頁面。
This shows why you should spend some time debugging. It might take some time, and it will be frustrating. The bug might look stupid, the fix might be simple, but it's worth it. The more time you spend debugging, the better you become and the faster you will fix even more complex bugs next time.
這說明了為什么您應該花一些時間進行調試。 這可能需要一些時間,并且會令人沮喪。 該錯誤可能看起來很愚蠢,修復可能很簡單,但這是值得的。 您花費更多的時間進行調試,您會變得更好,并且下次可以更快地修復甚至更復雜的錯誤。
🔍搜索 (🔍 Search)
Now if you have read your errors and several docs, but your bug is becoming more complex, it's time to search the web "effectively".
現在,如果您已經閱讀了錯誤和一些文檔,但是您的錯誤變得越來越復雜,那么就該“有效地”搜索網絡了。
One of the best places to search for solutions to your issues is Google since it already crawls content from numerous webpages, dev communities, and docs like StackOverflow, Hashnode, freeCodeCamp News, MDN, CSS tricks, Hackernoon, and many others.
搜索問題的最佳方法之一是Google,因為它已經從眾多網頁,開發人員社區和諸如StackOverflow , Hashnode , freeCodeCamp News , MDN , CSS技巧 , Hackernoon等文檔中抓取了內容。
Here are some helpful Google search tips you can try to get answers more efficiently:
以下是一些有用的Google搜索提示,您可以嘗試更有效地獲取答案:
Add a specific domain to channel your search to a particular website and save some time. You can append the
site: sitename
to your search, and it'll return only results from that website.添加特定的域以將您的搜索引導到特定的網站并節省時間。 您可以將
site: sitename
附加到搜索中,它只會返回該網站的結果。
- Search for specific title and text in specific sites. This will allow your results to include resources related to the title or text keyword you specified. 在特定站點中搜索特定標題和文本。 這將使您的結果包含與您指定的title或text關鍵字相關的資源。
intitle:axe
標題:axe
intitle:axe intext:web ui testing
intitle:axe intext:web ui測試
intitle:axe intext:web ui testing site:bolajiayodeji.com
intitle:axe intext:web ui測試站點:bolajiayodeji.com
- Add specific keywords to your search and pull out individual details like file paths. If your bug is related to Python, add it to your search query. If it is related to objects, add that too. This will streamline the results to a wider range of possible resources related to your bug, since there are objects in just about every programming language. 在搜索中添加特定的關鍵字,并提取文件路徑等單個詳細信息。 如果您的錯誤與Python有關,請將其添加到搜索查詢中。 如果與對象有關,則也添加它。 由于幾乎每種編程語言都有對象,因此這將使結果簡化為與錯誤相關的更多可能資源。
Google automatically omits most non-alphanumeric characters from your queries. Symbols like `!@#$%^&*(){}[]<> are not included in your search. So you can focus on more specific keywords, as discussed above.
Google會自動從您的查詢中刪除大多數非字母數字字符。 諸如`!@#$%^&*(){} [] <>之類的符號不包含在搜索中。 因此,如上所述,您可以專注于更具體的關鍵字。
- Copy and paste your errors (removing specific information); there is a 99.9% chance that someone else has encountered the same error and has maybe opened some issue or written an article about it. Never underestimate the power of StackOverflow and GitHub issues. 復制并粘貼您的錯誤(刪除特定信息); 可能有99.9%的其他人遇到相同的錯誤,并且可能已經打開了一個問題或撰寫了有關此錯誤的文章。 永遠不要低估StackOverflow和GitHub問題的力量。
- Search within the past few years since programming changes pretty quickly. This will ensure you don't hit redundant resources. 自從編程變化很快以來,過去幾年內就一直在搜索。 這將確保您不會浪費多余的資源。
- Reiterate, try different keywords and more general keywords multiple times, and open multiple tabs until you find an answer. This might be awkward at first, but as you consistently do this, you'll get better, and with time it will take you less time and fewer tabs to find an answer. 重申一下,多次嘗試使用不同的關鍵字和更通用的關鍵字,然后打開多個標簽,直到找到答案。 起初這可能很尷尬,但是隨著您一貫這樣做,您會變得更好,并且隨著時間的流逝,您將花費更少的時間和更少的選項卡來找到答案。
Ask?問 (🗨? Ask)
Now comes the sought-after diamond. I would advise, before you ask ANY questions, that you make sure you have completed steps 1 and 2.
現在是搶手的鉆石。 在您問任何問題之前,我建議您確保已完成步驟1和2。
This might be hard, but the earlier you get used to this, the better you grow. I've had people ask me questions, and when I copy and paste their question into Google, the first result answers the question 100%. This doesn't feel great.
這可能很難,但是您越早習慣這一點,您的成長就越好。 我曾有人問我問題,當我將問題復制并粘貼到Google時,第一個結果會100%回答問題。 感覺不太好。
Most often, I'll have to send the link to them. Meanwhile, they could have done this themselves and saved me some time while increasing their problem-solving skills.
通常,我必須將鏈接發送給他們。 同時,他們本可以自己做,并節省了我一些時間,同時提高了他們解決問題的能力。
Even if your next-door neighbour works at Google, if your dad is a Software Engineer, if your close friend has two more years experience beyond you, try not to ask them questions until you have invested time into finding solutions yourself. This will help you:
即使您的隔壁鄰居在Google工作,如果您的父親是一名軟件工程師,或者您的密友還有2年以上的工作經驗,在您花時間自己尋找解決方案之前,也不要問他們問題。 這將幫助您:
- Build more self-confidence, as you won't need to rely so much on others. (What if that close friend is unavailable to respond to you someday, what will you do?!) 建立更多的自信,因為您不需要過多地依賴他人。 (如果有密友某天無法回復您,您將怎么辦?!)
- Save the time of whomever you are planning to ask questions. There are tons of developers around the world, and you might not be the only one asking that same person questions. By completing steps 1 and 2 first, you are also helping others with less experience or more complex problems get answers quickly. 節省您計劃提問的時間。 世界各地有成千上萬的開發人員,您可能不是唯一一個問同一個人問題的人。 通過首先完成第1步和第2步,您還可以幫助經驗不足或更復雜的問題的其他人快速獲得答案。
- Build your problem-solving, debugging, research and googling skills. These are essential skills that will help you become a better developer. You only master a skill when you consistently practice it, so try to practice this regularly and watch yourself grow and master the art. 建立您的問題解決,調試,研究和谷歌搜索技能。 這些是必不可少的技能,可幫助您成為更好的開發人員。 您只有在持續練習時才掌握這項技能,因此請嘗試定期進行練習,并觀察自己的成長和掌握技巧。
But let's say that you have completed both steps, and you still need external help from a mentor, senior developer, team lead, the local community, group, or friend. How then do you ask questions effectively?
但是,假設您已經完成了兩個步驟,但是仍然需要導師,高級開發人員,團隊負責人,本地社區,團隊或朋友的外部幫助。 那您如何有效地提出問題?
- Complete step 1 and make sure you understand the problem already 完成步驟1,并確保您已了解問題
- Complete step 2 so you might at least have gotten some insights into possible causes and solutions of the problem 完成步驟2,因此您至少可以對問題的可能原因和解決方案有一些了解
Now do some research: you are either asking the question in dev communities like Stackoverflow or Hashnode or requesting help from an individual you feel has more experience than you.
現在進行一些研究:您是在像Stackoverflow或Hashnode這樣的開發社區中提出問題,或者是向您覺得比自己更有經驗的個人尋求幫助。
- The "problem" you have encountered 您遇到的“問題”
- Your thoughts on what you think might be wrong "based on your research." 根據您的研究,您對自己認為的想法可能是錯誤的。
- Proof of research efforts (Devs will be happier to help you once they see you have made some effort already). Add links to resources you have checked and solutions you have tried already. 研究工作的證明(一旦開發人員發現您已經做出了一些努力,他們將更樂于為您提供幫助)。 將鏈接添加到您已檢查的資源和已經嘗試過的解決方案。
Be conversant with tools like CodePen, CodeSandBox, GitHub Gist, Repl.it, and GitHub so you can easily provide a link to a snippet of your code, a working project or mimimal reproduction without having to type so much text. Please try as much as possible not to paste code that is more than one line in chat.
熟悉諸如CodePen , CodeSandBox , GitHub Gist , Repl.it和GitHub之類的 工具 ,因此您可以輕松地提供指向代碼段,工作項目或最小復制的鏈接,而無需鍵入太多文本。 請盡量不要在聊天中粘貼超過一行的代碼。
- Take clean and clear screenshots where necessary. Most often, you can take a snapshot of your console errors for smaller issues. Try not to strain your helper's eyes. Take specific and clear screenshots related to your error. 必要時采取干凈清晰的屏幕截圖。 通常,您可以為較小的問題制作控制臺錯誤的快照。 盡量不要拉傷助手的眼睛。 拍攝與您的錯誤相關的特定且清晰的屏幕截圖。
- Be sure you're asking the right person or community. Don't ask a python related question to someone who knows just Java. Your research from the previous step will help you here. It's also great to bookmark specific communities, individuals or groups where you will regularly ask questions based on how helpful their responses have been to you. 確保您問的是合適的人或社區。 不要向只懂Java的人詢問與python相關的問題。 上一步的研究將為您提供幫助。 將特定的社區,個人或團體添加書簽也很不錯,您可以根據他們的回復對您的幫助程度定期提出問題。
- Now don't be afraid to ask. I've had my share of toxic responses from people who respond with comments like "this is simple", "come on, google it", "you should know this", and you might get that too :(. The internet is a combination of good and toxic individuals who might be or not welcoming. Be confident in yourself, you have done your part by completing steps 1 and 2, so ask the question freely. 現在,不要害怕問。 我收到了一些人的有害React,這些人用“這很簡單”,“來吧,用谷歌搜索”,“您應該知道這一點”等評論來回應,您也可能會得到:(。互聯網是對自己充滿信心,可以完成第1步和第2步,因此對自己充滿信心,因此可以自由地提出問題。
結論 (Conclusion)
You don't need to "know it all", you just need to "know it and know how and where to find more knowledge."
您不需要“全部了解”,只需要“知道并知道如何以及在何處找到更多知識”。
Dear 10x, Senior, "It's Simple", Engineer: please note that you're discouraging developers who are asking these questions. I had to battle so much with my self-confidence some years ago, and it took me a while to get over it.
親愛的10x,高級工程師,“很簡單”,工程師:請注意,您不鼓勵提出這些問題的開發人員。 幾年前,我不得不為自己的自信而奮斗,這花了我一段時間才能克服。
There is so much for learners to battle with already (learning, imposter syndrome, and personal issues), so please don't add to it. Be welcoming, make them feel like they belong here, and support them.
學習者已經為之奮斗了很多(學習,冒名頂替綜合癥和個人問題),所以請不要添加。 熱情好客,讓他們覺得自己屬于這里,并支持他們。
Your response can intentionally or unintentionally influence someone's decision to ask questions freely next time. If you can't or won't be available, you can either not respond at all or respond in a friendly way with feedback.
您的回答可能有意或無意地影響某人下次自由提問的決定。 如果您無法使用或無法使用,則根本無法回應,也無法以友好的方式反饋。
Refer people to your friends if you don't have the time or capabilities to attend to them, give constructive criticism, and try not to leave a question without feedback or impact.
如果您沒有時間或能力陪伴他們,不給他們建設性的批評,并且不要在沒有反饋或影響的情況下提出問題,請把人們推薦給您的朋友。
Beginner developers need support. Learning to code is hard, especially if you're doing it alone. If you're learning in a traditional classroom, be sure to network with the other students. Do homework together. Discuss the problems. If you're learned online, it's very easy to get discouraged. Find chat spaces with others who are on a similar journey and use that space to encourage one another. Twitter also makes the experts accessible to you (reason #49948 why I love Twitter). Find the experts in whatever it is you're learning and consume their content. Ask them questions if you need to. The key is not to do it alone. ~ Angie Jones
初學者開發人員需要支持。 學習編碼非常困難,特別是如果您一個人做的話。 如果您是在傳統教室里學習,請確保與其他學生建立聯系。 一起做作業。 討論問題。 如果您是在網上學習的,很容易灰心。 與處于相似旅程中的其他人找到聊天空間,并利用該空間互相鼓勵。 Twitter還使您可以訪問專家(原因#49948我愛Twitter的原因)。 無論您要學習什么,都可以找到專家,并使用他們的內容。 問他們是否需要的問題。 關鍵不是一個人做。 ? 安吉·瓊斯(Angie Jones)
The industry is growing daily. We are all trying to learn and get better at different levels. A lot of developer communities are supportive and make their resources available for consumption. Make sure you are a part of this movement, consume those available resources, contribute to these resources, and be a helper in any way you can.
該行業每天都在增長。 我們都試圖在不同的水平上學習并取得進步。 許多開發人員社區都支持并使其資源可供消費。 確保您是這一運動的一部分,消耗這些可用資源,為這些資源做出貢獻,并盡一切可能成為幫手。
Thank you to all the amazing developers across the globe, creating and sharing contents/ projects. Your contributions are the pillars holding up the tech ecosystem today. 🙏💙
感謝全球所有出色的開發人員,他們創建和共享內容/項目。 您的貢獻是支撐當今技術生態系統的Struts。 🙏💙
Quick note, I interview awesome women in tech on the She Inspires at Hashnode where I understand the current health of the tech industry, get insights from their personal and career growth, and inspire other women to become better. Read all past interviews here, trust me it's worth your time. :)
快速說明,我在Hashnode的She Inspires上采訪了科技界的杰出女性,我了解科技行業的當前狀況,從其個人和職業發展中獲得見解,并激勵其他女性變得更好。 在這里閱讀所有過去的采訪,請相信我,這值得您度過。 :)
Don't spend your entire life waiting for the best time to make that move – write that article, build that side-project, apply for that job or ask that question today. The best time is always now!
不要一輩子都在等待最好的時機來做這個動作–寫那篇文章,建立那個副項目,申請那個工作或今天問這個問題。 最好的時光永遠是現在!
翻譯自: https://www.freecodecamp.org/news/asking-effective-questions-a-practical-guide-for-developers/
extjs 實用開發指南