User Tools

Site Tools


haas:fall2017:discrete:projects:dcf1

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:dcf1 [2017/09/09 14:22] – [Check Results] wedgehaas:fall2017:discrete:projects:dcf1 [2017/10/09 14:21] (current) wedge
Line 3: Line 3:
 <WRAP><fs 150%>CSCS2330 Discrete Structures</fs></WRAP> <WRAP><fs 150%>CSCS2330 Discrete Structures</fs></WRAP>
 </WRAP> </WRAP>
- 
-~~TOC~~ 
  
 ======Project: RUN-LENGTH ENCODING - DATA COMPRESSION FUN (dcf1)====== ======Project: RUN-LENGTH ENCODING - DATA COMPRESSION FUN (dcf1)======
 +
 +=====Errata=====
 +Any changes that have been made.
 +
 +  * Revision 0.1: Updating dcfX v2 spec and added some additional implementation constraints (20170907)
 +  * Revision 0.2: Finalized project data files, adapted included 'check' script for dcf1 (20170909)
 +  * Revision 0.3: Updated check script so it no longer gives out false negatives. **make getdata** to grab the updated copy (20170921)
  
 =====Objective===== =====Objective=====
Line 55: Line 60:
 ====Header==== ====Header====
 It is actually **identical** to the specifications of last week, save for four changes: It is actually **identical** to the specifications of last week, save for four changes:
-  - we're no longer hard-coding the **stride** value to 1 (byte 10)+  - we're no longer hard-coding the **stride** value to 1 (byte 10), but instead obtaining it from the command-line (argv[3]), any valid value between 1 and 255 (inclusive).
   - we're placing a 2 in the version byte (byte 9)   - we're placing a 2 in the version byte (byte 9)
   - the embedded source file name will now be stripped of any path (ie "in/sample0.txt" should now just be stored as "sample0.txt")   - the embedded source file name will now be stripped of any path (ie "in/sample0.txt" should now just be stored as "sample0.txt")
   - the destination argument (argv[2]) is now merely a path, NOT a path+filename (ie "out/sample0.txt.rle" should now just be "out")   - the destination argument (argv[2]) is now merely a path, NOT a path+filename (ie "out/sample0.txt.rle" should now just be "out")
     * the destination file is a combination of the destination path + source filename + ".rle" extension (for encode).     * the destination file is a combination of the destination path + source filename + ".rle" extension (for encode).
 +
 +And specifically for **decode**, the source filename will be retrieved out of the post-header information at the start of the encoded file.
  
 Every RL-encoded file will start with the following 12-byte header: Every RL-encoded file will start with the following 12-byte header:
Line 162: Line 169:
 ‘/var/public/SEMESTER/discrete/dcf1/encode.c’ -> ‘/home/USERNAME/src/discrete/dcf1/encode.c’ ‘/var/public/SEMESTER/discrete/dcf1/encode.c’ -> ‘/home/USERNAME/src/discrete/dcf1/encode.c’
 ‘/var/public/SEMESTER/discrete/dcf1/decode.c’ -> ‘/home/USERNAME/src/discrete/dcf1/decode.c’ ‘/var/public/SEMESTER/discrete/dcf1/decode.c’ -> ‘/home/USERNAME/src/discrete/dcf1/decode.c’
