Update
This commit is contained in:
parent
dbf191fd3a
commit
7d386d475f
14 changed files with 2002 additions and 1968 deletions
|
@ -53,10 +53,11 @@ This place is for suggesting programming [projects](project.md) that will in fir
|
|||
9. **[bytebeat](bytebeat.md)**: Make at least three cool sounding bytebeat songs.
|
||||
10. **Lorem ipsum [markdown](md.md) generator**: Create a program that generates gibberish text in markdown format that looks like normal human text. Each time it is run, it will generate generally a different text that consists of 3 to 5 sections, each section starts with a heading which starts with `# ` after which 3 to 5 words follow, then there are two newlines and then 3 to 5 paragraphs follow; each paragraph ends with two newlines, except for the last one in the document which only ends with one newline. Paragraph consists of 5 to 10 sentences; each sentence consists of 3 to 10 words, starts with capital letter (other letters are lowercase) and ends with period. About 1 in 20 words in paragraphs are highlighted -- highlight is either italic (the word is between `*`s) or bold (the word is between `**`s). After period there is space except when it's the last period in a paragraph (then there is no space). Words are selected randomly from some set of words that you define (have at least 10 different words). Thumbs up for also generating lists etc.
|
||||
11. **Caesar cipher**: Make a program that encrypts/decrypts text with the simple cipher known as Caesar cipher, i.e. by offsetting each letter by certain fixed number *N* (e.g. with *N = 2* the letter *A* will become *C*, *B* will become *D* etc.). Assume just ASCII characters on input (encrypted output can be non-ASCII). You can just choose and hardcode some specific *N* but thumbs up for allowing to set any *N*. You can input/output text from/to standard input/output or files -- it's up to you -- also you can either make one program that does both encoding and decoding (e.g. depending on CLI flag) or make two programs, one for each task.
|
||||
12. **Roman numeral converter**: make a program that will convert between Roman numerals and our traditional decimal numerals (only positive whole numbers, at least up to the limit of unsigned integer range), both ways. The program will read the numeral on its input (you can choose: either read it from standard input or take it from program arguments, this isn't that important), then recognize if it's Roman numeral or decimal number, then convert it to the other representation and print it out. Handle errors only on a basic level (e.g. write out if the input value is in wrong format).
|
||||
13. **simple website generator**: All static site generators suck ass, make your own. Make a simple markup language and a program that will turn this markup into [HTML](html.md) file -- this will allow you to write HTML websites very easily. The program will read the input file on standard input (i.e. NOT from a file, though you can optionally support this too) and output the HTML on standard output (again, output to file is optional), so that the program can be used like this: `cat myfile.mymarkup | ./mymarkupprocessor > mywebpage.html`. The markup language may be super simple: let's say `_` and `;_` could mark the start and end of bold text (translating to `<b>` and `</b>` respectively) , `#` and `;#` start and end of heading (translating to `<h1>` and `</h1>` respectively) and so on (you can make your own tags, this is just an example). Basically you'll be mostly just translating your tags into HTML tags. You don't have to implement escape sequences for special characters (i.e. it's fine if it's impossible to have let's say the `#` character in your output), but thumbs up if you do. You HAVE TO output a correct HTML, i.e. you have to output a prologue (something like `<html> <head> </head> <body> ...`) and epilogue (something like `</body> </html>`) and somehow deal with possible HTML special characters in the input text: for example if the input contains `<`, you have to translate it to `<` etc., but it is allowed to handle non-trivial cases (like weird Unicode stuff or something) by e.g. just replacing problematic input with `???`. [Unicode](unicode.md) doesn't have to be supported on output, you can output plain [ASCII](ascii.md). You have to support at least normal text, 2 levels of headings and bold text, thumbs up for additional things like images, links, lists etc. Thumbs up for additional features like allowing to set website title with a CLI flag, choose from several hardcoded [CSS](css.md) styles or adding extra output formats like [Markdown](md.md), LaTeX and so on. Test that you generate correct HTML with some HTML validator.
|
||||
14. **filetype guesser**: Create a program that reads a file and guesses its file type. You can NOT use the file name, only the file content. First look at the [magic number](magic_number.md) (file signature) -- check at least PDF, JPEG, PNG, MP3, GIF and TAR. If this doesn't succeed, then see if 90% of bytes are printable ASCII characters: if so, then guess the file to be TXT, otherwise you may report unknown type (or optionally you can try some extra checks if you want).
|
||||
15. **[brainfuck](brainfuck.md) interpreter**: Make a program that interprets brainfuck. You may choose to read the input program either from standard input or from a file (the file may have some hardcoded name, e.g. your program will just look for a file named `program.bf` in the same directory). If the brainfuck program is invalid or runtime error occurs in it, you may just write out `error` and halt your interpreter. Thumbs up for making the interpreter nicer, e.g. allowing to pass input file name as a CLI argument, reporting more details about errors (e.g. its position in source code) and so on.
|
||||
12. **Data corruptor**: write a [CLI](cli.md) utility that reads data from standard input and outputs the same data but corrupted on standard output. There must be at least one optional argument: the level of corruption in percents (i.e. 0 to 100) -- this will say how much the data will be corrupted. Default value will be 10. By corruption we mean flipping (negating) a bit in the data. Probability of flipping every single bit is given by the optional percentage argument. The number of corrupted bits doesn't have to be the EXACT requested percentage, it's just a statistical request (except for values 0 and 100, of course). This means that 1000 with 50% corrpution don't have to have exactly 500 bits different, just approximately that many. You can use the standard library `rand` function to generate random numbers. Thumbs up for extra functionality such as optional second argument for random seed, and possibly other types of corruption such as removing or adding bits. Test the utility by on some real data, e.g. videos, jpeg images, audio, PPM images etc.
|
||||
13. **Roman numeral converter**: make a program that will convert between Roman numerals and our traditional decimal numerals (only positive whole numbers, at least up to the limit of unsigned integer range), both ways. The program will read the numeral on its input (you can choose: either read it from standard input or take it from program arguments, this isn't that important), then recognize if it's Roman numeral or decimal number, then convert it to the other representation and print it out. Handle errors only on a basic level (e.g. write out if the input value is in wrong format).
|
||||
14. **simple website generator**: All static site generators suck ass, make your own. Make a simple markup language and a program that will turn this markup into [HTML](html.md) file -- this will allow you to write HTML websites very easily. The program will read the input file on standard input (i.e. NOT from a file, though you can optionally support this too) and output the HTML on standard output (again, output to file is optional), so that the program can be used like this: `cat myfile.mymarkup | ./mymarkupprocessor > mywebpage.html`. The markup language may be super simple: let's say `_` and `;_` could mark the start and end of bold text (translating to `<b>` and `</b>` respectively) , `#` and `;#` start and end of heading (translating to `<h1>` and `</h1>` respectively) and so on (you can make your own tags, this is just an example). Basically you'll be mostly just translating your tags into HTML tags. You don't have to implement escape sequences for special characters (i.e. it's fine if it's impossible to have let's say the `#` character in your output), but thumbs up if you do. You HAVE TO output a correct HTML, i.e. you have to output a prologue (something like `<html> <head> </head> <body> ...`) and epilogue (something like `</body> </html>`) and somehow deal with possible HTML special characters in the input text: for example if the input contains `<`, you have to translate it to `<` etc., but it is allowed to handle non-trivial cases (like weird Unicode stuff or something) by e.g. just replacing problematic input with `???`. [Unicode](unicode.md) doesn't have to be supported on output, you can output plain [ASCII](ascii.md). You have to support at least normal text, 2 levels of headings and bold text, thumbs up for additional things like images, links, lists etc. Thumbs up for additional features like allowing to set website title with a CLI flag, choose from several hardcoded [CSS](css.md) styles or adding extra output formats like [Markdown](md.md), LaTeX and so on. Test that you generate correct HTML with some HTML validator.
|
||||
15. **filetype guesser**: Create a program that reads a file and guesses its file type. You can NOT use the file name, only the file content. First look at the [magic number](magic_number.md) (file signature) -- check at least PDF, JPEG, PNG, MP3, GIF and TAR. If this doesn't succeed, then see if 90% of bytes are printable ASCII characters: if so, then guess the file to be TXT, otherwise you may report unknown type (or optionally you can try some extra checks if you want).
|
||||
16. **[brainfuck](brainfuck.md) interpreter**: Make a program that interprets brainfuck. You may choose to read the input program either from standard input or from a file (the file may have some hardcoded name, e.g. your program will just look for a file named `program.bf` in the same directory). If the brainfuck program is invalid or runtime error occurs in it, you may just write out `error` and halt your interpreter. Thumbs up for making the interpreter nicer, e.g. allowing to pass input file name as a CLI argument, reporting more details about errors (e.g. its position in source code) and so on.
|
||||
|
||||
### Level 2: Mid, *Hurt Me Plenty*
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue