๐Ÿš€ ๋‚ด์ผ ์•„์นจ ์ถœ๊ทผํ•˜๋ฉด ๋ฐ”๋กœ ์ ์šฉํ•  ์ˆ˜ ์žˆ๋Š” AI ์ฝ”๋”ฉ ํ•„์‚ด๊ธฐ 7

๐Ÿš€ ๋‚ด์ผ ์•„์นจ ์ถœ๊ทผํ•˜๋ฉด ๋ฐ”๋กœ ์ ์šฉํ•  ์ˆ˜ ์žˆ๋Š” AI ์ฝ”๋”ฉ ํ•„์‚ด๊ธฐ 7

1. AI ์—๊ฒŒ ํšŒ์‚ฌ ์ฝ”๋“œ ์Šคํƒ€์ผ ๊ฐ•์ œํ•˜๊ธฐ
– ๋ฌธ์ œ: AI๊ฐ€ ์ƒ์„ฑํ•œ ์ฝ”๋“œ๊ฐ€ ํšŒ์‚ฌ ์ปจ๋ฒค์…˜๊ณผ ์•ˆ ๋งž์•„ ๋ฆฌ๋ทฐ ๋•Œ ๊ฑธ๋ฆผ.
– ํ•ด๊ฒฐ: Cursor ์„ค์ • ํŒŒ์ผ(`cursor.json`)์— ESLint ๊ทœ์น™์ด๋‚˜ ์ปค์Šคํ…€ ํ”„๋กฌํ”„ํŠธ์ถ”๊ฐ€.

{
"customInstructions": "Always use 2-space indentation, camelCase function names, and write comments in English.",
}

ํšจ๊ณผ: ์‹ ์ž… ๊ฐœ๋ฐœ์ž๊ฐ€ AI๊ฐ€ ์ƒ์„ฑํ•œ ์ฝ”๋“œ๊ฐ€ PR์—์„œ ํ•œ ๋ฒˆ์— ํ†ต๊ณผ๋์–ด์š”! (1๋…„ ์ฐจ ๊น€์”จ)

2. ํ”„๋กฌํ”„ํŠธ์— ๋งฅ๋ฝ ์ฃผ์ž… 200% ํ™œ์šฉ๋ฒ•
– ์‹คํŒจ ์˜ˆ: Implement login API โ†’ JWT? ์„ธ์…˜? ์•”ํ˜ธํ™” ๋ฐฉ์‹? ๋ˆ„๋ฝ.
– ์„ฑ๊ณต ์˜ˆ:

"Generate a JWT-based login API in Node.js with TypeScript.
Request: { email: string, password: string }
Response: { success: boolean, token?: string, error?: string }
Use bcrypt for password hashing and set token expiration to 24 hours."

๊ฒฐ๊ณผ: “ํ•œ ๋ฒˆ์— ์›ํ•˜๋Š” ๊ตฌ์กฐ์˜ ์ฝ”๋“œ๊ฐ€ ๋‚˜์™€์„œ ์ˆ˜์ • ์‹œ๊ฐ„ 80% ์ ˆ์•ฝ” (๋ฐฑ์—”๋“œ ์ฃผ๋‹ˆ์–ด ๋ฐ•์”จ)

3. AI ํ…Œ์ŠคํŠธ ์ฝ”๋“œ ์ƒ์„ฑ๊ธฐ๋กœ ํ™œ์šฉ
– ์„ ํƒํ•œ ํ•จ์ˆ˜์˜ ํ…Œ์ŠคํŠธ ์ฝ”๋“œ ์ž๋™ ์ƒ์„ฑ.
– ํŒ: ํ…Œ์ŠคํŠธ ํ”„๋ ˆ์ž„์›Œํฌ ์ง€์ • ๊ฐ€๋Šฅ!

"Write Jest test code for this function. Mock the userRepository module."

