How to Write More Reusable Code?

Juntao Qiu
ITNEXT
Published in
6 min readNov 12, 2022

--

After writing code for a living for years, I found something interesting: what programmers do is nothing but bounce between abstract and concrete. They either extract something to make them more generic (so it can be used widely) or use an instance of one abstraction to solve a specific problem. In other words, they abstract code for concrete usages (although sometimes they go too far).

It should be noted that no ethically-trained software engineer would ever consent to write a DestroyBaghdad procedure. Basic professional ethics would instead require him to write a

--

--

I help developers write better code. Developer | Author | Creator. https://juntao.substack.com/ @JuntaoQiu