logoalt Hacker News

ravenstineyesterday at 3:58 PM3 repliesview on HN

One thing I've learned about building toy software projects or even just small personal software (stuff that's actually useful) is to avoid implementing flexible configuration engines. I used to fall into this trap where I thought I should make my software to be configuration-centric so that it would be usable for others in case I decided to make my code FOSS. The problem with that is making a configuration engine is a lot less efficient than just writing the code to do the damn thing. I've almost never shared any code outside of small libraries that were very low in complexity, and I wasted a lot of time writing code for other hypothetical people when I should have just been writing it for myself.


Replies

bob1029yesterday at 4:55 PM

> The problem with that is making a configuration engine is a lot less efficient than just writing the code to do the damn thing.

http://mikehadlow.blogspot.com/2012/05/configuration-complex...

It took me a solid decade to accept these lessons. I cannot build a product that even remotely competes with things like Visual Studio and .NET tooling. How many hours would it take a solo developer to recreate a debugger experience that anyone else could be bothered to look at for more than 5 seconds?

The hardest part of building something configurable is the UI/UX. The moment you step outside of the host language, your tooling support goes to zero. Sure, you can pick other popular languages as the language of configuration (SQL, python, Lua, etc.) and piggyback off those ecosystems. But, you still have to build a way for a "non programmer" to visit all of the patchwork sites of "configuration" in a coherent way. Telling the business people to go edit a folder full of .py and .sql files will probably not be received well. Wrapping all of this with a fancy web interface doesn't make the problem less severe either (it makes it substantially worse).

If you have a way to build/deploy your product in <60 seconds from source, worrying about elaborate configuration and customization architecture seems extremely idiotic to me now. The best path I've found is something approximating a common library and a per-customer executable that consumes it and implements the expected contracts. Each customer's project lives in a subfolder on the same monorepo. The power of the hierarchical filesystem is tragically understated throughout our industry.

dockercompostyesterday at 4:03 PM

A rite of passage! :D

pinoy420yesterday at 4:10 PM

[dead]