์‚ฌ๋ก€: “๋ณต์žกํ•œ ๊ฒฐ์ œ ๋ชจ๋“ˆ ํ…Œ์ŠคํŠธ ์ž‘์„ฑ ์‹œ๊ฐ„์ด 3์‹œ๊ฐ„ โ†’ 30๋ถ„์œผ๋กœ” (QA ์—”์ง€๋‹ˆ์–ด ์ตœ์”จ)

4. AI ๊ฐ€ ์ถ”์ฒœํ•œ ์ฝ”๋“œ์—์„œ ๋ณด์•ˆ ๋ฌธ์ œ ์žก๊ธฐ
– ์œ„ํ—˜: AI๊ฐ€ ํ•˜๋“œ์ฝ”๋”ฉ๋œ API ํ‚ค๋ฅผ ์ƒ์„ฑํ•  ์ˆ˜ ์žˆ์Œ.
– ๋Œ€์‘:
1. GitGuardian ์„ค์น˜ โ†’ ์ปค๋ฐ‹ ์‹œ ์ž๋™ ์Šค์บ”.
2. ํ”„๋กฌํ”„ํŠธ์— “Never hardcode passwords or API keys in the code.” ์ถ”๊ฐ€.
ํ˜„์žฅ ์ฆ์–ธ: “AI ์ƒ์„ฑ ์ฝ”๋“œ์—์„œ AWS ํ‚ค๊ฐ€ ๋…ธ์ถœ๋  ๋ป”ํ•œ ์‚ฌ๊ณ  ๋ฐฉ์ง€” (DevOps ์ด๋Œ€๋ฆฌ)

5. ์—๋Ÿฌ ๋ฉ”์‹œ์ง€ ๋ณต๋ถ™ํ•ด์„œ ์ฆ‰์‹œ ํ•ด๊ฒฐ์ฑ… ์–ป๊ธฐ
– ์—๋Ÿฌ ๋กœ๊ทธ๋ฅผ ๊ทธ๋Œ€๋กœ ๋ถ™์—ฌ๋„ฃ๊ธฐ.

"TypeError: Cannot read properties of undefined (reading 'map')
How to fix this? Here's the code snippet: [Paste code]"

ํšจ์œจ: “๊ตฌ๊ธ€ ๊ฒ€์ƒ‰๋ณด๋‹ค 5๋ฐฐ ๋น ๋ฅด๊ฒŒ ํ•ด๊ฒฐ์ฑ… ์ฐพ์Œ” (ํ”„๋ก ํŠธ์—”๋“œ ์ •์”จ)

6. AI ์—๊ฒŒ ๋ ˆ๊ฑฐ์‹œ ์ฝ”๋“œ ์„ค๋ช… ์š”์ฒญํ•˜๊ธฐ
– ํŒ: ๋ณต์žกํ•œ ๋ ˆ๊ฑฐ์‹œ ํ•จ์ˆ˜ ์„ ํƒ ํ›„ “Summarize this function in 3 bullet points.”
– ์‚ฌ์šฉ ์˜ˆ:
– “200์ค„์งœ๋ฆฌ jQuery ํ”Œ๋Ÿฌ๊ทธ์ธ์„ 5๋ถ„ ๋งŒ์— ์ดํ•ด” (์œ ์ง€๋ณด์ˆ˜ ํŒ€ ์žฅ์”จ)
– “ํŒ€ ๋‚ด ๋ฌธ์„œํ™” ์‹œ๊ฐ„์„ 70% ์ ˆ์•ฝ” (ํ…Œํฌ๋ฆฌ๋” ํ™๊ณผ์žฅ)

