Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Sudoku Grade 11 FSE
Index -> Programming, Java -> Java Submissions
View previous topic Printable versionDownload TopicRate TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
Keith




PostPosted: Thu Oct 11, 2007 7:26 pm   Post subject: Sudoku Grade 11 FSE

Hi, this is my first submission! I did this as my final project in grade 11. It is a sudoku generator. It randomly generates a new puzzle!


Sudoku_FSE.java
 Description:

Download
 Filename:  Sudoku_FSE.java
 Filesize:  122.23 KB
 Downloaded:  1852 Time(s)

Sponsor
Sponsor
Sponsor
sponsor
wtd




PostPosted: Fri Oct 12, 2007 12:44 am   Post subject: Re: Sudoku Grade 11 FSE

Very little and poor use of methods. For that alone, were I your instructor, I have to say I wouldn't be able to give you a passing grade.

Of course, if your instructor hasn't taught you any better, I'd give him/her a failing grade as well.

I wouldn't excuse you, though. There are any number of resources outside your class which could show you how to use methods well.
Tony




PostPosted: Fri Oct 12, 2007 1:01 am   Post subject: RE:Sudoku Grade 11 FSE

If you ever see yourself repeating the same code over and over again - it's a sign of a problem in the design.

I see you having code like
code:

if 1
do foo + 1
end

if 2
do foo + 2
end

and so on for a lot of numbers

having a for-loop + a generalized method will cut your program down to maybe 150 (out of current 4600) lines. There's 3% of logic and 97% of redundancy.
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
Euphoracle




PostPosted: Fri Oct 12, 2007 2:37 pm   Post subject: RE:Sudoku Grade 11 FSE

4600 lines? Damn. That's like the "trivia games" people made last year in turing in my class. Really, the schools aught to rethink their curriculum for this course. Leave it to people with no knowledge of it to design it wrong.
Tony




PostPosted: Fri Oct 12, 2007 2:41 pm   Post subject: RE:Sudoku Grade 11 FSE

I remember back in high school someone was using the older DOS version of Turing and there was a really big problem -- it wouldn't compile more than 5000 lines of code. Also for a "trivia game". Of course the entire program could have been crunched down to 20 lines of code + a data file for the questions.
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
Euphoracle




PostPosted: Fri Oct 12, 2007 7:11 pm   Post subject: RE:Sudoku Grade 11 FSE

While they were doing that, I wrote a 2D sidescroller game, but I ran out of time, so it wasn't as good as it could have been. I wrote a tiny little paintball game, where you shoot paintballs at zombies (because guns aren't allowed, but I didn't have time to redo the sprites, so it was a paintball minigun with muzzle flashes :S) in the 2500 line range (not sure of actual numbers because I deleted it, I was so shamed of it. Half of that is commenting also, because nearly every single line had to be "commented" and I had to put a 25 line header at the top of every file, which also had a variable list in comments which was about 20~60 depending on the file). And I find it weird that people managed to write MORE code than my unmanaged and poorly-created game for a simple trivia game that asked you 20 questions each with 5 answers and a background which looked like garbage because most of them were from Google at a size of 400x300 stretched to like 600x480. I would have preferred them teach that course without computers. Instead, teach the concepts behind object orientated languages, since that is what is thrown at you next year, but the teacher said they can't do that because no one would take the course, and it doesn't follow the curriculum. Since when should learning a mediocre outdated style of programming & language be part of the standard curriculum? There's a good 9 of us who actually care about it enough to take it, and just me who already knows a few languages. I think it'd be overall beneficial to modify the current system. Some may argue that it's too "fast" for people just starting. I don't think that's true. It's like when the class goes as slow as the slowest student. It doesn't benefit anyone but that one student. Sure, the schools need to help them too, but that's hindering everyone else for the needs of a few. There is a reason we have extra help, but go figure, the people who need it don't care enough to get it. Well, since they don't care, why are they being forced to care? If someone is truly having problems and wants to succeed, they normally would take it upon themselves to help themselves do so. I get many people who come to me and ask for help on certain things they don't understand. Whether or not they are at a high level of skill is not of concern to me, because they are trying to catch up, get ahead, or gain a better understanding of the concepts that they cannot learn through the current methods of the teachings (although the same can be said about many classes, this is just one I feel most strongly about). I'm still waiting for the day when those who strive to get ahead can do so, those who struggle but have desire can get the help they need to do so, and those who do not want to no care to succeed are forced to realize that no one is going to force them to succeed, they have to take it upon themselves to get the help they need. If someone asks me for help, I will assist them, but if someone doesn't ask, I won't pity them when they are falling behind. Initiative, that's the key word, the one thing teachers try to stress, but don't place value on. If you show that initiative is required to succeed, the skill will be learned, likewise if you show that grammar is needed to achieve highly on an assignment, people who wish to succeed will try harder to learn and apply it.

Just my trailing thoughts in this hour of waiting for DWITE site to be fixed.
HeavenAgain




PostPosted: Fri Oct 12, 2007 7:15 pm   Post subject: RE:Sudoku Grade 11 FSE

Quote:

.........................................
Just my trailing thoughts in this hour of waiting for DWITE site to be fixed.

i envy you *bows*
Reality Check




PostPosted: Mon Nov 12, 2007 10:49 pm   Post subject: Re: Sudoku Grade 11 FSE

Well, if your teacher hasn't taught you the proper use of a method or for loop than we can't put the blame on you. But your program, although decent, is very redundant. You could really reduce a lot of your code and if you ever want to have a future in this then efficiency and readability is of utmost importance. I know if I was a fellow programmer I would not want to work with you. Out of curiosity though, what was your mark?
Sponsor
Sponsor
Sponsor
sponsor
Keith




PostPosted: Fri Nov 16, 2007 4:17 pm   Post subject: RE:Sudoku Grade 11 FSE

i got an 89% overall, that included a log and pseudo code.
Euphoracle




PostPosted: Fri Nov 16, 2007 5:21 pm   Post subject: RE:Sudoku Grade 11 FSE

Posted Image, might have been reduced in size. Click Image to view fullscreen.
What is the world coming to...
Display posts from previous:   
   Index -> Programming, Java -> Java Submissions
View previous topic Tell A FriendPrintable versionDownload TopicRate TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 10 Posts ]
Jump to:   


Style:  
Search: