Getting on Rails with ChatGPT
Ruby on Rails can be daunting for newbies, but the rise of LLMs gives another tool for learning it's many powerful conventions.
I have been using Rails for years, but I’ve learned more about the Rails Way in the last year than in the 3 or 4 before then. There are two reasons for this. First, I’ve been building a greenfield project using plain server-rendered rails. Second, I’ve been working on this project with the help of ChatGPT.
For me, LLMs have boosted the appeal of older programming languages and frameworks. Older frameworks tend to have robust docs and years of content on blogs and forums. Rails' philosophy of "Convention over Configuration" is particularly suited to working with LLMs. Conventions are powerful, but they can be elusive without guidance. Prior to LLMs, that guidance came in the form of docs and mentorship from senior devs. Now, LLMs can serve an efficient alternative for the simpler cases.
A Build->Ask->Fix loop has been common in my Rails development cycle lately. The process is simple. I build something. Then I show it to ChatGPT and ask “What’s the more conventional way to do this with Rails?”. Usually it teaches me something interesting that lets me simplify my approach greatly.