this post was submitted on 17 Dec 2025
38 points (100.0% liked)

Programming

24083 readers
137 users here now

Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!

Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.

Hope you enjoy the instance!

Rules

Rules

  • Follow the programming.dev instance rules
  • Keep content related to programming in some way
  • If you're posting long videos try to add in some form of tldr for those who don't want to watch videos

Wormhole

Follow the wormhole through a path of communities !webdev@programming.dev



founded 2 years ago
MODERATORS
 

I have always had a great deal of respect for C, and I would like to start writing in it. However, while I am skilled in other languages, I basically don't know any C off the top of my head.

I find that I learn better and faster by attempting projects, rather than working through a book ir taking a class. For example, to learn Perl, I am working on a basic disk image writer that's coming along nicely.

So, what do you think might be a good idea for my first C project?

EDIT: Zig is also something I'm interested in learning. Same question, different language.

top 18 comments
sorted by: hot top controversial new old
[–] allo@sh.itjust.works -3 points 6 days ago

no. you're trash.

[–] ShawiniganHandshake@sh.itjust.works 13 points 1 week ago (3 children)

As someone whose first "real" programming language was C, I recommend against writing anything new in C.

There are plenty of C projects you could consider contributing to as a way to learn the language (and if you want a long and prosperous career, knowing C can only help you) but language design has come a long way since the 70s and something like Golang or Zig or Rust would get you many of the advantages of C with many fewer pitfalls.

[–] hellfire103@lemmy.ca 5 points 1 week ago
[–] mrmaplebar@fedia.io 4 points 1 week ago

I'm totally with you on this.

C is a fantastic language for people who want to develop for existing C projects. But there are very few reasons to develop new software projects in C today. As such, for anyone learning C, the best first project would probably be whatever existing C project you want to work on.

Maybe the main exception to that is probably embedded systems stuff for microcontrollers and the like, but I don't know enough about that space to say whether that is even still the case or whether you'd be better off with something else.

[–] ExLisper@lemmy.curiana.net 1 points 1 week ago (1 children)

There's still plenty of jobs using C. C has certified compilers and libraries that let you use it in projects with security regulations like automotive. Those project are not moving to Rust or Zig anytime soon. They are also safe from AI (no one will dare doing anything "agentic" in safety critical projects) and with latest investments in the defense sector in Europe I would expect them to grow in the coming years. If I could change career paths today I would definitely consider C. Rust is great but it's really hard to find a job as a rust programmer.

[–] homura1650@lemmy.world 1 points 1 week ago (1 children)

I don't know about Europe. But the US (or at least the portion of the US federal government I deal with) has been trying to ban us from using memory unsafe languages for as long as I can remember. For us, Rust isn't replacing C; it is replacing Ada. The only difference is that they have stopped granting exceptions for new code bases in memory unsafe languages.

[–] ExLisper@lemmy.curiana.net 1 points 1 week ago (1 children)

Yes, they are trying but C still dominates in many parts of industry. After learning C I would definitely start learning Rust but right now you will have way bigger chances of finding a job with C than with Rust.

[–] prettybunnys@piefed.social 2 points 1 week ago

The other side of this coin is C developers are still plentiful whereas folks who know rust are less available.

If someone knows C and Rust experience I’m hiring them over the others.

[–] e8d79@discuss.tchncs.de 10 points 1 week ago

C is the lingua franca of computing, having a basic understanding of it is in my opinion an essential skill. So I would disregard the recommendations of learning Zig or Rust for now. These languages have their place but they aren't as entrenched and universal as C. To learn C you could try a few of the exercises on the exercism C learning track. Another good project, to learn a new programming languages in general, is building a calculator that parses an expression like 2 + 3 / (5 - 1) and outputs the result while respecting the correct order of operations.

[–] reallykindasorta@slrpnk.net 5 points 1 week ago* (last edited 1 week ago)

You could build an app for the Pebble watch! A little game to take advantage of the new touchscreen feature or a habit tracker or something.

https://developer.repebble.com/sdk/

https://apps.repebble.com/en_US/watchapps

[–] who@feddit.org 5 points 1 week ago (2 children)

How about a network protocol client, like HTTP, DHCP, SMTP, STUN, IMAP, DNS, DHCP, etc?

[–] hellfire103@lemmy.ca 5 points 1 week ago (1 children)

There are a few network tools that don't yet support Gemini (the network protocol, not the LLM). Maybe I could build something for that...

[–] who@feddit.org 2 points 1 week ago

Good idea. :)

[–] hono4kami@piefed.social 5 points 1 week ago

AH!! Speaking of that, there is an excellent (and free) book about Network Programming available online, check it out: https://beej.us/guide/bgnet/

Write a program that reads or writes a simple binary file format. I recommend midi, TIFF, BMP.

For example write a generator for fractal images.

[–] whotookkarl@lemmy.dbzer0.com 3 points 1 week ago

You could make a process tree like pstree, something with an easily checked output and fast to test is usually a good starting project

[–] monkeyman512@lemmy.world 2 points 1 week ago

Maybe start by taking an existing script you wrote in another language and hand rewrite it in C? Then you can focus on understanding how things are done differently in C.

[–] atomicbocks@sh.itjust.works 1 points 1 week ago

C is primarily used in embedded programming these days. For instance the RPi Pico has a C/C++ SDK. I would start there.