User Tools

Site Tools


haas:fall2017:discrete:projects:pnc2

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
haas:fall2017:discrete:projects:pnc2 [2017/09/11 15:08] wedgehaas:fall2017:discrete:projects:pnc2 [2017/09/18 15:58] (current) – [Evaluation Criteria] wedge
Line 174: Line 174:
     * as primes are being displayed, they are space-separated (first prime hugs the left margin), and when all said and done, a newline is issued.     * as primes are being displayed, they are space-separated (first prime hugs the left margin), and when all said and done, a newline is issued.
     * the timing information will be displayed in accordance to code I will provide below (see the **timing** section).     * the timing information will be displayed in accordance to code I will provide below (see the **timing** section).
 +
 +=====Implementation Restrictions=====
 +
 +As our goal is not only to explore the more subtle concepts of computing but to promote different methods of thinking (and arriving at solutions seemingly in different ways), one of the themes I have been harping on is the stricter adherence to the structured programming philosophy/paradigm. It isn't just good enough to be able to crank out a solution if you remain blind to the many nuances of the tools we are using, so we will at times be going out of our way to emphasize focus on certain areas that may see less exposure (or avoidance due to it being less familiar-- and from what I've witnessed so far this semester, avoidance is alive and well).
 +
 +As such, the following implementation restrictions are also in place:
 +
 +  * focus on **if()**, **ternary**, and **conditional chaining** over switch/case statements.
 +  * keep your use of **continue** and **break** statements (especially **break** statements) to a necessary minimum).
 +  * absolutely **NO** other non-structured program flow alteration (jumps, gotos, etc.)
 +  * absolutely **NO** infinite loops (**while(1)**, which are more-or-less unviable anyway if you cannot **break** out of them).
 +  * no forced redirection of the flow of the process (no seeking to the end of the file to grab a max size only to zip back somewhere else: deal with the data in as you are naturally encountering it).
 +  * All "arrays" must be declared and referenced using ONLY pointer notation, NO square brackets.
 +  * **NO** logic shunts (ie having an if statement nested inside a loop to bypass an undesirable iteration)- this should be handled by the loop condition!
 +  * At most, **ONE** return statement per function (in the case of **void**, 0 return statements).
 +  * No redundant duplication of code to address different top-level conditions or operational constraints (think quantity vs. range- these can successfully co-exist in the same block of code).
 +  * Never leave an initialized or allocated resource unverified- always do proper error checking (was the file successfully opened? Was the memory successfully allocated?
 +
 +A common resistance or complaint I get with imposing these is that it may make your solutions more cumbersome or less optimal; that actually may not be an incorrect assertion, but remember: we are interested in the longer-term pursuit of structured thinking and effective problem solving. To foster your ability to think flexibly and differently. We tend to be naturally more averse to going against the grain, but to be an effective programmer/problem solver, this is absolutely necessary. It may be "annoying", and you may choose to make it more aggravating on both yourself and me by agonizing over it, but history and experience teaching has shown me, time and time again, that this is an investment and it pays off in the long run (assuming one actually plays along).
 +
 +I am seeking to make you all better thinkers and programmers, and I cannot do that if I cave to your innate desires not to change your ways of doing things. Yes, it may be unfamiliar; yes, it may be perceived as challenging. But you know what? Work through it and eventually it becomes the new normal- what was challenging is now no longer an issue.
  
 =====Grabit Integration===== =====Grabit Integration=====
Line 729: Line 750:
  
 <code> <code>
-312:pnc2:final tally of results (312/312)+390:pnc2:final tally of results (390/390)
 </code> </code>
  
Line 738: Line 759:
 *:pnc2:primeALGO.c implements only specified algorithm [8/8] *:pnc2:primeALGO.c implements only specified algorithm [8/8]
 *:pnc2:primeALGO.c consistent indentation throughout code [4/4] *:pnc2:primeALGO.c consistent indentation throughout code [4/4]
-*:pnc2:primeALGO.c relevant comments throughout code [4/4]+*:pnc2:primeALGO.c relevant how and why comments in code [7/7]
 *:pnc2:primeALGO.c code conforms to project specifications [4/4] *:pnc2:primeALGO.c code conforms to project specifications [4/4]
-*:pnc2:primeALGO.c runtime output conforms to specifications [4/4] +*:pnc2:primeALGO.c implementation free from restrictions [13/13] 
-*:pnc2:primeALGO.c make checkqty test times within reason [4/4] +*:pnc2:primeALGO runtime output conforms to specifications [4/4] 
-*:pnc2:primeALGO.c make checkrange test times within reason [4/4] +*:pnc2:primeALGO make checkqty test times within reason [4/4] 
-*:pnc2:primeALGO.c make verifyall tests succeed [13/13]+*:pnc2:primeALGO make checkrange test times within reason [4/4] 
 +*:pnc2:primeALGO make verifyall tests succeed [13/13]
 </code> </code>
haas/fall2017/discrete/projects/pnc2.1505142514.txt.gz · Last modified: 2017/09/11 15:08 by wedge