meta data for this page
Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revision Both sides next revision | ||
courses:ct30a5000:generic_instructions_and_requirements [2010/08/10 18:07] julaakko |
courses:ct30a5000:generic_instructions_and_requirements [2012/08/20 19:19] julaakko [Generic instructions and requirements] |
||
---|---|---|---|
Line 1: | Line 1: | ||
Network programming [[https://noppa.lut.fi/noppa/opintojakso/ct30a5000/etusivu|@ Noppa]] | [[courses:ct30a5000:start|@ wiki]] - | Network programming [[https://noppa.lut.fi/noppa/opintojakso/ct30a5000/etusivu|@ Noppa]] | [[courses:ct30a5000:start|@ wiki]] - | ||
- | Updated: --- //[[jussi.laakkonen@lut.fi|julaakko]] 2009/09/29 15:44// | + | Updated: --- //[[jussi.laakkonen@lut.fi|Jussi Laakkonen]] 2011/09/16 11:22// |
---- | ---- | ||
+ | |||
+ | Updates: | ||
+ | > 16.9.2011: Added clarification for README file | ||
+ | |||
====== Generic instructions and requirements ====== | ====== Generic instructions and requirements ====== | ||
* INDIVIDUAL WORK – **NO COPYING** – NO GROUPWORK (discuss but do not share code) | * INDIVIDUAL WORK – **NO COPYING** – NO GROUPWORK (discuss but do not share code) | ||
+ | * If you're caught copying directly from others or from Internet/books your grade is 0. | ||
+ | * Remember the difference between plagiarism and adaptation. | ||
* Use **C-language** and **GCC compiler** (see //man gcc//) | * Use **C-language** and **GCC compiler** (see //man gcc//) | ||
* Eliminate warning-messages (use ''-Wall'' for ''gcc'') | * Eliminate warning-messages (use ''-Wall'' for ''gcc'') | ||
- | * Program can be **run in Linux** (on [[admin:pentinkulma|computers in classroom 6325]]) | + | * Try to follow coding standards (''-ansi'' **is not required**), use extended C99 standard: GNU99: ''-std=gnu99''. |
- | * Do not use external libraries (use only system libraries) | + | * Program can be **run in Linux** (on [[admin:pentinkulma|computers in classroom 6218]]) |
- | * Use iterative approach (no threads or fork() unless requested) | + | * Do not use external libraries (use only system libraries, all required should be installed into classroom 6218 machines) |
+ | * Use iterative approach (__no threads or fork()__ unless requested) | ||
+ | * **Graphical user interface __IS NOT REQUIRED__, NOR RECOMMENDED** | ||
* Use a **make file** (see //man make// or use a [[http://www2.it.lut.fi/courses/CT30A5000/material/Makefile|Makefile template]]) | * Use a **make file** (see //man make// or use a [[http://www2.it.lut.fi/courses/CT30A5000/material/Makefile|Makefile template]]) | ||
* Compile: make build | * Compile: make build | ||
Line 15: | Line 23: | ||
* **Comment** and **document** your code | * **Comment** and **document** your code | ||
* Comments directly to source code files | * Comments directly to source code files | ||
- | * Add name, student number and email into beginning of **EVERY** file. | + | * Add name, student number and email into the beginning of **EVERY** file. |
+ | * All documentation either in __English__ or in __Finnish__ | ||
* Use **good structure** for your code | * Use **good structure** for your code | ||
* Divide code to functions based on responsibilities. | * Divide code to functions based on responsibilities. | ||
Line 21: | Line 30: | ||
* C-code in .c files and header descriptions in .h files. | * C-code in .c files and header descriptions in .h files. | ||
* **ONE MAIN FUNCTION IS NOT GOOD STRUCTURING OF CODE** ! | * **ONE MAIN FUNCTION IS NOT GOOD STRUCTURING OF CODE** ! | ||
- | * **!!!!!!! NO GOTO !!!!!!!** People it is the year 2009, we're not anymore living in the 80s! | + | * **!!!!!!! NO GOTO STRUCTURES !!!!!!!** |
* See [[courses:ct30a5000:generic_instructions_and_requirements#using_multiple_files|short example about how to use multiple files]]. | * See [[courses:ct30a5000:generic_instructions_and_requirements#using_multiple_files|short example about how to use multiple files]]. | ||
- | * Write a **readme file**, which contains: | + | * Write a **readme file**, **AS PLAIN TEXT, !__NO DOC/ODT/PDF/__!, **which contains: |
* How to run the program. **Follow the given instructions on __every__ assignment** | * How to run the program. **Follow the given instructions on __every__ assignment** | ||
- | * Description of the task (what has been done, **what references were used**) | + | * Description of the task (what has been done) |
+ | * List what **references were used** (books, Internet pages/tutorials, etc.) | ||
* Features that were implemented | * Features that were implemented | ||
* Description of division of code into separate files | * Description of division of code into separate files | ||
- | * Own ides (text) or solutions (code) for improving the task | + | * Own ideas (text) or solutions (code) for improving the task |
* __Own improvements must clearly be a new feature__, i.e. separate feature that enhances functionalities of the application. | * __Own improvements must clearly be a new feature__, i.e. separate feature that enhances functionalities of the application. | ||
* __Must be documented__! No documentation about own feature(s) → no additional points | * __Must be documented__! No documentation about own feature(s) → no additional points | ||
Line 41: | Line 51: | ||
Files: | Files: | ||
* main.c - main file, contains implementations of main() and run()-functions. | * main.c - main file, contains implementations of main() and run()-functions. | ||
- | <code c> | + | <code c main.c> |
#include "main.h" | #include "main.h" | ||
int main(int argc, char *argv[]) | int main(int argc, char *argv[]) | ||
{ | { | ||
- | printf("Main"); | + | printf("Main\n"); |
run(argc); | run(argc); | ||
Line 62: | Line 72: | ||
* main.h - header for main.c, contains prototype for ''run()''-function. | * main.h - header for main.c, contains prototype for ''run()''-function. | ||
- | <code c> | + | <code c main.h> |
#include <stdio.h> | #include <stdio.h> | ||
Line 69: | Line 79: | ||
* file.c - additional file, contains implementation of check()-function. | * file.c - additional file, contains implementation of check()-function. | ||
- | <code c> | + | <code c file.c> |
#include "file.h" | #include "file.h" | ||
Line 80: | Line 90: | ||
* file.h - header for file.c, contains prototype for ''check()''-function. | * file.h - header for file.c, contains prototype for ''check()''-function. | ||
- | <code c> | + | <code c file.h> |
#define RIGHT 0 | #define RIGHT 0 | ||
Line 89: | Line 99: | ||
To use the function defined in file.h and implemented in file.c in the main.c following steps are needed: | To use the function defined in file.h and implemented in file.c in the main.c following steps are needed: | ||
- Include the file.h in main.c (or in main.h) | - Include the file.h in main.c (or in main.h) | ||
- | * main.c after modifications:<code c> | + | * main.c after modifications:<code c main_mod.c> |
#include "main.h" | #include "main.h" | ||
#include "file.h | #include "file.h | ||
Line 95: | Line 105: | ||
int main(int argc, char *argv[]) | int main(int argc, char *argv[]) | ||
{ | { | ||
- | printf("Main"); | + | printf("Main\n"); |
run(argc); | run(argc); |