Stanley Solutions Blog

engineering and creativity - all under one hat

Write a Good Framework - ONCE.


C'mon, every developer has had that epiphany moment:

"I know, I can just write this thing now, and I'll have exactly what I need, and I'll never need to touch it again; I'll never need to add more to it, and it will never change."

Yeah. Right.

We wish it worked that way, but let's be honest. Projects develop, add scope, change, and sometimes, they morph into something new entirely. Actually, that's often where great code comes from. The best projects are the butterflies of the development world. They start as a simple little caterpillar, but at some point along the line, they change into something far more elegant and beautiful.

That's why I'm writing this plea to developers out there in the "real world." We know that you could just write this little thing, but isn't it nice to get the framework right the first time so that when you need to revisit that code, it'll be so much easier. Or, better yet, isn't it better to prepare the project for the "next guy" who comes along to make your framework into something incredible.

I guess I've devolved into rambling, as usual, but my point is this: when you spend the time to develop the framework the right way the first time, you and all of your colleagues will thank you. It will make things just that much easier.

I've had a handful of experiences with this myself. I started on a couple projects at work where I developed something that I thought was a great system, and didn't really require a superior framework. This inevitably saved time in the short-term, but it bit me later.

As it turned out, I recently realized that I was re-writing the same code over, and over, and over again every time I had to touch the code. In the end, as it seems, I didn't spend enough time writing the framework to begin, and that hurt me.

Here's the Takeaway:

Long story short, we all love just "pulling in" a library that does the "dirty work" for us. I think it's time that we focus on getting those libraries right from the onset, so we don't need to keep re-doing our own work, or the work of others.

What do you think?

I'd say drop me a note in the comments, but I haven't quite gotten that set up yet. So, for now, just keep fighting the good fight, and write those libraries!