Epilogue

Congratulations! You did it!

If you have read through to the end of this book, have been diligently typing in every program, and have been performing the suggested experiments on those programs, you will have achieved a solid foundation in the fundamentals of C programming. Make some time to celebrate, even if only for a little bit or if on your own. 

Taking the next steps

Take some time to review each of the programs. You may want to pick out some that you have found to be particularly useful for future reference. You may also want to revisit those programs that you had some difficulty mastering.

You are now ready to take the next steps in developing both your C skills and your programming skills. Everything you have learned in this book is applicable to most programming languages and environments. Here are some suggestions about what might be worthwhile next steps.

More advanced C topics

Even though C is often called a simple or concise programming language, it can take years to fully master some of the more advanced features of C programming. Not every feature of C has been covered in this book. The following is a list of those features, with an explanation of each feature and why it was left out of this book:

  • Unions: An alternate form of a structure that can take more than one form, depending upon how the union is used. Unions are particularly useful for system-level functions. In my own experience, I have never needed to create a union structure.
  • Recursion: A method where a function calls itself repeatedly until some stop condition is met. There are some algorithms that are ideally solved with recursion. To use recursion effectively, both a thorough knowledge of those algorithms and an understanding of the performance of the given system are essential.
  • Function pointers: This feature was touched upon in the printing functions of carddeck.c in Chapter 16Creating and Using More Complex Structures. A programmer could go a very long time without ever needing to use this feature.
  • The preprocessor: As has been pointed out in Chapter 24Working with Multi-File Programs, the preprocessor is both powerful and dangerous. To use it effectively, a broader understanding of performance is essential, as well as a high degree of debugging skill.
  • Random-access file processing: The examples we used for file processing have been on sequential files only. C provides the mechanisms for random-access file processing. However, because most of these problems are now solved with databases that were not available 50 years ago, this type of file processing is considered less important today.
  • Error handling: Each system has its own mechanisms for dealing with errors. We touched upon the Unix errno facility in Chapter 22Working with Files. Whichever system you program for, be certain to understand and use its error-handling and reporting mechanisms in your programs.
  • Multithreading: Various systems provide different ways to perform as if two or more parts or threads of a program are operating at the same time. This feature is operating system-dependent and requires a thorough understanding of operating system concepts. 
  • Debugging: The debugging systems on each operating system are largely specific to each system. Many of the debugging concepts are common across all debuggers, but the details and capabilities vary widely from system to system. In this book, we have introduced and illustrated probably the most basic debugging technique that does not require a debugger: caveman debugging. To become proficient in code-level debugging requires both an in-depth knowledge of assembler language as well as a thorough understanding of specific operating system (OS) concepts. For example, knowledge of how a given OS manages processes and allocates resources such as memory is essential.

As you gain more skill and understanding of programming concepts and techniques, you will be exposed at some level to each of these features. As you can see, some of them are related to C but others are more related to the specific OS on which your programs will run.

More advanced programming topics

