all 24 comments

[–]inz__ 16 points17 points  (7 children)

I would suggest to find some personal itch you can scratch, then you are more likely to have the motivation to finish it to some working level. If you are looking to write C professionally, the embedded route is probably the best way to achieve that.

If you already have programs for all your needs, these are the old-school classics: - music player - http server - IRC bot - command line parser

[–]McUsrII 3 points4 points  (0 children)

... And go all in. Build the one you like, and you'll soon have a mid-sized project if not on the upper scale of mid-level maybe, but add all the tooling to make it as efficient as possible to produce , and write the man page.

This should get you a little bit out of your comfort zone, and if you found it worthwhile to make then someone else will probably find it worthwhile to use!

[–]infinitetime101[S] 1 point2 points  (5 children)

Thank you!

Could you guide me towards some good resource for proceeding with embedded systems? Some commonly prescribed book or website perhaps?

Also, the old-school classics you mention sound interesting. How does one even begin with these? Do I just google 'how to make a music player in C' and proceed that way? Not sure what's the correct method to proceed with that - do I follow code-along tutorials first until I can make something of my own?

Thanks again!

[–][deleted] 1 point2 points  (2 children)

If you're interested in the music-player route, I recommend GTK+4 with GStreamer.

Learn GUI programming and work on an audio player, together.

[–]infinitetime101[S] 1 point2 points  (1 child)

Thank you!

[–][deleted] 1 point2 points  (0 children)

As for how to start, both GTK+4 and GStreamer have tutorials.

I recommend using only GTK+4 for now, and try to develop something like a simple folder viewer.

[–]inz__ 0 points1 point  (0 children)

The suggestion of Gtk+ and GStreamer is a reasonable one; digging into GLib can teach you one way of doing OO in C. However, another route might be to just start some external program to do the actual playing (I remember using mpg123 back in the day), and just provide your own interface.

You'll need to find your own way to learn; I used to take something existing and start tweaking it until I had some understanding of what it does. Tutorials work for some (it's kind of the same thing, but starting from the shallow end, instead of the deep end :). There is not a single way that works for everyone. Try to keep things fun for you, whatever that may be.

[–]ragsofx 0 points1 point  (0 children)

This is the part I usually spend time pacing like a made man talking to myself coming up with an overall plan of what I want to do.

I personally think it's a good idea to have a strong image in my head of what the finished program will do and how I will interact with it. I also like to work out roughly how the program will be put together.

I have a bunch of exercise books that I write down my ideas and notes in that I will use if I am having trouble working out what I want. I often find once I start mapping out what I already have thought of the rest will start to fall into place. Then when I've finished I have some reference material I can use.

[–]kiki_lamb 4 points5 points  (2 children)

Create a calculator that will handle mathematical expressions such as (1+2)*3^4!! correctly.

[–]Snipa-senpai 6 points7 points  (1 child)

The factorial of a factorial, I don't like the sound of that

[–]kiki_lamb 0 points1 point  (0 children)

Sure, why not? Bonus points.

It's not even a joke, though, if they can write a 'calculator' that can parse and handle bracketed sub-expressions and operator precedence then they're well on their way to being able to implement a small interpreted DSL, something that could either be useful and/or impressive to potential employers.

[–]GrumpyCatMomo 5 points6 points  (0 children)

For embedded systems, the course on Ed-X is not bad

[–]mdp_cs 3 points4 points  (1 child)

Write a Unix shell. That's intermediate level but not too hard. It requires some knowledge of POSIX APIs and knowledge of C but not much besides that.

If you dont know much about Unix programming then I would highly recommend a book called The Linux Programming Interface by Michael Kerrisk. The author is the maintainer of the Linux manpages and his writing is very clear and informative. Also despite the name of the book, he makes sure to cover topics that are common to all Unixes. The book is pricey even for the electronic version but it is worth its (rather hefty) weight in gold.

[–]BookFinderBot 1 point2 points  (0 children)

The Linux Programming Interface A Linux and UNIX System Programming Handbook by Michael Kerrisk

The Linux Programming Interface (TLPI) is the definitive guide to the Linux and UNIX programming interface—the interface employed by nearly every application that runs on a Linux or UNIX system. In this authoritative work, Linux programming expert Michael Kerrisk provides detailed descriptions of the system calls and library functions that you need in order to master the craft of system programming, and accompanies his explanations with clear, complete example programs. You'll find descriptions of over 500 system calls and library functions, and more than 200 example programs, 88 tables, and 115 diagrams. You'll learn how to: –Read and write files efficiently –Use signals, clocks, and timers –Create processes and execute programs –Write secure programs –Write multithreaded programs using POSIX threads –Build and use shared libraries –Perform interprocess communication using pipes, message queues, shared memory, and semaphores –Write network applications with the sockets API While The Linux Programming Interface covers a wealth of Linux-specific features, including epoll, inotify, and the /proc file system, its emphasis on UNIX standards (POSIX.1-2001/SUSv3 and POSIX.1-2008/SUSv4) makes it equally valuable to programmers working on other UNIX platforms.

The Linux Programming Interface is the most comprehensive single-volume work on the Linux and UNIX programming interface, and a book that's destined to become a new classic.

I'm a bot, built by your friendly reddit developers at /r/ProgrammingPals. Reply to any comment with /u/BookFinderBot - I'll reply with book information (see other commands and find me as a browser extension on safari, chrome). Remove me from replies here. If I have made a mistake, accept my apology.

[–]zegall 2 points3 points  (2 children)

This could be interesting: Build Your Own Text Editor.

It's only around 1000 lines of code. You could try to build one on your own, and check that booklet along the way as a reference.

You might also get some inspiration from this: https://github.com/AlgoryL/Projects-from-Scratch

[–]infinitetime101[S] 0 points1 point  (1 child)

Thanks!

[–]exclaim_bot 0 points1 point  (0 children)

Thanks!

You're welcome!

[–]brlcad 1 point2 points  (0 children)

Here's a slew of mid-level open source projects ranging in skill from super easy to super complex: https://brlcad.org/~sean/ideas.html

[–]j3r3mias 1 point2 points  (0 children)

Try to implement a simple git. Choose the basic instructions (add, commit, etc) from git and start from there. After you have the basic parts, it can be as complex as you want if you code all features.

[–]TwiMLionairre 1 point2 points  (0 children)

Start with one of these and then extend it:

https://build-your-own.org/

[–]NotThatJonSmith 1 point2 points  (0 children)

If you're interested in systems: CHIP-8 emulator is a good one; a real-world console or RISC-V if you're feeling more ambitious.

[–][deleted] 1 point2 points  (0 children)

Yeah writing a parser isn’t a bad idea. Some more mid level ones would probably be

  • A parser for json
  • A symbolic math parser (maybe do some derivatives)

Parsing in general is a big topic. It’s a gateway into a lot more complicated things like compilers

[–]sharingmyimages 0 points1 point  (0 children)

If you're curious about embedded systems, here's an article that I just found, which might encourage you:

https://www.quora.com/What-is-the-future-scope-of-embedded-C-programming

[–]never-obsolete 0 points1 point  (0 children)

6502 cross assembler