🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

Expectations for all your code, always

Published October 17, 2017
Advertisement

Part 1

  1. It needs to work. And by work I mean execute without crashing.
  2. It needs to do what you expect it to do.
  3. It needs to have code you can actually read and debug.

Part 2

  • No Syntax Errors
  • No Warnings (from the compiler)
  • It has tests (yes, even asserts)
  • It passes test.
  • It logs errors.
  • It does not crash.
  • Someone who doesn't know you won't kill you for writing completely illegible code.
  • It has instructions. For the user.

 

1 likes 2 comments

Comments

JTippetts

I'm terrible at writing code. Always have been, and while for some time there I was improving, in recent years I've been getting worse, I think. I can usually write something that achieves what I need it to do, but when it comes time to polish, cleanup, formalize the tests, and expunge the warnings... heh. Yeah, THAT will happen. Sure.

October 17, 2017 06:57 PM
Alpha_ProgDes

For personal code, pfft. If it compiles and does what i want it to do, then it's Part 1. That's it. I'm good.

But for code that I'm sharing with other people, like on GitHub. With the intention of them using it in their projects. Or even more grave, code i'm putting out on production. Yeah, I gotta do as much of Part 2 as possible.

I am not very good at logging errors. In fact, honestly, I avoid it. Part of the reason why I put it up there. I need to git gud. Plus, not logging has bit me in the bum more times than I can count.

October 17, 2017 07:14 PM
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Advertisement
Advertisement