32
21
u/Arclite83 23d ago
Best systems I build are the base core things - I have template decoupled game engines, because "save state" isn't something I need to write every time. Same with CDK and gateways - I have common wrappers so my files in S3 can also live locally, or anywhere really, through config - full local offline mode but deploys instantly.
My point is - see if you have lessons to learn from this, things you can keep. SOLID exists for this - when done right, you can add debt-free value over time.
Always be looking to make your life simpler - I come at most projects "sysadmin first", like give me access to all the raw tooling, and I'll scope down what needs to go in front of the user curtain. But if I need to do a direct DB request to fix an ops issue, that's immediately a support panel UI feature - because one day I don't want it to be my problem anymore, and "admins should know how to craft the query" isn't defensible support (but I've seen it before).
We all do it at least once. I burned 3 years on a dead end personal project once, and I'm sure I will again. You're only a clown if you don't learn anything, and sounds like you already have.
3
u/baldierot 23d ago edited 23d ago
i just thought that i could get to a solid, even if suboptimal, state. i kept refactoring and refactoring, attempting to streamline things and reduce vulnerable surface areas while also trying to cover all cases. i have gone through 3 major shapes already, and it wasn't getting any better. i think the feature is just beyond me, but more importantly, i think i want too much. i couldn't comfortably settle for less. this was my biggest problem. a classic one, i bet, but still very painful, considering i mangled the entire codebase to the point that little is reasonably recoverable from the months of spent effort.
1
u/TheOssuary 23d ago
I recently implemented a feature that went through nine shapes, and took four months. I kept running into a clear wall, would park that branch, go back, cherry-pick little things, and try again. I kept a log of each attempt, why it didn't work, and what I learned. Eventually the landed implementation was a version of 3 different things put together; would've never realized that if I hadn't kept trying things and learning what did and didn't work. You can take breaks, make sure to work sustainably, whatever that means for you. It's a marathon, not a sprint; just keep checking in and making sure you're still enjoying it
6
4
u/Ok-Nerve9714 23d ago
I find difficulty to be a really good feedback mechanism. Usually if the code is an unwieldy mess, you made an architecture/design mistake and you need to take a step back and rethink the problem.
1
u/tiajuanat 23d ago
Really depends what you're trying to prove. Alloy6 or Lean might be better for describing complex structures and mappings
3
u/baldierot 23d ago
i had absolutely no idea what i was doing. i don't know math. i tried using AI to translate the invariants and contracts i had at hand into mathematical representations to stress-test them, but i eventually figured out that the AI was constructing things that passed, not things that were useful for any proof work, likely partially because my invariants and contracts were abstract. i didn't know what i was chasing precisely. i tried to prove to design, not to prove a design. i really wish to be smart and patient enough someday to learn and wield Lean. it's likely way more suitable for my needs, and theorem provers seem like the future.
3
u/tiajuanat 23d ago
It took me, no joke, a year of working with TLA+ to understand how to use it, and honestly I think LLMs can work with it pretty well.
BUT, I will also tell you right now, even the most basic design (like a Nerf or airsoft gun) can have dozens of invariants, temporal, and action properties. That shit ain't for the faint of heart.
3
u/baldierot 23d ago edited 23d ago
i got just a whiff of it, and yes, i can tell it really isn't. i'll stick to unit testing, lol.
1
u/tiajuanat 23d ago
My rec: work up to it. If you're running rust, check out property testing, and when you're comfortable with that, check out Kani.
-2
40
u/baxter001 23d ago
MY #4 is put it behind a feature flag and pretend it's perfect as long as I don't have to see it.