Computer Science Canada Can anyone make suggestions to make this program better? |
Author: | PR069 [ Thu Oct 09, 2014 6:31 pm ] | ||
Post subject: | Can anyone make suggestions to make this program better? | ||
|
Author: | Insectoid [ Thu Oct 09, 2014 6:50 pm ] |
Post subject: | RE:Can anyone make suggestions to make this program better? |
Your comments are actually pretty good, and your variable names too. You shouldn't have to love naming your variables after what they do, because that's how it should be done. It's actually very bad form to not do that. |
Author: | Nathan4102 [ Thu Oct 09, 2014 6:52 pm ] |
Post subject: | RE:Can anyone make suggestions to make this program better? |
I don't have a turing compiler on this computer so I can't test anything but glancing over the code, I see no issues. Unfortunately I can't help you with your drawing issue on this computer, if nobody helps you tonight than tomorrow I'll give it a shot. One thing to note though, unless you're specifically challenged to keep code length to a minimum, ALWAYS treat efficiency and readability over code shortness. Code length is not necessarily a bad thing, longer code can be more efficient than short code, and is usually neater and easier to read and modify later. Not that your code looks like you really pressed for shortness, just based on the comment you made at the top. It looks good though, keep it up and good luck! |
Author: | Tony [ Thu Oct 09, 2014 7:00 pm ] |
Post subject: | Re: Can anyone make suggestions to make this program better? |
Instead of asking for marks and total separately, you could get one line of input in the form of "56/60" and parse that into appropriate components yourself. PR069 @ Thu Oct 09, 2014 6:31 pm wrote: if percent > 100 then put "Are you asian??" end if Racial stereotypes are a base of many jokes, but might not be appropriate in a classroom setting. Messaging aside, this out-of-bounds types of checks _are_ a good thing to do. |
Author: | PR069 [ Fri Oct 10, 2014 7:23 am ] |
Post subject: | Re: Can anyone make suggestions to make this program better? |
Im sorry about the racism Me and my friends were fooling around, I will ensure that all of this code has been checked over and thanks for the support that I should not just strive for shorter code. |