It's almost time to talk about that most important aspect of programming - testing. However, before we start talking about the tools, we need to look at some basic concepts of debugging.
A bug is anything that doesn't work exactly as expected. Bugs can be fatal - they can crash your machine - or bugs
Compiling your program is easy when you're working with one source and the standard libraries, but it gets more complex as you go along. That's why God put make on this earth.
The First Makefile
...was created alongside the Earth. Every other makefile is derived from a previous one.
Jokes aside, the make program reads a makefile
There are a few programs in Linux which every programmer MUST use at one point or another. Most of these are every-day tools, without which we cannot survive.
There are three basic functions we use to move files around in the Linux terminal. They are, in no particular order:
cp source_location destination_location - Copy a
It has only been a few days since I changed hosting, and what an interesting time it's been.
I not only rehosted my blogs to my new hostgator domain, but I also published my first book on Amazon!
As a consequence of all this, you might notice that the contents of the Computer Science 101 posts
We've seen how to pass arguments to programs, and we've seen how to write to files. Now we'll look at how that is done from the Terminal.
A pipe redirects the standard output (stdout) from one program to the standard input (stdin) of another. It acts like a tunnel (or pipe) between two programs, which
Includes never-before-published section on Networking and a rich
With this little box, you can do almost anything.
There are a few quick commands you will need to know as we move forward with the terminal. In no particular order:
CTRL-C - Close the process currently running. This is sort of like pressing the X on a GUI interface.
CTRL-Z - Kill the process currently running.
The blog will be updating at 9a (Mountain Time) for the foreseeable future.
So far, the vast majority of this series has revolved around programming in C. We have covered:
Writing our first program
The theory and execution of math in C
Creating and printing characters and strings
Working with arrays
The basic rules of C syntax
Programming with Command Line Arguments
Safe and unsafe string operations (when reading from the terminal)
I have a copy of Bjorn Stroustrup's Programming: Principles and Practice Using C++ (2nd Edition). That's a book about C++, written by the guy who developed C++.
It's over 1300 pages long, and it only covers the most basic details of the language. It calls on a magic library, for crying out loud.