Relearning C

Relearning C

There’s lots of languages you can learn, from PHP and Python, to Erlang and Clojure, but last week I decided to get back to learning C. Yep C.


This might seem like a strange decision to make, deciding to relearn C, especially after so many years living and breathing dynamically typed languages such as PHP.

Come to think of it, I don’t know any developers who go in this direction, moving from dynamic typed to statically typed languages; especially not such a veteran one as C. The common direction seems to be the opposite.

I’m used to people remarking that they started out with C, C++, Cobol, or other older languages, and with time moved on to newer languages, such as PHP, Ruby, Python, Go, Haskel, and so on.

The usually say things like:

  • They’re sick of how long it takes to get anything done in C, how strict it is, and how tough it is
  • That as dynamic languages are so flexible, so accommodating, and so easy to get started with, that they’re like a breath of fresh are

To be fair, I started out with C\C++ and Java about 16 years ago. Whilst they laid the foundations for my software knowledge, I moved on pretty quickly to Visual Basic and PHP (the demands of professional roles).

Consequently perhaps, I’ve wanted to be proficient at my foundational languages for some time - C especially. However I never had a real reason to do so, as all of my professional jobs required other languages.

These roles were always either front end jobs, with JavaScript, or backend jobs with PHP, Bash, some Ruby or Python. So unless I could find a project of my own which required C, I never had enough reason to invest the time.

There was this one time though, when I almost went down the road of becoming an embedded Linux developer, which would have required C, loads of C. Sadly, that never panned out. Who’s to say what the future may bring though.

Anyway, last week, I finally found a reason to come back to C - creating a patch for PHP’s core. Ever since I decided to get in to that, I’ve been thinking about how to best get started with C.

This week I want to share with you what I’ve learned and found for learning C so far. If you’re a seasoned C developer, I’d love to get your input as to what you use, and how you got started.

Some Great Resources

Learn C the Hard Way

There’s a load of books and sites for learning C. But the one that most appeals to me, at the moment, is Learning C the Hard Way. The attitude and style of the site is right up my alley.

Right from the name, it’s how I want to learn. I’m keen to properly start over, and get rid of bad habits. I don’t want any sugar-coating.

And I really want to be hands on, knowing exactly what I’m doing. I’ve not gotten too far through it but for what I have, it’s proved to be a good choice.

I tweeted that on Sunday. If I want to get tech advice and feedback from peers, I turn to Twitter. And good feedback I did receive, from Rob Allen:

It didn’t take more than 5 seconds to find a copy on Amazon. On going through the book’s synopsis, this definitely seems like the right one to have as my reference tome. All being well, it should turn up in a few days.

An Excellent Video

If you want to understand software development, then learn from one of the best, Uncle Bob Martin. I’ll be honest, I’ve become a bit of a fan boy of his lately. But his style, as this video shows (despite being a bootleg), is excellent, and his knowledge is extensive.

Here’s someone who’s been developing for over 50 years. Right back from the days of punch cards, across a host of operating systems and computers, right up until the current day. So his knowledge on the art and craft of software development is invaluable.

There’s one more thing. Besides knowing his stuff inside and out, he talks in a real “get to the facts” kind of way. Sure, he has excellent stories which begin all his talks - but he gets to the facts and lets it flow like an ocean thereafter.

This video in particular has helped to re-educate me about what OOP is, what it really is. Not what I always thought, or was taught, it was. I encourage you to check it out and listen carefully to the wisdom he has to share.

A Veteran Editor

Relearning C with Vim

There are loads of editors which to choose from, but the one I’m really keen to make my C editor of choice, is, you guessed it, Vim.

Sure, I use an IDE, PhpStorm, for PHP. And I could continue in that vein, picking one of the many available IDEs, such as Eclipse, Visual Studio, XCode, KDevelop, Qt IDE, or C Lion. But it’s my intent to really stay as hands on as possible.

And yes, I’m keen to have VIM as my IDE/text editor of choice for C. I’ve already spent time getting the setup underway, and am hopeful that I’ll be able to tune and configure it to let me be as proficient as I need to be. Time will tell.

I can’t say that I’ll stay the course and not let it go in favour of an IDE, where everything’s almost the click of a button away.

But I plan to give it a good try and see just how far I can get. I’m hopeful that my experience using VIM for C will be better than it’s been for PHP.

## Where To From Here

It’s early days getting back in to one of, if not the veteran software development language. But I’m excited. Hearing Uncle Bob’s words, and reading what I have so far of Learn C the Hard Way, I’m inspired.

It’s my firm belief that if I have a structured approach, an ordered mind, and continue to learn the art of software development, that C won’t be anything near like as hard as most people say.

I’m confident that it might end up being a joy to learn, even becoming my language of choice.


You might also be interested in...


Want more tutorials like this?

If so, enter your email address in the field below and click subscribe.

You can unsubscribe at any time by clicking the link in the footer of the emails you'll receive. Here's my privacy policy, if you'd like to know more. I use Mailchimp to send emails. You can learn more about their privacy practices here.


Join the discussion

comments powered by Disqus