So I vibe-coded some effects... #750
Replies: 5 comments 2 replies
-
Hi, Damian.
Actually, for discussing code, tossing it on GitHub where people can see it
and analyze it with familiar code really is the way to go.
I have some nits (I always do - Dave's about tired of me. :-) ) like weird
whitespacing, using new loop iterators, making your own bresneham when we
already have several, making your own safe draw pixel thing when www have
several, the use of double-precision math (which is emulated in software on
ESP32) instead of single precision floats (which are in hardware),
excessive static_cats, my preference of early return over lengthy if else
chains, namining conventions (prefer kFoo over foo when it's a constant),
the weird additional iner scope for the "blue tinting", preference for
std::clamp over what you did with centerWeight, and such, but the code
isn't BAD. I know it sounds like I'm shredding it, but that's kind of how
code reviews work; people (so far, mostly humans) that have reached zen
with the code base and know overall styles and other functions that a blind
"make me a thingy" AI command might not find is how we make code better.
That's how it works reviewing human-authored code,too.
Note that I'm explicitly NOT commenting on the likelihood of it being
accepted (I'm clearly no good at that - see the branch named after me for a
few dozen effects I worked up that didn't make the cut) or the quality of
the pixels splashed around. I've actually found it helpful to also get AI
to barf up an HTML preview when doing show-and-tells, such as my recent
https://robertlipe.com/tmp/PatternCyclicCA.html
Calling drawRectangle to draw a pixel is just weird. Please use our actual
primitives. I'm skeptical that the setting code works, but I'm a terrible
reviewer for that since I don't think I've ever successfully landed
settings code without extensive coaching from Rutger.
It might be a fun exercise to feed it the other effects as context and ask
it to make this code more like the existing practice (not that even that is
always awesome...) and tell it to use best practice modern C++, such as
modern loops, using std::clamp,
I have a GEMINI.md that I use to sway Gemini's own crazy styles more toward
what's done here. I'm pretty sure that Dave has one for Copilot. Maybe we
should start chucking those into the tree so we're not all convincing our
AI's about our interpretations of The Right Way.
…On Wed, Aug 20, 2025 at 7:02 PM Damian Karlson ***@***.***> wrote:
Hi folks - I've really been wanting to learn more about creating effects
but just haven't had the headspace to learn something new on top of life,
family, day job, etc. So I thought I would try out GPT5 mini in VSCode to
see how it would handle creating Mesmerizer effects based on a prompt.
These took a number of iterations to get them to where I liked them. I'm
curious, in y'all's opinion, how *terrible* is the code quality on these?
They build & run on the Mesmerizer kit I bought from Dave.
Sorry for the zip. I didn't want to open a PR just to have a conversation,
and I haven't pushed them to any repo of mine yet. They're just two .h
files - one is called Boxes and the other is Warp. Patterns.zip
<https://github.com/user-attachments/files/21908196/Patterns.zip>
—
Reply to this email directly, view it on GitHub
<#750>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACCSD37SASTE3E7QEYW5TO33OUEANAVCNFSM6AAAAACENAIYM2VHI2DSMVQWIX3LMV43ERDJONRXK43TNFXW4OZYG43TAMBYGM>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
what's the worst that can happen.
Oh, if it was just the biggest pile of suck I'd ever seen (a hotly
contested title), you'd have heard about that, too. :-)
The design isn't *bad*. The implementation isn't *bad*. It's not flagrantly
AI-scented with bullet lists with ❌ and ✅ all over the place. If you'd
told me it was an early programming effort from someone new to the language
and new to the project, I wouldn't have blinked an eye at it. You've been
here a while; you've seen me offer language coaching/reviewing/mentoring
pretty equally to everyone, regardless of experience level...and whether
they want it or not. :-)
If you (well, if those with opinions that actually count) think these
effects are awesome enough to be included, I'd encourage you to spin up a
fork with all that annoying other stuff that effects need so that others
with Mesmerizers can experience the visuals for comment and those that care
about code can argue bits and bytes.
It's not my project, but open source works by people making code, mostly to
scratch their own itches. If this was just a learning experience for you
and you don't care,but you have more blinkies that you like, great. Mission
accomplished. If you want to try to land it, those of us that DO care about
such things can help with that.
Since you're the second person to mention it within the hour, you're
correct that there's a bit of tension in the style of those that review
such things here. For example, I come from a different pedigree of large
companies with different style guides, and "complete English sentences
<https://google.github.io/styleguide/cppguide.html#Punctuation_Spelling_and_Grammar>
with
punctuation" is drilled into us because we had a large number of
non-English natives in the code. I've lost that battle (repeatedly) here,
so I didn't call it out in this code. I've just accepted that that's the
norm here. Likewise, I actually had to check the standard that, unlike C,
leading underscores in symbols actually are legal class member names just
because I'd never seen that elsewhere,
<https://google.github.io/styleguide/cppguide.html#Variable_Names> as
putting them in the back is the norm. They're a disaster in global scope
because leading underscores are reserved in C, and the library and OS may
conflict with them.
There are preferences and styles, there's correctness, and there's just
plain good taste.
It's pretty nice that I didn't see anything in the middle category
(off-by-ones, loops that walk off the end, etc.) in this code. So your code
generator is correct (well, maybe it's so wrong that I just didn't catch
it) it's just having trouble keeping a consistent "accent" and in picking
up the nuances of the larger, overall project.
That's a passing score.
Now, for those of us that are AI-curious, how did this come about? Did you
say, "Make me a pattern," and let it venture off on its own, or did you
describe visually how you wanted it to look and then let it code it or
something in between?
…On Wed, Aug 20, 2025 at 7:47 PM Damian Karlson ***@***.***> wrote:
Thanks, I appreciate your time and opinion. I follow this repo, and I see
the opinionated discussions in the reviews & PRs. At first I wasn't sure if
I wanted to show y'all AI slop that only exists because I wanted to try
making effects...and then the more I thought about it, I got around to
"well, why the hell not. what's the worst that can happen." :)
—
Reply to this email directly, view it on GitHub
<#750 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACCSD32PMYDKNLYK4KI72GL3OUJLHAVCNFSM6AAAAACENAIYM2VHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTIMJXGE2TIMY>
.
You are receiving this because you commented.Message ID:
<PlummersSoftwareLLC/NightDriverStrip/repo-discussions/750/comments/14171543
@github.com>
|
Beta Was this translation helpful? Give feedback.
-
No, I was very specific about what I wanted.
Interesting. Thank you.
I've had some luck with the opposite when building effects, either by
feeding Gemini nerd math (as with the cited automata thing that I need to
get back to...) or just giving it visual constraints and a dash of
inspiration and letting it go.
As a tease for the six people that actually read these discussions, I spent
MONTHS scribbling in a notebook (yeah, paper. Wanna start somethin'?)
trying to get the hex math right that's described in
https://www.redblobgames.com/grids/hexagons/. Once I let three Ais (Gemini,
ChatGPT, Windsurf) tag team it (none of them got it right) I FINALLY got to
a happy place, but I made enough of a mess in the process that I'm still
some time away from submitting it. That's one of two
NigthDriverLED projects I've done where I relied heavily on AI and probably
wouldn't have succeeded without it.
This is why I'm interested in how others are succeeding.
use extended star streak warp sequences...but whatever.
No need. They've already arrived! Plus, if you show it long, people can see
the wires...
scratches that same itch. Write code, make pixel do pretty thing, be happy
:)
Same. After years of working on invisible things, there's something
satisfying about working on attention-getters.
"Hey, you know when you pressed tab and your cursor landed in the right
place? That was my code! No, man, you don't understand. It's just a
multiple of eight. You backspaced over a multibyte character!" My parents
never had any idea what I did for a living. Everyone loves blinky lights.
Blink on!
|
Beta Was this translation helpful? Give feedback.
-
Here’s one more person actually reading the discussion. I grabbed the zip file, and since I’d never tried this before, I first checked the existing effects in the code. I got Damian’s two effects running on my Mesmerizer, and honestly, I think they look pretty good. Don’t ask me about the code quality though. Someone told me last week: as long as it works, that’s what counts. When that was running, I tried making an effect together with Chat, and the result was “Fireworks.” Thanks, Damian, for kicking off this discussion. Looks like Harke picked up a new little skill along the way too! effects.mp4 |
Beta Was this translation helpful? Give feedback.
-
So adding my two cents to this:
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi folks - I've really been wanting to learn more about creating effects but just haven't had the headspace to learn something new on top of life, family, day job, etc. So I thought I would try out GPT5 mini in VSCode to see how it would handle creating Mesmerizer effects based on a prompt. These took a number of iterations to get them to where I liked them. I'm curious, in y'all's opinion, how terrible is the code quality on these? They build & run on the Mesmerizer kit I bought from Dave.
Sorry for the zip. I didn't want to open a PR just to have a conversation, and I haven't pushed them to any repo of mine yet. They're just two .h files - one is called Boxes and the other is Warp. Patterns.zip
Beta Was this translation helpful? Give feedback.
All reactions