PDA

View Full Version : want to learn to code.



ryno
11-28-2006, 08:29 PM
hey im new and really want to learn to code i have almost no experience.
i want to learn probably c++ and java. need some place to start out lerning and need suggestions on where to start.


thanks, Ryno

ShiningArcanine
11-29-2006, 09:53 AM
For C++, you will want to download Microsoft Visual C++ 2005 Express Edition:

http://msdn.microsoft.com/vstudio/express/

Then you will want to get a book, or you could try an online tutorial. Here is the one that I am currently using to myself C++:

http://www.cplusplus.com/doc/tutorial/

Here are two others that I know exist:

http://www.icce.rug.nl/documents/cplusplus/
http://lepslair.com/tutorials/c/

To use any of them, you will want to use the instructions on the following webpage:

http://lepslair.com/tutorials/c/1.php

If you want to learn C++ according to the ANSI standard, which I assume you do, you will want to learn to use unmanaged code, so stay away from anything that involves either .NET or managed code.

I do not know Java and I do not care to learn it so I cannot recommend anything to help you learn it.

ryno
11-29-2006, 04:06 PM
thanks man really helpful :up:



ryno

Qkjhfhaiguihfma
12-01-2006, 09:45 PM
java is really easy to learn, all you need is a book and the jdk.

ahmad
12-04-2006, 04:46 PM
Take the time to work with C# and Java first, then move to C++ if you really want to. Unless you are going into game dev, C++ is almost non-existant in Windows apps now.

flavoraid
12-05-2006, 08:05 AM
im hopping onto the c++ boat

VisiV
12-05-2006, 02:57 PM
funny, you guys say C# and Java first yet my firs C-based language was C++ at the tech college I go to.... Currently into Java right now... of course I am not going into any detail with any of the languages now, they are supposed to be building blocks to learn more... so far....... im not liking Java but that's just me.

Growly
12-05-2006, 03:03 PM
C & C++, IMHO, have a certain je ne sais quoi which pertains to their leetness.

Unlike other languages, however, I do not think they are ones one should learn from the internet. They are structured and rigid and deserve to be learned in just such a manner - discipline you cannot teach yourself but that you need drilled into you.

Not that I'd know, I always wanted to be a pro coder but spent more time stressing about life in general than doing anything.

eshbach
12-05-2006, 07:16 PM
I don't think C++ is too terribly difficult to learn independently. I was doing it in high school without having taken classes, and so were several of my friends.

I don't think C++ is the best language to learn right now, though, especially for someone with no prior background. That's not because it's harder, it's because it's not very modern. That's not to say you can't write very modern programs in C++, as you absolutely can, but many of the "new" features that programming languages like C# have built in have been grafted on to C++ to keep it up to date.

The object oriented paradigm that is exmplified by Java and C# is certainly the most popular school of thought for programming at this point, and C++ is simply too old to really offer the kind of OO thinking that will be useful to programmers working in the field in the years to come.

So, I'd suggest new programmers learn C# and Java, as they are very similar and can be learned simultaneously. The knowledge gained from learning to program will be easily translated to C++ if they choose to learn it as well. The specific considerations and difficulties for C# and Java won't translate as directly, but the real challenge in programming is figuring out how to best solve the problem at hand, not language synatx.

nn_step
12-05-2006, 07:45 PM
I vote go with java, it is alot more "safe" as a language

Bootsy
12-08-2006, 01:29 AM
I have been programing for 20+ years and it's alot like learning a new language, once you get the first one down , you can build on that to learn new languages. Over the years I have programmed in: C, C#, C++, Powerbuilder,Visual Basic, Delphi, Gupta, Java

I would go with Java as well, C# is microsoft's answer to Java the syntax is almost identical. Java has many free IDE's(Eclipse is what I use) you can use to learn. Java and C# are the most marketable skills right now if you are looking for a programming job. If you just want to do it for fun then pick whatever you feel comfortable with.

The most important thing to learn is programming concepts like Objects, Inheritance, Polymorphism, Design Patterns..etc

Just my 2 cents.

djgandy
12-08-2006, 12:29 PM
Take the time to work with C# and Java first, then move to C++ if you really want to. Unless you are going into game dev, C++ is almost non-existant in Windows apps now.

Really? I'd like to see you back that up :D

bouc
12-08-2006, 05:38 PM
c is really rigid but teachfull, go to c++ it's my life ;) anything other is...

nn_step
12-08-2006, 05:39 PM
c is really rigid but teachfull, go to c++ it's my life ;) anything other is...
Try D, you might like it

Asazman
12-08-2006, 07:53 PM
i think your best bet would be choosing something and sticking with it until the end, instead of jumping around a lot. once you get the hang of one the others won't be hard :)

djgandy
12-09-2006, 12:46 PM
A language is just a way to express a problem. You could learn the syntax of every language, but still not be able to program.

