AI「Vibe Coding」係乜東東?輕鬆寫Code定伏味濃?

Ai




什麼是「氛圍編碼」?

雖然讓人工智能(AI)為你的網站編寫代碼似乎是一個好主意,但這並不是沒有其限制。

當OpenAI的聯合創始人安德烈·卡帕西(Andrej Karpathy)在二月興奮地在X平台上發帖談論他的新興趣時,他可能沒有意識到自己即將創造一個能夠概括一整個運動的術語,這個運動在全球逐漸獲得動力。

“有一種新的編碼方式我稱之為‘氛圍編碼’,在這種方式中,你完全投入氛圍,擁抱指數增長,忘記代碼的存在。”他說。“我正在建設一個項目或網絡應用程序,但這不算真正的編碼——我只是看到一些東西,說些話,運行一些東西,複製和粘貼一些東西,然後大多數時候它就能正常運作。”

如果這一切聽起來與仔細研究代碼行非常不同,那是因為卡帕西在談論一種特定的AI輔助編碼風格。他的話引起了軟件開發人員和熱衷的業餘愛好者的共鳴。在接下來的幾個月裡,他的帖子引發了網絡上的思考文章和熱烈辯論。但究竟什麼是氛圍編碼?誰能受益於它?它的未來又會如何?

那麼,它到底是什麼?

要真正理解氛圍編碼,重要的是要注意,雖然這個術語可能是新的,但其背後的編碼技術並不是。在過去幾年中,像Anthropic的Claude、OpenAI的ChatGPT和Google DeepMind的Gemini等通用聊天機器人已經在編寫代碼以構建軟件(包括遊戲、網站和應用程序)方面變得越來越出色。但最近出現的專門AI編碼助手,如Cursor的Chat(之前稱為Composer)和GitHub Copilot,真正引入了氛圍編碼的概念。這些助手可以對你試圖做的事情進行實時預測,並提供直觀的建議,使創建軟件變得比以往任何時候都容易,即使你從未編寫過代碼。

“在過去的三到四年中,這些AI自動完成工具變得越來越好——它們最初是完成單行代碼,現在則可以為你重寫整個文件,或創建新組件。”介面設計公司Sandbar的軟件設計師巴倫·韋伯斯特(Barron Webster)說。“你可以放手讓機器做的事情範圍隨著時間不斷增長。”

什麼不算氛圍編碼?

但並非所有AI輔助編碼都算是氛圍編碼。要真正進行氛圍編碼,你必須準備好讓AI完全控制,並在過程中不檢查或直接調整它生成的代碼——完全信任這種氛圍。在卡帕西的長篇帖子中,他解釋了當他進行氛圍編碼時,他輕鬆地接受Cursor工具給他的所有建議,並相信它能夠修正自己的錯誤。“當我收到錯誤消息時,我只是將它們複製粘貼進去,通常這樣就能解決。”他寫道。“有時LLMs無法修復錯誤,所以我只會繞過它或要求隨機更改直到它消失。”

根據設計平台Canva的軟件工程師謝爾蓋·茨洛瓦爾尼科夫(Sergey Tselovalnikov)的解釋,氛圍編碼本質上是通過提示與代碼庫進行交互,因此工程師的角色僅僅是與工具對話並檢查其結果。“安德烈有點像一個影響者,他非常有意識地定義了這個術語。”他說。“他只是發了一個玩笑,但因為他基本上正確地指出了行業中發生的事情,所以這個術語就起飛了。”

氛圍編碼適合我的項目嗎?

麻省理工學院媒體實驗室的AI安全研究員托賓·南方(Tobin South)表示,最有可能從氛圍編碼中受益的人分為兩類。一類是像卡帕西這樣已經對編碼有良好掌握的人,他們知道如果在構建重要項目時出現嚴重錯誤該如何修正;另一類則是完全沒有編碼經驗的初學者。“我會把氛圍編碼定義為擁有一個你無法執行的願景,但AI可以實現。”他說。

