It took me way too long to understood what I wrote few weeks ago. After looking at the code for few minutes and looking at my db structure, I finally realized. I also instantly remembered that I wrote that "user is shown as ad" comment hoping I will not confuse myself in future. Apparently I failed.

Temporarily added next line of comment to help the future me.

Deep down I know that I should change function name itself to become clearer, more meaningful and easier to understand.

But writing that comment, making those screenshots, combining the 2 images in Pinta and writing this rant is faster than thinking the new name.

  • 1
    All that code needed was the one extra line in comments you added

    It went from "huh" to "oh" for me

    If I look at my code and can get it within 10 seconds, Id say it's clear enough and move on

    Is that simple, you just refactored it fine, doesn't matter if all you did was add a one line in the comments and the code didn't change, that block is clear now
  • 1
    Of course, you could have just put "get use profile as an advertisement for display"
    And named it "asAdvertisement"?

    Same difference
  • 0
    @rant1ng true 😁

    I will change it to as_advertisements()
Add Comment