learning c language programming

icepeed

Reputable
Jun 18, 2015
3
0
4,510
Hello all. I want to learn c language programming by myself. not for any specific purpose at this point. I used to program way back and I can tell al lot have changed. my question is what kind of a tool kit shoud I use if I want to start from the basic, all the way up to c++. I am interested in c as gateway to modern time programming and to c++ as a gatway to OOP, as later on I wish to go further to other languages as need and time (oh ye, i'm old, but couple of decades or so steal ahead of me) will dictate.

i am using a 64 bit windows machine, and I would be happy for your recommendations on a tool kit for my needs. I understand now days you are talking about frameworks, IDE's and CDT's as opposed to plain text editor and command line. could you please explain what is the difference and what do you think is best. I will be thankful if you could elaborate on how each of the programming functions (writing code, compiling, running and so on) are done on each of the enviroments and where can those be found for download. I do not need learning resources at the moment, because I have a good book ("c language programing").
 
Solution
You are correct about the language choice as being attainable, but only over time. I recommend going from C++ to Java, as the many simularities between them make this an easier step than many. Then Javascript (very much like Java, yet different in some key areas) for the web programming, and then assess whether you really need Python and Ruby. At this point, they will be much easier, but you may be able to do all that you need without them.

Code::Blocks is interesting - an IDE that integrates with a range of compilers. If you are happy working with it, keep going. It does have a good reputation, although I haven't tried it myself. The trick is to find what works for you. You are unique, so the preferences of others may not suit...

Charles A Peirce

Reputable
May 19, 2015
26
0
4,560
What is your chosen operating system?

There are a plethora of programming tools out there which do the heavy lifting of the fiddly details (remembering call structures, place closing braces to match the opening one you just placed, refactoring) so that you can concentrate on the real business - programming. And if you want to use a plain text editor, you can. Notepad++ is very popular for just that activity, as well as many others.

I started programming with Kernighan and Ritchie's book, back when c++ and oop was still a concept. Then I went on to c++, then many other languages. Are you planning on learning c only as a prelude to c++? If so, don't. Go straight for c++. Nine months of learning c plus nine months of learning c++ will get you to roughly the same place as twelve months of learning just c++.

Please take a moment to think about what type of programs you want to make, and post those thoughts here. What you want to do will greatly influence the path to take and perhaps the tools to use. The c language is great if you want to screen drivers and such like. If you want to create something that appears in a window (on a form) and takes user input and has a graphical display, c++ is a better choice. Or perhaps you want to move into programming as a form of employment?

Remember, programming is a means of producing programs (apps), just like driving is usually a means of getting to a place. Most of the time, if you don't have a place to go, you won't have a reason to drive, and it is the same with programming. You must have something you wish to create, or the effort of programming will defeat your ambition to learn.

So tell us where you want to go, and we can give you our thoughts on how best to get there.
 

icepeed

Reputable
Jun 18, 2015
3
0
4,510
Thank you Charles for taking the time to reply patiently and with detail. My O.S is Windows, mainly by default (came with the machines), so not much choise involved and I would love for recommendations on that topic. I too started programming many years ago, but deserted programming entirely when I relized I don't want to make a profession out of it for I knew it would suck all the fun right out.

now, decades after, when I have time for leisure, I want to get back to the old hobby, just for the fun of it. Even though I do not have specific goels at the moment I do have a general direction. I want to be able to use my PC better by developing all kinds of uttility programs (for example to deal with my wife's huge Pic collection and such tasks, and to bulid custom computaion programs and data bases for some specific needs I have), I want to get in robotics and program for hardwere, I want to get into games deveolpment (small scale, just for fun), and finally, I want to be able to do some moderate web programming. I chose C first and thaen C++ and after that maybe JS, Python, Ruby, JAVA, because I concluded from a very short and prompt research that it should be a fairly easy and attainable path, which will meet my general purposes. I would be more than happy to read everyone's views on that.

By the way, I found C/C++ IDE named Code Blockes which is pretty comfortable to use and allready working with it.
 

Charles A Peirce

Reputable
May 19, 2015
26
0
4,560
You are correct about the language choice as being attainable, but only over time. I recommend going from C++ to Java, as the many simularities between them make this an easier step than many. Then Javascript (very much like Java, yet different in some key areas) for the web programming, and then assess whether you really need Python and Ruby. At this point, they will be much easier, but you may be able to do all that you need without them.

Code::Blocks is interesting - an IDE that integrates with a range of compilers. If you are happy working with it, keep going. It does have a good reputation, although I haven't tried it myself. The trick is to find what works for you. You are unique, so the preferences of others may not suit you, no matter how many bells and whistles their favorite tool has.

Now about those projects: The best way to learn a language is to try to do something with it. If that "something" interests you, it will motivate you to overcome the difficulties of not knowing how to do it. I recommend the utility programs to start with, keeping the visual elements simple (graphics in C are particularly frustrating when you are a beginner, even with the aid of the helpful librarys out there). The advantage of learning as you go over formal courses is that you remember the language that you have used, instead of memorising language that you might never need. (I used to teach in the distant past - this way really works!)

Move on to graphics as you get more confident. It's at this point you might want to look at some of the freely available libraries that take the work out of it, but don't rush to get them, the more you understand how graphic programming works, the better your understanding of how to get the best from the library.

Robotics is much more accessible and affordable now, thanks to units like the Raspberry Pi and the Arduino. Thankfully, these can be programmed from your computer, which takes some of the complexity out of it. Get into it early, then if its seems too complicated, put it in the bottom drawer for a year and try again. You will get to a point where your other programming brings you to a level where you can figure it out.

Build up your confidence by sticking to the easy stuff until it begins to be less fun, then move to the next more complex that you really want to do, so that it remains fun. If you do this, learning programming will seem easy.

Don't rule out the many free, formal courses available online. When you get stuck (we all get stuck at some time - that is often half the fun) it is useful to find the part of the course that seems to relate most closely to where your problem is. Most of the programmers I know are registered on at least one course web site, with half completed courses because they dip in to the parts that interest them. Do the same with the books that you acquire - use them as references. Doggedly working through the chapters is the quickest way to make yourself loose interest.

The next source of help is your search engine. Type in a description of your problem, and your will probably get links to where someone has had the same problem, and others have supplied the solution, or at least pointers to it. Over time you will find the sites that work best for you, in terms of complexity level, style and language. I rarely have a problem that hasn't been had by someone else before me.

When you are happy with the C/C++ and want to move on to other languages, consider the Eclipse IDE. It is highly recommended by programmers at all levels, primarily for Java/Javascript development, but it works well for several other languages. C++ to Java is an easy step.

There are many free database engines out there, and some of the big companies like Oracle sometimes offer a cut down version of theirs for free if you are not going to make money out of it. (Read the small print.) For the bits you are likely to need during the first few years, they all work pretty much the same, as far as you will be able to tell.

 
Solution

icepeed

Reputable
Jun 18, 2015
3
0
4,510
Thank you very much Charles, once more, for another yet very detailed and very helpfull reply. Clearly you are most familiar with programming learning curve because you are right on the money on your indications. For example, I completed my first few simple programs in C, and was thinking of better it with UGI's. Thanks to you I understand that it will be easier to leave it for now and wait with the topic for C++. I am sure that all of your other advices shall be proven just as good in the future.

I am currently pondering on ADT's in C, after I figured out how to handle dynamic memory alocations in C. the next step will be Real Time programming basics, in C, and hopfully that with be the gate to robotics, and at the same time I intend to proceed to C++. I enjoy every minute of this and you are correct that it makes what otherwise could be a tedious task of learning, to a relatively fast and fun process.

To conclude, you certainly helped open up te path for me, and I am sure many more facing the hardship of the first few steps in programming will find your comments extremely beneficial.