Join Dan Gookin for an in-depth discussion in this video What you should know before watching this course, part of Code Clinic: C.
- In this course, I use the C language to code the solutions. C is the most ancient programming language offered in the Code Clinic courses. Unlike other programming languages from the 1970's, C has staying power. Today C programming is taught at major universities, and is frequently a required course for anyone studying programming. Many of the recent and much more trendy programming languages borrow heavily syntax and other concepts from C. That makes learning and knowing C important for any programmer's education.
But at it's core, C remains a viable and useful programming tool, if not one with a rather questionable sanity. To compile the programs, I use the Clang Compiler on a Macintosh computer running OS X. Clang can be obtained by installing the Xcode app on your Mac, or you can get it independently from clang.llvm.org. I didn't use the Xcode environment. All programs for this course are single module, so I compiled them in a terminal window by using the command line.
That's the kind of way crazy C programmers prefer to do things. I used the Vim editor at the terminal, or for longer chunks of code I used the TextWrangler program which is available free at the App Store. To accomplish some of the assignments additional C libraries were used, each of which is available free on the internet. The individual courses explain which libraries you'll need and where to get them. If you're using a Windows machine, I recommend that you obtain the Cygwin shell. It provides a UNIX-like environment for creating simple programs.
Plus it provides easy access to the necessary libraries. Cygwin is available free at cygwin.com. If you're more comfortable using an integrated development environment in Windows, I recommend the Code::Blocks IDE coupled with the MinGW Compiler visit codeblocks.org to obtain a copy and ensure that you get the MinGW binary. For this course, I concentrated on doing what the C language does best: stream input and output.
When possible my solutions output plain text or they require plain text as input either directly or from a file. So having a knowledge of command line operations, including piping, and I/O redirection is important. Don't be too concerned if you find some of the activities in this Code Clinic challenge to be daunting, especially for the crufty old C language. C is pretty basic dealing with low level concepts and simple machines which collectively achieve more complex tasks.
C can also be overwhelmingly cryptic and notoriously undisciplined. My recommendation is to treat those limitations as a challenge. You learn and grow as a programmer, and as a person, by leaving your comfort zone and this course most definitely does that with the C language. That ability to buck trends is the kind of spirit I expect from C programmers, and it's what I hope you'll find as you explore this course.
Dan introduces challenges and then provides an overview of his solutions in C. Challenges include topics such as statistical analysis, searching directories for images, and accessing peripheral devices.