-‘/var/public/SEMESTER/discrete/dcf1/data/sample0.txt’ -> ‘/home/USERNAME/src/discrete/dcf1/data/sample0.txt’ +...
-‘/var/public/SEMESTER/discrete/dcf1/data/sample1.txt’ -> ‘/home/USERNAME/src/discrete/dcf1/data/sample1.txt’ +
-‘/var/public/SEMESTER/discrete/dcf1/data/sample2.bmp’ -> ‘/home/USERNAME/src/discrete/dcf1/data/sample2.bmp’ +
-‘/var/public/SEMESTER/discrete/dcf1/data/sample3.wav’ -> ‘/home/USERNAME/src/discrete/dcf1/data/sample3.wav’ +
-‘/var/public/SEMESTER/discrete/dcf1/data/sample4.bmp.rle’ -> ‘/home/USERNAME/src/discrete/dcf1/data/sample4.bmp.rle’ +
-‘/var/public/SEMESTER/discrete/dcf1/data/sample5.txt.rle’ -> ‘/home/USERNAME/src/discrete/dcf1/data/sample5.txt.rle’ +
-‘/var/public/SEMESTER/discrete/dcf1/data/sample6.mp3.rle’ -> ‘/home/USERNAME/src/discrete/dcf1/data/sample6.mp3.rle’ +
-‘/var/public/SEMESTER/discrete/dcf1/data/sample7.txt.rle’ -> ‘/home/USERNAME/src/discrete/dcf1/data/sample7.txt.rle’ +
 make: Leaving directory '/var/public/SEMESTER/discrete/dcf1' make: Leaving directory '/var/public/SEMESTER/discrete/dcf1'
 lab46:~/src/discrete$ cd dcf1 lab46:~/src/discrete$ cd dcf1
Line 264: Line 263:
  
 <cli> <cli>
-lab46:~/src/discrete/dcf1$ ./decode data/sample5.txt.rle +lab46:~/src/discrete/dcf1$ ./decode in/sample0.txt.rle out 
-    input filename: data/sample5.txt.rle+    input filename: in/sample0.txt.rle
 output name length: 11 bytes output name length: 11 bytes
    output filename: sample5.txt    output filename: sample5.txt
Line 455: Line 454:
  
 You should get some sort of confirmation indicating successful submission if all went according to plan. If not, check for typos and or locational mismatches. You should get some sort of confirmation indicating successful submission if all went according to plan. If not, check for typos and or locational mismatches.
