Centarro: Exploring AI to accelerate Drupal Commerce development

I've been slow to try out AI tools even as they've grown in popularity. Part of it is the pedant in me bristling at the fact that we're all now calling "AI" what we used to call "machine-learning" on "big data." But I can get past that to admit that turbocharged predictive text generation applied to coding is actually pretty neat.

Recently I've been exploring AI assisted development by switching from VS Code to Cursor and trying out different chat prompts and models while working on Drupal Commerce. I haven't been tracking the myriad tools and models too closely, so I opted for the tool that required the least amount of change for me. All my extensions and my fine-tuned custom theme transfered over without issue, so I was happy to move forward with Cursor. ☺️

I've had a few "Aha!" moments while working in Cursor along with some natural frustrations. Before relaying the former, I can illustrate the latter. Cursor uses AI to make code suggestions in the editor based on what it thinks you want to do. Once it makes a suggestion, you hit tab to apply it, which means quickly roughing out a simple function is an exercise in whack-a-mole as it continually expands suggestions where you just wanted to indent. Easy enough to train myself around, but perhaps I can find a setting to make this less aggressive.

Last week I turned up the need for a minor improvement to the Commerce Recurring module. This module defines a subscription entity type and a related entity trait that will create a subscription for a customer based on their purchase of a given product variation. The module supports a wide variety of use cases for subscription billing - pre vs. post-billed subscriptions, fixed price vs. metered usage, prorations, etc. - and it lets you determine the billing cycle based on fixed dates or rolling intervals.

Read more
PubDate

Tags