r/C_Programming • u/xerrs_ • Jul 03 '26
Project I am starting to code everything from scratch.
Ever since I started programming in C, Ive become addicted to building things from scratch.
Not because I think libraries are bad. I still use them when they solve a real problem.
But after writing enough low-level code, you start looking at problems differently. Instead of asking, 'Which library should I use?' you start asking, 'Could I build this myself?'
For cherries(.)works main website, I coded my own quick HTML parser.
Or for Pulse v0.1.0, my own very quick API.
That's exactly what happened while working on Pulse v0.2.0.
Pulse is a lightweight system monitor with a built-in web dashboard. The goal has always been to keep it small, fast, and easy to understand. For v0.2.0, I wanted to add historical metrics so you can see how CPU, memory, disk, and network usage change over time.
My first thought was to use a charting library.
Instead, I ended up writing my own tiny chart library. (~100 LOC, thats all). [Of course it is a little bit cherries-works oriented, but with a few tweaks it can also be used by someone else.]
Now Pulse collects historical metrics, exposes them through its API, and renders graphs without pulling in a heavyweight dependency. Everything is working, and v0.2.0 is finally ready.
Building software this way has made programming fun again. Every feature is an excuse to learn something new instead of treating it as a black box.
I'd love to hear if anyone else has gone down this rabbit hole after learning C.
For anyone interested in the current state of Pulse, check it out! It is my very first C project, and it now is in version v0.2.0!
•
u/AutoModerator Jul 03 '26
Hi /u/xerrs_,
Your submission in r/C_Programming was filtered because it links to a git project.
You must edit the submission or respond to this comment with an explanation about how AI was involved in the creation of your project.
While AI-generated code is not disallowed, low-effort "slop" projects may be removed and it's likely that other users push back strongly on substantially AI-generated projects.
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.
25
u/digitaljestin Jul 04 '26
I love it! Just remember to keep using trusted libraries for cryptography. There are far too many pitfalls when implementing crypto, and every lesson was hard won.
2
u/alex_sakuta Jul 06 '26
Why did you require writing your own HTML parser for developing your portfolio site, I'd call it?
And don't take me wrong, but it doesn't sound like you are sharing your enthusiasm but rather selling Pulse, your first C project, after saying that you worked on enough low level code first.
So you never developed anything in C and jumped straight to developing a monitoring system...
I hope you clear these gaps for me
9
u/Remarkable_Bike_1148 Jul 04 '26 edited Jul 04 '26
Hell yeah! That looks awesome!
And I basically do the same thing on reinventing things, but I try to balance that with a bit of pragmatism. I can't reinvent the whole world obviously, but I know when something isn't done to satisfactory, I have to rewrite it sometime. There's always a trade off here and there.
Biggest one is my current project on replacing Web Browser with something new.
8
u/Rude-Professor-2485 Jul 04 '26
I have digged so deep that now I am building my own CPU and robot above it.
3
u/alexanderbath Jul 06 '26
Honestly is the best way to learn imo. Not always a great choice for production applications.. a lot of lessons have had to be learnt the hard way! But definitely unlocked a bunch of knowledge I never would have gained just plumbing libraries together for the rest of my career!
4
u/Tillua467 Jul 04 '26
After I learned C I just try to make anything out of C, I never thought about using C to do that much looks cool!
2
u/DevTuringIntoFounder Jul 04 '26
Damn !! Me too , I started C like a 15-20 days back : https://www.youtube.com/watch?v=9gzPHBNsH3I
Here you will see i destroyed my friend completely.
Now I am getting into circuits and all some hardware stuff I am exploring and today itself I faced an issue of moving from jumper wires to actual prototype board and it is so f**ing difficult to keep track of pins and sides. I thought it should be a solved problem and a lot of softwares actually does that I tried "kicad" but i realised may be I can re-use my math engine and build something on top of it. I don't need a lot of things i just want to define connections and see a different view , the core math engine does that.
I am here taking 15-20 mins , will get back how it turns out to be. :)
But When i saw your post I can 100% resonate to that C gives you that power , you start seeing so many things differently. C is OP
1
u/deftware Jul 05 '26
I like rolling my own stuff for a lot of things except platform-specific boilerplate. DSAs I'm always coding up myself, because then I can finely tune exactly what data is actually in memory, how it's situated (packed and organized) so that my wares are as lightweight and efficient as possible.
Plus, the more you know how to do, the more complexity you can envision.
1
u/hey_buddy123 Jul 11 '26
lol, this is how i always was in the first place, and i think it's why i ended up loving C so much. it gives you enough control that you don't have to rely on black boxes, (which are the bane of my existence, as someone who needs to understand how/why everything works.) Also why I've been meaning to get into rust
1
u/lmemsm Jul 04 '26
Cool program. I can understand the desire to want to build things from scratch. I often look at programs or libraries and if I think they're not well written or require too many dependencies and I can't modify them in some way to clean them up, I'll write my own. Don't have time to write everything from scratch. However, there are a lot of categories where I'd like to find a lightweight C program or library to do the job and there just isn't one. So, I'll often end up writing code for it if I have the time. If others have created their own lightweight C software to suit their own needs, I would love to hear about it. I'm always looking for new and useful, portable, lightweight software.
-2
u/reini_urban Jul 04 '26
Come back when you have your own compiler and libc. I do