The most important thing in programming is practice. The language is only a tool. If you don't know what you want to do or the best way to use the tool you're not going to get anywhere.

ahmad
12-09-2006, 12:55 PM
Really? I'd like to see you back that up :D

Well if you look at the majority of webapps (most popular thing now), servlets, interfaces.. most of it is being done in Java/C#.

Also with Vista, Microsoft is pushing everyone to go .NET. Once you go .NET, there is absolutely no point to go with C++ or C since it's all run the same way. And with the C# compiler improving with every release, C# will be used for games as well.

And the other thing: C++ and C are very powerful languages. So powerful that you will waste a lot of time getting used to pointers and dynamic memory allocation that you will miss out on a lot of other stuff (in terms of time spent).

Compare Threads for example in C++ and C#/Java.... Its almost 2 lines to run another thread in C#/Java.

My point is, learn about programming and if you like it a lot and want to see what you can really do with an unrestricted (or less anyways) language, go with C/C++.

Besides, C# has many many things which you can do in C++ as well (operator overloading, structs/enums, block arrays and a few others). These are things that you can't do in Java.

I have done them all, and if I were to do things again, thats how I would go about it.

djgandy
12-09-2006, 02:50 PM
I can make a thread in c++ with 1 line :p. Threads are an operating system feature.
Pointers are easy, DMA is easy. Once you know about them and how they work it makes programming a lot easier too.

Anything that requires any decent type of protection won't go C#.
It makes me laugh, you see new anticheats written in C# all the time. That's just an instant fail. There are plenty of programs that turn C# into source code.

C# is great for busting out some quick app or whatever, but for serious projects with teams of people the advantages it has are lost.

Not really sure what you mean by webapps. I have seen some .net asp webapps like for process control but thats about it. I've used a few C# apps and most of them have a poor feel to them. Same with java too, everything feels slower.

Games in C#. I hope not.

Teratism
12-11-2006, 09:10 PM
There is always python or perl.

ahmad
12-12-2006, 07:02 PM
No offense, but it doesn't sound like you have used C# or .NET for that matter.

Yes it is easy to do all these things once you learn them, but you don't start doing integrals before you do derivatives, even though integrals are easy :p:


I can make a thread in c++ with 1 line :p. Threads are an operating system feature.
Pointers are easy, DMA is easy. Once you know about them and how they work it makes programming a lot easier too.

Anything that requires any decent type of protection won't go C#.
It makes me laugh, you see new anticheats written in C# all the time. That's just an instant fail. There are plenty of programs that turn C# into source code.

C# is great for busting out some quick app or whatever, but for serious projects with teams of people the advantages it has are lost.

Not really sure what you mean by webapps. I have seen some .net asp webapps like for process control but thats about it. I've used a few C# apps and most of them have a poor feel to them. Same with java too, everything feels slower.

Games in C#. I hope not.

Bei Fei
12-12-2006, 08:19 PM
I have a computer science BA degree. I believe that you need to lean the basic programming fundamentals that apply to almost all the languages listed in this topic. I personally would not start with GUI based languages. By GUI based languages I mean drag and drop programming. I started with assembly language with early 8086 processors.

djgandy
12-14-2006, 03:19 AM
I'd say assembler too, but i don't think that would be a popular choice with most people. It's the best way to learn the logic though, and you will understand memory, dma, pointers and just about everything a lot quicker.

Ahmad, i haven't written in C# before but i listed a few of it's downfalls. How are you going to charge £30 for a program which can be turned to source code? Protection is an issue. That's why it think it won't take over from C++.

I haven't really seen any large software that uses C# either. Everything i can think of that i use daily is written in c++.

eshbach
12-15-2006, 01:26 AM
I'd say assembler too, but i don't think that would be a popular choice with most people. It's the best way to learn the logic though, and you will understand memory, dma, pointers and just about everything a lot quicker.

Ahmad, i haven't written in C# before but i listed a few of it's downfalls. How are you going to charge £30 for a program which can be turned to source code? Protection is an issue. That's why it think it won't take over from C++.

I haven't really seen any large software that uses C# either. Everything i can think of that i use daily is written in c++.

.NET source code can be obfuscated... how is protection an issue? If I don't want my program to be decompiled, I run it through microsoft's obfuscator and then it's safe.

as far as "being a language" goes, C# is the most advanced. It is the most object oriented, it has the most complete class libraries, and it offers the best performance of any non-native language. It's very flexible in that you can write entirely without caring about memory, use dynamic arrays, and write completely managed code, or you can use pointers and do basically anything you want. It has the right blend of power and rapid-development to be microsoft's new star language, and I think we'll see it slowly start taking up C++'s market space on the windows platform, particularly when Vista becomes mainstream.

for an example of popular program written in C#, look at Microsfot SQL Management Studio 2005. that thing is used everywhere these days.

uOpt
12-15-2006, 11:57 AM
There's no reason to go Visual Studio for C++.

Any of the free (gcc based) toolkits will do for first steps.

