wp博客寫文章500錯誤
I've written a lot of blog posts. Somewhere north of 500 to be exact. All of them are technical.
我寫了很多博客文章。 確切地說是在500以北的某個地方。 所有這些都是技術性的。
About two dozen of them are actually good.
實際上大約有兩打是不錯的。
The rest are just a meandering hot mess of grammatical errors, code snippets that don't work and a never-ending misuse of "it's" vs "its". Why can't I get that right?! Its not that complicated.
剩下的只是一堆亂七八糟的語法錯誤,不起作用的代碼段以及對“它是”與“它”的無休止的濫用。 我為什么不能正確呢? 它沒有那么復雜。
BUT. I'm not here to talk about my failures. That's what therapy is for. I'm here to talk about the dozen or so roses that bloomed in a literary field of feces. These are the tips that you need to write the best technical articles.
但。 我不是在這里談論我的失敗。 那就是治療的目的。 我在這里談論的是在文學領域里盛開的十幾朵玫瑰。 這些是編寫最佳技術文章所需的技巧。
為初學者寫 (Write for the beginner ?)
To date, my most popular article on Medium (by views) is, "Here's how you can actually use Node environment variables". ?
迄今為止,我最流行的有關Medium(按視圖)的文章是:“這是您實際使用Node環境變量的方式”。
When I was writing the post, I wondered if I was the last person alive who didn't fully understand environment variables. Clearly I'm not. The takeaway from this is that if you think something is too simple to write about, you should probably write about it.
當我寫這篇文章時,我想知道我是否是最后一個沒有完全理解環境變量的人。 顯然我不是。 由此得出的結論是, 如果您認為某些事情太簡單而無法寫,則可能應該寫它 。
Over-estimating the audience is the most common mistake you can make when writing technical articles. You don't need to dissect a compiler or invent a framework to have something to talk about. Lea Verou did an entire talk on 1 CSS property. ONE. And it's one of the best presentations I have ever seen.
高估受眾是您撰寫技術文章時可能犯的最常見錯誤。 您無需剖析編譯器或發明框架就可以談論一些事情。 Lea Verou對1個CSS屬性進行了整個討論。 之一。 這是我見過的最好的演示之一。
Pick simple topics and then dive into them. There are far more people interested in learning how to trim strings than there are people who are interested in having a structured argument on how to solve the Dining Philosopher's problem.
選擇簡單的主題,然后深入其中。 對學習如何修剪弦樂感興趣的人比對如何解決就餐哲學家的問題有結構性爭論的人要多得多。
Note that I'm judging the popularity of articles based on views. There's some conjecture about whether or not this is a good measure of success. After all, good clickbait will get you views. There are sites with an entire business model based on this, and we don't hold them in particularly high esteem.
請注意,我根據觀點來判斷文章的受歡迎程度。 關于這是否是成功的良好衡量標準,存在一些猜測。 畢竟,良好的點擊誘餌將使您獲得觀看次數。 有一些網站基于此建立了完整的業務模型,我們并不特別重視它們。
Another measurement we could look at is "Read Ratio". The above article has a "Read Ratio" of 25%. One quarter of the people who visited the article actually read it. The higher the percentage, the better. It turns out that the easiest way to increase that percentage is to just write shorter posts. Take a look...
我們可以查看的另一種度量是“讀取比率”。 上面的文章的“讀取率”為25%。 實際訪問過這篇文章的人中有四分之一讀過這篇文章。 百分比越高,效果越好。 事實證明,增加該百分比的最簡單方法是撰寫較短的帖子。 看一看...
These are throw-away posts that are only 2 or 3 paragraphs long. Lazy writing. Me just throwing turds in the air so that I can say I wrote something that week.
這些是只有2或3個段落長的一次性文章。 懶惰的寫作。 我只是把雜物扔在空中,這樣我可以說我那一周寫了一些東西。
We seem to be in a culture that is obsessed with this target. Make shorter content! People will read it! Yeah, they'll read it, but kind of the same way they read road signs; flying down the 1 billion lane highway of the internet, stuffing their face with Combos and retaining virtually none of what they see.
我們似乎處在迷戀這個目標的文化中。 縮短內容! 人們會讀它! 是的,他們會讀的,但是他們讀路標的方式差不多; 沿著10億車道的互聯網高速公路飛來飛去,用Combos塞滿了他們的臉,幾乎什么也看不見。
Read % is not a good target. It encourages everyone to just throw turds, and what goes up, must come down.
讀取%不是一個好的目標。 它鼓勵每個人都亂扔垃圾,上漲的東西必須倒下。
A better measurement, I think, is the "Reads" metric. How many people actually read the article? Now we don't know how Medium calculates this, but they attest that it's "how many viewers have read the entire story". By that metric, a new post emerges as the top dog.
我認為,更好的衡量標準是“讀取次數”指標。 實際上有多少人閱讀了這篇文章? 現在我們不知道Medium是如何計算出來的,但是他們證明這是“有多少觀眾閱讀了整個故事”。 按照這個指標,一個新職位成為頭號狗。
"You should never ever run directly against Node in production. Maybe."
“永遠不要在生產中直接與Node對抗。也許。”
Which brings me to the second insight for writing successful technical articles...
這使我對撰寫成功的技術文章有了第二見解...
質疑現狀 (Question the status quo)
While working on a demo with a friend, he mentioned to me in an off-handed way that you should never run directly against Node in production. Well I didn't know that. I had never heard that before. So I decided to research it to see if he was right. As it turns out, he was right. But he was also wrong. The answer, like everything in life, is, "it depends".
在與朋友一起進行演示時,他以一種過分的方式向我提及,您絕對不應在生產中直接與Node對抗。 好吧,我不知道。 我以前從未聽說過。 因此,我決定對其進行研究,以了解他是否正確。 事實證明,他是對的。 但是他也錯了。 就像生活中的一切一樣,答案是“取決于情況”。
Programming ideology is littered with absolutes. Never use ternary statements. Never open a hyperlink in the same window. Never push to production on a Friday at 5 PM. Never build a website that doesn't work on mobile. Never do "Select *" from a database. Never force push into a Github repo. And never ever should you take any of those things at face value.
編程思想充滿了絕對性。 切勿使用三元語句。 切勿在同一窗口中打開超鏈接。 切勿在星期五下午5點推入生產。 切勿建立無法在手機上運行的網站。 請勿從數據庫中執行“選擇*”。 切勿強行推入Github存儲庫。 而且,您永遠都不應以任何面值看待這些東西。
Programming is black and white. Reality is not. The second that you hear someone make an absolute statement, that's a good time for a blog post. You may find that absolute is absolutely wrong. I once heard that you should never put JavaScript in HTML. Then some guy named Jordan said, "yeah, but you can put HTML in JavaScript", and today we have React.
編程是黑白的。 現實不是。 您聽到的第二個聲音是絕對的,這是寫博客的好時機。 您可能會發現絕對是絕對錯誤的。 我曾經聽說您不應該將JavaScript放入HTML。 然后,一個叫約旦的家伙說:“是的,但是您可以將HTML放入JavaScript中”,今天我們有了React 。
Shake it up. Reader's want an original opinion and everyone likes a renegade.
搖一搖。 讀者想要有獨到見解,每個人都喜歡叛徒。
The paradox of absolutes is that as much as people like you to question existing ones, they also like it when you make your own.
絕對的悖論是,就像您這樣的人質疑現有的一樣,當您自己創建時,他們也會喜歡它。
絕對發言 (Speak in absolutes)
If we continue down the list of the most popular posts, we get to "The greatest Visual Studio Code setup in the world".
如果我們繼續在最受歡迎的帖子列表中進行下去,我們將獲得“世界上最棒的Visual Studio Code設置”。
This one has a far lower view count because it's posted in my personal publication. As a side note, don't try and create your own blog or publication. That's like trying to create your own magazine or TV channel. You can do it, but it's way easier to just go where the readers already are.
由于它已發布在我的個人出版物中,因此它的視圖數量要少得多。 附帶說明,請勿嘗試創建自己的博客或出版物。 這就像嘗試創建自己的雜志或電視頻道一樣。 您可以做到,但是走到已經是讀者的地方會更容易。
Also note that even though this article has far less views than the next highest one (41K vs 113K), it only has 4K less reads (24K vs 28K).
還要注意,即使這篇文章的瀏覽量遠少于第二高的瀏覽量(41K vs 113K),但讀取量卻少了4K(24K vs 28K)。
This article makes an outlandish allegation - that my personal VS Code setup is the best in the world. This is an extremely subjective claim, and likely not even close to being accurate. But it's great for a blog post because it makes the reader think, "Oh yeah!? I'll be the judge of that, buddy!".
本文提出了一個怪異的指控-我的個人VS Code設置是世界上最好的。 這是一個非常主觀的主張,并且可能甚至不十分準確。 但是,這對博客文章很有用,因為它使讀者認為:“哦,是的!?我將成為法官,老兄!”。
Anytime you make an absolute statement, you are inviting people to come and see if it can stand up under scrutiny. Developers really can't help themselves. Seeing if things stand up under scrutiny is kind of what we do.
每當您發表絕對聲明時,您都在邀請人們來看它是否可以接受嚴格審查。 開發人員真的無法自救。 看看事情是否經過嚴格審查是我們的工作。
Many of these people are going to disagree with you. That's OK. In fact, it's healthy. Let people like things, but also let them not like things. There are going to be people who don't like that I said to use absolutes. They are going to say that you should never use absolutes, which is itself an absolute statement. See? You can't win, so don't be afraid when at least half of your readers leave comments like this...
其中許多人會不同意您的看法。 沒關系。 實際上,它是健康的。 讓人們喜歡事物,也讓他們不喜歡事物。 會有人不喜歡我說的使用絕對值。 他們會說,您絕對不要使用絕對值,這本身就是絕對值聲明。 看到? 您贏不了,所以當至少有一半的讀者發表這樣的評論時,請不要害怕...
Feel the burn. And its got 432 claps - by far the most of any comment on that article. That's fine. Let those people disagree or not like your writing style. You can please some of the people some of the time.
感到灼傷。 它獲得了432拍手-到目前為止,對該文章的評論最多。 沒關系。 讓那些人不同意或不喜歡您的寫作風格。 您有時可能會請一些人。
The only article that I've ever had go to #1 on Hacker News uses a similar strategy...
我曾經在Hacker News上排名第一的唯一文章使用類似的策略...
Everything? It's ruined everything?! Of course not. Every0ne knows that DC actually ruined everything when they made, "Aquaman". Now, see, you want to take issue with that statement. See how that works?
一切? 一切都毀了?! 當然不是。 Every0ne知道DC制作“ Aquaman”時實際上毀了一切。 現在,看一下,您想對該語句發表意見。 看看如何運作?
The other thing that we can glean for the top three posts, is that they all cover pretty popular technologies - Node and VS Code. That's a trend that continues in the stats.
我們可以收集到的前三篇文章的另一件事是,它們都涵蓋了非常流行的技術-Node和VS Code。 統計數據將繼續保持這種趨勢。
撰寫流行技術 (Write about popular technologies)
If I keep looking through the list, the next several posts are about either React, or VS Code.
如果我繼續瀏覽列表,接下來的幾篇文章都是關于React或VS Code的。
Writing about popular technologies is gonna get you readers. This one is kind of a no-brainer, but it bears repeating: writing about popular technologies is going to get you readers. Writing about an obscure product or technology that nobody has heard of is gonna feel like you threw a party and nobody showed up. Not that that's ever happened to me. Twice.
撰寫流行技術將吸引您的讀者。 這有點兒不費吹灰之力,但需要重復: 撰寫有關流行技術的文章將吸引您的讀者 。 撰寫一篇沒人聽說過的晦澀產品或技術的感覺,就像是您參加一個聚會卻沒人露面。 并不是那件事發生在我身上。 兩次。
For me, writing about whatever is "hot" always feels like dunking on a six foot goal. It's too easy and nobody is impressed when you topple your four year old's Fisher- Price Grow-To-Basketball toy. But the fact remains that talking about subjects that people are interested in is simply better than talking about ones they aren't. That shouldn't be an earth shattering revelation.
對我來說,寫些“熱門”的東西總是感覺像是在踩著6英尺高的球門灌籃。 這太簡單了,當您推倒四歲的費舍爾價格成長型籃球玩具時,沒人會留下深刻的印象。 但是事實仍然是,談論人們感興趣的主題比談論他們不感興趣的主題更好。 那不應該是破天荒的啟示。
The trick is to figure out how to use those things to leverage what you actually want to say in an article.
訣竅是弄清楚如何使用這些東西來充分利用您在文章中實際要說的內容。
For instance, I work on Azure at Microsoft. If I want to write an article about best practices for running Node apps on Azure, I could do it and then call it "Best practices for running Node on Azure". There is a name for an article like that. It's called, "documentation".
例如,我在Microsoft的Azure上工作。 如果我想寫一篇有關在Azure上運行Node應用程序的最佳實踐的文章,則可以這樣做,然后將其稱為“在Azure上運行Node的最佳實踐”。 這樣的文章有一個名字。 它稱為“文檔”。
Instead, I wrote an article titled, "You should never ever run Node apps in production. Maybe." This article benefits all Node developers while still conveying the ideas for how to best run Node apps on Azure. Since I'm no longer scoped to just "Azure", I get to write to all Node devs and you don't have to be using Azure to benefit from the content.
取而代之的是,我寫了一篇文章,標題為“永遠不要在生產環境中運行Node應用程序。也許吧。” 本文使所有 Node開發人員受益,同時仍然傳達了有關如何在Azure上最佳運行Node應用程序的想法。 由于我不再局限于“ Azure”,因此我可以寫信給所有Node開發人員,而您不必使用Azure即可從內容中受益。
所有點擊誘餌的創建方式均不相同 (All click bait is not created equal)
Good titles draw people in. They have to. The sheer volume of information that we consume daily requires you to say something to get people's attention.
好的頭銜吸引著人們。他們必須這么做。 我們每天消耗的大量信息需要您說些什么來引起人們的注意。
Unfortunately, people have abused this concept by optimizing for the "Views" or "Read Percentage" metric; putting turds behind a title designed just to get your click.
不幸的是,人們通過優化“觀看次數”或“閱讀百分比”指標來濫用這一概念。 將草皮放在僅旨在獲得點擊的標題后面。
We call this, "Clickbait".
我們稱其為“ Clickbait”。
Clickbait is bad. It's bad because the title is salacious, but the content is weak. This is pure deception, and we hate it. Nobody likes being lied to. Thanks to people abusing titles for clicks, we've gotten to the point where any title which grabs your interest is considered "clickbait". Except it isn't.
Clickbait不好。 不好是因為標題很淫蕩,但內容很薄弱。 這純粹是欺騙,我們討厭它。 沒有人喜歡被騙。 由于人們濫用標題來獲得點擊,因此到現在為止,任何引起您興趣的標題都被視為“點擊誘餌”。 除非不是。
Your content is only as good as the title that it sits behind. If the title doesn't get people to stop and take notice, it really doesn't matter how good your content is, does it? As long as you are putting substance in your content, don't be afraid to bravely draw people in with strong titles. Of all the titles I've come up with, here are some of my favorites...
您的內容僅取決于其標題。 如果標題沒有引起人們的注意,那么您的內容到底有多好,不是嗎? 只要您在內容中添加實質內容,就不要害怕勇敢地吸引具有強標題的人。 在我想出的所有標題中,有一些我的最愛...
- Oauth has ruined everything Oauth毀了一切
Save 15% or more on car insurance by switching to plain JavaScript
改用純JavaScript可以節省15%或更多的汽車保險費用
How to increase your page size by 1500% with Vue and Webpack
如何使用Vue和Webpack將頁面大小增加1500%
You should never ever run Node.js in production. Maybe.
您永遠不要在生產中運行Node.js。 也許。
The best CLI is the one you don't have to install
最好的CLI是無需安裝的CLI
So how do you write better headlines? In the first iteration of the freeCodeCamp style guide, Quincy recommended the CoSchedule Headline Analyzer tool. I've used this site many many times. It helps you to write better titles by giving your headline a "score".
那么,您如何撰寫更好的標題? 在freeCodeCamp樣式指南的第一版中,Quincy建議使用CoSchedule標題分析器工具。 我已經多次使用該網站。 通過為標題提供一個“得分”,可以幫助您編寫更好的標題。
This tool can be a little frustrating to use. It will tell you that you need more "common" words or "emotional" phrases, but it doesn't tell you what those things are. It's a bit of an exercise, but I've found the tool to be useful in so much as it forces me to create dozens of iterations of a title and I always end up with a better one than the one I started with.
使用該工具可能有點令人沮喪。 它會告訴您您需要更多的“常用”字詞或“情感”短語,但并不能告訴您這些東西是什么。 這是一個練習,但是我發現該工具很有用,因為它迫使我創建一個標題的幾十個迭代,而且我總是得到比開始時更好的標題。
For my last tip, I have no data. I have no charts to show you or stats to back me up. My last tip is just hard-learned from the trenches of life.
關于我的最后一條提示,我沒有數據。 我沒有圖表可以顯示您,也沒有統計數據來支持我。 我的最后一個提示只是從生活的戰hard中吸取的。
脆弱 (Be vulnerable)
The psychologist Robert Glover once said, "Human beings are attracted to each other's rough edges".
心理學家羅伯特·格洛弗(Robert Glover)曾經說過:“人類被彼此粗糙的邊緣所吸引”。
One of the most engaging things you can do for your reader is to simply be you. If you don't understand something, say so. If a concept is confusing, point that out. If you are afraid to write about something because you think you might be doing it wrong, write it. Your honesty is what ultimately makes a terrific blog post.
您可以為讀者做的最吸引人的事情之一就是成為您自己。 如果您聽不懂,請這樣說。 如果一個概念令人困惑,請指出。 如果您害怕寫某事是因為您認為自己做錯了,請寫下來。 您的誠實是最終使您撰寫精彩博客文章的原因。
Put yourself out there. Show people how you solved a problem and ask them how they would do it. You are going to be wrong. All the time. That's life. And the thing is, people love that.
把自己放在那里。 向人們展示您如何解決問題,并詢問他們如何解決。 你會錯的。 每時每刻。 那就是生活。 事實是,人們喜歡這一點。
One of the first articles that I wrote for CSS Tricks was covering a pretty simple issue in React where I needed some content to be dynamically rendered. I was new to React, so I wasn't sure how everyone else was doing it.
我為CSS Tricks撰寫的第一篇文章之一涉及React中一個非常簡單的問題,其中我需要動態呈現一些內容。 我是React的新手,所以我不確定其他人的表現如何。
So I asked people.
所以我問人 。
This article has more comments than any article I have ever written. It is not a long article. It does not provide any sort of revelation. It also exposes my naivety as a React developer. But more importantly, it connects with people. Why? Because everyone has things that they don't know that they think everyone else already knows. They are just waiting for someone to step out and say so. Once you do, they will too.
與我以前寫過的任何文章相比,本文的評論更多。 文章不長。 它不提供任何形式的啟示。 這也暴露了我作為React開發人員的天真。 但更重要的是, 它與人聯系在一起 。 為什么? 因為每個人都有他們不知道的東西,他們認為其他人已經知道了。 他們只是在等待某人說出來。 一旦您這樣做,他們也會。
Yes, you are going to get the "everyone knows this" comments. But that's false. Everyone doesn't know it. After all, you didn't know. And that voice in your head that tells you that you're the only one? That's your ego. In short, pride keeps you from being authentic, and that ultimately keeps you from connecting with your readers.
是的,您將獲得“每個人都知道這一點”的注釋。 但這是錯誤的。 每個人都不知道。 畢竟,您不知道。 而腦海里那種聲音告訴你,你是唯一的一個? 那是你的自我。 簡而言之,驕傲會使您失去真實性,最終使您無法與讀者建立聯系。
有趣和進攻之間的細線 (The fine line between being interesting and being offensive)
A word of caution: there is a fine line between writing interesting content and just being a jerk. It's quite easy to swing from being insightful into just being mean. I should know. I've done it.
請注意:在編寫有趣的內容與成為混蛋之間有一條很好的界限。 從有洞察力轉變為卑鄙是很容易的。 我應該知道。 我做完了
If I say "OAuth has ruined everything", I am taking shots at the people who created that spec. There is a thinking, feeling human on the other end of every technology you use. In the case of OAuth, the creator himself had already made worse statements it, so I felt comfortable that I wasn't simply smearing his work in public.
如果我說“ OAuth破壞了一切”,那我就是對創建該規范的人開槍。 在您使用的每種技術的另一端都有一種思考,感覺像人。 就OAuth而言,創建者本人已經做出了更糟糕的陳述,因此我感到安慰的是,我并不僅僅是在公開場合涂抹他的作品。
Even still, I took a big risk doing that. That's expected. You are going to have to assume some amount of risk to write great content, either because you are being vulnerable, because you are questioning the status quo, or because you are simply being honest. But you don't have to be a jerk. That part is optional and the internet is not exactly lacking in negative content.
即使如此,我還是冒著很大的風險。 那是意料之中的。 您可能要冒一定的風險才能編寫出色的內容,要么是因為您處于脆弱狀態,要么是因為質疑現狀,要么是因為您只是誠實。 但是您不必是一個混蛋。 這部分是可選的,互聯網也不是完全缺少負面內容。
寫在 (Write On)
The most important thing of all is to just write. None of these tips are any good if you don't write anything. For a lot of people, that's the hardest part. Just know that the more you do it, the easier it gets. It's kind of like playing the guitar.
最重要的是寫。 如果您什么都不寫,這些技巧都不是一件好事。 對于很多人來說,這是最難的部分。 只要知道,您做得越多,它就越容易獲得。 有點像彈吉他。
I'll leave you with this inspiration. This is Alexandr Misko. My guess is he didn't just pick up a guitar one day and play like this. It took a lot of practice. Writing is no different. If you do it enough, you might just become the Alexandr Misko of blogging.
我會給你這個靈感。 這是亞歷山大·米斯科。 我的猜測是他不僅有一天會拾起吉他并像這樣彈奏。 花了很多時間練習。 寫作沒有什么不同。 如果做得足夠,您可能會成為博客的Alexandr Misko。
翻譯自: https://www.freecodecamp.org/news/what-500-blog-posts-taught-me-about-writing-great-articles/
wp博客寫文章500錯誤