Search code examples
programming-languages

Tips for making code last


Sometimes I really wonder if my code is "lastable". I do everything to make it "last" and avoid depending on things while writing or solving problems. Things like "programming tricks" and assumptions which may change in the future if I rewrite or add to the code. Sometimes it's easy, other times it's hard, but it's all a part of being a programmer and making stuff work better, faster and easier.

Having said this, can you recommend some tips from your personal experience for writing better long lasting code in HLL? What should be avoided, what embraced?

Thank you!


Solution

  • Avoid anything you recently read about and thought,

    Well that is an interesting language feature, design pattern etc. , I think this can help me reduce my code complexity.

    For some reason this always comes to bite me later on. Better to have this in side projects and then use it in production code once it proved a good idea, versus merely looking like one.