Programming and solving problems with computers often involve much more than just being skilled at a programming language. Now that you have some programming knowledge and skill with C, you should strive to broaden your programming knowledge in the following areas:

  • Algorithms: These deal with how to approach solving many different kinds of problems. A linked list is one such algorithm. You should strive to gain a general understanding of a wide variety of algorithms and when to use each of them.
  • Application frameworks: Today’s operating systems are complex computing environments that offer a standard set of functionalities to every user. This functionality is provided by the operating system vendors via application frameworks. The application framework does the nitty-gritty work of these features. To provide users with a feature-rich yet consistent application, the programmer must understand and use the specific application framework of a given operating system.
  • A build system: A build system such as make or cmake, when set up properly, automates the process of building and properly rebuilding programs that consist of many source files. We’ve already gotten an introduction to make in Chapter 26. If/when you use an integrated development environment (IDE) such as Visual Studio, Xcode, Eclipse, and so on, those applications will have their own build systems integrated into them. Gaining more than a rudimentary knowledge of build systems is essential for today’s programmer.
  • Graphical user interfaces (GUIs): GUIs are a part of application frameworks on most operating systems today, yet GUI programming requires an additional set of knowledge and skills to program effectively.
  • Fundamental database programming: When C was invented, nearly all data was stored in files. This is not true today, where a large percentage of data that is created and consumed on computers is housed in some kind of database. Modern database systems provide a rich set of functions with which programs can query, retrieve, and store data in the database. 
  • Networking: We now live in a completely interconnected world thanks to the World Wide Web (WWW). Every operating system provides application programming interfaces (APIs) to interact with the networking subsystems of the host operating system. And, while web servers perform most of the low-level functionality needed, application programs often need to interact with other computers via the network interface.
  • Performance: Rudimentary performance concepts often go hand in hand with understanding algorithms. However, there are many instances where a deeper understanding of the performance of a particular program or system is required. There are specialized concepts and techniques to understand a system’s performance, as well as to improve various aspects of the program/system performance.

Again, as you gain more skills and understanding of programming concepts and techniques, you will be exposed at some level to each of these areas of computing. Some of them are independent of any programming language. However, some are related to the specific operating system on which your programs will run.

Learn about modern computer architecture and organization

Learning a programming language and a variety of useful algorithms is not enough to make you a complete programmer. To become a complete programmer, you must also have a solid understanding of how the computer works—how the CPU executes commands, how it accesses memory, and how it communicates with the rest of the system. For that, I can heartily recommend Modern Computer Architecture and Organization: Learn x86, ARM, and RISC-V architectures and the design of smartphones, PCs and cloud servers, 2nd Edition, by Jim Ledin. This book will provide deep insight into any of the types of computing devices you may write programs for.

Picking a project for yourself

One of the most effective ways to deepen your knowledge and skills in any area of endeavor is to pick a project for yourself and then complete that project. It could be a simple project that takes dealer.c, for instance, and uses that to create a more complete version of the Blackjack game given in Chapter 27, or another card game. To learn about GUI development, you might take your C Blackjack and make it into a full GUI-based game. Or, you might want to create a simple to-do list program using your knowledge of files and structures. It could also be an ambitious project that provides a screen to enter data that will be stored in a database on a remote server.

Regardless of the project, not only will you gain knowledge but you will also have learned how to acquire more knowledge to accomplish your project(s). And if you choose to make programming your vocation, you will have working programs to demonstrate your skills.

Resources

There are many books available for all levels of C programming skills. These can be found on the Stack Overflow website at https://stackoverflow.com/questions/562303/the-definitive-c-book-guide-and-list

Note

A note about Stack Overflow: I have found that most of the answers to questions available on the Stack Overflow website are often useful starting points; very rarely have I ever gotten a complete or totally correct answer from that site. It is useful, to be sure. Take what you find there and run the programs in your environment. Modify the solutions to your situation. But do not stop there. Most often, you will learn about something you had never considered—when that happens, keep questioning and experimenting for yourself.

On the other hand, I have also learned things from Stack Overflow that I’d never even considered before. So, it can be a rich and useful resource if approached carefully.

Another website worth exploring is comp.lang.cFrequently Asked Questions (http://c-faq.com), where you will find common questions answered in generally useful ways.

A very good website for both C++ and C is https://cppreference.com. This site provides concise yet up-to-date information for each version of C++ and C.

As C has evolved, it is important to rely upon books that reflect that evolution; at a minimum, books in your library should be based on the C99 standard, although it is becoming more common to see books that focus on C11, C17, and even C23 standards. 

It is also useful to join and participate in a local programming user group. Such groups meet at regular intervals and are often focused on a single technology. Likewise, there are many online chat and message boards focusing on a single technology. Beware though, as they can soon enough become time sinks.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.135.246.193