SINGAPORE EXPATS FORUM
Singapore Expat Forum and Message Board for Expats in Singapore & Expatriates Relocating to Singapore
C++ Programming
C++ Programming
Hey,
Was wondering if anyone would be willing to teach me some programming. Quick learner, would appreciate if someone could get me up to speed on some of the basics.
Was wondering if anyone would be willing to teach me some programming. Quick learner, would appreciate if someone could get me up to speed on some of the basics.
- sierra2469alpha
- Editor
- Posts: 1381
- Joined: Tue, 27 Feb 2007 10:50 am
- Location: Singapore (Finally!)
-
- Regular
- Posts: 130
- Joined: Fri, 17 Apr 2009 9:54 am
- Location: Singapore East Coast
- Strong Eagle
- Moderator
- Posts: 11650
- Joined: Sat, 10 Jul 2004 12:13 am
- Location: Off The Red Dot
- Contact:
Look, all programming languages are essentially the same. What differs is the syntax (where the hell do I put the ';' or '#'), reserved words and functions, and order of arguments in functions. So, if you learn to program in C++, you can pretty easily learn to program in C#, Pascal, PHP, and yes, even VBA.
What you need to learn programming is:
Basic concepts... language syntax, operations, functions, compiling, etc.
Learn something about how to access files and databases... you need to bit of SQL to write useful programs.
Understanding of object oriented programming - this is key to being a good programmer
Learning algorithms to do things... how do you construct a linked list, for example.
Like the others have said, get a book. Get a free compiler and install it. Write a 'hello world' program. Then try to do something you really want to do.
My first attempt at php programming was a photo album that stored thumbnails in a database, along with descriptions.
http://www.herbhost.com/seasia
The best way to learn is with a book to help you understand syntax and functions and the attitude that you will not break anything by trying to write something.
What you need to learn programming is:
Basic concepts... language syntax, operations, functions, compiling, etc.
Learn something about how to access files and databases... you need to bit of SQL to write useful programs.
Understanding of object oriented programming - this is key to being a good programmer
Learning algorithms to do things... how do you construct a linked list, for example.
Like the others have said, get a book. Get a free compiler and install it. Write a 'hello world' program. Then try to do something you really want to do.
My first attempt at php programming was a photo album that stored thumbnails in a database, along with descriptions.
http://www.herbhost.com/seasia
The best way to learn is with a book to help you understand syntax and functions and the attitude that you will not break anything by trying to write something.
The reason I suggest c# (or Java) is because the concepts are more truly object oriented, easier to learn and the syntax tends to install fewer bad habits.
It also reads closer to English, is more internally consistent and doesn't have much of the strange syntax baggage brought over from C.
Much of this is due to its strongly typed nature and proper embrace of generics. Its garbage collection is also a big plus for beginning programmers.
Believe me, this is coming from a long time C++ coder, who still does most of his work in c++ or managed c++.
You do have point however, its not that difficult to go from c# to c++.... but why would you want to unless the job requires?
Also, as strange as it sounds, those Dummy books can get you up to speed fairly quickly... I'll second that approach also.
It also reads closer to English, is more internally consistent and doesn't have much of the strange syntax baggage brought over from C.
Much of this is due to its strongly typed nature and proper embrace of generics. Its garbage collection is also a big plus for beginning programmers.
Believe me, this is coming from a long time C++ coder, who still does most of his work in c++ or managed c++.
You do have point however, its not that difficult to go from c# to c++.... but why would you want to unless the job requires?
Also, as strange as it sounds, those Dummy books can get you up to speed fairly quickly... I'll second that approach also.
True, but C++ is an exceptionally bad place to start learning, because it's a thin layer of hirsutely complex object orientation crufted on top of the bit-bashing 1970s raw power of C. My girlfriend went through introductory programming just last year at NTU and she found Java far easier to deal with than C, because you don't need to boggle your mind with pointers, memory allocation and all that low-level stuff, and even the library names are more intuitive and userfriendly. strncmp() and strncpy() vs String.compare() and String.substring(), anybody?Strong Eagle wrote:Look, all programming languages are essentially the same. What differs is the syntax (where the hell do I put the ';' or '#'), reserved words and functions, and order of arguments in functions. So, if you learn to program in C++, you can pretty easily learn to program in C#, Pascal, PHP, and yes, even VBA.
Vaguely heretical thoughts on travel technology at Gyrovague
- Strong Eagle
- Moderator
- Posts: 11650
- Joined: Sat, 10 Jul 2004 12:13 am
- Location: Off The Red Dot
- Contact:
True, but C++ is an exceptionally bad place to start learning, because it's a thin layer of hirsutely complex object orientation crufted on top of the bit-bashing 1970s raw power of C. My girlfriend went through introductory programming just last year at NTU and she found Java far easier to deal with than C, because you don't need to boggle your mind with pointers, memory allocation and all that low-level stuff, and even the library names are more intuitive and userfriendly. strncmp() and strncpy() vs String.compare() and String.substring(), anybody?[/quote]jpatokal wrote:
Otay... I agree with that. And... pointers are good poo for the advanced programmer. Maybe the OP will chime in with why they want to program.
- sierra2469alpha
- Editor
- Posts: 1381
- Joined: Tue, 27 Feb 2007 10:50 am
- Location: Singapore (Finally!)
Ah, BUT, the low level stuff is always important. Remember PL/I? Half the reason crap apps happen these days is programmers rely on the so-called "language", O/S, or wrap-around layer for their code rather than proper programming skills. I've seen more crap Java code than COBOL, LOL 
If you don't want to go with the Dummy books I suggested, then get a free Fortran compiler, and learn programming from the heart. Either that or learn the original C, and write your own operating system add-ons to UNIX!
Learning something from the olden days will make you better equipped to funnel your career into real understanding, rather than someone who can make a nice widget.
My 2c worth anyway, Mr. P.

