Which is the best programming language for a beginner?
And what's the difference between C and C++ ?
Printable View
Which is the best programming language for a beginner?
And what's the difference between C and C++ ?
Beginners All-purpose Symbolic Instruction Code would get you going pretty quickly. But if you really want to learn how to properly program go for Pascal.Quote:
C is procedural, C++ is object oriented.Quote:
And what's the difference between C and C++ ?
Basically, it depends on your budget. (Since this is a security site, I don't think it's a good thing to advise tp use illegal copies of software so I won't do that!) If you can't spend any cash, you will have to depend on freeware languages. Many of them are very good quality too.
Another thing to consider is the kind of applications you want to write. Do you want to build a back-end for a webserver? Some desktop tool? Games? Multi-tier database systems? System tools? Or something else?
http://en.wikipedia.org/wiki/Programming_Languages gives a good overview of all kind of programming languages. http://en.wikipedia.org/wiki/C_%28pr...ng_language%29 gives a nice overview of the C programming language. You can read there how C and C++ relate to one another.
For starters it doesn't matter. Once you learn how to program in one language you can easily learn another. They all use variables, conditional statements etc. only the syntax might be different. The real differences in languages is procedural vs. object oriented. Those are 2 completely different worlds and require different approaches to solving the problem.Quote:
Originally posted here by Katja
Another thing to consider is the kind of applications you want to write. Do you want to build a back-end for a webserver? Some desktop tool? Games? Multi-tier database systems? System tools? Or something else?
When you have a good grasp on how to solve problems you can think about the more 'advanced' programming like the back-ends, games etc.
Excellent point, SirDice, but I've found that while most programming concepts translate easily from one language to another, it can sometimes be time consuming to learn a new syntax when switching. In addition, it's been my experience that it's much easier to learn a language if you have tasks you want to perform that are ideal for that language. For example, if you were doing a lot of file/text manipulation, it might not be too practical to learn C over Perl to help with those tasks. Similarly, you wouldn't want to be writing device drivers in Perl -- you would probably choose C over Perl.
legionaire, you would be wise to figure out what you want to accomplish with programming, and then pick the language that would be most appropriate. No sense learning a language that is not the best suited for what you want to do. If you don't know what you wants to do yet, perhaps an all-purpose language such as Python would be the most appropriate. As a system administrator myself, I have found that there's very little in my job that can't be accomplished through that wonderful Swiss Army Chainsaw, Perl, whereas a colleague of mine doing the same job swears by Python. In many ways, it comes down to preference and utility.
While I usually decide to stay away from posts like this... I decided I skipped classes today, I might as well jump on in and teach someone something, since I haven't learned anything today....
iight... So where do we begin?
First off, saying the programming language you decide to learn will control completely what kind of programs you make is kind of wrong... Atleast as far as I can prove, most well-known languages are rather simliar and have port-ability into another language, and several even have programs that can transfer one into another....
Katja I have absolutely no idea where you came from with the your budget statement... There are languages that you have to pay for to use... But, there are far more free ones... Java, C, C++, perl and the list goes on and on. So that is kind of not true... But, whatever...
Actually, you can write device drivers in perl... There is actually a perl OS... can't remember the name of it at the moment... But, everything but the kernel is written in perl.
And the difference between C and C++ is if you shot yourself in the foot with C... You will lose the foot.... If you shoot yourself in the foot with C++ you lose the foot the leg, and part of your hip.
What programming language? Answer. Who Cares.
Learn the difference between compiled and interpreted; When to use which. I've seen asp code calling vb scripts that call other scripts, when the same thing could have been done with 15 lines in a sp.
SQL is SQL left right inner outer joins - joins are joins, inserts are inserts. Learn the difference between functions, subs. I've seen programmers who couldn't code there way out of a while loop.
When I need to write anything I use textpad. I use it to write in any language. I use M$ Complier for any .# or C++ apps I may write.
As to cost. If you buy M$ Visual C++ Enterprise and don't have a DB or Web Server. You just wasted your money.
Start with programming for dummies. Follow the K.I.S.S. rule and don't just focus on the syntax. Learn to be dynamic. Write it ONLY ONCE.
/end rant
edit: Also for the love of GOD, know the difference between vchar and int
whizkid, the budget thing is from personal experience. A product like Visual Studio, for example, tends to be extremely popular and you normally can't get that for free, legally. VC combines C++, VB and J in one single product with some nice, additional features. And if you need help, you will find a lot of materials for VS too. While there are also many free languages, many of them lack a good user-interface (or IDE) for the user to develop from. You might have to end up collecting all kinds of tools just to work properly with a single, free compiler. It just doesn't always integrate nicely together. But this is just personal experience. Anyway, from one of the Wiki's that I linked to, you can get a very nice overview of many available languages, both free and commercial.
About the Perl OS, according to this link, someone is working on it. One is called Perlix and is based upon the Linux kernel, thus not completely written in Perl. The other one is JKOS which isn't actually a real OS according to this article. So the real Perl OS is still work in progress...
EDIT: IDE = Integrated Development Environment...
Integrated Device Electronics WTF does an IDE have to do with programing?Quote:
many of them lack a good user-interface (or IDE)
And
Select * from tblName
is free
------------------------
var fso, output;
fso = new ActiveXObject("Scripting.FileSystemObject");
output = fso.OpenTextFile("C:\\test.txt" , 8, 1, -2);
is free
----------------------
#include <stdio.h>
int main(void)
{
int count;
for (count=1;count<=500;count ++)
printf(“I don’t have a flippen clue.”);
return0;
}
is free
---------------------
But what do I know?
I would recomend PHP for its ease of learning and rapid results.
For proper programing I would recomend choosing an Object Orientated language, something along the lines of Java or C#, both of which are used widely in industry.
I wouldnt venture into C/C++ untill you understand the concepts of programing, it might give you the wrong impression and thus you wont enjoy it.
I wrote an attempt for a tutorial called "Learning to program?" which some seemed to like, but it needs a bit cleaning up. (Which is why I posted it there, not as a tutorial.) Too bad that thread committed suicide. :(
The IDE she was refering to is Integrated Development Environment. :)Quote:
Originally posted here by dinowuff
Integrated Device Electronics WTF does an IDE have to do with programing?
I think the cost is worth it for VC++ (6.0) or VS .NET. And anyway, you can always get student discounts on your software.
A pretty good free editor is Notepad++
Ah Shoot. too many TLA's now days.
Noia said it best.More and more I see applicants that either got their degree/training from the back of a match book cover, or just learned how to pass a test.Quote:
understand the concepts of programing
I am in no way a developer. Give me a blank screen and an idea... Not going to happen. Give me frame work and existing code, I can fix what's broken or add-on.
My point here is learn how to program. Not how to program with some utility/package.
I think that's exactly right. I started programming a little more than three years ago (still learning, btw), and I remember how difficult it was to *really know* how to go about solving a problem. The language was the easy part. It wasn't until maybe about a year ago that the "I know how to solve the problem with code" part really kicked in. The syntax is easy, knowing how to use the operators, the logic, the objects, the methods / functions...is easy. But to be given a problem and know how to best *use* the code to solve the problem / complete the task...is the hard part.Quote:
Originally posted here by dinowuff
Ah Shoot. too many TLA's now days.
Noia said it best.
More and more I see applicants that either got their degree/training from the back of a match book cover, or just learned how to pass a test.
I am in no way a developer. Give me a blank screen and an idea... Not going to happen. Give me frame work and existing code, I can fix what's broken or add-on.
My point here is learn how to program. Not how to program with some utility/package.
In my opinion, I would start with Python or Pascal first, then quickly move to C or C++.
You have no real need to master Python or Pascal.
Honestly, everyone you ask is going to have a different opinion about which language is the best to start with. Just do a search of the forums and you'll find a hundred threads just like this one. :)
I'll give a more general answer: I think any object-oriented language would be a good language to begin with (C++, C#, VB .NET, Java).
Pick a language that has something to do with the area of development you are interested in. Do you want it for system administration? Quick tasks? Web application development? Game development?
KIX Scripts :D
Seriously though, one of the major reasons why people dont take up programing (or atleast what I have seen) is that is seems too hard and you dont get "results" fast enough, this is generaly disheartening for people and they get into thinking "I cant do this" "its too hard" "I suck" "I should vote G. Bush" or some variation on that. This is exactly why I suggested PHP, maybe even Perl, both are simple and easy to get into, offer rapid results and can be quite powerful when put to good use. That said, I would not stick around PHP and Perl for too long, an OO language is going to be better in the long run.
Pascal is a pretty good choice in my opinion. Of course, I'm biased here but Pascal is pretty structural and has a very strict syntax. FreePascal is a good compiler if you don't want to to but the commercial Delphi Pascal compiler. (Delphi is pretty expensive, if you want the professional version, but like many commercial products you might .)Quote:
Originally posted here by Seek&Destroy
In my opinion, I would start with Python or Pascal first, then quickly move to C or C++.
You have no real need to master Python or Pascal.
Unfortunately, Pascal is real good for learning to program (It's the first language I've learned), but it isn't real popular (so I heard) in many businesses. There aren't that many companies that use Pascal for their applications. After the first Visual Studio.NET version became available, Borland Delphi lost a bit of it's market share because people wanted to move over to the new .NET environment which wasn't supported by Delphi.
But just pick whatever language that you have already available. Try it out and if you don't like it, pick another one.
Learning to program isn't easy. It takes time. Don't expect to be an expert within a year if you have zero experience from the start... (And be prepared to deal with many small frustrations because you just can't discover why your code doesn't work... ;))