There are many programing laguages out there rigth now. I think the most common ones are Java, Java Script, Visual Basic, and C++. My question is which one is the over all best and which ones has which strengths. (Feel free to metntion other common ones I forgot)
Comments
In short, every programming language is different. Few are absolutely better or worse than others. Every language has an appropriate time and place to be used. As a programmer, languages are my tools. When I have to hit a nail I use my hammer language. When I have to cut wood I use my saw language. Some languages are chainsaws, and some are swiss army knives. The tool analogy for programming languages can be taken pretty far without it breaking down.
If you want to list languages, we'll be here for days. There are probably as many programming langauges as there are spoken ones. You see, there are different categories of languages: procedural, object oriented, machine, etc. Once you learn the basic concepts of one category of languages you can easily learn all the languages in that category. Once you know the concept behind a language, all that's left is to memorize syntax. Due to this fact I have been able to learn a great many languages. With the help of an O'Reilly book I can put a new tool on my utility belt in a week's time. That of course assumes I need, or want, to learn the language in the first place.
Having said all that, I can't really answer your question. What you are asking is much too general for me to feel comfortable responding. Ask me some more specific questions, then I can give a really good answer. Good questions would be "What are the pros and cons of using language X to make an application like Y?" or "I want to make a program like X, what language would be best?"
I reccomend you start by learning the difference between object-oriented and procedural languages. Then read the individual wikipedia pages for the languages you listed in your post. That should get you thinking in the right direction. Also be sure to listen to all of our "how computers work" episodes. You'll be sure to learn a great deal about languages there.
20 GOTO 10
BASIC is the only programming language you'll ever need.
20 GOTO 10"
Output:
poop poop poop poop poop poop poop poop poop poop poop poop poop poop poop poop poop poop poop poop poop poop poop poop poop poop poop poop poop poop poop poop poop poop poop poop poop poop poop poop poop poop poop poop poop poop poop poop poop poop poop poop poop poop poop poop poop poop poop poop poop poop poop poop poop poop poop poop poop poop
System.out.print("poop");
,>,>++++++++[<------<------>>-]
<<[>[>+>+<<-]>>[<<+>>-]<<<-]
>>>++++++[<++++++++>-],<.>.
What Scott posted is indeed valid code in a language that makes me want to cry. The language is real. It is called BrainFuck.
Ook. Ook. Ook. Ook. Ook! Ook? Ook? Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook.
Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook? Ook! Ook! Ook? Ook! Ook? Ook.
Ook! Ook. Ook. Ook? Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook.
Ook. Ook. Ook! Ook? Ook? Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook?
Ook! Ook! Ook? Ook! Ook? Ook. Ook. Ook. Ook! Ook. Ook. Ook. Ook. Ook. Ook. Ook.
Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook! Ook. Ook! Ook. Ook. Ook. Ook. Ook.
Ook. Ook. Ook! Ook. Ook. Ook? Ook. Ook? Ook. Ook? Ook. Ook. Ook. Ook. Ook. Ook.
Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook! Ook? Ook? Ook. Ook. Ook.
Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook? Ook! Ook! Ook? Ook! Ook? Ook. Ook! Ook.
Ook. Ook? Ook. Ook? Ook. Ook? Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook.
Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook! Ook? Ook? Ook. Ook. Ook.
Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook.
Ook. Ook? Ook! Ook! Ook? Ook! Ook? Ook. Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook.
Ook? Ook. Ook? Ook. Ook? Ook. Ook? Ook. Ook! Ook. Ook. Ook. Ook. Ook. Ook. Ook.
Ook! Ook. Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook.
Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook!
Ook! Ook. Ook. Ook? Ook. Ook? Ook. Ook. Ook! Ook.
I don't think I have any desire to learn Ook!. BF would be bad enough. And so would COW, but Ook! would be the worst of the lot.
As Scott mentioned, thar be procedural, and thar be object-oriented. It is very true that learning one procedural language helps you learn them all, and the same is true of OO languages. You should, in my opinion, learn both, and you should learn procedural first. You should also shoot for a language that doesn't dumb down data types, and leaves the conversions to you. (There are lots of discussions about why this is a good/bad thing, but the jist of the argument for it is that it teaches you to think like the computer does, and thus makes you a better, more agile programmer)
Bearing that in mind, I don't think anyone will be surprised by my recomendations:
Learn C, then learn C++.
C and C++ are fairly similar. You can, in fact, write valid C code that will compile with a C++ compiler (don't, though...it's just silly). Why these? I'm glad you asked.
Both of these languages allow you to learn the basics pretty quickly, if you are willing to read a book and do some mental work. Many people find C too difficult to be an "introductory" language, so they push for kiddie languages like BASIC. BASIC will destroy your mind. I spent much of my late teens undoing the brain damage that language caused me. C can be used at a fairly high level, but when you learn enough, you can write damn-near anything with it. And while the structure of other procedural languages may be very different, the underlying concepts are all fully represented by C, so you'll be able to start learning other languages with most of the conceptual tools you'll need.
I recommend C++ because 1) Its syntax and structure are quite similar to C and 2) It is extremely similar to most other OO languages.
As for references, I learned with the Deitel & Deitel series, C how to Program and C++ how to Program (clever guys, those Deitels). They may not be widely regarded as the best books, but they got me through.
Wow, I didn't mean to get this wordy. Short answer: Use C and C++, because I want more C/C++ zealots in the world :-p
Two things I forgot about: 1) C and C++ are very cross-platform compatible, in their basic forms. 2) If you use linux (you do, RIGHT!?!?), you probably already have the GNU cross compiler (GCC) on your system. This handles C and C++ very nicely, and there are several options for using the compiler in windows, my favorite being cygwin
Well what do you know I got a rare event! im sleepy for once! so bye people.
HAI
CAN HAS STDIO?
VISIBLE "IT IS CAN BE NECRO TIME PWEASE?"
KTHXBYE
Another sample:
HAI
CAN HAS STDIO?
I HAS A VAR
IM IN YR LOOP
UP VAR!!1
VISIBLE VAR
IZ VAR BIGGER THAN 10? KTHXBYE
IM OUTTA YR LOOP
KTHXBYE
This has me jumping in the air and high-fiving everyone I meet.
U can has it in Python:
# sys is used for COMPLAIN and ARGZ
import sys as _lol_sys
from datetime import date as DATE
def FIBBING ( N ) :
'ITERATE FIBONACCI TERMS LESS THAN N'
assert N >= 0
# BTW, FIBONACCI LIKE BUNNIES! LOL
yield 1
yield 1
I = 1
HE = 1
while 1:
I , HE = HE , I + HE
if HE >= N :
break
yield HE
if __name__ == '__main__' :
print >>_lol_sys.stderr, 'NOW IZ' , DATE . today ()
if len(_lol_sys.argv) == 1 :
N = 100
else :
N = int(_lol_sys.argv[ 1 ])
for I in FIBBING ( N ) :
print I
# The end.
lolcats, how I love thee.
Copyrights be damned.
for( int count = 0; count < 10; ++count ) {
is a relatively new development.I'm not debating the finer points of coding in this case, I'm debating that the character in the strip would have done it the new way because of who he is.
Which brings me to the next question, which version of Linux would he run if he did not have a Mac?
for( int count...
. If you were to compile it using the default gcc parameters with the newest gcc, like sogcc test.c
you would get an error message! You have to do something specialgcc -std=c99 test.c
to make it work your way. You know what? Most people do it the old way. You know that whole gigantic open source C program, that um, Linux kernel thing. Yeah, it's written the default way. That's the way the vast majority of C code is written. I don't want to explain the finer points of C coding standards, and why they are the way they are. Just accept the following statement as fact. The code in the Foxtrot comic is correct, and you are wrong.Come on guys, aren't we just a little above arguing over syntax?