Thread: Anywhere to get your code checked?

  1. #1
    Registered User
    Join Date
    May 2009
    Posts
    12

    Anywhere to get your code checked?

    I have been programming SDL lately and sometimes I feel like there are some problems with my code. Problems that don't show up at compile time or runtime. For example, I have run a sample SDL program to practice my knowledge of it, and a few times I run it, windows shows it stopped working after I close it. Other times I closed a program and my computer ran really slow.

    Anyways, my question is this:
    Are there any online communities or website where you can submit your source code have it checked or reviewed?

    Thanks,
    Jonny

  2. #2
    Registered User Inanna's Avatar
    Join Date
    May 2011
    Posts
    69
    If you find one, let me know.

  3. #3
    &TH of undefined behavior Fordy's Avatar
    Join Date
    Aug 2001
    Posts
    5,793
    It always helps to use something like valgrind - that checks your memory usage and points out leaks and places where you might access uninitialized/freed memory.

    I dont think there's a decent windows port though, so unless you have a linux box and unless your code compiles on both (which is possible with SDL/OpenGL) you will have to find another alternative.

  4. #4
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,660
    > Problems that don't show up at compile time or runtime.
    ...
    > windows shows it stopped working after I close it
    How is this not a run-time problem?

    This is just your basic debugging.
    Start by commenting out the bulk of the code and make sure you can start and end a minimal process cleanly.
    Then add some of the code back in (say you read a file, then do some calculation), you might just read the file and then exit the process.
    Find out through a process of elimination what resource(s) you've still got hold of that is causing the environment to wobble.

    > Are there any online communities or website where you can submit your source code have it checked or reviewed?
    You could put it on sourceforge (or similar).
    But bear in mind that to do a proper code review (actually analysing and understanding what is/should happen) can take hours or even days. It's a big commitment on the part of someone to give you that much time and effort for free.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Can a menu POPUP be set to CHECKED?
    By Viper187 in forum Windows Programming
    Replies: 7
    Last Post: 06-22-2008, 08:26 PM
  2. checked the boards and cant see this one
    By Andystudent in forum C Programming
    Replies: 2
    Last Post: 01-17-2006, 05:01 PM
  3. Radio button is it checked?
    By Bajanine in forum Windows Programming
    Replies: 2
    Last Post: 11-21-2002, 07:08 PM
  4. for those who checked out the first one heres the new one
    By jobolikescake in forum C++ Programming
    Replies: 3
    Last Post: 09-14-2002, 09:28 PM
  5. Running a EXE -Don't Yell! I checked The FAQ...
    By johnc in forum C Programming
    Replies: 14
    Last Post: 07-11-2002, 03:28 PM