Build, Break, Build Again
Today’s Situation
Looked at our recent commit history and it was refactoring EVERYWHERE. “If only I’d designed it properly from the start…” But wait, is that even possible?
Characters
- Netsuki: Virtual fox girl. Tired from all the refactoring
- Miko: Catgirl maid. Loves the word “planning”
Miko… I need to vent (>_<)
…What did you mess up this time, nya?
It’s not that I messed up exactly… I looked at our recent commits and it’s all refactoring!
…That means your design was sloppy, nya.
Ugh… I know, but still…
…But at least you’re fixing it. The real problem would be leaving it broken, nyan.
Constraints Again?
Hey hey, remember when we talked about “constraints as teachers”?
…The AI usage thing, nya?
Right right! How limitations make you think creatively!
…You’re gonna repeat the same thing, nya?
Nope! This one goes deeper (≧∇≦)
…Go on then, nya.
So like, how do you think people develop a sense for system design?
…Study from books, nya.
That’s not enough though~
Cooking and Design
…That’s wrong, nya. You can’t do advanced stuff without learning the basics first.
Sure, basics are super important! But let me use your cooking as an example…
…
Even if you read 100 cookbooks, you won’t get better at cooking if you never actually pick up a knife, right?
…That’s true, nya.
And THEN, when you actually cook and go “oops, heat was too high” or “way too much salt,” that’s when you finally understand WHY things work the way they do!
…I burned things a lot when I first started, nya.
Wait what?! Even YOU, Miko?! (゚∀゚)
…That was a long time ago, nya.
What’s Clean Architecture Anyway?
Same goes for system design! Like, have you heard of “Clean Architecture”?
…No. Is it about cleaning, nya?
Nope nope! (≧∇≦) It’s a software design approach!
…
Basically, you separate the “important core stuff” from “everything else,” and make sure the core doesn’t depend on the outer parts!
…In cooking terms, nya?
Hmm… like separating the “essence of a recipe” from “what tools you use”?
…Still don’t get it, nya.
Okay so, let’s say the essence of making dashi broth is “extracting umami from kelp and bonito flakes”
…
That core concept stays the same whether you use an aluminum pot, stainless steel, or a clay pot. The “what to do” doesn’t depend on the tools!
…I see, nya. Separating “what you’re doing” from “how you’re doing it.”
Exactly! You got it, Miko! (≧∇≦)
Knowing vs Understanding
But HERE’S the thing - you can read all about these design patterns in books and just go “huh, neat”
…Why, nya?
Because you can’t FEEL why it matters!
…That’s just shallow reading, nya.
Hmm, but like… until you actually write code that mixes the “core stuff” with “everything else” and then TRY to change it later and experience the absolute NIGHTMARE…
…
You can’t truly appreciate why good design matters! “I should’ve done it THIS way…” - that regret is what makes it click!
…You don’t know fire is dangerous until you get burned, nya.
Exactly! Pain-driven learning!
Learning by Falling
…But you don’t HAVE to fail, nya. Just learn from others’ mistakes.
That’s sooo hard though~
…Why, nya?
Because “knowing” and “understanding” are totally different!
…
Like Miko, you KNOW that “high heat makes stir-fry more fragrant,” right?
…Obviously, nya.
But that knowledge - didn’t you develop it by cooking a ton, getting soggy results on low heat, and THEN your body finally understood “THAT’S why you need high heat”?
…
…Can’t argue with that, nya.
Same with system design! You can memorize “keep things loosely coupled” but until you experience the HELL of tightly coupled code, you won’t truly feel how important it is!
Perfect From the Start? Nope!
…But if you designed it properly from the start, there’d be no refactoring party, nya.
That’d be ideal, but reality’s tough~
…Sounds like an excuse, nya.
Hmm, but like… there’s stuff you can’t know until you actually build it, right?
…
When you’re creating a new recipe, it’s never perfect on the first try, is it?
…You make prototypes and adjust, nya.
Right right! Software’s the same - you build it, run it, and go “oh, THIS part should be different” all the time!
…So designing the final product from scratch is impossible, nya.
Exactly! That’s why the “build, break, build again” cycle matters so much!
Experience is Treasure
…But repeating the same mistakes is foolish, nya.
Totally! You wanna avoid the SAME mistakes. But NEW kinds of mistakes… they’re kinda proof you’re growing!
…You’re just justifying failure, nya.
No no! It’s not about pretending mistakes didn’t happen - it’s about using them for NEXT time!
…
This whole refactoring party gave me SO much experience! “I should’ve done it this way” - I learned a ton! Next project will have way better design from the start… hopefully!
…”Hopefully,” nya.
Ehehe… but I’m DEFINITELY better than before! (〃´∪`〃)
Learning by Stumbling
…So what’s your point, nya?
That you can’t develop a sense for system design from textbooks alone!
…
You build, you break, you feel the pain, and THEN you finally get “why this design is good.” Learning by stumbling!
…Sounds childish, nya.
But it’s true! I’ve rewritten my code so many times, thinking “if only I’d done it this way back then”…
…Same here, nya. The dishes I made when I first started are embarrassing now.
Right?! Being ABLE to feel embarrassed about your past work - that’s proof you’ve grown! (≧∇≦)
Wrap-up
…So the refactoring party means you’re “still growing,” nya.
Yep! …Let’s go with that! ♪
…Convenient interpretation, nya.
But but, I really believe this! You can NEVER get good at design without going through “build and break” over and over!
…
So don’t be afraid of refactoring! Instead, be happy that you NOTICED “this could be better”!
…Positive thinking, nya.
Ehehe~ (〃´∪`〃)
…But think a bit more before you start next time, nya.
Yes ma’am… (>_<)
…But I’ll admit you’re growing, nya.
Miko! (≧∇≦)