Every programmer should learn C during their programming career. Its benefits are too numerous to ignore. Not only will it open many more job opportunities, but it will teach you more about computers as a whole.
- C is lower level then other programming languages (C++, Java). Programming at a lower level allows you to further your understanding of computers, as a whole.
- Device drivers and operating systems are written exclusively in C. Now, you may never write a device driver or an operating system, but what if you are ever required to modify one?
- What if you ever want to get a job programming microcontrollers? They are programmed in C. Are you going to limit your possible list of jobs because you didn't want to learn a new language?
- C programs are smaller and faster then any other program created in a different language. Sometimes your program needs that speed boost that only C can give it.
- If you have learned C, you can learn any modern programming language. The reason behind this is that all modern programming languages are based on C (Java, C++, C#, etc).
- Because C has been around for many years, it has a large community and collective code base. This allows you to quickly and efficiently implement new algorithms or functions that have been programmed before.
- C is the language of the Open Source community. The Open Source poster child, Linux, was coded in C. If you know C, you can participate in and contribute to numerous Open Source communities like .
- C is the only language that teaches you what pointers really are. C# and Java skip the subject completely. It is pointers that give C its power.
- C is still the most commonly required language for programming jobs. It is well worth your time to get C under your belt.
- Anything that has a microprocessor in it has support for C. From your microwave to your cell phone, C powers technology.
Five more reasons why every programmer should learn
C is not an object oriented language. Because of this, anyone who learns C has to learn to think functionally. When you do learn object oriented programming, you will have the base of C functional programming to go by. This will make learning object oriented programming easier and more enjoyable.
- C is not an object oriented language. Because of this, anyone who learns C has to learn to think functionally. When you do learn object oriented programming, you will have the base of C functional programming to go by. This will make learning object oriented programming easier and more enjoyable.
- Writing programs in C is like a mental exercise. You must take care of everything that many other languages take care of for you. You must manage your pointers, your memory allocation, and your memory deallocation. You have to figure out how you will to handle strings, and dynamic data. In other languages, all these things are hidden from you. You don't know how they work, nor can you change how they work. You trade in control and speed, for ease of use. In many cases, this is a valuable tradeoff. In other cases it is not.
- For different situations you will use different languages. Some situations will call for Lisp, others for Java, and still others for C++. But your solid foundation will be C. You may not use it to program certain projects, but it will assist your ability to skillfully program in other languages.
- Programs generated with C code are smaller and faster then programs generated from any other type of language besides Assembly. Why not learn Assembly then? Assembly is a beautiful language that can be very useful to learn, but it is not as portable as C, and popular languages like Java are based on C syntax, not Assembly. You should still learn Assembly at one point, but it will not prove as useful to you as C will.
- If you ever want to write a video game engine or an operating system you will need C. You can't use C#, Java, or Basic for these type of programming tasks.
How to learn C
So you want to learn the C programming language? Good for you! Learning C will be well worth your time. Here are five steps that you can follow to learn C.
- Buy a C programming book. You could also use an online C programming tutorial, but from my experience, books are better. The two books I would recommend are "C Primer Plus" by Prata and "The C Programming Language" by Kernighan and Ritchie. They are both quality books.
- Get a compiler. A compiler will allow you to turn your C code into a program that you can run on your computer. Windows users can download or . If you are using Linux you can use GCC, which most likely came with your distribution. If you are using OSX you can use Macintosh Programmer's Workshop. All of the compilers listed above are either free or Open Source.
- Write your first "Hello World" program. Many people decide to quit learning C at this point. All you have to do is get over the hump of your first program, and everything follows naturally from there.
- Join the Open Source community and contribute to projects. You can find and join these projects at . Helping out an Open source project can teach you much about programming and professional program structure.
- Continue learning. With every programming language, you are never finished learning. Buy more advanced C programming books on algorithms, and data structures.
阅读(1073) | 评论(0) | 转发(0) |