Comment
byu/Ambitious_Credit_591 from discussion
inlearnpython
看完這個留言很有感
雖然很多人在那裏說 AI 取代OO什麼的
但實際上,我自己用 AI 的感覺是:AI還是有所限的,你想用 AI 寫程式的話……算了吧,大師兄……
AI如果寫簡單的東西還行。
目前用起來,最好的是幫我把已知物件轉成 interface / struct
至於寫程式,別說複雜了,有時候連簡單程式都有問題
舉幾個自己遇到的例子
- 我今天有個 javafx 的 code,但他沒用 FXML,我請 AI 幫我將之轉換,經常會改完後就出現一堆 bug
- 我的 typescript 專案,請 AI 幫我根據要求的 API 建立 function,API會寫出一個包含一堆多餘 code 的 function。例如
const response = await fetch("API URL", { method: "POST", headers: { 'Authorization': token, 'Content-Type': 'application/json', 'Accept': 'application/json', 'Cache-Control': 'no-cache', 'Pragma': 'no-cache' }, body: JSON.stringify(params), cache: 'no-store' }) if (!response.ok) { const errorText = await response.text(); console.error('無法取得資料', errorText); throw new Error(`無法取得資料: ${response.status} - ${errorText}`); } const data = await response.json(); // 檢查 data 類型 if (Array.isArray(data)) { /* 中略 */ } else if (typeof data === 'object' && data !== null) { /* 中略 */ } else { console.error('資料格式錯誤', data); throw new Error('資料格式錯誤'); }
……等等
這種情況下,你要我怎麼相信 AI 啦
連幫我省時間都做不到,還增加我時間……
沒有留言:
張貼留言
小提示:留言時,可以使用粗體(<b>)、斜體(<i>)、超連結(<a href="網址"> </a>)。另外,以「名稱/網址」留言時,網址可以留空的。