氛圍編碼的主要吸引力在於它的簡便性和可及性。AI輔助工具使得生成代碼和快速製作小型項目(如原型網站、遊戲或網絡應用程序)變得比人類更快。但雖然這種不經意的方式在創建這類低風險、簡單的數字產品時可能是合理的,但在更大、更複雜的系統中,風險則要高得多。由於AI編碼工具是由大型語言模型(LLMs)驅動,它們生成的代碼同樣可能包含錯誤,這與由LLM驅動的聊天機器人所提供的答案一樣。如果你試圖編碼的內容需要訪問大量信息數據庫、安全措施來保護這些數據、大量用戶或來自用戶的數據輸入,這將是一個大問題,茨洛瓦爾尼科夫說。

“氛圍編碼可能會產生很多錯誤和問題,但在一個小遊戲或不存儲任何數據的小應用程序的環境中,這些問題的重要性要小得多。”他說。“我個人會對更大的項目更加小心,因為如果你不知道是否存在任何安全漏洞,而你又沒有自己測試代碼,那是非常危險的。”

這一點對於非編碼者尤其適用。一位名為Leo的X用戶和氛圍編碼的擁護者在上個月發帖談論他僅使用Cursor構建了一個SaaS應用程序(即運行在互聯網上的軟件,而不是下載到用戶設備上),結果很快引起了惡作劇網友的注意,他們立即開始挑剔他服務的安全性。“伙計們,我正在遭受攻擊,”他在兩天後發帖說。“我不懂技術,所以這花了我比平常更長的時間來搞清楚。目前,我將停止在X上公開分享我的工作。外面有一些奇怪的人。”

最終,雖然氛圍編碼可以幫助將一個模糊的網站或遊戲想法變成現實,但它無法使其可靠或安全。但目前已有許多現有工具可以幫助你,從創建數據庫到添加身份驗證措施。因此,雖然你無法用氛圍編碼創造真正有價值、安全、健壯的應用程序,但只要你謹慎,它可以是一個有用的起點,南方說。

他認為,AI輔助編碼助手將繼續變得更加強大,並且網頁托管公司將繼續將AI集成到他們的工具中,使其更易於使用,這意味著創建軟件的障礙將持續降低。“這會將生產軟件的成本大幅降低到指數級別。”他說。“世界將不得不適應這種新現實。這一趨勢不會消失。”

這篇文章引發了我對氛圍編碼的思考,特別是在當今快速變化的技術環境中。雖然氛圍編碼為許多新手提供了一個進入軟件開發的門檻,但它同時也揭示了對代碼質量和安全性的潛在風險。尤其在面對複雜系統和重要應用時,依賴AI生成的代碼而不進行充分測試可能會導致嚴重後果。因此,對於希望利用這種新技術的開發者來說,具備基本的編碼知識和安全意識仍然至關重要。

以上文章由特價GPT API KEY所翻譯及撰寫。而圖片則由FLUX根據內容自動生成。

🎨 Nano Banana Pro 圖像生成器|打幾句說話就出圖

想畫人像、產品圖、插畫?SSFuture 圖像生成器支援 Flux Gemini Nano Banana Pro 改圖 / 合成, 打廣東話都得,仲可以沿用上一張圖繼續微調。

🆓 Flux 模型即玩,不用登入
🤖 登入後解鎖 Gemini 改圖
📷 支援上載參考圖再生成
⚡ 每天免費額度任你玩
✨ 即刻玩 AI 畫圖
Create a sticker set maintaining 100% of the woman's original facial features from the provided image. Do not alter the face, focusing on ultra-realistic details of the facial structure, eyes, eyebrows, nose, mouth, and expression. The final face must be realistic, not cartoon-like. She has long, voluminous hair.
1. Makeup:Maintain Original Face: We will preserve the structure of your face, eyes, eyebrows, nose, mouth, and expression as closely as possible to the original image to maintain naturalness and uniqueness, while adjusting the tone to be softer:

Eyes: Slightly reduce the sharpness of the Cat Eye eyeliner to a thin line close to the lash line for a softer look, while still maintaining eye definition.
Eyeshadow: Use natural tones like light brown, peach, or beige.
Eyebrows: Original shape, but brushed up to look softer and more natural.
Lips: Glossy, pink-tinted, nude-pink, or coral-toned lipstick/tint to make the lips look full and moisturized. Focus on a bright but not overly intense look.
2. Hairstyle:Natural Voluminous Long Hair: Her hair is long and flowing, but the styling will emphasize natural volume and movement. Soft, natural waves.
3. Outfit:

