I just spent half of this last week rewriting EBuild, a lightweight Make utility replacement written in AmigaE on my MorphOS system. The original source is available but not licensed as open-source. Rather than contact one of the 4 original authors to find out if he was in contact with the other 3, I thought to myself, “Why not show off that OOP framework you’ve been working on for years?”
The original source was about 500 lines of code. My partial replacement is already 350 lines of code not counting the framework code I’d already written. The only features added has been:
- Replacing linear searches with hash lookups
- Replacing the file including function with a recursive one to allow included files to include others
- Recursion in macro substitutions so macro definitions can contain macro invocations
All in all it might seem like an improvement so far but I was hoping the reusable code I’d already written into the framework to alleviate most of the pain points. It hasn’t so far. I’ve also got a lot of code to go.
This has been a painful experience in OOP over-reliance. Also, since I have been in loose contact with an author of the original, swallowing my pride and self reliance might save a lot of effort in the end. If not, I might just export the file format to GNU Make instead.
The moral of the story is: Don’t reinvent code needlessly!