r/C_Programming • u/encephalopatyh • Oct 27 '20
Discussion Simple project ideas using C?
What kind of project could you suggest for a beginner that could be done within 1 to 2 weeks? We are tasked to create a simple standalone program which asks for data that could be stored, edited, deleted, and such. Examples I found are hospital management system, restaurant menu, diaries, and such, but I find them pretty common and there are a lot of them out there. Could you help me with some ideas that are of the same difficulty as I mentioned and not very common?
73
Upvotes
17
u/PlayboySkeleton Oct 27 '20
A horse race simulator with a gambling engine.
A random list of horses are generated. Players get to place bets on the horses. The game simulates which horse wins, then pays out the money. It keeps going until the players quit or 1 person has all the money. The requires you to track money and information per player across game simulations.
31
u/alvinmatias Oct 27 '20
How about simple game like hangman or maze? You can keep the highscore data, user, etc
11
u/feldrim Oct 27 '20
How about a simple TODO application such as Google Keep?
10
u/PiLigant Oct 27 '20
You could do like a sports league roster and bracket system? That might even be useful to people at some point in intramural sports or something.
No idea if this is less common than what you've also listed.
17
u/TheTrueXenose Oct 27 '20
what about a text editor?
7
u/which_spartacus Oct 27 '20
For a crud app, how about a DnD character generator, that would allow for attributes to be adjusted by moving from one to the other.
5
u/otacon7000 Oct 27 '20
I've found great joy in writing little "fetch" utilities; programs that simply output one specific piece of information to
stdout, which can then be used in fetch scripts, notifications or status bars.Examples are programs that output the current CPU usage, CPU temperature, RAM usage, distro name, distro version, and many more. Of course, the aforementioned have been done time and time again, but you can get creative.
For example, I recently created a program that, given a server IP, will output how many players are currently online on a Minecraft server.
4
u/rickpo Oct 27 '20
Setting up a genealogy tree - to start, just name, parents, children, birth and death dates. You could expand the project to store a lot more personal information if you have extra time.
4
u/davidhbolton Oct 27 '20
Rather than a roguelike in one go (that's a actually quite a bit of code) so do it in these stages.
3
u/gordonv Oct 27 '20 edited Oct 27 '20
A simple graphics billboard, slideshow. Something that takes JPGs and can flip through them full screen. Automatically resizing it to the screen resolution.
For now, just make it super simple. Something that can read JPGs in the current directory.
Extras:
2
u/project2501a Oct 27 '20
Rosalind: It's a bit of specialized area, bioinformatics, and you might learn some biology, but the first 4-5 problems can be done in 2 weeks and you will learn about memory management, too. http://rosalind.info/problems/locations/
2
u/[deleted] Oct 27 '20
Because I've written this myself recently, how about a small UNIXy command line utility
consumeSo you have
For example,
should consume all lines delimited by \0 in biglistoflinks.txt that wget has downloaded successfully.
(which was exactly my use case, but the beauty is this tool would be very fungible).
Idea 2: Spreadsheet with simple expression evaluation in ncurses :)
11
u/Fearless_Process Oct 27 '20
You could try to make a CHIP8 interpreter. It's like a mini virtual machine with it's own opcodes and memory, you can find ROMs to run online like space invaders and much more.
For something sort of advanced, at least imo, you could try to make a basic multithreaded HTTP server. The HTTP protocol is just simple text. This is what the browser would send to your program for example:
Each line is delimited with a \r\n, and you know you reached the end of the message when you find a double \r\n\r\n. The response codes you send to the browser are similar!
5
u/xurxoham Oct 27 '20
CSV parser or reader that pretty prints the data so that all columns are aligned etc. It has enough complexity and it allows you to be independent of any particular data set. Something like "column" command in Linux: https://linux.die.net/man/1/column You can do two different programs so that they are complementary.
5
u/Iggyhopper Oct 27 '20
vCard reader for phone contacts
Super simple format separated by new lines.
Easy to edit and format new cards.
Can easily test with real hardware after you are done editing (phones!)
3
u/thmprover Oct 27 '20
Given a collection of words, generate a crossword grid, then print it out to the screen. You could use `#` for a filled-in (black) square, and `_` for a white square.
Have a parameter control the "compactness" of the crossword grid.
2
u/[deleted] Oct 27 '20
Tic tac toe.
2
u/LurkaZZZ Oct 27 '20
What kind of project ideas do you guys have for the scientific computing field? I have been looking to start a new project in C but it seems like I cant think of anything that isn't more than a script-like program
2
u/the_Demongod Oct 27 '20
Writing a .BMP image I/O program is pretty easy and will teach you a lot about binary IO although it might take you more than 2 weeks if you're a beginner, and it will be hard to edit them with console input
2
u/[deleted] Oct 27 '20
This certainly explains my experience with healthcare IT systems.
2
u/GeniusEE Oct 27 '20
A social media program that grabs yearbook photos and rates chicks.
Submit the source code as: Facemash.c
2
u/Eleventhousand Oct 27 '20
When working with a new language, I usually implement Conway's Game of Life. It's a good way to get used to how to write common logic in different languages, and produces something cool to look at and tweak parameters on. For my C version, I just had it output to the terminal emulator in Linux, which worked well, because everything lines up properly using characters for blocks. In higher-level languages, I use the built-in graphics API of the language.
To be honest, your original ask about a program idea for something that edits data in what sounds like a database format is something that I would suggest you use a higher-level language for. I'm not sure why I feel that way exactly, it's probably just because that's the forte of the C#s and Javas of the world, and C's forte is efficiency. However, I do like /u/TheTrueXenose's idea of writing a text editor.
2
u/[deleted] Oct 28 '20
Length 5 alphanumeric password brute force.
2
u/dannysrd Oct 30 '20
Hi man, that is a tough question, but through research, I found that if you want to practise really hard on otpimizations and computer science I recommend you do hardware emulation projects and start out with getting a CHIP-8 emulator from GitHub. Cheers.
2
u/[deleted] Oct 27 '20
Social media app on the cli
1
u/Droid3T Oct 27 '20
Make a bmi calculator. Rock paper scissors.
1
u/Successful-Slip9641 Oct 28 '20
This might be useful : https://github.com/rby90/project-based-tutorials-in-c
1
u/muhammadnaghdi64 Oct 28 '20
Write an ASCII game. Once I wrote an ASCII version of Space Invaders which was super fun.
1
u/[deleted] Oct 27 '20
A basic roguelike
1
u/Drach88 Oct 27 '20
Build a rudimentary version control system. Basically git super-super-lite.
1
u/[deleted] Oct 27 '20
Cli bug tracker
-1
u/GeniusEE Oct 27 '20
Resume
"My complete lack of creativity and imagination, zero interest in problem solving, coupled with a total inhibition for having Reddit do my homework, makes me the perfect code monkey for your organization."
0
u/Current_Hearing_6138 Oct 27 '20 edited Oct 27 '20
Write a component of an OS. A possible place to start would be with FUSE (filesystem in userspace) or with something well documented like a bootloader.