Computing.Net > Forums > Programming > How do I know if my code is good?

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

How do I know if my code is good?

Reply to Message Icon

Name: Deimos
Date: March 27, 2009 at 15:41:14 Pacific
OS: Windows XP
CPU/Ram: AMD Athlon x2 5200+ / 2GB Kingston DDR2-800
Subcategory: General
Comment:

Hello, everyone

Right now I'm working with C++ and SDL in order to create games. I just have an issue which comes up when my project starts getting more complex, I think to myself "My code sucks, I think if I'd start over and did this or that it would be better". But it never does...I mean, to code a task, any task, there are lots and lots of ways, I mean, there are so many options!
For instance, I want to create a framebuffer for SDL but I have no idea if I should use OOP, or if I should use separate functions, or if I should combine both, or if, or if, or if...
So, my question is: How can I tell if my code is good and that I should stick with it instead of writing it all over again?
I don't expect a "You should do this" kind of answer, because I am aware this could be kind of a tough question, but please do answer based on your programming experience and please do try to give me some sort of guidelines so that I get any actual game (or something) done.

Thank you in advance and best regards
~Deimos

AMD ATHLON X2 5200+ 2.6GHz
ASUS GeForce 8600GTS
ASUS M2N-E SLI MB
2xKingston 1GB DDR2 800



Sponsored Link
Ads by Google

Response Number 1
Name: StuartS
Date: March 27, 2009 at 15:46:37 Pacific
Reply:

The best way to test your code is to give it to someone else to look at.

If they can understand it and work out what the code is supposed to be doing then it is good. If they cant understand it and have to constantly ask why you did this or this doesn't make sense then you need to do a re-think.

Stuart


0

Response Number 2
Name: Deimos
Date: March 27, 2009 at 18:17:52 Pacific
Reply:

Thanks for your reply, lets assume that I have no one to show my code to. What should I do in that case?

AMD ATHLON X2 5200+ 2.6GHz
ASUS GeForce 8600GTS
ASUS M2N-E SLI MB
2xKingston 1GB DDR2 800


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Programming Forum Home


Sponsored links

Ads by Google


Results for: How do I know if my code is good?

VB 6.0 and serial port www.computing.net/answers/programming/vb-60-and-serial-port/3469.html

How can I know whether any process www.computing.net/answers/programming/how-can-i-know-whether-any-process-/14572.html

Where do i start www.computing.net/answers/programming/where-do-i-start/13274.html