Attire: A white open-back bodysuit paired with distressed, faded blue denim shorts. There is a message "Kunika" on the shirt.
Shoes: Elegant, simple open-toe flat sandals.
Accessories: Styled freely and fittingly for each scene.
4. Poses & Sticker Elements:Poses: Various poses such as waving, jumping, walking playfully, reading a book, holding up a sign, cheering with both hands, stretching, or making a celebratory gesture, to create a cheerful and friendly atmosphere.Decoration: Include elements like small rainbows, sparkling stars, clear bubbles, hearts, balloons, or light-colored dots to decorate and enhance the fun of each sticker scene.Style: Thin black border around the sticker. Use a modern, rounded 'Itim' style font for the text.Text: Add short emotional phrases written in a cute, beautiful script near the sticker (no speech bubbles/text boxes):

"Hello"
"Love you"
"Submitting work"
"Great"
"Got it"
"Thanks!"
"Wait a sec"
"Ready to care"
"Fight"
"Let's do it"
"So cute"
"OK"
"Sweet dreams:
"Get well soon"
"555"
"You're welcome"
"HBD" 
"OMG" 
"Sorry"
"Got a headache" 
Guidelines: Do not include a text box. Ensure balanced composition with sufficient white space—not cluttered. Match the pose to the text.
Emphasis: Reiterate 'maintain 100% of the original face features from the provided image,' 'ultra-realistic facial detail,' and 'professional studio lighting on face (realistic face, not cartoon face).

Use Cantonese in the stickers. {
"intro": "Create an ultra realistic 8K UHD DSLR editorial fashion photo based on the attached image as a reference of facial features, maintaining 100% likeness.",

"subject": {
"identity": "A beautiful real human woman styled as a modern high-fashion Cleopatra queen, maintaining 100% likeness to the reference image.",
"angle": "Full-body portrait captured at eye level with ultra-sharp clarity and no blur.",
"pose": "She stands confidently with one hand gently touching a tall carved pharaoh statue — the kind commonly found in Egyptian palace entrances — while her other hand holds an ornate cobra staff.",
"expression": "Regal, intense, and empowered.",
"hair": "Shoulder-length dark brown hair, sleek, glossy, and styled with subtle volume.",
"makeup": "Full glam with bold editorial colorful eye makeup — vibrant turquoise, sapphire blue, violet, and gold blended in a dramatic high-fashion shape, winged liner, glowing highlighted skin, sculpted cheeks, and glossy nude-rose lips."
},

"wardrobe": {
"outfit": "A luxurious high-fashion Egyptian couture gown with a dramatic, sexy silhouette — fitted bodice, flowing structured panels, iridescent fabrics, and metallic serpent-inspired embellishments wrapping around her hips and waist. The gown is elegant, regal, and runway-level extravagant.",
"footwear": "Flat Egyptian-style sandals with gold straps and gemstone accents.",
"accessories": "Opulent Egyptian jewelry including a golden collar necklace, serpent arm cuffs, gemstone earrings, and stacked bracelets.",
"headpiece": "A stunning Egyptian queen crown or headpiece featuring intricate gold filigree, gemstones, and a central cobra motif.",
"prop": "A tall ceremonial cobra staff with sculpted scales, gemstone inlays, and a dramatic raised cobra head."
},

"background": {
"location": "In front of the exterior wall of an Egyptian palace.",
"environment": "Ancient sandstone walls decorated with deep carvings and hieroglyphics. Beside her stands a traditional Egyptian palace statue — a tall carved pharaoh figure — which she touches with her hand. Warm golden desert sunlight illuminates the scene.",
"atmosphere": "Powerful, cinematic, regal — blending ancient Egyptian grandeur with high-fashion editorial aesthetics. No blur effect, all textures crisp."
},

"camera": {
"lighting": "Dramatic editorial lighting using strong directional sunlight with soft diffused fill, highlighting the gown’s texture, gold accents, and facial features.",
"lens": "50mm or 85mm prime lens for hyper-detailed realism.",
"settings": "ISO 100, f/5.6, 1/250 sec for a perfectly clear full-body image.",
"quality": "8K ultra-realistic, HDR, vibrant color grading with warm desert tones and high-fashion contrast."
}
} 一隻在香港茶餐廳喝奶茶的貓