There's still the fact that the language (and C++, for that matter) is still far harder to use, can get you in trouble far easier, and isn't as readable. The productivity is a lot lower than it is in a higher level language (like Java or C#) for most tasks.
Personally, I recommend C#. If you already have a Java book, start there.
To be honest, I don't really know that much of C++ besides recognizing it, but it looks a little harder than JavaScript. If you want easy, go with HTML and CSS. If you want moderate go with JavScript. If you're up for a challenge, do C++. But you do have the books, and they aren't going anywhere.
Quit cramming HTML and CSS down the poor guy's throat those aren't even programming languages
Don't go with Java. It's a complete mess and has terrible performance. Python is a good language to learn basics of programming, but it's incredibly slow and bloaty. If you want to do serious work, learn C, it's much more powerful and the low level access allows a lot more work to be done.
And like the guy above me said, don't bother with web languages. They can be learned in a very short time if you need them, but they're not at all useful outside of making websites and whatnot.
Yes, the fact that C and C++ are lower level allows the programmer to take advantage of quite a few features that can help with performance. But the vast majority of development doesn't need that performance. It's also far easier to fall into pitfalls, and development time is much, much higher. C# and Java are both high level enough to give great productivity, support a lot of modern features, and are performant enough that no one should run into issues. If there are issues, then it's usually the programmer's fault. If you needed the lower level performance, you would know before you start.
C is too different from C# and Java for me to recommend using. Objects oriented design is very powerful, though maybe a little confusing. C doesn't support objects. C++ is dated for the most part. Highly recommend avoiding both.
Python is fine to start, though it doesn't lend itself to good programming practice. Its support of Objects is sketchy, and it's more of a scripting language than a traditional programming language. It's useful at times, but not really something decent for main usage.
Don't go with Java. It's a complete mess and has terrible performance. Python is a good language to learn basics of programming, but it's incredibly slow and bloaty. If you want to do serious work, learn C, it's much more powerful and the low level access allows a lot more work to be done.
Your quip about Java is a leftover sentiment from the early 2000s and simply isn't true at all anymore. With recent versions of the language, virtually all of the "fat" and verbosity of older constructs, like casting to and from Object for genericity, have been replaced with proper Generics syntax and other syntactic improvements, and the standard library has been expanded quite a bit, such that canonically styled Java code is now generally shorter, neater and more readable than the equivalent C++ code. At the same time, improvements to the JVM over time have meant that modern Java can be as fast as C++ for some things, especially when portability is taken into account (that is, when software is tested outside of the carefully manicured lab environment on real machines running non-target operating systems on non-target hardware).
I'm not familiar enough with Python to give an educated assessment of its speed, but my understanding is that its speed is fairly typical for a scripting language, with a few things (like exception handling) that are notoriously well optimized.
As for C being a "powerful language"... just no. Whatever you do, don't go into learning C thinking you're learning a faster or more powerful language. If you want to learn a powerful language with low-level access, learn C++. The fact is that good, modern C++ is generally as fast as, if not faster than, the equivalent coded in C, because it can take advantage of the safer type system, the notoriously fast STL, and all of the language features such as classes and templates that allow the compiler to do much more work for you at run time to optimize your code. C is all but a dead language, because by design, any program that can be expressed in C can be expressed equivalently in C++ while still benefiting from better language standardization and a safer type system, at the very least.
C is too different from C# and Java for me to recommend using. Objects oriented design is very powerful, though maybe a little confusing. C doesn't support objects. C++ is dated for the most part. Highly recommend avoiding both.
Five years ago, you might have had a case claiming that C++ was becoming dated, but with the introduction of C++11, so many of the language issues have been fixed (or at least addressed) that calling it "dated" is just an exercise in ignorance; let's not forget that C++ was only formally standardized 16 years ago, actually two years after the introduction of java.
As for what language you should learn to start out, it really depends what you want to get into and how you prefer to think and learn. If you're someone who, like me, prefers to know all the technical details underlying your programming and how it's implemented on hardware (and if you enjoy thinking a lot about optimization and speed), then C++ is really not a bad language to start. The syntax can get weird, and the memory model is not nearly as simple as Java's, but it's fundamentally a language of discipline which (imo) can help you continue writing good code even once you branch out into other languages. And the syntax is really not much wonkier than any other language when you're first starting out - it's only once you get into more advanced language features that it starts to get messy.
On the other hand, if you're someone who's a little less particular and has a hard time with nitty gritty details, you may be better off starting off with a higher level language like Python. Or if you're in the middle of the road, something like Java or C# of course couldn't hurt.
Honestly, I don't think that the decision of what language to learn first will make or break you as a programmer, as long as it's not absolutely horrible. Depending on your needs and abilities, almost any modern language could work, whether it's C#, Java, Javascript, Python, C++, or even something like C, Ruby, or Visual Basic. Heck, a lot of professional programmers today started in the 80s and 90s as hobbyists writing code in now-dead proprietary languages for now-decades-outdated hardware.
In any case (although especially if you pick a lower-level language like C++), it's likely to be slow and frustrated when you're first starting out. Once you get the fundamentals down, you'll be picking up new tricks and algorithms and paradigms left and right, but the first few steps are often pretty painstaking and confusing, and cause a lot of people to give up before really getting anywhere. (On the other hand, I'd argue if you take the harder first steps and learn a lower level language, it'll give you a more solid foundation for approaching more complex problems and make things easier for you later on, but that may just be bias speaking).
I've been doing java but I'm having a really hard time understanding it. Any suggestions?
It depends. How are you learning it? Is it through a book? If so, what book, and what specifically are you having trouble with?
If you really can't wrap your head around what one book or tutorial is teaching, it may help to just try another one for a while. I spent a while tutorial-hopping when first learning C (my starting language), until I got a good enough general understanding of the language for soaking in information from several different sources to be able to make it the rest of the way on short-form articles and language documentation.
As for general learning suggestion, my biggest one is: abuse StackOverflow!!! If you're having a specific problem, try searching it up on StackOverflow. There's probably already an answer out there, and if there isn't, you can feel free to ask a question yourself. It is seriously going to be your best friend forever, not just as a beginner but as long as you continue programming. Get used to the format of the site because you're going to be using it all the time.
Your quip about Java is a leftover sentiment from the early 2000s and simply isn't true at all anymore. With recent versions of the language, virtually all of the "fat" and verbosity of older constructs, like casting to and from Object for genericity, have been replaced with proper Generics syntax and other syntactic improvements, and the standard library has been expanded quite a bit, such that canonically styled Java code is now generally shorter, neater and more readable than the equivalent C++ code. At the same time, improvements to the JVM over time have meant that modern Java can be as fast as C++ for some things, especially when portability is taken into account (that is, when software is tested outside of the carefully manicured lab environment on real machines running non-target operating systems on non-target hardware).
I'm not familiar enough with Python to give an educated assessment of its speed, but my understanding is that its speed is fairly typical for a scripting language, with a few things (like exception handling) that are notoriously well optimized.
As for C being a "powerful language"... just no. Whatever you do, don't go into learning C thinking you're learning a faster or more powerful language. If you want to learn a powerful language with low-level access, learn C++. The fact is that good, modern C++ is generally as fast as, if not faster than, the equivalent coded in C, because it can take advantage of the safer type system, the notoriously fast STL, and all of the language features such as classes and templates that allow the compiler to do much more work for you at run time to optimize your code. C is all but a dead language, because by design, any program that can be expressed in C can be expressed equivalently in C++ while still benefiting from better language standardization and a safer type system, at the very least.
Five years ago, you might have had a case claiming that C++ was becoming dated, but with the introduction of C++11, so many of the language issues have been fixed (or at least addressed) that calling it "dated" is just an exercise in ignorance; let's not forget that C++ was only formally standardized 16 years ago, actually two years after the introduction of java.
As for what language you should learn to start out, it really depends what you want to get into and how you prefer to think and learn. If you're someone who, like me, prefers to know all the technical details underlying your programming and how it's implemented on hardware (and if you enjoy thinking a lot about optimization and speed), then C++ is really not a bad language to start. The syntax can get weird, and the memory model is not nearly as simple as Java's, but it's fundamentally a language of discipline which (imo) can help you continue writing good code even once you branch out into other languages. And the syntax is really not much wonkier than any other language when you're first starting out - it's only once you get into more advanced language features that it starts to get messy.
On the other hand, if you're someone who's a little less particular and has a hard time with nitty gritty details, you may be better off starting off with a higher level language like Python. Or if you're in the middle of the road, something like Java or C# of course couldn't hurt.
Honestly, I don't think that the decision of what language to learn first will make or break you as a programmer, as long as it's not absolutely horrible. Depending on your needs and abilities, almost any modern language could work, whether it's C#, Java, Javascript, Python, C++, or even something like C, Ruby, or Visual Basic. Heck, a lot of professional programmers today started in the 80s and 90s as hobbyists writing code in now-dead proprietary languages for now-decades-outdated hardware.
In any case (although especially if you pick a lower-level language like C++), it's likely to be slow and frustrated when you're first starting out. Once you get the fundamentals down, you'll be picking up new tricks and algorithms and paradigms left and right, but the first few steps are often pretty painstaking and confusing, and cause a lot of people to give up before really getting anywhere. (On the other hand, I'd argue if you take the harder first steps and learn a lower level language, it'll give you a more solid foundation for approaching more complex problems and make things easier for you later on, but that may just be bias speaking).
It depends. How are you learning it? Is it through a book? If so, what book, and what specifically are you having trouble with?
If you really can't wrap your head around what one book or tutorial is teaching, it may help to just try another one for a while. I spent a while tutorial-hopping when first learning C (my starting language), until I got a good enough general understanding of the language for soaking in information from several different sources to be able to make it the rest of the way on short-form articles and language documentation.
As for general learning suggestion, my biggest one is: abuse StackOverflow!!! If you're having a specific problem, try searching it up on StackOverflow. There's probably already an answer out there, and if there isn't, you can feel free to ask a question yourself. It is seriously going to be your best friend forever, not just as a beginner but as long as you continue programming. Get used to the format of the site because you're going to be using it all the time.
I've been using the book Head First Java and I've found it explains stuff well sometimes but it will often use random code that's not from the last tutorial and it just confuses me more when it's explaining. Do you have any websites or books you could recommend. I also made a StackOverFlow account
Rollback Post to RevisionRollBack
My specs: i5 4460, Msi guard pro H97, Sapphire r9 280x, Western digital blue 1 TB, evga 600b psu, Nzxt h440
If you're looking for an easy introduction to Java syntax and basic programming concepts, I highly recommend trying out Processing. It's essentially a superset of Java that has highly simplified libraries for drawing simple graphics and such (learning through using graphics is a lot better for some people than being limited to a text console, though not necessarily for everyone). There's a lot of example code and tutorials out there (as well as a set of complete and easy to understand documentation), as it's an environment designed to be beginner-friendly.
However, it's not the best for learning OOP concepts, so you should still try to learn pure Java alongside it, to get used to the practical implementation details of the language (things like packages, non-inner classes, etc. which Processing largely leaves out) and learn how to do things in the Java standard libraries without always relying on Processing functionality. I just think it's a great tool for taking some of the headache and frustration out of learning programming.
For Java, I already was familiar with a lot of the basic syntax and constructs that carry over from C++, and I had a friend who was really into Java development who helped explain some of the OOP concepts to me. Beyond that, I mostly learned from StackOverflow, the Oracle Java SE documentation (for looking up standard library classes and interfaces mostly), and by reading other people's code and looking up whatever I didn't understand.
As for learning C++ in the first place, I started learning C through Carl Herold's videos, and was introduced to C++ classes and templates by reading the pages about them on cplusplus and cprogramming. The rest was cobbled together through SO, wikipedia, language/library reference, and example code, same as with Java. I also took an intro C++ class last year, which helped, but wasn't a primary source of knowledge since I was already familiar with most of the topics.
Most knowledge of algorithms and computer science more generally came mostly from wikipedia, youtube, and example code. Basically, my mode of learning has been to decide on a problem I want to solve, look up and absorb a bunch of information about it, and then try to implement it in code using the ideas and algorithms I've found, along with whatever prior knowledge I have, looking up solutions to any smaller problems I run into along the way.
Don't take this as a recommendation, though, unless you already know you learn best by being an information sponge and cobbling together an understanding from different sources. AFAIK most people prefer to have a proper curriculum and learn better that way. That said, you should still read a lot about programming (example code, algorithms, style guides, tutorials, opinionated rants, whatever it is) and don't expect to get all your information from one source.
Personally, I recommend C#. If you already have a Java book, start there.
"Programmers never repeat themselves. They loop."
Quit cramming HTML and CSS down the poor guy's throat those aren't even programming languages
And like the guy above me said, don't bother with web languages. They can be learned in a very short time if you need them, but they're not at all useful outside of making websites and whatnot.
Yes, the fact that C and C++ are lower level allows the programmer to take advantage of quite a few features that can help with performance. But the vast majority of development doesn't need that performance. It's also far easier to fall into pitfalls, and development time is much, much higher. C# and Java are both high level enough to give great productivity, support a lot of modern features, and are performant enough that no one should run into issues. If there are issues, then it's usually the programmer's fault. If you needed the lower level performance, you would know before you start.
C is too different from C# and Java for me to recommend using. Objects oriented design is very powerful, though maybe a little confusing. C doesn't support objects. C++ is dated for the most part. Highly recommend avoiding both.
Python is fine to start, though it doesn't lend itself to good programming practice. Its support of Objects is sketchy, and it's more of a scripting language than a traditional programming language. It's useful at times, but not really something decent for main usage.
"Programmers never repeat themselves. They loop."
public class whileloop {
public static void main(String[] args) {
int x = 12 * 11;
int y = 13 * 12;
if(x>y){
System.out.println("x is greater than y!");
}else{
System.out.println("y is greater than x!");
}
System.out.println(x, y);
}
}
The issue is when I try to print the integers how do I do this correctly?
Thank you
Your quip about Java is a leftover sentiment from the early 2000s and simply isn't true at all anymore. With recent versions of the language, virtually all of the "fat" and verbosity of older constructs, like casting to and from Object for genericity, have been replaced with proper Generics syntax and other syntactic improvements, and the standard library has been expanded quite a bit, such that canonically styled Java code is now generally shorter, neater and more readable than the equivalent C++ code. At the same time, improvements to the JVM over time have meant that modern Java can be as fast as C++ for some things, especially when portability is taken into account (that is, when software is tested outside of the carefully manicured lab environment on real machines running non-target operating systems on non-target hardware).
I'm not familiar enough with Python to give an educated assessment of its speed, but my understanding is that its speed is fairly typical for a scripting language, with a few things (like exception handling) that are notoriously well optimized.
As for C being a "powerful language"... just no. Whatever you do, don't go into learning C thinking you're learning a faster or more powerful language. If you want to learn a powerful language with low-level access, learn C++. The fact is that good, modern C++ is generally as fast as, if not faster than, the equivalent coded in C, because it can take advantage of the safer type system, the notoriously fast STL, and all of the language features such as classes and templates that allow the compiler to do much more work for you at run time to optimize your code. C is all but a dead language, because by design, any program that can be expressed in C can be expressed equivalently in C++ while still benefiting from better language standardization and a safer type system, at the very least.
Five years ago, you might have had a case claiming that C++ was becoming dated, but with the introduction of C++11, so many of the language issues have been fixed (or at least addressed) that calling it "dated" is just an exercise in ignorance; let's not forget that C++ was only formally standardized 16 years ago, actually two years after the introduction of java.
As for what language you should learn to start out, it really depends what you want to get into and how you prefer to think and learn. If you're someone who, like me, prefers to know all the technical details underlying your programming and how it's implemented on hardware (and if you enjoy thinking a lot about optimization and speed), then C++ is really not a bad language to start. The syntax can get weird, and the memory model is not nearly as simple as Java's, but it's fundamentally a language of discipline which (imo) can help you continue writing good code even once you branch out into other languages. And the syntax is really not much wonkier than any other language when you're first starting out - it's only once you get into more advanced language features that it starts to get messy.
On the other hand, if you're someone who's a little less particular and has a hard time with nitty gritty details, you may be better off starting off with a higher level language like Python. Or if you're in the middle of the road, something like Java or C# of course couldn't hurt.
Honestly, I don't think that the decision of what language to learn first will make or break you as a programmer, as long as it's not absolutely horrible. Depending on your needs and abilities, almost any modern language could work, whether it's C#, Java, Javascript, Python, C++, or even something like C, Ruby, or Visual Basic. Heck, a lot of professional programmers today started in the 80s and 90s as hobbyists writing code in now-dead proprietary languages for now-decades-outdated hardware.
In any case (although especially if you pick a lower-level language like C++), it's likely to be slow and frustrated when you're first starting out. Once you get the fundamentals down, you'll be picking up new tricks and algorithms and paradigms left and right, but the first few steps are often pretty painstaking and confusing, and cause a lot of people to give up before really getting anywhere. (On the other hand, I'd argue if you take the harder first steps and learn a lower level language, it'll give you a more solid foundation for approaching more complex problems and make things easier for you later on, but that may just be bias speaking).
It depends. How are you learning it? Is it through a book? If so, what book, and what specifically are you having trouble with?
If you really can't wrap your head around what one book or tutorial is teaching, it may help to just try another one for a while. I spent a while tutorial-hopping when first learning C (my starting language), until I got a good enough general understanding of the language for soaking in information from several different sources to be able to make it the rest of the way on short-form articles and language documentation.
As for general learning suggestion, my biggest one is: abuse StackOverflow!!! If you're having a specific problem, try searching it up on StackOverflow. There's probably already an answer out there, and if there isn't, you can feel free to ask a question yourself. It is seriously going to be your best friend forever, not just as a beginner but as long as you continue programming. Get used to the format of the site because you're going to be using it all the time.
I've been using the book Head First Java and I've found it explains stuff well sometimes but it will often use random code that's not from the last tutorial and it just confuses me more when it's explaining. Do you have any websites or books you could recommend. I also made a StackOverFlow account
However, it's not the best for learning OOP concepts, so you should still try to learn pure Java alongside it, to get used to the practical implementation details of the language (things like packages, non-inner classes, etc. which Processing largely leaves out) and learn how to do things in the Java standard libraries without always relying on Processing functionality. I just think it's a great tool for taking some of the headache and frustration out of learning programming.
http://www.amazon.com/Java-Pocket-Guide-Robert-Liguori/dp/1449343562/ref=sr_1_2?ie=UTF8&qid=1416279742&sr=8-2&keywords=java reference
I love both of those books and they have saved me countless times.
How did you learn?
As for learning C++ in the first place, I started learning C through Carl Herold's videos, and was introduced to C++ classes and templates by reading the pages about them on cplusplus and cprogramming. The rest was cobbled together through SO, wikipedia, language/library reference, and example code, same as with Java. I also took an intro C++ class last year, which helped, but wasn't a primary source of knowledge since I was already familiar with most of the topics.
Most knowledge of algorithms and computer science more generally came mostly from wikipedia, youtube, and example code. Basically, my mode of learning has been to decide on a problem I want to solve, look up and absorb a bunch of information about it, and then try to implement it in code using the ideas and algorithms I've found, along with whatever prior knowledge I have, looking up solutions to any smaller problems I run into along the way.
Don't take this as a recommendation, though, unless you already know you learn best by being an information sponge and cobbling together an understanding from different sources. AFAIK most people prefer to have a proper curriculum and learn better that way. That said, you should still read a lot about programming (example code, algorithms, style guides, tutorials, opinionated rants, whatever it is) and don't expect to get all your information from one source.
"Programmers never repeat themselves. They loop."
I tend to learn best when I have a few books and can use other books if one doesn't explain something well.
http://www.amazon.com/Java-Beginners-Guide-Herbert-Schildt/dp/0071809252/ref=zg_bs_3608_4
http://www.amazon.com/Effective-Java-Edition-Joshua-Bloch/dp/0321356683/ref=zg_bs_3608_2
Is great.