10

How do you write your "identity" in your code so that others can see that it's you who made it?

Do you do it with a simple "made by" or do you write more?

Comments
  • 2
    A comment or when you've read enough, there's usually some distinct patterns & style that's unique
  • 1
    @lotd i have always done it as a comment. It is more what do you write og what information do you write.
    I'm interested in seeing how others do it. 😁
  • 2
    My MO is:

    //---author: ku
  • 2
    @JKielsgaard Danish?

    Usually just a simple block at top with @author & @lincense :)
  • 1
    @lotd yes I'm danish 😁, what reveal me

    Edit: danm im new to devRant, you can see it in my profil 🀣
  • 2
    @JKielsgaard previous comment, of instead of and.
  • 2
    git commit
  • 4
    Generally by committing the code myself, I trust that in most cases, seeing my name on the blame will suffice.

    It I know that the feature might get moved around, or a blame record wouldn't be enough (usually if I'm explaining stakeholder decisions) I add my initials and the date after the bulk of my comment.

    As I generally work on projects with many other developers, adding my name to a comment at the top of a 10k line file just wouldn't be that helpful to anyone.
  • 3
    @NoMad I did at first. Now, it's just the hella long functions that bug me.

    If.πŸ‘ It's. πŸ‘Over. πŸ‘100.πŸ‘ Lines. πŸ‘Pull.πŸ‘ Something. πŸ‘Out. πŸ‘
  • 1
    @NoMad yeah. The rest of the development team doesn't seem to mind, but I think they're afraid of looking dumb, so they don't say anything.
  • 2
    I'd hide Easter eggs or have piece of code that does absolutely nothing or something of that lives
  • 2
    I usually right a Leo Tolstoy thoughts as comment in first line of my program!
    But stopped following because ppl felt it's dumb style
  • 1
    If it is important to the code that people should be able to contact me I include a Twitter handle. Otherwise, it is nearly always included in my Gitlab repo so people know I wrote it.
  • 1
    Never understood this concept. If you're using source control, what's the point. It reminds me of DBAs pretending to be developers and using the production SQL server and comments as source control.
  • 1
    It's good, readable and flawless.
    I'll be famous one day.
    Honest.
  • 1
    I remember seeing a comment on stack overflow that was something along the lines of
    //If this code works it was written by {Name}
    //If not it was written by {Co-Worker}

    That seems to be the safest way
  • 1
    Mostly "Violet" prefix as placeholder..
    Like "violetButton";
Add Comment