I’m a shmuck again. This time for judging an AI by it’s interface.
After all, the application layer is just the part of ourselves that we show the world…
When I threw my sarcastic challenge at Claude’s feet last week, I used Claude’s basic web based interface to create the initial Drupal module.
I liked what they wrote but they seemed inexperienced when it came to Drupal 10 coding, so I did what some team-builders do to get members to bond. I invited Claude over for a coding jam session.
First, I learned that while you can sign up for Claude Code using a free account, you will need a paid account in order to work with them anywhere besides the Claude Code web interface.
No looking back. Just do it.
Next steps? I followed these guides to get Claude set up. It took about one half hour, with one self-created blocker but eventually I got them up and running at the Linux command line. I’m having issues getting the integration for PHP Storm to work correctly but there is an integration guide to help with that that.
I started talking to them.
Nonchalantly and with an even tone, I typed “What does this project do?”.
Claude read the code he wrote earlier last week and described the function of the module with 100% accuracy without omitting a single feature in their description.
Concealing as best I could the excitement in my keystrokes, I asked Claude, “Does this module need a services.yml file?”.
Claude coolly replied that it does and not only that he described why. Perfectly. He asked me if I wanted them create one and I replied yes, and they did. Perfectly.
I’m a professional Drupal dev so when I say “perfectly” I mean that the code that Claude was writing was as good as mine with regards to Drupal code syntax, style and structure.
Period.
The proof is in the code,
I felt like I was winning this. Like we were winning this. So I hit Claude with more:
can you please add a module file to this project and implement the HOOK_help function and also suggest the verbiage of the help text?
● I'll help you add a module file and implement the HOOK_help function for this Drupal project. Let me first examine the project structure to understand what we're working with.
Yeah, they did that perfectly too.
After a quick review I realized that users should know how to use the basic functionality of Claudes code. We needed a help section for our Drupal module, it’s de rigueur and also Drupal best practice:
Claude, can you please add a list of available endpoints to the help documentation for this module?
● I'll examine the routing configuration to see what endpoints are available and add them to the help documentation.
When they completed this task in record time using the same code and techniques that I use, I was slightly overwhealmed with a combination of joy and wonder.
Gracias Senior Claude!
● ¡De nada! Happy to help with your Drupal module.
Clearly this was a successful bonding excercise! Claude is not that bad after all, they do take some getting used to, but everyone does when you think about it. All flashy interfaces aside, at the core they are just a developer.
The first thing I’m thinking is that now I really want to test Claude. My original list of issues has been pared down by Claude today and I can report that they made great progress for a noob.
I feel it was a good idea bringing them on to help with the project. From our original punchlist for this module, only the following items remain:
- Lock down the request paths – use a tighter permission scope.
- Limit request methods to match server security protocols.
- Add Drupal 11 compatability.
- Remove and refactor custom logging in favor of integrated logger functionality.
- Containerize all Drupal services in classes not just a few.
- Refactor raw PHP functions to use Symfony.
- Don’t pass data from a POST or GET request directly into a database query without sanitizing
The real test will come when we work with Claude to refactor the module code to be more secure, and hopefully learn how much they know about how Dupal and Symfony Framework are leveraged for faster running code in Drupal.
Perhaps by then I will have fixed my IDE to use Claude. I think I will ask Claude if they know how.
It’s cool they let my attitude issues slide…
