New from Raspberry Pi Press: Learn to Code with C
Many years ago, when I first joined Raspberry Pi, I was approached by the editor of The MagPi magazine (now Raspberry Pi Official Magazine) to see if I was interested in contributing to it. At the time, I was in the process of getting to grips with writing new GUI applications for the desktop using the GTK toolkit, and I suggested that a series of articles about how to do that might be of interest. But we then realised that this was to some extent putting the cart before the horse; in order to use GTK, you first need to know the basics of programming in a language which can use GTK.
We therefore decided that it would be a good idea for me to first write a series of articles on how to get started with the C programming language (as that is what I was using), and then to move onto the GTK series once that was done.

So that is what I did; The MagPi first published a series of articles on learning C, and then a year or so later, a series on how to use C to write GTK GUI applications. Both seemed to be generally quite well received, and they were both subsequently published in book form by Raspberry Pi Press.
Updated and refreshed
The original Learn to Code with C was basically just the magazine articles reprinted, and that was quite a long time ago now. This year, it has been refreshed and updated (and looks rather better for it!), and is now available to buy or download.
My intention when writing this book was to provide a rather easier way to learn C than I had when I first learnt it. Back in 1992, when I first joined Cambridge Consultants, my boss handed me a copy of Kernighan and Ritchie’s The C Programming Language on my first day and said, “there’s a compiler on that computer over there — off you go!”
Written for complete beginners
While Kernighan and Ritchie’s book is the definitive reference for C, written by the people who created the language in the first place, it is not a simple guide for absolute beginners, and I will freely admit that I struggled. I did get the hang of C eventually, but it took me a few months — I did a lot of reading, a lot of trial and error, and quite a bit of making stupid mistakes that were then corrected by more experienced engineers, and it was a rather slow and painful process.
While I am not promising that my book will completely avoid any of that, it is intended as a guide to learning to program in C from the very first principles, with no prior knowledge of anything other than the most basic programming concepts assumed. It’s about as simple as I could make it, and in many ways is the book I wish I had available to learn from all those years ago as a junior engineer; I hope it offers an approachable introduction to what is still one of the most useful programming languages there is.
Get your copy now!
You can grab the book online from our store for just £14.99 £7.99 (introductory price), on Amazon UK and Amazon US (preorder), or at the official Raspberry Pi Store in Cambridge.
6 comments
Jump to the comment form
Confused
Writing a programming book is a bold move in the age of AI…
Raspberry Pi Staff Simon Long — post author
People are still going to need to know how to program. I use an AI coding assistant for some things nowadays, but I still write most of my code myself by hand. Even AI-generated code needs to be reviewed and checked for accuracy, and if you don’t understand the programming language it is using, you can’t do that.
Programming as a human skill isn’t going anywhere.
Anderson
Great news!
Peter Ing
Ironically just yesterday I found my copy of K&R, it was also my first intro to C after I got it at a thrift store back in 98 while i was in school. I was stuck without a compiler for a while until I landed copy of Red Hat Linux 4.2 on the cover of magazine a few years later. RHL gave me access to gcc and suddenly a whole world opened up to me that also lead me to embedded systems when I studied electronics after school! This set me off on a path that ended up in AI. All thanks to C. Hope your book inspires the next generation!
rclark
Nice addition.
After graduating from college, I was hired for programming RT automation systems back in the 80s. C was the language we used even though Pascal was the ‘learning language’ back in the day. Still use it a lot today. Between assembly language and C, you can do anything with hardware. It will never go away even if it is not the darling of today’s generation of wanna-be programmers. And with AI, sounds like a lot don’t even want to learn to program… Just let the AI do it :rolleyes: .
Pete
The cat and the cactus learned some C
From a beautiful-looking book
They’d spent some money, just half* the money
That’s all the money it took
* nearly