Most people do not think (often) about this, and I think the same thing is true about ‘elegant code’: Nearly all the nice code we write is code we marvel at ourselves, but neither our colleagues or our customers will ever know.
It is much easier to see the oversights than it is to see the good parts. Maybe that just is the way we are trained to think in today’s society.
It also very commonly happens that code that I find elegant ends up being too hard for my coworkers to understand …
@OvermindDL1: The ‘habits’ you describe are not very ‘odd’, in my opinion: The fact that you are doing things that nobody did before probably means you are doing nice, new, innovative things. Also, the sheer fact that the infinity of creatable computer programs is a really really incredibly large infinity means that it very easily happens that you are looking for something that is different.
@bobbypriambodo Yeah, debt is a very negative term. I do agree though that you are responsible for the code you write.
Back to the topic at hand:
A great saying from the game development world (I’m paraphrasing here, and unfortunately I do not remember who originally said it) is:
You can either make a game, or a game engine, but not both.
And I think this is very true. If you don’t want to get bogged down in a project that is too large to maintain, it is important to focus on something. You can either build something that is a nice general (partial) solution for a large set of problems, or perfectly solve a single problem, but not both at the same time.
That being said, it is hard to work with other people’s code. What helps in Elixir is that the language already nudges people in a direction of creating readable and maintainable code, which overlaps with what I like to see in code.