This post is NOT about design patterns, not about any programming language in specific, hell, probably not even about programming, but about project structures. I was scouting the Plan 9's source code and i saw how the codebase was structured and it was glorious. Everything very organized, very easy to read and well integrated. At some point i came across this mkfile from acme.
</$objtype/mkfile
BIN=/$objtype/bin
TARG=acme
OFILES=\
acme.$O\
addr.$O\
buff.$O\
cols.$O\
disk.$O\
ecmd.$O\
edit.$O\
elog.$O\
exec.$O\
file.$O\
fsys.$O\
logf.$O\
look.$O\
regx.$O\
rows.$O\
scrl.$O\
text.$O\
time.$O\
util.$O\
wind.$O\
xfid.$O\
HFILES=dat.h\
edit.h\
fns.h\
</sys/src/cmd/mkone
$O.out: /$objtype/lib/libframe.a /$objtype/lib/libdraw.a /$objtype/lib/libthread.a
edit.$O ecmd.$O elog.$O: edit.h
syms:V:
$CC -a acme.c > syms
for(i in ????.c) $CC -aa $i >> syms
And this mkfile has lots of references to the operating system itself and more specifically the /sys/src/cmd/mkone made me wonder if we are doing our codebases wrong. It's going to be weird, but we have to split our projects into different repositories? Instead of thinking on different software, shouldn't we be writing, lets say "our OS", based on some other OS containing our stuff, so we can reuse parts we already done before? And what about other things, like "/usr/share" for non-code resources and documentation we already worked on? Are we using computers wrong?