36 Replies - 4685 Views - Last Post: 13 May 2012 - 01:16 PM
#1
I'm new to the world of programming
Posted 29 May 2009 - 10:45 AM
Replies To: I'm new to the world of programming
#2
Re: I'm new to the world of programming
Posted 29 May 2009 - 11:15 AM
#3
Re: I'm new to the world of programming
Posted 29 May 2009 - 11:25 AM
Dark_Necros, on 29 May, 2009 - 09:45 AM, said:
I depends on what kind of programs you want to write.
Games, audio, graphics are usually written in C/C++. database is often C# or Visual Basic. there are always exceptions to those but that's a general guideline. I'd look at getting a book on general programming concepts and object oriented programming. C/C++/C# are good languages to start with. Java is decent too. VB is fine, but I'd go with C and it's derivatives.
#4
Re: I'm new to the world of programming
Posted 29 May 2009 - 11:53 AM
#5
Re: I'm new to the world of programming
Posted 29 May 2009 - 06:26 PM
Stay away from C, C++ and Java for now.
#6
Re: I'm new to the world of programming
Posted 29 May 2009 - 06:35 PM
#7
Re: I'm new to the world of programming
Posted 29 May 2009 - 06:58 PM
IngeniousHax, on 29 May, 2009 - 05:35 PM, said:
Languages itself don't teach anything - they are tools. I've seen people write horrendous code in every language I know.
The reason not to study C\C++ - pointers. Everyday I see newbies asking a questions about their C code not working, because they have absolutely no idea how pointers, memory, and arrays work. And I don't blame them. That's a very tough topic that takes a long time to master. If you are new, stay away from it.
Why would the following code result in a segmentation error? I can bet you that not a single newbie will be able to figure it out. You need to have the understanding of the program structure and its memory layout in order to figure it out.
char* str = "Text"; str[0] = 'T';
The reason not to study Java - OOP. Having to think in terms of classes as a newcommer is very daunting. Having every variable act as a pointer doesn't help either.
What would you rather choose for beginner to code:
public class Test {
public static void main(String[] args) {
System.out.println("Hello World");
}
}
Or:
PRINT "Hello World" END
And I'm not even talking about using Java for I/O. Ew.
This post has been edited by Dantheman: 29 May 2009 - 07:19 PM
#8
#9
Re: I'm new to the world of programming
Posted 29 May 2009 - 07:28 PM
Touche, I do see your point adn you have swayed me.
#10
Re: I'm new to the world of programming
Posted 29 May 2009 - 07:46 PM
IngeniousHax, on 29 May, 2009 - 06:28 PM, said:
Touche, I do see your point adn you have swayed me.
This is what's happening in the above code:
The string "Text" is already known at the compile-time, so the compiler will create that string in the special part of your program's memory - read-only segment of the static memory. Such memory cannot be changed throughout your program's lifetime. And yet, I am trying to modify it. That's when the Operating System halts my program, because it's trying to do very naughty things.
The way around it is - create a string somewhere else. We can create such string on the stack by using a char array:
char str[] = "Text"; str[0] = 'T';
Or on the heap by using a pointer:
char *ptr = new char[5]; strcpy(ptr, "Text"); ptr[0] = 'T';
Yeah, this is not something that I would advise any beginner to fiddle around with, it will only frustrate them and in some cases might even discourage from programming. Glad I changed your mind :-)
This post has been edited by Dantheman: 29 May 2009 - 07:59 PM
#11
Re: I'm new to the world of programming
Posted 29 May 2009 - 07:51 PM
#12
Re: I'm new to the world of programming
Posted 29 May 2009 - 08:32 PM
Dark_Necros, on 29 May, 2009 - 09:45 AM, said:
I think you should take a class in C.
Or read a good C book, and practice, and see if you like it! If its flowing really good, and your learning quite a bit, move on to C++
In college, I did take the squence of VB.net before i took CS classes. I do think that it made it easier to move on to C++.
If you do decide to try VB for awhile, it will teach you stuff that can be applied to C/C++
Personally, i have taken VB.net, a little C#, and C++, and C++ is more challenging and more rewarding to code.
Although, you could play aroudn with VB for awhile to get the hang of loops, functions, tests, etc...
#13
Re: I'm new to the world of programming
Posted 29 May 2009 - 09:49 PM
Quote
I came here looking for a
Hello World!
: (
#14
Re: I'm new to the world of programming
Posted 29 May 2009 - 10:57 PM
#15
Re: I'm new to the world of programming
Posted 01 June 2009 - 11:39 AM
|
|

New Topic/Question
Reply



MultiQuote









|