If you don't want to go with the Dummy books I suggested, then get a free Fortran compiler, and learn programming from the heart. Either that or learn the original C, and write your own operating system add-ons to UNIX!
Learning something from the olden days will make you better equipped to funnel your career into real understanding, rather than someone who can make a nice widget.
My 2c worth anyway, Mr. P.
-
- Regular
- Posts: 130
- Joined: Fri, 17 Apr 2009 9:54 am
- Location: Singapore East Coast
COBOL, schnobol. You young punks with your fancy interpreted languages and punch cards... back when I was your age, we had to program raw assembly language by toggling bits on and off manually, AND WE LIKED IT!sierra2469alpha wrote:Ah, BUT, the low level stuff is always important. Remember PL/I? Half the reason crap apps happen these days is programmers rely on the so-called "language", O/S, or wrap-around layer for their code rather than proper programming skills. I've seen more crap Java code than COBOL, LOL
Somewhat more seriously -- no, that's ridiculous. Of course the core concepts of programming (abstraction, algorithms, reusability, patterns etc) are the same across languages and across the ages, but that's like telling somebody to start their studies of French by first inhaling Latin declensions because, hey, that's what French originates from. Or do you really think people should start off with 6502 assembler?Learning something from the olden days will make you better equipped to funnel your career into real understanding, rather than someone who can make a nice widget.
.word $c000
*=$c000
MAIN: LDX #$00
Loop: LDA hello,x
CMP #$00
BEQ Out
JSR CHROUT
INX
JMP Loop
Out: RTS
hello: .asc "hELLO, WORLD!"
.byt 13,0
Vaguely heretical thoughts on travel technology at Gyrovague
- Strong Eagle
- Moderator
- Posts: 11650
- Joined: Sat, 10 Jul 2004 12:13 am
- Location: Off The Red Dot
- Contact:
I am providing a link to a bit of programming history in the hopes that it may help the OP determine which language to learn.
Cheers.
http://james-iry.blogspot.com/2009/05/b ... wrong.html
and one near and dear to me.
http://www.mdarwin.ca/humour/whats-this-hoopla.phtml
Cheers.
http://james-iry.blogspot.com/2009/05/b ... wrong.html
and one near and dear to me.
http://www.mdarwin.ca/humour/whats-this-hoopla.phtml
Who is online
Users browsing this forum: No registered users and 13 guests