Jump to content
  • Advertisement
Sign in to follow this  
King of Men

Good news, bad news

This topic is 4438 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

The good news is, I found out how to double my data sample. The bad news is, I do this by fixing a bug in my code. The lesson is, if you insist on having a local variable mask a member variable, make sure your compiler warnings are set to tell you that you are being an idiot!

Share this post


Link to post
Share on other sites
Advertisement
Yeah, if the compiler would warn you in other situations as well

A few minutes ago I finished my 1000ths ray triangle intersection implementation.
I tested for an hour until I got sick of the code I wrote, rewrote everything to finally realize that I have been testing a ray against a triangle parallel to that ray *ugh*

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Quote:
Original post by King of Men
The good news is, I found out how to double my data sample.
The bad news is, I do this by fixing a bug in my code.
The lesson is, if you insist on having a local variable mask a member variable, make sure your compiler warnings are set to tell you that you are being an idiot!


I don't see how this is bad news? I see it as killing two birds with one stone.

Share this post


Link to post
Share on other sites
It's bad news because that bug has been around for several months, messing up my plots and conclusions. I found it in the writing-up-results stage, which is highly embarrassing.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
With Visual Assist X you can highlight your global and local variables specially.

I know why my source code looks like a rainbow =)

Share this post


Link to post
Share on other sites
you could also just adopt a naming convetion for local and global variables. Its not uncommon to see Global variables appending _G on their end or beginning to signify they're global.

<insert obligatory remark about how some people really like hungarian notation and some really don't>

Cheers
Chris

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • 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!