Skip to content
Minsing Log
Go back

English Edition

Wrong Abstraction

Programming & CS

Recently, by directly using functional programming through decorators and OOP in the RAGchain project, I was able to add logic to the countless repetitive code I had written and create more organized code.

However, while excessively believing in OOP and using excessive abstraction, I got a harsh lesson during review for abstracting things that did not really need to be abstracted. So, to what extent can the concept of abstraction be used? The link below explains it veeeery well.

When an exception case is added to abstracted code later, or when additional functionality needs to be implemented and someone else continues writing the code I created, there will be pressure to prevent the original code from being damaged as much as possible. Because of this, it becomes impossible to remove incorrect abstractions, and ultimately, unsatisfactory code is produced. If there is an incorrect abstraction, removing it and returning the code to its original place can make adding new functionality faster and easier.

Abstraction means creating new abstract concepts to reduce duplication in repeatedly used code, condensing repetitive code into modules for reuse.

Nice sites and references to check out

Please share your thoughts if anything is incorrect~

공개 여정 구독

글이 올라오면 이메일로 보내드릴게요.

개발, 창업, 배움, 실패와 회고를 짧고 솔직하게 기록합니다. 검색으로 스쳐가는 독자가 아니라 여정을 따라오는 팬을 만들기 위한 뉴스레터입니다.

뉴스레터는 준비 중입니다. 그동안 RSS 로 구독하거나 이메일 로 알림을 요청해 주세요.


Share this post:

Comments

Sign in with GitHub to leave a comment.


Previous Post
UUID
Next Post
What is a decorator (@)?