DEV Community

mikkergimenez
mikkergimenez

Posted on

A really great use-case for AI Coding

I like many devs, have been relatively underwhelmed by AI coding tools. I mean on the one hand, they're amazing! What an amazing capability that seemed like science fiction just a few years ago. On the other hand, for any reasonably complex application, the amount of context you have to provide, provides too much room for error, and if you let the LLM run wild, you can end up doing more harm than good.

But there's a class of applications, that I think LLM's could vastly accelerate, especially for the solo developer, and that's any application that's modular.

Two examples come to mind, one I've actively tested and am using, the other that I haven't gotten back to yet.

Dashboards

I have this dashboarding app at work I periodically update to try and unify all of the different information sources I'm interested in.  Some practical like hacker news and a todo list, some nerdy, like I have a vintage photo app slideshow and a Synthwave music player.  It's probably 98% vibe coded, and the specs are markdown file in the "specs" folder:

Here is my layout.md file:

I want the layout of the three columns in the app to be as follows. The order of the components in a column matches the order in the below list.

Header - Contains Global Settings, including light/dark selector.

Left Column - MusicPlayer, LinearComponent, ToDoListApp
CenterColumn - VintageImages, OnThisDay
RightColumn - FlashCard Component, HackerNewsComponent

## Theme.

- The app should have a selectable light and dark theme.
Enter fullscreen mode Exit fullscreen mode

And here is the spec file for a single component:

I want a music player component that has the following features:

- Select a playlist (The playlists are the list of folders in the music folder, the music is stored in said folder. The music folder is in the root of the project.)
- Play a random song from the selected playlist.
- Remember the last selected playlist.
- Show the currently playing song.
- Show play/pause/skip controls.
- Auto-play the next random song when one finishes.
- There should be a volume control
- The Playlist selector text should be darker or include the name of the playlist.
Enter fullscreen mode Exit fullscreen mode

It's not perfect.

Here is my todolist component:

I want to add a todolist component. The rules of the todo list are as follows.

10 Items on the todo list
A Todolist Item has text and an optional link (This is creatable and editable, there's an edit button)
A Todolist Item has a delete button
There can be more than ten items on the todo list, but you can only see the 10 most recent items.
Store the items in a local json file for now, this should be modular so we can put in an sql backend if needed.
Right now page.tsx is getting big, let's ensure the todolist frontend items and todolist backend items are in their own separate files.
Enter fullscreen mode Exit fullscreen mode

I explicitly say in this componment spec that I want to store the data in a local json file, but the LLM for some reason interpreted "local json file" (which would have persisted on the hard disk) to "local storage" which does not persist between browsers.

But still, a thing that may have taken me quite a bit of work to code, I can get 80% of the way there with a few minutes of speccing and prompting.

DAW

A while ago I had this idea for a modular in-browser DAW. The idea was that the different components, the sound source, the sequencer, the effects, would be modular in pretty predictable ways. Rather than having complex say sequencers, you might literally have a sequencer that's just a 4/4 kick drum, with an off-beat kick every 4 measures, or a 16 note hihat, with a knob to vary the tambre of every second hat. The noise makers would be similarly modular in that instead of having a subtractive synth, you might have a bass synth, a bell synth, a lead synth etc. The goal being be that for certain kinds of music there are fairly predictable patterns, that you could pull up in natural language, and maybe improvise a track, and expect that each component could be musical and compatible by nature. There would be global timings and keys that could synchronize all the instruments.

It's an experiment, you lose some flexibility but add the ability to have sort of a casual generative music machine in your browser. But the point was that when I first came to this, I had to code each of these components individually, I look forward to getting back to it, and structuring it in such a way that the context for each component is limited and can be written with spec.

Conclusion.

I don't know that any of the above makes giant strides in making it easier to achieve true innovation. But lots of products probably have a similar design pattern. For instance, a tool like Zapier lives and dies on all the integrations it has. And if you thought you didn't want to approach a problem, because even though the core logic was fairly simple, the integrations or modules would be fairly time consuming, AI may help lower that barrier to entry.

Top comments (0)