Handmade Hero»Forums»Code
Juliano
11 posts
Why the "(casey)" on //TODOs and //NOTEs?
I think the title speaks for itself. Why do you (Casey) always put your name on every todo, note, etc on the code?

Is this something specific to Emacs, are you planning to have more proggrammers work on the same code (so you are putting your name there to point out it is meant for you only) or is it just a habit of sorts?
andrea
12 posts
Why the "(casey)" on //TODOs and //NOTEs?
There're already programmers working on the same code: that's us. :3

With that notation you can add notes to the code yourself without confusing them with casey's. It's a good habit to get imho.
Andrew Chronister
194 posts / 2 projects
Developer, administrator, and style wrangler
Why the "(casey)" on //TODOs and //NOTEs?
Yeah, it's good practice to put your name in your comments so that someone can come ask you about it later if necessary.

In my local copy, I've been using "handmade" instead of "casey" to distinguish things that were added on the stream from notes to myself. Makes it a little clearer that they were things done on a video and not by some random dude named casey.
Juliano
11 posts
Why the "(casey)" on //TODOs and //NOTEs?
Isn't that one of the key features of a version control system?

I mean, I've been working in .Net for a few years and whenever I want to see "who did something" (comments or code) I just look up in the change history, or even better now with TFS 2013, I have code lens change tracking per method right up in the method signature.

Perhaps this practice is just more common in C code or something? I've never ever seen it before anywhere, and it feels very redundant to me.
19 posts
Why the "(casey)" on //TODOs and //NOTEs?
I love source control as much as the next guy but I really like including the name after the comments.

Think about the workflow for a second. "Alright there's this comment and I don't know who wrote it. Let me [git blame/svn blame/whatever], ok so dev1 touched it last, but the commit message is "refactoring", so he probably just copied it over, now let me rifle through the history of the file until I found the original author"

Not to mention that when you want to find all your own TODOs all you need is a text search now instead of some complicated filtering involving your source control system.
Casey Muratori
801 posts / 1 project
Casey Muratori is a programmer at Molly Rocket on the game 1935 and is the host of the educational programming series Handmade Hero.
Why the "(casey)" on //TODOs and //NOTEs?
The reason I always tag comments with my name is so that I can search for them on projects where there is more than one programmer. I like to be able to quickly search for all my TODOs, for example, vs. someone else's.

- Casey
9 posts
None
Why the "(casey)" on //TODOs and //NOTEs?
vcs tells you only what already has been done and not what you intend to do. has nothing to do with the programming language.
19 posts
Why the "(casey)" on //TODOs and //NOTEs?
NoobSaibot
vcs tells you only what already has been done and not what you intend to do. has nothing to do with the programming language.


He means the "praise/blame/annotate" function most vcs have where you can see who wrote each line.
9 posts
None
Why the "(casey)" on //TODOs and //NOTEs?
yeah, i know. but how's that supposed to replace the TODO comment that states what you're going to do at this place in the future?
19 posts
Why the "(casey)" on //TODOs and //NOTEs?
NoobSaibot
yeah, i know. but how's that supposed to replace the TODO comment that states what you're going to do at this place in the future?


Did you not even read the title of this thread? It's talking about the "(casey)" next to the "TODO" not the "TODO" itself
9 posts
None
Why the "(casey)" on //TODOs and //NOTEs?
well i did, but the todo might not be related to the guy who wrote that part of the code. anyway, thanks for clarifying :)