I'm currently working front end at my company, and am applying for a backend internship within the same company.

Would it be in appropriate for me to comment a block of code with

# I know there has to be a better way to do this but I haven't found it yet

In my code challenge for the application?

Basically I found a clumsy and ugly solution but I want them to know *i know* it's clumsy and ugly and if I had more time I would come up with something better

  • 2
    // TODO baewulf: (...)

    But yes and also add tests.
  • 4
    I'd say it depends if the code is part of production code or is only used in the interview process.

    If its in production code, it should be proposed in a pull request, commented within the pull request - not in the code - and then discussed with reviewers. One of the reviewers may know.of a cleaner way to do it and you can implement the cleaner way before it gets merged in.

    I'd also suggest making it a TODO comment if you were to do it. That way, you show that you plan to go back to that. Don't say you only did it this way because you haven't found a better way yet. Say that the Todo is to improve performance or something like that.
  • 2
    @cmarshall10450 Also, some IDEs and other tools can gather and show all todo comments as tasks so they are easy to find.
  • 4
    @Voxera that was part of the reason I suggested the todos. They are much easier to find later on.

    There's a VS Code extension that can create Jira tickets from todos
  • 2
    @cmarshall10450 oooh cool! I never use TODOs. It's just for the interview, definitely not going in production.

    Thx for the advise folks!
  • 4
    TODO for missing features, FIXME for things that are broken in some way.
Add Comment