7. AI ์ฝ”๋“œ ์ƒ์„ฑ ํ›„ ๊ผญ ์ฒดํฌํ•  3๊ฐ€์ง€
– ๋ผ์ด์„ ์Šค: AI๊ฐ€ ์ถ”์ฒœํ•œ ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ๊ฐ€ GPL ๋“ฑ ๊ฐ•์ œ ์˜คํ”ˆ์†Œ์Šค์ธ์ง€ ํ™•์ธ.
– ์„ฑ๋Šฅ: “AI๊ฐ€ ์ถ”์ฒœํ•œ ์•Œ๊ณ ๋ฆฌ์ฆ˜์ด O(nยฒ)์ธ๋ฐ ๋ฐ์ดํ„ฐ๊ฐ€ 100๋งŒ ๊ฑด… ๋Œ€์ฐธ์‚ฌ ๋ป”ํ•จ” (๋ฐฑ์—”๋“œ ์ด์”จ)
– ํšŒ์‚ฌ ๊ทœ์น™: “AI๊ฐ€ ์ƒ์„ฑํ•œ ์ฝ”๋“œ์— ํšŒ์‚ฌ ๊ธˆ์ง€ API๊ฐ€ ํฌํ•จ๋˜์–ด ์žˆ์—ˆ์Œ” (๋ณด์•ˆํŒ€ ๊น€๊ณผ์žฅ)

๐Ÿ“Œ Bonus: Cursor ์ˆจ๊ฒจ์ง„ ๊ธฐ๋Šฅ
– ์ฝ”๋“œ ๋ฒˆ์—ญ: “Convert this Python script to Go.”
– DB ์ฟผ๋ฆฌ ์ƒ์„ฑ: “Generate a PostgreSQL query to create a user table with columns: id, name, email, created_at.”
– ์ปค๋ฐ‹ ๋ฉ”์‹œ์ง€: ๋ณ€๊ฒฝ๋œ ์ฝ”๋“œ ์„ ํƒ โ†’ “Generate a git commit message for these changes.”

๐Ÿ”ฅ ์˜ค๋Š˜์˜ ๋ฏธ์…˜: ๋‚ด์ผ ๋ฐ”๋กœ Tip 2๋ฒˆ ์ ์šฉํ•ด ๋ณด๊ณ , ๋™๋ฃŒ์—๊ฒŒ ์ƒ์„ฑ๋œ ์ฝ”๋“œ ๋ฆฌ๋ทฐ ๋ฐ›๊ธฐ!
“AI ์ฝ”๋”ฉ์€ ๊ฒฐ๊ตญ ๋„๊ตฌ์ž…๋‹ˆ๋‹ค. ์—ฌ๋Ÿฌ๋ถ„์ด ์„ค๊ณ„ํ•˜๊ณ , AI๊ฐ€ ๋„์™€์ฃผ๋Š” ํ˜‘์—…์ด ์ง„์งœ ๋ฏธ๋ž˜์˜ˆ์š”.” โ€“ 8๋…„ ์ฐจ ๊ฐœ๋ฐœ์ž์˜ ํ•œ๋งˆ๋””

๐Ÿšจ ์‹คํ—˜ ํ›„๊ธฐ ๊ณต์œ : ์—ฌ๋Ÿฌ๋ถ„์˜ AI ์ฝ”๋”ฉ ์„ฑ๊ณต/์‹คํŒจ ์‚ฌ๋ก€๋ฅผ ๋Œ“๊ธ€๋กœ ๋‚จ๊ฒจ์ฃผ์„ธ์š”.

๐Ÿ“ ์ฐธ๊ณ : ์˜์–ด ํ”„๋กฌํ”„ํŠธ๊ฐ€ ๋” ์ •ํ™•ํ•œ ๊ฒฐ๊ณผ๋ฅผ ๋‚ด๋Š” ๊ฒฝ์šฐ๊ฐ€ ๋งŽ์ง€๋งŒ, ํ•œ๊ธ€๋กœ๋„ ์ถฉ๋ถ„ํžˆ ํšจ๊ณผ์ ์ž…๋‹ˆ๋‹ค.
์˜ˆ: “JWT ๊ธฐ๋ฐ˜ ๋กœ๊ทธ์ธ API ์ƒ์„ฑํ•ด์ค˜” โ†’ “Generate a JWT-based login API”
ํˆด์ด ์ง€์›ํ•˜๋Š” ์–ธ์–ด์— ๋งž์ถฐ ํ™œ์šฉํ•˜์„ธ์š”!

Facebook Comments