58
xxxx
7y

"How to name your variables and functions so they can be understood by other humans" should be a mandatory lesson right after someone writes their first ever computer program.

Comments
  • 1
    @Jilano Thanks! Love it here
  • 7
    But I like my function names.
    They are so EASY to remember....

    A()
    B()
    C()
    D()
    E()

    If you didn’t pickup on the sarcasm() here I will probably murder someone if I see them do this 🤔
  • 2
    @C0D4 Me too! My personal bad habit is using i,j,k as the iterator in my loops but I'm working on it :D
  • 1
    @xxxx
    i can live with i, j should be named in nested for loops but k? i try to avoid a third layer.
  • 2
    @C0D4 current project I'm working someone literally did this.

    I was like what the fuck dude!
  • 2
    @luper That coworker definitely deserves to be a victim of the Pornhub Prank.
  • 2
    @C0D4 yeah, I was just saying. I don't mind going down to the third level, maybe because I work with image data in numpy quite often
  • 1
    @xxxx care to elaborate on what that is?
  • 1
  • 3
    @xxxx I think that's fine to be honest, it's a pretty universal convention. Unless you're using something like a foreach, then you should be more careful.
  • 0
    Definitely! I do it for myself first lol, because I have very quick code amnesia.
    @C0D4 yeah for iterators I find that letter is faster to read and understood by most due to most programmers using them.
  • 1
    @xxxx it always comes back to @linuxxx here. Such a great ranter.
  • 1
    @luper His ranting game is top notch, I agree lol
  • 1
    I actually lost points in my first programming assignment for using one-letter variables. Every int was called n, m, and so on. The same goes for char c and string s. My teacher told me it was a bad practice and said he would mark any future code with this naming scheme as unreadable
  • 1
    @ocab19 good teacher!
Add Comment