Does anyone know where I can participate in top quality online Programmer training courses in C or C++ for Free?
Does anyone know where I can participate in top quality online Programmer training courses in C or C++ for Free?
Hi Bill,
I've not seen good courses for these topics, so apologies for the slightly off-topic response which is some other information regarding some ideas
on more-than-basic learning for these topics:
When I learnt, I didn't do a programming course but instead did a course on Unix, which taught me about the file system and services available
on the OS, so in a roundabout way this helps when writing - and troubleshooting programs that are to run on a Unix based OS. It wasn't free though : (
Regarding C, it only has about 30 keywords so I think you may be surprised, but your arduino programming experience may well be 90% of the way there for general C programming. C is so close to assembler (I mean you can almost guess what assembler instructions each C command will translate to - but is of course totally machine-architecture independant unlike assembler), so knowing how a microprocessor functions is also very important (and some older books are very good for explaining architectures, as are the microcontroller datasheets of course). The datasheets explain for example things like what interrupts there are, so then you know how to implement in C (along with the C compiler reference book for your particular compiler). I also sometimes look at the generated assembler and any linker output to see what the C compiler did, just for curiosity. For those that don't know how a microprocessor works, I'd suggest just finding some dusty books in a library; possibly the older the better (If you're interested in more advanced modern architectures, there are some good books but it won't help unless you're familiar with some classic simple (e.g. 8,16-bit) microprocessor architectures too. Anyway, this is digressing slightly from C..
As for C++, this is a different beast, because while it is possible to continue to write almost C-style but use a C++ compiler, this is not really taking advantage of the language which is extremely powerful. Some (many!) of the concepts of C++ really take a lot of time to understand, and probably the value of some concepts is not realized until you use them in programs. There is the generally-accepted reference book to C++ by Stroustrup, and although it is not an easy read, it is needed as a single reference (you'll find yourself dipping into it from time to time to learn some new concepts). You can do some things that are really quite difficult to do in C, that help with writing large, complex programs. C++ allows your program to scale to a higher complexity with less risk, rather than with C. The STL (standard template library) is something that you can use in C++ programs, to provide you with an expanded set of general-purpose 'commands' essentially, and are important to learn. It is extremely useful. (Shaun's C++ tutorial in the Code Exchange blog section looks like it will cover some STL features next). Also, object-oriented programming has allowed some people to write some 'commonly-encountered' best-practise algorithms to do popular tasks, and these are known as design patterns; these are also therefore useful to write larger programs with the comfort that you're using a reliable/tried-and-tested procedure for your application.
So, one way to learn C++ is through the Stroustrup book, Shaun's guide, online examples, a book on STL, a book on design patterns and finding a real coding challenge to implement, to get real practise. Personally I'd find some Linux-based challenges to work on first, in case the C++ implementation for microcontrollers is really cut-down. (For smaller programs on a microcontroller, C++ may sometimes be overkill).
p.s. I forgot to mention, troubleshooting complex software (especially when it crashes!) is another topic, and some valuable things I've learnt is to learn to spot and note all patterns/symptoms, nothing is rare if you see it occur, nothing is coincidence, and always be suspicous about all lines of code : - )
Hi Bill,
I've not seen good courses for these topics, so apologies for the slightly off-topic response which is some other information regarding some ideas
on more-than-basic learning for these topics:
When I learnt, I didn't do a programming course but instead did a course on Unix, which taught me about the file system and services available
on the OS, so in a roundabout way this helps when writing - and troubleshooting programs that are to run on a Unix based OS. It wasn't free though : (
Regarding C, it only has about 30 keywords so I think you may be surprised, but your arduino programming experience may well be 90% of the way there for general C programming. C is so close to assembler (I mean you can almost guess what assembler instructions each C command will translate to - but is of course totally machine-architecture independant unlike assembler), so knowing how a microprocessor functions is also very important (and some older books are very good for explaining architectures, as are the microcontroller datasheets of course). The datasheets explain for example things like what interrupts there are, so then you know how to implement in C (along with the C compiler reference book for your particular compiler). I also sometimes look at the generated assembler and any linker output to see what the C compiler did, just for curiosity. For those that don't know how a microprocessor works, I'd suggest just finding some dusty books in a library; possibly the older the better (If you're interested in more advanced modern architectures, there are some good books but it won't help unless you're familiar with some classic simple (e.g. 8,16-bit) microprocessor architectures too. Anyway, this is digressing slightly from C..
As for C++, this is a different beast, because while it is possible to continue to write almost C-style but use a C++ compiler, this is not really taking advantage of the language which is extremely powerful. Some (many!) of the concepts of C++ really take a lot of time to understand, and probably the value of some concepts is not realized until you use them in programs. There is the generally-accepted reference book to C++ by Stroustrup, and although it is not an easy read, it is needed as a single reference (you'll find yourself dipping into it from time to time to learn some new concepts). You can do some things that are really quite difficult to do in C, that help with writing large, complex programs. C++ allows your program to scale to a higher complexity with less risk, rather than with C. The STL (standard template library) is something that you can use in C++ programs, to provide you with an expanded set of general-purpose 'commands' essentially, and are important to learn. It is extremely useful. (Shaun's C++ tutorial in the Code Exchange blog section looks like it will cover some STL features next). Also, object-oriented programming has allowed some people to write some 'commonly-encountered' best-practise algorithms to do popular tasks, and these are known as design patterns; these are also therefore useful to write larger programs with the comfort that you're using a reliable/tried-and-tested procedure for your application.
So, one way to learn C++ is through the Stroustrup book, Shaun's guide, online examples, a book on STL, a book on design patterns and finding a real coding challenge to implement, to get real practise. Personally I'd find some Linux-based challenges to work on first, in case the C++ implementation for microcontrollers is really cut-down. (For smaller programs on a microcontroller, C++ may sometimes be overkill).
p.s. I forgot to mention, troubleshooting complex software (especially when it crashes!) is another topic, and some valuable things I've learnt is to learn to spot and note all patterns/symptoms, nothing is rare if you see it occur, nothing is coincidence, and always be suspicous about all lines of code : - )