-=====Submission===== 
-====Project Submission==== 
-To submit this program to me using the **submit** tool, run the following command at your lab46 prompt: 
- 
-<cli> 
-lab46:~/src/discrete/dcf1$ make submit 
-removed 'decode' 
-removed 'encode' 
-removed 'errors' 
- 
-Project backup process commencing 
- 
-Taking snapshot of current project (dcf1)      ... OK 
-Compressing snapshot of dcf1 project archive   ... OK 
-Setting secure permissions on dcf1 archive     ... OK 
- 
-Project backup process complete 
- 
-Submitting discrete project "dcf1": 
-    -> ../dcf1-DATESTRING-HOUR.tar.gz(OK)  
- 
-SUCCESSFULLY SUBMITTED 
-</cli> 
- 
-You should get some sort of confirmation indicating successful submission if all went according to plan. If not, check for typos and or locational mismatches. 
- 
-====Submission Criteria==== 
-To be successful in this project, the following criteria must be met: 
- 
-  * Project must be submit on time, by the posted deadline. 
-    * Early submissions will earn 1 bonus point per full day in advance of the deadline. 
-      * Bonus eligibility requires an honest attempt at performing the project (no blank efforts accepted) 
-    * Late submissions will lose 25% credit per day, with the submission window closing on the 4th day following the deadline. 
-      * To clarify: if a project is due on Wednesday (before its end), it would then be 25% off on Thursday, 50% off on Friday, 75% off on Saturday, and worth 0% once it becomes Sunday. 
-      * Certain projects may not have a late grace period, and the due date is the absolute end of things. 
-  * all requested functionality must conform to stated requirements (either on this project page or in comment banner in source code files themselves). 
-  * code resulting in two binaries must be submitted: 
-    * source code that when compiled produces the **encode** program 
-      * if you're only using one file for the encode, that source file should be called **encode.c** 
-    * source code that when compiled produces the **decode** program 
-      * if you're only using one file for the decode, that source file should be called **decode.c** 
-  * Output generated must conform to any provided requirements and specifications (be it in syntax or sample output) 
-    * output obviously must also be correct based on input. 
-  * Processing must be correct based on input given and output requested 
-  * Specification details are NOT to be altered. This project will be evaluated according to the specifications laid out in this document. 
-  * Code must compile cleanly. 
-    * Each source file must compile cleanly (worth 3 total points): 
-      * 3/3: no compiler warnings, notes or errors. 
-      * 2/3: one of warning or note present during compile 
-      * 1/3: two of warning or note present during compile 
-      * 0/3: compiler errors present (code doesn't compile) 
-  * Code must be nicely and consistently indented (you may use the **indent** tool) 
-    * You are free to use your own coding style, but you must be **consistent** 
-    * Avoid unnecessary blank lines (some are good for readability, but do not go overboard- double-spacing your code will get points deducted). 
-    * Indentation will be rated on the following scale (worth 3 total points): 
-      * 3/3: Aesthetically pleasing, pristine indentation, easy to read, organized 
-      * 2/3: Mostly consistent indentation, but some distractions (superfluous or lacking blank lines, or some sort of "busy" ness to the code) 
-      * 1/3: Some indentation issues, difficult to read 
-      * 0/3: Lack of consistent indentation (didn't appear to try) 
-  * Code must be commented 
-    * Commenting will be rated on the following scale (worth 4 total points): 
-      * 4/4: Not only aesthetically pleasing, but also adequately explains the WHY behind what you are doing 
-      * 3/4: Aesthetically pleasing (comments aligned or generally not distracting), easy to read, organized 
-      * 2/4: Mostly consistent, some distractions or gaps in comments (not explaining important things) 
-      * 1/4: Light commenting effort, not much time or energy appears to have been put in. 
-      * 0/4: No original comments 
-      * should I deserve nice things, my terminal is usually 90 characters wide. So if you'd like to format your code not to exceed 90 character wide terminals (and avoid line wrapping comments), at least as reasonably as possible, those are two sure-fire ways of making a good impression on me with respect to code presentation and comments. 
-    * Sufficient comments explaining the point of provided logic **MUST** be present 
-  * Code must be appropriately modified 
-    * Appropriate modifications will be rated on the following scale (worth 3 total points): 
-      * 3/3: Complete attention to detail, original-looking implementation 
-      * 2/3: Lacking some details (like variable initializations), but otherwise complete (still conforms, or conforms mostly to specifications) 
-      * 1/3: Incomplete implementation (typically lacking some obvious details/does not conform to specifications) 
-      * 0/3: Incomplete implementation to the point of non-functionality (or was not started at all) 
-    * Implementation must be accurate with respect to the spirit/purpose of the project (if the focus is on exploring a certain algorithm to produce results, but you avoid the algorithm yet still produce the same results-- that's what I'm talking about here).. worth 3 total points: 
-      * 3/3: Implementation is in line with spirit of project 
-      * 2/3: Some avoidance/shortcuts taken (note this does not mean optimization-- you can optimize all you want, so long as it doesn't violate the spirit of the project). 
-      * 1/3: Generally avoiding the spirit of the project (new, different things, resorting to old and familiar, despite it being against the directions) 
-      * 0/3: entirely avoiding. 
-    * Error checking must be adequately and appropriately performed, according to the following scale (worth 3 total points): 
-      * 3/3: Full and proper error checking performed for all reasonable cases, including queries for external resources and data. 
-      * 2/3: Enough error checking performed to pass basic project requirements and work for most operational cases. 
-      * 1/3: Minimal error checking, code is fragile (code may not work in full accordance with project requirements) 
-      * 0/3: No error checking (code likely does not work in accordance with project requirements) 
-  * Track/version the source code in a repository 
-  * Submit a copy of your source code to me using the **submit** tool (**make submit** will do this) by the deadline. 
  
haas/fall2017/discrete/projects/dcf1.1504966938.txt.gz · Last modified: 2017/09/09 14:22 by wedge