starting to learn programming - which language to start with?

Apr 7, 2005
35
0
0
So I was an electical engineering student, but recently decided that i hated the classes i was in, and that I should try Comp Sci. So my question is, which language should someone with no experience start to learn? (i've done html but that hardly counts i assume)
 

jimithing2077

Member
Mar 22, 2004
138
0
0
Coming from being a Comp Sci. major I'd say C++. In all honestly I had never taken any programming languages in High School before college and was able to catch on to c++ rather quickly.

Not only that but I would say that the majority of your courses are going to revolve around you knowing c++ so I would suggest you get to know it now.

Let me recommend a good link:

http://www.course.com/downloads/computerscience/malikdatastructures/index.htm
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
Different people will recommend different languages.

Straight C is fairly easy because functional programming is straight-forward, it's easy to trace the execution path. But memory management is a pain, you'll have to do a decent amount of book-keeping that other languages take care of automatically. If you want to do low level code you'll need to know C eventually. Also Gnome, GTK, Glib, etc are all done in C so if you want to use them it's recommended that you know C (yes there are C++ bindings in gtkmm, but I have no idea how good they are).

Java is supposedly nice, it's object oriented which people seem to love for some reason. The memory management is taken care of in the background for you so you can concentrate on the core logic. But, it's java.

C++ is half-way between Java and C, it's object oriented and parts of the memory management are taken care of, but you can still manipulate it if you wish. Most userland apps on Windows are done in C++ and AFAIK everything that uses QT and thus everything in KDE is C++.

C# seemed decent to me but I was using VS.Net which does a lot of hand-holding, it's sort of like a C++/Java hybrid designed by MS. The language itself isn't bad but you're tied to a CLR, either the .Net one from MS or Mono.

Python is supposed to be easy to start with. It's objected oriented and interpreted so debugging is easy. I never liked the idea of using whitespace for flow control, but a lot of people seem to disagree. There are Python bindings for just about everything and interpreters for every OS I can think of.

Perl is a hybrid of a lot of things, it's like C but there are objected oriented parts and the language itself is very liberal. Like Python there are modules and bindings for anything you can think of and it's interpreted (with compilers available) so debugging and testing is simple. But because the language is so liberal it's easy to write code that's unreadable an hour after you wrote it. I personally really like perl and use it, but I wouldn't recommend it for a starter language.

VB is bad, it teaches bad habits and it's ugly and ties you to Windows. VB.Net is supposedly better, but I see no reason to use it when C# is available. VB will let you get a quick app running but in the long run it's a bad idea to use VB for anything more than MS Access projects or non-production demos.

And after all that I'll say that the language itself is largely irrelevant. If you have the mindset of a programmer you'll be able to pickup any language. Your best bet is to just get some programming classes and see how it goes, having a teacher and other students to discuss and answer questions will help immensely. But failing that you'll just have to pick a book and be persistent because you'll most likely get pretty frustrated along the way.
 

kamper

Diamond Member
Mar 18, 2003
5,513
0
0
Originally posted by: Nothinman
Straight C is fairly easy because functional programming is straight-forward, it's easy to trace the execution path.
Minory technicality: c is procedural. Functional programming is a different paradigm altogether.

Java and .NET will get you the mainstream industry jobs and c++ will probably make you quite employable too. But, if you're going to do a comp sci degree you're pretty much guaranteed to learn at least one of those anyways so I'd say try something a little more geekish. If I got to do it all over again I'd start with Python. Something like that that is written by geeks for geeks is bound to give you an interesting perspective when you learn the more "corporate" languages.
 

TheLonelyPhoenix

Diamond Member
Feb 15, 2004
5,594
1
0
In the Comp Sci program here at VT, they're starting to use Java heavily, although high-level courses still use C and C++. I'd recommend C/C++ simply because they are all-around versatile, powerful languages, and if you know them you can learn anything else fairly easily.

Java makes programming quicker and easier, but churns out some pretty clunky code in the end - C++ is a more elegant object-oriented language, IMHO. Perl was designed for quick-and-dirty projects - its a very powerful language, but its also pretty rough around the edges. VB is much higher-level than the others - you can do quite a bit with it, but it won't do you much good in the long run.

Straight C is almost always the best choice if you can't take advantage of C++'s object-oriented features for whatever project you happen to be working on, so you'll need it sooner or later. I'd start there.
 

Snapster

Diamond Member
Oct 14, 2001
3,916
0
0
I'd start with C, it's a good base to build up from. Learn some good habits, so you aren't so reliant on the garbage collectors in Java and .Net wiping your arse for you. Once you're more confident and have a good understanding, either Java or C# as they are pretty similar. I also agree with kamper's sentiments of python.
 

Barnaby W. Füi

Elite Member
Aug 14, 2001
12,343
0
0
Originally posted by: TheLonelyPhoenixC++ is a more elegant object-oriented language, IMHO.
:Q

I think that's the first time I've heard C++ be called elegant.

No other language seems to be able to pull of such ginormous indecipherable error messages as C++ can. And the syntax itself can get pretty ridiculous.

C++ is deceiving at first - it gets pretty insane as you get deeper and deeper into it. But it's still a cool language in its own special way.

Oh and regarding gtkmm -- it's pretty complete and well-kept, but think of the ram usage! As if glib/gtk/gnome and template-happy C++ weren't bad enough independently -- when their powers combine... <insert captain planet joke>
 

boran

Golden Member
Jun 17, 2001
1,526
0
76
VB.Net is imho not so bad, compared to previous VB versions (we see VB.Net in class) but C# might be a better candidate, in general it wouldnt be a bad idea to start off with either Java or C# because they do quite a bit for you, but as mentioned before most real-life programming these days is done in C or C++ but since both Java and C# are quite close to C++ the switch from them to C++ would only take about a few months of study. (mainly the whole memory management as mentioned before) going to C is a different piece of cake, C is not object oriented and you will curse it if you're used to an object oriented language. For that you might want to take the path the other way around (ie, start with C then go to C++ etc) but in general programming is more about getting the mindset than the language, because in the end you should be able to know and work with any language in a matter of mere weeks simply by seing the differences (we learned VB.net in 21 hrs now and we're already up to a decent level) once you grasp the idea of the whole thing the language shouldnt matter that much. even VB.net and Java arent that much apart, they're both object oriented so both comprehensible for me. since we also see cobol (a procedural langauge) i'd guess C would be comprehensible for me to once I figure out the syntax. I just havent gotten into it yet.

So ehm, in short, just pick something, either procedural or OO and then stick with it, get it to know inside out then try a related language, and then so forth. but if you would study computer science next year you might want to inquire what they would see and NOT take that language, otherwise you'll be bored to hell, and believe me the main difficulty in computer science is not the difficulty of the courses but the fight against the terrible boredom in the courses.
 

notfred

Lifer
Feb 12, 2001
38,241
4
0
It doesn't really matter, it's about as important a decision as saying, "What kind of car should I learn to drive in?"

People learn to program just fine in all different languages.
 

magomago

Lifer
Sep 28, 2002
10,973
14
76
Python! I Started with it and i'm glad because things are soo much easier now. Though technically i play with programming on and off teaching myself basic to a degree (Though i never got further than arrays cause i could never understand the damned thing) and then dabbling in dark basic and then SOME VB...

but for the most part i was programming newb and only now I really see how simplistic and awsome Python is. Three cheers for the snake!
 

Modeps

Lifer
Oct 24, 2000
17,254
44
91
The path is much different than when I was going through this... I learned BASIC, then Turbo Pascal, THEN C++, then Java.... Then everything else was pretty much syntax learning.
 

Jack Ryan

Golden Member
Jun 11, 2004
1,353
0
0
Originally posted by: Modeps
The path is much different than when I was going through this... I learned BASIC, then Turbo Pascal, THEN C++, then Java.... Then everything else was pretty much syntax learning.

My track was exactly the same, and I agree, all other languages now is just learning what things do what you want to do conceptually.
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
The path is much different than when I was going through this... I learned BASIC, then Turbo Pascal, THEN C++, then Java.... Then everything else was pretty much syntax learning.

Mine was similar, except I never made it to Java, thankfully.
 

SelArom

Senior member
Sep 28, 2004
872
0
0
www.djselarom.com
I thought you just wanted to learn programming in which case I would suggest VB.NET because it is wicked easy to learn... but if you're going to be a cs major, you will HAVE to learn c++, so get that going.

C# is pretty cool too, and it's similar to C++, but easier to use. but like i said, cs majors will do almost all their programming in c++ (unless curriculums have changed recently, and they haven't in my school)

-SelArom
 

kamper

Diamond Member
Mar 18, 2003
5,513
0
0
Originally posted by: SelArom
I thought you just wanted to learn programming in which case I would suggest VB.NET because it is wicked easy to learn... but if you're going to be a cs major, you will HAVE to learn c++, so get that going.

C# is pretty cool too, and it's similar to C++, but easier to use. but like i said, cs majors will do almost all their programming in c++ (unless curriculums have changed recently, and they haven't in my school)

-SelArom
By no means will he HAVE to learn c++. I haven't seen a line of c++ in my entire school experience. I'm sure it depends entirely on the particular school.
 

ArmchairAthlete

Diamond Member
Dec 3, 2002
3,763
0
0
Python or VB.NET are easy to start with. You don't have to go into OO right away. Python lets you run individual statements in its interpreter prompt thingie.
 

ArjSiv

Member
Apr 6, 2005
37
0
0
I'd recommend starting with a langauge that's good for learning. I'd hightly recommend something like Pascal, it tends to keep you from forming bad habits. Once you understand the basics, you can move onto a more "industrial" langauge like C, then C++.

I'd advise against diving into an OO language as your first one. Id also suggest taking a look at some of the more "different" languages like LISP, they are radically different from your run of the mill C/C++ and give you a good understanding of theory.

I'd also suggest taking a look into assembly, try a simple instruction set like MIPS, it will give you a good understanding of how memory managent and everything works.

Also, don't think that knowing C/C++/whatever syntax makes you an experienced programer. Know your algorithms, know how to solve problems. Remember... "Scientist Computer science is no more about computers than astronomy is about
telescopes." - Edsger Dijkstra

Oh yeah.. and avoid Visual Basic in any form like the plague while your learning. It's good for some things once you're experienced ( like whipping up a quick UI frontend ) but should not be used for anything more than that.
 

TheLonelyPhoenix

Diamond Member
Feb 15, 2004
5,594
1
0
Originally posted by: BingBongWongFooey
Originally posted by: TheLonelyPhoenixC++ is a more elegant object-oriented language, IMHO.
:Q

I think that's the first time I've heard C++ be called elegant.

No other language seems to be able to pull of such ginormous indecipherable error messages as C++ can. And the syntax itself can get pretty ridiculous.

I don't see where the C++ syntax gets more ridiculous than anything else... pass-by-pointer work can be pretty complex, but that's about it. Although, yeah, the errors are cryptic sometimes.

I think coding object-oriented solutions in C++ gives more control and flexibility than any other language. That's just my experience with it. I'm not a crack Java programmer, so maybe I'm wrong.
 

everman

Lifer
Nov 5, 2002
11,288
1
0
My first "language", or rather programming experience was from a rather simple scripting program. So maybe something like that might be good, but I think C++ is great too.
 
Aug 16, 2001
22,505
4
81
Originally posted by: Modeps
The path is much different than when I was going through this... I learned BASIC, then Turbo Pascal, THEN C++, then Java.... Then everything else was pretty much syntax learning.

Same here with the difference I stopped at Pascal and went with graphical programming from there. My productivity went up 2000% by switching to LabVIEW for big measurement systems.

Never mind my comment, it's a bit OffTopic.
 
sale-70-410-exam    | Exam-200-125-pdf    | we-sale-70-410-exam    | hot-sale-70-410-exam    | Latest-exam-700-603-Dumps    | Dumps-98-363-exams-date    | Certs-200-125-date    | Dumps-300-075-exams-date    | hot-sale-book-C8010-726-book    | Hot-Sale-200-310-Exam    | Exam-Description-200-310-dumps?    | hot-sale-book-200-125-book    | Latest-Updated-300-209-Exam    | Dumps-210-260-exams-date    | Download-200-125-Exam-PDF    | Exam-Description-300-101-dumps    | Certs-300-101-date    | Hot-Sale-300-075-Exam    | Latest-exam-200-125-Dumps    | Exam-Description-200-125-dumps    | Latest-Updated-300-075-Exam    | hot-sale-book-210-260-book    | Dumps-200-901-exams-date    | Certs-200-901-date    | Latest-exam-1Z0-062-Dumps    | Hot-Sale-1Z0-062-Exam    | Certs-CSSLP-date    | 100%-Pass-70-383-Exams    | Latest-JN0-360-real-exam-questions    | 100%-Pass-4A0-100-Real-Exam-Questions    | Dumps-300-135-exams-date    | Passed-200-105-Tech-Exams    | Latest-Updated-200-310-Exam    | Download-300-070-Exam-PDF    | Hot-Sale-JN0-360-Exam    | 100%-Pass-JN0-360-Exams    | 100%-Pass-JN0-360-Real-Exam-Questions    | Dumps-JN0-360-exams-date    | Exam-Description-1Z0-876-dumps    | Latest-exam-1Z0-876-Dumps    | Dumps-HPE0-Y53-exams-date    | 2017-Latest-HPE0-Y53-Exam    | 100%-Pass-HPE0-Y53-Real-Exam-Questions    | Pass-4A0-100-Exam    | Latest-4A0-100-Questions    | Dumps-98-365-exams-date    | 2017-Latest-98-365-Exam    | 100%-Pass-VCS-254-Exams    | 2017-Latest-VCS-273-Exam    | Dumps-200-355-exams-date    | 2017-Latest-300-320-Exam    | Pass-300-101-Exam    | 100%-Pass-300-115-Exams    |
http://www.portvapes.co.uk/    | http://www.portvapes.co.uk/    |