Be warned that C++ is only a useful language if you can devote at least 20 hours a week to it, and for many months in a row. It is an extremely complicated language with a lot of baggage. And before you know all the baggage you write really really lousy code. Nobody gives any C++ jobs to people who don't know all the crazy details. Don't underestimate this warning, you can waste huge amounts of time here.

Having said that, if you can dig it, go for it. Much better than the wimp languages like Java and C# :) [note friendly nagging, nothing serious guys]

djgandy
12-23-2006, 01:15 AM
.NET source code can be obfuscated... how is protection an issue? If I don't want my program to be decompiled, I run it through microsoft's obfuscator and then it's safe.

It's not :)


for an example of popular program written in C#, look at Microsfot SQL Management Studio 2005. that thing is used everywhere these days.

:confused: :eek:

Renfield
12-25-2006, 02:07 PM
Try D, you might like it

Very much agreed

In my opinion...
Original poster should learn C++ first. After that, java, C#, and D are much more approachable. But that's just syntax. Programming is learning how to write efficient code, and think and plan in a logical and algorithmic manner. C++ won't baby you with garbage collection, and it's a good basis for learning OOP methods. After that, using an individual language is just the matter of choosing the right tool for the right job.

As far as language features go:
C++ for almost anything.
D for application development targeted architecture.
C# for collaborative efforts at windows programs.
Java ideal for web based, or highly portable programs where performance isn't an issue.

As far as why I like D...
Note: the following may contain jargon.

D offers up to 80-bit floating points, in-line assembly, associative (non-integer indexed) arrays, standard libarary support for fast array manipulation (very speedy array resizing), manual or automatic garbage collection (mem management), class type support for semaphore-based mutual exclusion in threads, and good automatic documentation generation.

Unless you plan to either make a career from it, or you need a big basis for (corporate) collaboration, stay clear of C#. It's far too integrated with the .NET IDE: not as simple as just writing a text file and compiling it. While that does allow for some quick shortcuts, and the IDE's MISL compilation means that you can compile code from other languages into the project, it's hurt in several other areas. Slow object-based arrays (with pretty useless class functions: sort limited to 1D?), limited access to explicit memory management, object-based unicode-required strings requiring quite a bit of overhead, nastily formatted XML documentation generation.

Whoops, sorry to rant!

Teratism
12-25-2006, 02:24 PM
So far we have
.Net
Assembly
Basic
C
C++
C#
D
Delphi
Gupta
Java
Perl
Powerbuilder
Python
Ruby
Visual Studio (encompassing Visual Basic, Visual C++, Visual C#, Visual J#, Visual Web Developer)

Anything else for the aspiring coder?

nn_step
12-25-2006, 05:17 PM
a working computer and the desire to learn

ahmad
12-25-2006, 07:00 PM
I have a computer science BA degree. I believe that you need to lean the basic programming fundamentals that apply to almost all the languages listed in this topic. I personally would not start with GUI based languages. By GUI based languages I mean drag and drop programming. I started with assembly language with early 8086 processors.


A comp sci BA degree?

....

Perhaps you are in the wrong section.

justin_c
01-03-2007, 07:54 PM
well, i guess its time to improve my c++ skills; i still don't get assembler.
last time i did some simple stuff in C was 4 years ago when i still was a computer noob.

do you guys use dev-cpp? there are 1362 c++ books @ my local bookstore's website: http://www.chapters.indigo.ca/books/search?keywords=c%2b%2b&pageSize=10
which publisher, and does out of date (a year or two) mean anything?

nn_step
01-03-2007, 07:57 PM
Dev-C++ works rather nicely
and it doesn't matter if the Book was written a decade ago, most of the ideas for how to program never change.
Don't Bother with assembly unless you want to make your own compiler or work with low level

eshbach
01-03-2007, 08:28 PM
I used to reccommed DevC++ for people looking for freebies, but since Visual C++ Express came out, I've been reccommending that instead.

If you're comfortable with DevC++ there's no immediate need to switch, but the MS environment is nicer even if you want nothing to do with MFC/ATL/.NET

I even know a few unix people who run visual studio in a VM because they like the code editor better.

ahmad
01-03-2007, 11:52 PM
Don't Bother with assembly unless you want to make your own compiler or work with low level

Only the very basic C compiler is in assembly. Most compilers available now are written in either C or C++.

The only reason one needs assembly now is if they are going to do embedded/realtime systems programming (like you said).

uOpt
01-04-2007, 01:45 PM
2 years age for a C++ books is nothing.

Be sure to put up some of the "tips and tricks" kinds of books such as "Effective C++". You'll need it.

Assembly is needed e.g. if you want to make actual good use of SSE, and to look at some functions you compiled so that you can see which constructs make what assembly. That is extremely useful to spot performance accidents such as involuntary copying of objects.

There is no need to write assembly code as such but you should be able to read the assembly output of the compiler.