开发中mock什么意思_开发中
開發中mock什么意思
You don’t develop code. Code develops you.
您不開發代碼。 代碼可以幫助您發展。
During a recent lecture via Zoom in the Flatiron School software program, I attempted to crack-wise on the chat as my fellow students and I often do. I can’t exactly remember what prompted me, but I wrote:
在最近通過Flatiron School軟件程序中的Zoom進行的一次演講中,我試圖像我的同學和我一樣經常在聊天中進行細化。 我不記得是什么提示了我,但我寫道:
“You don’t develop code. Code develops you.”
“您不開發代碼。 代碼可以培養您?!?/strong>
Although I was trying to make a joke, this stuck with me. I believe it’s true, if you’re serious about learning how to code (well).
盡管我想開個玩笑,但這種想法一直困擾著我。 我相信這是真的,如果您認真學習如何編碼(很好)。
What do I mean by “code develops you”? A few things come to mind, but the overarching truth about code development for me is:
“代碼使您成長”是什么意思? 我想到了一些事情,但是對我來說,關于代碼開發的首要真理是:
“A computer is literally as dumb as a rock. It literally needs to be told how to do EACH. AND. EVERY. LITTLE. THING.”
“一臺計算機實際上就像一塊石頭一樣愚蠢。 從字面上需要告訴每個人如何做。 和。 每個。 小。 事情。”
Because computers are dumb, it’s often necessary for you to break down a problem and its solution into smaller, simpler pieces to ensure your code will do what you want need. You also quickly learn how tedious, frustrating, aggravating, exasperating and humbling this process can be. Turns out, instructing a rock how to manipulate the DOM and persist changes in the back end can easily drive a person insane. I know. Trust.
由于計算機很笨,因此通常需要將問題及其解決方案分解為更小,更簡單的部分,以確保您的代碼能夠滿足您的需要。 您還可以快速了解該過程的繁瑣,令人沮喪,加重,生氣和挫敗。 事實證明,指導某人如何操縱DOM并在后端保持持久的更改很容易使人發瘋。 我知道。 相信。
In order to avoid going insane, I’ve had to develop myself in several key areas, many of which overlap and relate to each other:
為了避免發瘋,我不得不在幾個關鍵領域發展自己 ,其中許多領域相互重疊并相互聯系:
Discipline (aka “Code like everyone one is watching?”)Unless you’re disciplined in structuring your application and writing your code, before you know it you’ll have thousands of lines in a jumble of files with comments few and far between. If you’re lucky enough to somehow get it working, fixing the inevitable bug will likely have you cursing yourself in the wee hours too many times. Let’s hope you’ll never need to add to or modify its functionality, or need to explain how it works to the poor soul tasked with maintaining it.
紀律處分(又名“每個人都在看代碼嗎?”)除非您受過結構化應用程序和編寫代碼的訓練,否則在您不知不覺中,您會在成堆的文件中成千上萬行,注釋之間幾乎沒有距離。 如果您很幸運能夠以某種方式使其正常工作,則修復不可避免的錯誤可能會使您在凌晨時分詛咒自己太多次。 我們希望您永遠不需要添加或修改其功能,也不需要向負責維護它的可憐人解釋它的工作原理。
Thoroughness (aka “Meet my nemesis: The Infamous Corner Case”)Just when you think the code demo is going flawlessly, in walks nobody’s friend, Corner Case (it’s telling that it’s also know as pathological case). Either due to your laziness, a bad assumption or an incomplete grasp of reality, one of these nasty buggers WILL decide to make its presence known, as it often does, AT THE WORST POSSIBLE TIME.
徹底性(又名“遇見我的敵人:臭名昭著的極端案例”)就在您認為代碼演示正在順利進行時,沒有人知道它的朋友Corner Case (它也被稱為病理案例 ) 。 由于您的懶惰,錯誤的假設或對現實的不完全掌握,這些令人討厭的竊聽者之一將決定在最壞的可能時像通常那樣使它的存在眾所周知。
Clarity (aka The What, The How and sometimes, The Why)You need to be clear about the problem being solved and how to solve it (and sometimes, why to solve it), hopefully before you type your first line of code. If not, the risk is great that you’ll soon find yourself wondering: “What the f*ck is this function supposed to be doing? How the f*ck is it supposed to work? Why the f*ck am I up at 3AM?”
清晰度(又名“什么,什么,如何以及有時,為什么” ),希望在鍵入第一行代碼之前就要解決的問題以及如何解決(有時,為什么要解決)的問題保持清楚。 如果不是這樣,則冒著很大的風險,您很快就會發現自己在想: “此功能應該執行的功能是什么? f * ck應該如何工作? 我為什么要在凌晨3點起床?”
Efficiency (aka “Nobody’s got time for that”)One of the main selling points of these dumb rocks is that they can do stuff quickly, the same way every time, for a bazillion times in a row. Therefore, if we can save one step each loop, we will have saved ourselves and the dumb rock a bazillion steps. “A bazillion here, a bazillion there, and pretty soon you’re talking about real gigaflops.”
效率(又稱“沒有人有時間”)這些笨蛋的主要賣點之一是它們可以連續以每次相同的方式快速完成工作,連續進行數十億次。 因此,如果每個循環都可以節省一步,那么我們將節省自己和笨拙的巖石的步伐。 “這里有一個億萬富翁,那里有一個億萬富翁,不久之后,您將談論真正的千兆級軟硬件?!?
Perspective (aka “There’s got to be a better way”)Unlike loading a dishwasher, there are often several “right” ways to perform a task. Developing the ability and discipline to examine a problem from several angles will often lead to a better solution. The key is to explore your options before you charge ahead down a dead end path. (Yeah, I know, I usually do charge ahead, get stuck, curse, try to untangle the mess, cry, eat ice cream, delete everything, repeat…)
透視圖(又稱“必須有更好的方法”)與裝入洗碗機不同,執行任務通常有幾種“正確”的方法。 發展從多個角度檢查問題的能力和紀律通常會導致更好的解決方案。 關鍵是在您走入死胡同之前,先探索您的選擇。 (是的,我知道,我通常會提前充電,卡住,詛咒,解開混亂,哭泣,吃冰淇淋,刪除所有內容,重復…)
Pattern-recognition (aka “Have we met before?”)People have been telling dumb rocks how to do things for millenia, so it’s rare that a solution to your problem hasn’t already been told to a million dumb rocks long ago. The only things that have changed is that our dumb rocks are typically smaller, faster, cheaper and are powered by electrons rather than steam or some animal. So the ability to recognize a problem and a tried-and-true solution is valuable in that you’re not reinventing an inferior, bug-filled wheel, and therefore can spend more time sleeping, eating right and taking the occasional shower.
模式識別(又稱“我們以前見過嗎?”)人們一直在告訴啞石千禧世代如何做事情,因此很早以前就沒有告訴過您解決問題的方法。 唯一改變的是,我們的笨蛋通常更小,更快,更便宜,并且由電子而非蒸汽或某些動物提供動力。 因此,識別問題和經過實踐檢驗的解決方案的能力非常有價值,因為您無需重新發明劣質的,裝滿蟲子的輪子,因此可以花更多時間睡覺,正確飲食和偶爾洗個澡。
Analogies and MetaphorsRelated to perspective and pattern-recognition, analogies and metaphors help me to visualize a problem and possible solutions using familiar everyday objects and situations. A recent favorite analogy is how a callback function is like a self-addressed, stamped envelope. The recipient of the envelope can be as dumb as a rock and the sender of the envelope will likely have returned what it needs (assuming the USPS is still functioning).
類比和隱喻與透視和模式識別相關,類比和隱喻幫助我使用熟悉的日常對象和情況來可視化問題和可能的解決方案。 最近最喜歡的一個類比是回調函數如何像一個自尋址的,帶有標記的信封。 信封的接收者可能像石頭一樣傻,信封的發送者很可能已經退回了所需的東西( 假設USPS仍在運行 )。
K.I.S.S. (Keep It Simple, Stupid)Computers are dumb as rocks. The more complex your code, the more likely it will be that errors will creep in as you try to explain a complex operation to a dumb rock. Did I mention that computers are literally as dumb as rocks?
KISS(保持簡單,愚蠢)計算機愚蠢如磐石。 您的代碼越復雜,當您嘗試向笨拙的對象解釋復雜的操作時,錯誤就越有可能蔓延。 我是否提到計算機字面上像石頭一樣愚蠢?
The Perfect vs. The Functional (aka “If it ain’t broke…”)I don’t know about you, but sometimes when I notice a small thing that’s just not right, I’d like to ignore it… BUT IT’S NOT PERFECT. Most times, making it “perfect” doesn’t come back to bite me in the ass, but when it does, it’s typically AT THE WORST POSSIBLE TIME.
完美與功能性(又名“如果還沒有破裂……”)我不了解您,但是有時當我發現一件不對勁的小事時,我想忽略它…… 但并非如此完善。 在大多數情況下,使它“完美”并不會使我陷入困境,但是當它恢復正常時,通常是在最糟糕的時候。
Reduce, Reuse, Recycle (aka “Laziness is a virtue”)Related to pattern-recognition, it’s best not to attempt to create a “better” mousetrap. The mousetrap has been around so long that the design has been optimized, debugged and improved by legions of better and more experienced mousetrap developers and “tested” on untold numbers and species of mice. It’s unlikely that you’ll be able to create a better one. My ego has tempted me to “roll my own” many times, but I don’t believe I’ve ever recreated a better version of anything. Best to spend your time on the bits and pieces that you can’t get off the shelf, as well as showering and sleeping, eating right and exploring the world.
減少,重復使用,回收(又稱“懶惰是一種美德”)與模式識別相關,最好不要嘗試創建“更好的”捕鼠器。 捕鼠器已經存在了很長時間,以至于許多更好和更有經驗的捕鼠器開發人員對設計進行了優化,調試和改進,并對無數數量和種類的小鼠進行了“測試”。 您不太可能創造出更好的產品。 我的自我吸引了我很多次“自己動手” ,但我不相信我曾經重新創造過任何更好的版本。 最好將時間花在無法下架的零碎物品上,并為淋浴和睡眠,正確飲食和探索世界打下基礎。
And, lastly: “You’re always in development, if you’re doing it right.”
最后,“如果您做對了,那么您就一直在開發中?!?/strong>
翻譯自: https://medium.com/swlh/in-development-6c6727d9f4be
開發中mock什么意思
總結
以上是生活随笔為你收集整理的开发中mock什么意思_开发中的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: ps调色技能
- 下一篇: Mybatis嵌套查询与嵌套结果