I have never programmed in C++, but am going to be taking a class that involves programming in C++ in January. I want to be able to excel in the class, and looking for advice, as I come from a PHP background. How can I best prepare myself for success?
|
Your question is like asking, 'How can a baseball player prepare for a basketball match?'. Once a programmer learns a language, usually he/she has no problem learning a new language; same as a baseball player adapting to a basketball game. The sportsman is fit, and the programmer has a basic understanding of language syntax and structure. You will find several difference between C++ and PHP, yet a lot of time you will be thinking on how C++ is like PHP. PHP is less strict than C++; C++ is what is considered a general-purpose programming language while PHP is a scripting language aimed at web development. C++ process is different, a c++ program is converted into binary code, then loaded into memory and run directly. If you really want to excel, then in my book you have to actually learn it on your own. I excelled in programming courses, because I knew most of the course beforehand. I see the best and most passionate programmers learning the language on their own. If there is a book included with the course try to get your hands on it, and read it before the start of the course at least get ahead. Most of us don't have photographic memory and we can only learn by hearing something over and over again. Learn it on your own and the course lecture would be the review. Warning: Following this advice might cause you to fall asleep in lectures. Again start reading tutorials and books, start building things and you won't have problem excelling in your C++ class. Books: Thinking in C++: Introduction to Standard C++ Extra: THe New Boston - C++ |
|||||
|
|
C++ and PHP are worlds apart in terms of applications and usage patterns. Your PHP knowledge will help you by giving you a head start on basic programming concepts such as
As well as any program designing experience you may have picked up while developing PHP applications. If you want to get the leg up in your course the best way is to start by ignoring your PHP background beyond the things outlined above and focus on some of the following:
Another good resource is your teacher for the course. I'm sure if you send them an email they will be able to give you some resources to get started. |
|||
|
|
|
The best thing to do is to forget everything you know about PHP. It will only serve to hold you back in the C++ world. Many things which appear similar are in fact not similar at all, and it's best to just not try to apply your PHP knowledge. |
||||
|
|
|
My two cents-
Pay attention to C++ specific OO features, some C features like pointers and it's libraries. Good luck. |
|||
|
|
|
I took a series of Java programming classes a few years ago after working mostly with PHP for five years. In my case, I attended a community college. The best advice I have is to stick with it. The first few weeks will undoubtedly be a little boring, but if you are inattentive, you may miss important key concepts. Don't be afraid to ask you instructor if you don't understand something and be careful not to rely too much on prior knowledge if you are unclear on what is being taught. That being said you are likely to find instruction on basic syntax redundant. If you want to excel, read a chapter or two ahead before going to lecture and come to class armed with a question or two. A good attitude will help you learn. Also, speak with the instructor about your PHP knowledge before the class starts or after the first lecture. If enough people in your class are already programmers, your instructor may pace the class differently than if everyone is new to coding. |
|||
|
|
Pointers, sirBinky will help you. OOPHoping that you are a good PHP developer and you have used classes (i.e. object oriented programming) you'll be pretty much conceptually ready to take on other concepts such as inheritance and polymorphism. |
|||
|
|
|
I find that proficiency at a given programming language is much like proficiency at any skill. While a good deal of study can help mitigate difficulties, the real "trick" is to practice1. And yes, some languages will be closer than others, just like certain disciplines will be easier to transfer than others — it is harder for a guitar player to learn viola than it is for a violinist to learn viola. The best thing you can do, then, is to focus on the major differences. And you'll definitely notice several major paradigm shifts between the two languages. Here are some recommendations to help bridge that gap:
1. How do you get to Carnegie Hall? Put this into Google Maps: 881 7th Ave. New York, New York. |
|||||||||||||||
|
|
That's a good topic. But I keep wondering why other programmers feel offended anytime the issue of PHP comes up? Looking around the web, PHP is clearly the winner - l don't even know the importance of all these other languages, when almost 70% of the web is in the hand of PHP. You don't need to abandon your PHP background, a good programmer be it in PHP, Java or any other language can pick up any other language easily, just study the syntax and you are good to go. As a PHP programmer, it never took me long to start piloting java, but not much use.Rick Rhodes, l like your answer. |
|||
|
Did you read the title of the question?is not a very constructive comment. Of course, what you're saying is correct, the title says you want to prepare for a course. But how you say it is also important. Same for the question itself, what kind of course, what are your specific skills and experience?I come from a PHP background.ranges from script kiddies that picked up PHP a week ago to seasoned PHP developers. I picked up PHP a couple of months after the release of 3.0 and it's been my primary development language since then, would be an example of what more you can tell us... – Yannis Rizos♦ Dec 8 '11 at 22:04