Monday, 26 March 2012

Sup :)

This is the biggest program that I have ever written, at 2016 lines long. Of course, the amount of lines in a code should not be a was of measuring how good a program is, and in fact this code is very, very bad. And besides, most of the code is basically inefficient repetition.

Enough criticizing of my own program.

The code is easy to read, and relatively simplistic. If you have any basic grasp of C++ you will understand it.

I will be making improvements, such as an encryption key, and saving space (I'm sure I will find a way to put the whole thing in a for loop)

The source can be found here:
http://pastebin.com/apU5Zi0b

Health warning: The program is written by a novice 14 year old programmer. The source may cause manic psychosis, comatose or even death in experienced programmers.

6 comments:

  1. Hey, this is the kid who's blog you just commented on. I took a look at your code, and I would recommend using a switch statement instead of a bunch of if statements. It could really cut down on the number of lines you have.

    Otherwise, keep on writing!

    ReplyDelete
  2. Thanks man, I'm always open to new feedback :)

    ReplyDelete
  3. Looking good for your age :)

    suggestion 1) consider a function to generate the values (are you just doing ASCII lookups? look into atoi)
    suggestion 2) depending on the cost of the function, consider using lookup tables... carmack used these frequently since games demand the fastest performance, and some of the calculations would've taken much longer with minimal improvement to accuracy.

    ReplyDelete
  4. Thanks for the feedback, will keep that in mind :) Thanks for visiting

    ReplyDelete
  5. I don't know if this is intentional, but A and V map to the same number

    ReplyDelete