DEV Community

CodewithEVILXD
CodewithEVILXD

Posted on

Why I Started Learning C (And Why It Actually Mattered)

Look, I'm a web developer. I build stuff with Next.js and TypeScript. My projects? There's SkillBuilderJS where people practice JavaScript, FileNest for cloud storage, CodeKeys for typing practice. I even made 28+ VSCode themes that somehow got downloaded thousands of times. Point is - I live in the world of React hooks and npm packages.

So learning C? That wasn't exactly on my roadmap.

How This Actually Started

My friend Sid (@YONKO-SID on GitHub) pinged me one random evening. "Yo, wanna build an AI assistant in pure C?"

I was working on BackForge at the time - this tool that generates entire backend scaffolds automatically. Modern stack, lots of abstraction, everything automated. And here's Sid talking about building something in C. Like, why would anyone do that in 2024?

But Sid's different. He wanted to build a Jarvis-style assistant (yeah, like Iron Man) but without any frameworks or npm packages. Everything from scratch. File management, voice recognition, HTTP requests - all pure C code.

I thought he was trolling. Turns out he was serious.

The Part Where I Realized I Knew Nothing

We started Assistant-in-c. I took the developer tools part - Git integration, HTTP clients, port scanning, log monitoring. Stuff I'd knock out in an afternoon with Node.js.

Except there was no Node. No npm. No "let me just import this package."

HTTP request? Write socket code from scratch. JSON parsing? Build it yourself. Kill a process on port 3000? Raw system calls.

First week was brutal. I'd write 50 lines of C to do what took 5 lines of JavaScript. My brain was wired for fetch() and axios. Now I'm dealing with socket() and TCP handshakes and buffer management.

But something clicked around week three.

What Changed

I'd built API Visualizer before - a tool to test REST APIs. Used it plenty of times. Never thought about what actually happens when you hit an API endpoint. Node.js just... does it.

Writing C code for network stuff? You see everything. Socket creation. Connection establishment. Data serialization. HTTP headers being constructed byte by byte. All the magic that frameworks hide? Not hidden anymore.

Now when I write Node code, I get it. Why connection pooling exists. Why you shouldn't block the event loop. Why certain operations are slow. I've literally implemented these things manually in C.

My CodeKeys project tracks typing in real-time. Built it in React. Never worried about memory - React handles it, garbage collector does its thing. But in C, you're managing every single byte. Allocate it, use it, free it. Miss one free() call and you've got a memory leak.

Sounds tedious, right? But it made me write better React code. I started noticing unnecessary re-renders, inefficient state updates, wasteful data structures. SkillBuilderJS runs smoother now because I understand what's actually expensive.

Then I Did Something Stupid (Or Smart?)

After a few months with C, I started GetLainux. A Linux distribution. Built on Arch, minimal, command-line focused.

Was this necessary? No. Did I need it for work? Absolutely not. But I wanted to see how far I could push this C knowledge.

Building a Linux distro meant dealing with boot processes, package management, system initialization, kernel interactions. All that stuff I'd learned from the Jarvis project - file operations, process management, system calls - suddenly applied at a bigger scale.

GetLainux taught me more about how operating systems work than any course could. It's not pretty, it's not polished, but it works. And it exists because I learned C.

The Reality Check

Let me be clear - I'm not rewriting my Next.js projects in C. That would be insane.

But C knowledge changed how I approach web development:

FileNest (my cloud storage thing): I know exactly what happens when someone uploads a 200MB file. File I/O, buffer management, memory allocation. The optimizations I made came from understanding these low-level operations.

Convortex (file conversion tool): Image processing is CPU-intensive. Understanding C helped me pick the right libraries and optimize the conversion pipeline.

BookmarkBloom (bookmark manager): Data structures matter. Search algorithms matter. C taught me to think about efficiency in ways React never did.

Even my VSCode themes - understanding how compilation works made configuring build systems way less mysterious. Webpack config finally made sense.

Where C Actually Wins

C matters for specific stuff:

System software: GetLainux exists because of C. Linux kernel modifications, bootloaders, device drivers - that's C territory.

Performance-critical code: When milliseconds matter. Game engines, video codecs, compression, real-time systems.

Embedded systems: IoT, microcontrollers, automotive. They can't run a JavaScript runtime. Too much overhead.

Understanding foundations: Want to know how Python works? CPython's source is in C. V8 engine powering Node? C++. Everything traces back to C.

The Honest Part Nobody Talks About

C is frustrating. Really frustrating.

Segmentation faults at 3 AM? You'll experience this joy. Program crashes, debugger says "segmentation fault", and you spend hours finding one uninitialized pointer.

Memory leaks? Early in the Jarvis project, our assistant leaked memory everywhere. Every new feature made it worse. Took us weeks to track down every missing free().

Cross-platform builds? Code works on Linux, crashes on Windows. Different system calls, different libraries, different everything.

No instant feedback like web dev. Change code, compile, link, run, crash, debug, repeat. It's slow. It's painful. But you learn.

What I'm Actually Using Now

My current projects:

Mostly web stuff. But C knowledge improved everything.

Should You Learn It?

Depends.

Don't bother if:

  • You just wanna build websites fast
  • Frontend/UI is your thing
  • You're doing data science (Python's better)
  • You need to ship prototypes quickly

Learn it if:

  • You want to actually understand computers
  • System programming interests you
  • You care about low-level optimization
  • You're curious what's under the abstractions
  • You wanna work on kernels, drivers, embedded systems

My Take

I'm still a web developer. TypeScript, React, Next.js - that's my daily work. I build SaaS products, developer tools, web apps. C isn't my main language.

But C made me significantly better. I understand performance, memory, compilation, system interactions. When I optimize my Next.js apps, I know exactly what I'm optimizing and why.

That Jarvis thing Sid and I built? It's messy. Code could be cleaner. Crashes sometimes. Has bugs. But building it - implementing 75+ features in pure C - taught me more than months of tutorials.

Would I tell a beginner to start with C? Probably not. Should you learn it eventually if you care about understanding computers? Yeah, definitely.

C isn't dying. It's not outdated. It's literally the foundation. Your OS? C. Your language's runtime? Probably C. Critical infrastructure? C everywhere.

Check my stuff:


Ever learned a language that completely changed your perspective? Let me know what it was.

Top comments (1)

Collapse
 
pauljlucas profile image
Paul J. Lucas

I agree, as I stated in my preface.