저는 개발자가 아닙니다. 기본적인 코딩 지식만 있을 뿐이고, 간단한 코드 정도는 읽을 수 있습니다.
최근에 플러그인을 하나 만들어 보았는데요, 대부분 Gemini 무료 버전을 이용했습니다. 코드의 95%가 AI가 생성한 것이었습니다.
플러그인은 확실히 작동하고, 인터페이스와 관리자 경험도 꽤 괜찮은 편이지만, 코드 청결성에 대해 정당한 우려가 있습니다. 제 프롬프트 작성 노력[1](그리고 공식 코드 발췌문을 AI에 수동으로 입력해 주는 것)에도 불구하고, 해당 코드가 Discourse 환경을 잘 활용하지 못하고 있다고 확신합니다. 헬퍼, 컴포넌트, 클래스 등 말입니다. 그래서 가끔 공식 코드의 일부를 AI에 입력해 주었습니다.
요즘 많은 개발자들이 워크플로우에서 AI를 사용한다는 이야기를 들었습니다. AI가 Discourse 생태계에 대한 인식이 있다면 AI가 생성한 Discourse 플러그인 코드가 얼마나 더 좋아질지 궁금합니다.
Claude, 특히 Opus 모델을 사용해 보라고 조언을 받았습니다. 또한 토큰 소모량이 많아 비용이 비싸다고도 들었습니다.
제 프로젝트에 대해 큰 야망은 없습니다. 그저 취미일 뿐이죠. 제가 상상하는 플러그인이 현실에서는 어떤 모습일지 궁금한데, AI는 이를 파악하는 데 꽤 뛰어납니다.
플러그인이나 컴포넌트를 개발할 때 AI를 사용해 보셨나요? IDE에 통합된 Claude Opus를 시도해 보셨나요? 도움이 많이 되셨나요?
기존 코드베이스를 적절히 활용하여 새 코드를 생성하나요?
비용은 얼마나 드나요? 어떤 요금제를 선택하셨나요?
지난주 저는 ask.discourse를 사용하여 Discourse 플러그인을 작성하는 데 시간을 보냈습니다. 만들고 싶은 플러그인의 기능을 설명하기만 하면 수많은 팁과 코드 스니펫을 출력해 주었고, 그중 일부는 실제로 실행되었습니다.
저는 취미로 프로그래밍을 하는 사람입니다. Discourse 인스턴스 외에도 MySQL 데이터베이스, PHP 백엔드, 그리고 Jquery/JavaScript 프론트엔드를 갖춘 다른 서버를 운영하지만 전문 프로그래머는 아닙니다. 해당 사이트를 개발할 때 대부분 그냥 구글에 원하는 것을 물어보면(아마도 Gemini일 텐데?) 코드 예제를 출력해 줍니다. 대부분의 코드가 바로 실행되며, 그렇지 않은 경우에도 저는 JavaScript에 충분히 익숙하여 원인을 파악할 수 있습니다.
수년간 다양한 프로그래밍 언어를 사용해 왔고, 과거에는 몇 시간씩 읽기, 검색, 실험을 반복해야 했던 것들을 이제는 구글에 물어보면 몇 분 만에 끝낼 수 있습니다. 과거에는 몇 시간 또는 며칠이 걸리던 작업이죠.
ask.discourse가 얼마나 잘 작동하는지 놀랐고, 결국 원하는 기능을 대략 수행하는 플러그인을 작동시켰습니다. 몇 가지 스타일링(CSS)을 추가하면 사용 가능한 플러그인으로 발전할 수 있을 것입니다. AI 지원 서비스가 코드 생성을 효율적으로 만들어 줄 수 있다는 가능성에 큰 관심을 갖고 있습니다.
NEVER store find() results - causes stale element references after re-renders
ALWAYS lint any changes you make
Do AIs understand the all-uppercase emphasis? Would it act differently if written “Never” and “Always” instead?
Are things like “architect mode” or other “xxx mode” prompts becoming soft standards in AI development? Do they have any real effect on model behavior? Are they pure conventions?
Don’t write obvious tests
I can see what an obvious test is, but do AIs understand what an obvious test (or obvious anything) is?
I toyed for a couple of days with Claude in VSCode. It’s quite impressive to see everything working by itself. Reading, creating, modifying files, running bash commands, etc…
About Claude’s work on plugin creation, this is what I observed:
When iterating over the same pieces of code and solving issues, it tends to use excessively specific variable names. For example, it would name a variable original_url instead of a very fine and simple url, as if meant to point out changes that were made, when it’s not necessary.
Iterations often lead to convoluted code, and sometimes, unnecessarily complicated queries. Asking the AI to review and point out parts of code that can be refactored from time to time is proven useful for this
When asked to find solutions for a given issue, I’ve been pleased by the answers.
The suggestions seem accurate. When it proposes several options, it can accurately weigh the pros and cons of each one.
In SCSS, it (rarely) uses hardcoded colors where it’s not advised, instead of using Discourse’s color variables.
After several tasks have been made, I like to ask the AI to review the code and see if some parts can be optimized without impacting the maintainability. I didn’t have many issues with the results. Sometimes, it tweaks too much and breaks the code.
Occasionally, it seems to create unnecessary conditions for the sake of security and robustness, but for situations I’m not sure exist in real-world conditions.
For example, in my search-related plugin, it would check if a post has any topics associated with it. But posts without a topic are not supposed to exist in Discourse, I think. If you have one, it means something went very wrong in your instance at some time, right? I feel it made no sense to make this check in my plugin.
It seems good at scaffolding tests!
So, good experience so far, even without using advanced AI configuration.
I spent my weekly quota in four days, which is great because it forces me to take a three-day pause
Curious to see how it will change when Discourse’s skills are added.
하루 종일 Claude와 함께 적응하는 시간을 보냈습니다 (ChatGPT와는 이별했죠). 이제 Claude Code를 활용해 최소한 프로토타이핑을 해보거나, Discourse 관련 궁금증을 풀어볼 생각에 기대가 큽니다. 어딘가에 숨겨진 기능이나 팁이 있다면 기꺼이 시도해 보고 싶습니다.
플러그인 개발을 실험해 본 후, Claude를 이용해 테마를 만들어 보았습니다. 결과는 재앙이었지만, 단순한 CSS 요청에도 자주 무의미한 내용을 출력하는 경향이 있어 크게 놀랍지는 않았습니다. 각 요소가 놓인 맥락을 제대로 파악하지 못하는 것 같아, 요소가 제대로 제작되거나 배치되지 않는 경우가 많았고, 쓸모없는 속성이 한가득 붙어 나오는 일이 잦았습니다.
테마 개발을 위한 구체적인 지침이 마련될 때까지, 이러한 작업에는 매우 신뢰할 수 없다고 생각합니다.