Jump to content
  • Advertisement
Sign in to follow this  
  • entries
  • comments
  • views

Expectations for all your code, always

Sign in to follow this  


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.


Sign in to follow this  


Recommended Comments

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.

Share this comment

Link to comment

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.

Share this comment

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!