One of the things I like about this project is that it is uncluttered by goofy, awkwardly-designed libraries. Sure, I could have grabbed some existing code for loading 3D files or animating figures, but I still would have been faced with the problem of getting them all to work together with my program. It’s possible that I might have saved time, but it’s also possible that I would have spent those four days pulling my hair out and solving strange dependency issues and going on fetch quests to get all the stuff it requires, only to discover that it didn’t work properly. Then I would have had the problem I feared: A huge, complex system that doesn’t work and no idea how to fix it.
And even if it did work, I wouldn’t really want to have an extra ten modules cluttering up my program, with thousands of lines of foreign (to me) code, the bulk of which I’ll never need or use, all in the name of saving me a day of work. There’s a trade-off at work here (like there always is) where you exchange compactness, elegance, and maintainability for time. At some point it becomes worth it, but I always advise caution when integrating foreign code. Even if the other library was made by someone smarter and more experienced than myself, the truth remains that they didn’t design their code with my project in mind.
Worse, when integrating external libraries like this there’s always the chance you’ll spend the time and end up with nothing. (Although, I think my professional experience has improved my ability to spot the packages likely to become duds and time-sinks. In fact, yesterday’s post touched on that: Look at the interface of a library. If it’s cluttered, obtuse, verbose, and confusing to use, you should be extremely reluctant to add it to your project, even if it solves critical problems. Right now, you only have one problem. Don’t trade it for six others.
Hang on a second. I feel like I’ve done this rant before…
Continue reading 〉〉 “Project Frontier #15: Devil of a Problem”
Shamus Young is a programmer, an author, and nearly a composer. He works on this site full time. If you'd like to support him, you can do so via Patreon or PayPal.