271
arantr
8y

I don't know what to say

Comments
  • 31
    The first rule of the tautology club is the first rule of the tautology club... -xkcd
  • 31
    ...the longest way to cast an int as a long
  • 6
    Can't help thinking that needs to throw a NotImplementedException!!
  • 23
    clearly missing the comment to be perfect

    //given the position returns the position
  • 25
    "You can be whatever you want to be. Just tell me, and I'll make it happen." - getItemId
  • 26
    @Lukas

    long value = new Long(Integer.toString (739));

    I saw this one in production code once
  • 2
    this is funny..
  • 3
    refactor that shit!
  • 9
    I actually see it as a valid abstraction (that type conversion is still wrong though). I can imagime scenarios wjere that abstraction could be useful, wih subclasses having different indexing methods for example.

    again, the type change is still wrong.
  • 1
    I cringed.
  • 3
    return items.get(position).getId();
  • 4
    to be fair, in Android that function is provided by abstraction to allow the developer to customize list adapters. it is actually quite useful. though I can't remember why it would return a long.
  • 1
    @aimanb Yeah I did - deleted it for good!
  • 3
    Everytime I see something like this I wish for a comment from the OP such as:

    "Plot Twist: the lead of the project requested it. "
  • 2
    Now if only the stress ball limit was still at 150++ :/
    #stress
  • 1
    @olpe did it move up again?
  • 1
    @brettmoan Yes. I think it is 175
  • 1
    To the upvote mobile batman!
  • 0
    @Knossos could be because resource IDs are longs?
  • 1
    @olpe and the ball has been earned!
  • 0
    I sense this code is from recycler view
  • 0
    I like the dark IDE theme 😂😂
  • 0
    thingking
  • 0
    setter and getter?

    yay?
  • 0
    I hate stuff like

    public int getID() {
    return id;
    }
  • 0
    Good example of the identity function used wrongly.
Add Comment