How to write software than will keep working for decades without problems
unixsheikh.com
unixsheikh.com
I thought a lot about the many implications of that sentence, one of which is relevant for this article. Understand that you _WILL_ always use a framework, whether it's an external one or your own. Knowing this, when choosing not to use an external framework, you must show consideration to the design of the one you're inevitably building, and chose to build it intently, rather than by accident.
I'm entirely in agreement with every sentiment of this article, not only does it make software that will last longer, but for some of us at least, makes for a much more fun, interesting and enjoyable development experience.
Writing a program from scratch actually feels like programming, it feels like doing the thing we're here to do, rather than laying the plumbing that ties together a multitude of third party, constantly-changing (if not just randomly disappearing from the internet) frameworks together.
The other point about building your own "framework" is that you can reduce the library count significantly. You don't need to include a library you only need one function from... Just reimplement that function in your own code.
That software survived Y2k with no incident, the only reason I heard about it was in 2007 when one of the cards was replaced, it failed to restart.
It turns out they had the two cables swapped. As far as I know it's still going strong.
I followed most of the rules detailed in the article, it was simple, did the one thing (including a multitasking library I wrote), and just kept doing it.
I can't name a framework I've ever worked with that anybody actually understood.
I mean they do mention that just after, and I agree. Often the frameworks take away a few hours of boilerplate work in the beginning in favor of weeks and months of learning and issues.
> Very rarely is the added complexity of frameworks justified and the added risk of breaking stuff down the line makes it a NO GO for serious software deployments. Only toy software and very small applications can justify the usage of frameworks and the likes.
There are definitely downsides to using frameworks, but this statement directly flies in the face of evidence. There's a ton of commercially successful software using frameworks, just think of all the things that are powered by React, Ruby on Rails or Spring Boot.
And the idea that this bespoke framework would somehow be more maintainable in five years is just lunacy. Even if Spring falls out of fashion, you'll still be able to find people that have a decent knowledge of Spring in five or ten years, just like you could find people who knew COBOL in the 90s. But how are you supposed to hire for "some guy that can figure out WTF this dude was doing when he wrote his own ORM a decade ago?"
I guess your mileage may vary so it's a case by case decision.
This is the cause of most of the problems I have seen. Businesses want quick over quality. Sometimes this is the right business decision.
* Ship quick
* Validate
* Build for the long term
1. Ship quick
2. Return to step 1 grind:
ship_quick()
if (is_market_leader()) {
hire_maintainer()
} else if (failed()) {
abort()
}
goto grindEvidence: most of you are running such software, the internet infra depends on it, etc...
- Ship and implement as much as you want when you need tight control. - But build on solid foundations which are already well established, so that you don't end up reinventing the frigging wheel.
I have a Flask app which is nearing 8 years old and it's going fine. Nowadays, I'm starting my backend python APIs with FastAPI, and feeling very comfortable.
Write your code as if you actually expect your code to be still working and maintainable after decades in the first place.