Blog: Hello, World Freezes Over
Mock Data, Real Problems: Learning from biting off more than I can chew
Sometimes, things don't go the way you planned. I've spent the past 3 or 4 days working on mocking up a fully-functional but not-functional UI and WebApp in Blazor/C# and I was on a roll. Knocking off refactors left and right, extracting components, modularizing the architecture, I was in a sort of flow state. I wondered just what I could do next to this non-functional prototype for this e-commerce solution.
"Well, I can't wire it up, because we don't have data modelled or real-world data yet, and I want to keep it high-level and mockup-style. Maybe I can write a few services and some mock data, and wire it up to that..."
I started simulating a fake user. Fake orders. I figured I'd dabble, and see how everything flowed together: maybe having mock classes would make it easier to wire up in the future.
I was wrong, and it blew up in my face. But I learned an awful lot, and that's what this post is really about.
My Biggest Issue
So, I'm a huge advocate of breaking large problems into medium ones, medium ones into small ones, small ones into tiny ones, and tiny ones into actionable tasks. It's not a good way of operating, it's the only way. I apparently forgot all about that philosophy last night. I started with a fake customer. But a fake customer needed a fake cart, see. And the fake cart needed fake line items, and those fake line items had fake products, and the fake cart generated a fake order. It was all spiraling. And merrily I rolled along, tapping out fake models and backing it up with fake hardcoded data, wiring up this, and that.
The problem, of course, was the tight coupling of everything I was doing. I'd make changes here, and that required changes there. And then over there, and then again over here. And pretty soon, a disturbing lack of git-commits later, I found myself with about 12 mock-classes, a to-do list a mile wide, and a completely non-functional app.
Sure, some of it worked well. Some of it even made my logic improve, making it easier to drop in the real thing when data modelling is done and we're ready. Oh crap, I thought, I've forgotten to commit. I looked at my Git UI, and: 39 files changed.
Oh dear God.
I kept traipsing from task to task, with every completed task leading to five others. After about four hours of this nonsense I had made a lot of progress, but I had made even more future work for future me. I was inventing things on the fly: These items probably have an ItemId. Maybe it's a GUID. The events have a List<DateTime>: no that won't work. I better make a DateRange class that takes two DateTimes, and now events have a List of those.
I wasn't so much mocking up an app as improvising one.
Git, save me!
I reverted to the last commit I had that didn't bother with this fake data, mock this, mock that crap. I went back to my original intention of simply mocking the user story flow with purely visual elements. It stung a bit to "lose" four hours of "work," but it was refreshing too.
I had explored, pushed my own limits, fallen on my face, and learned my lesson, all in a few hours.
Since last night, I've gone back to progressing with my original intent, and it feels right. I even snagged a few ideas out of the mayhem and wired them up (farming out some common functions to injectable services instead of just repeating myself was one particularly clean move)
Failure Isn't Final
In hindsight, what I did wasn't a waste of time at all. It was a sort of stress test. I pushed my own limits and the limits of my program, and watched where it started to crack. That's not really failure, that's research.
Remember: scope, scope, scope. If you're building a UI mockup, keep it a UI mockup. Maybe fart around with it a bit wiring up some fake stuff, but don't get too attached, and remember what you intended to do in the first place. Know your role. And keep playing it. It's important to keep scope in mind, and always, always, ALWAYS break things down to component pieces and micro-tasks. Nobody builds a whole house at once; that doesn't even make sense. They build this part of the foundation, this wall, this part of the roof, and eventually, a house is there. But the building is done on a much smaller level than the house level.
Oh yeah, and by the way, don't forget to commit.
Share Your Feedback...
Website and all content ©2025 Jake Fitzenreider
Website powered by Oqtane