Home | Notifications | New Note | Local | Federated | Search | Logout

Note Detail


Gregory@grishka@mastodon.social (2026-06-21 07:30:06)
I'm still quite perplexed when Idea does this. Why would I want to extract that to a separate method? What would that achieve? This code is only ever used in a single place anyway. What's the point having a private method that is only ever called from one place?
---Attachments---
image: https://files.mastodon.social/media_attachments/files/116/784/790/670/658/897/original/0849f7ac954c8c56.png
Reply

---Replies---
серёжа@broadway_lamb@mastodon.online (2026-06-21 08:30:19)
@grishka the same reason why long books are split into chapters: sometimes (most of the times?) it’s easier to reason about the logic if it is divided into clear named fragments, even if those fragments are only used once.