Singapore Expats

C++ Programming

Discuss about computers & Internet. Including mobile phones, home appliances & other gadgets. Read about Windows security risks or virus updates.
Post Reply
wawro106
Newbie
Newbie
Posts: 10
Joined: Sun, 19 Apr 2009 12:19 pm
Location: Montreal, Canada

C++ Programming

Post by wawro106 » Sun, 19 Apr 2009 1:08 pm

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.

AngMoKio
Regular
Regular
Posts: 91
Joined: Mon, 27 Apr 2009 5:06 pm

Post by AngMoKio » Thu, 30 Apr 2009 4:34 pm

I can. In summary :

1)Best bet is to start with a book.
2)Don't learn C++, learn c# (or Java)
3)If you have any other questions, I'd be glad to help.

User avatar
sierra2469alpha
Editor
Editor
Posts: 1381
Joined: Tue, 27 Feb 2007 10:50 am
Location: Singapore (Finally!)

Post by sierra2469alpha » Thu, 30 Apr 2009 5:45 pm

As much as the titles sound rude, many of the " xxxx for Dummies" - they are usually yellow in colouring, are a good start. There are plenty of web resources for you to learn from also. Make your search engine your friend!

HTH, Mr. P.

OogieBoogie
Regular
Regular
Posts: 130
Joined: Fri, 17 Apr 2009 9:54 am
Location: Singapore East Coast

Post by OogieBoogie » Thu, 30 Apr 2009 5:54 pm

AngMoKio wrote: 2)Don't learn C++, learn c# (or Java)
i second that, learn C#

User avatar
Strong Eagle
Moderator
Moderator
Posts: 11732
Joined: Sat, 10 Jul 2004 12:13 am
Answers: 10
Location: Off The Red Dot
Contact:

Post by Strong Eagle » Thu, 30 Apr 2009 10:39 pm

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.

AngMoKio
Regular
Regular
Posts: 91
Joined: Mon, 27 Apr 2009 5:06 pm

Post by AngMoKio » Fri, 01 May 2009 4:52 pm

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.

User avatar
jpatokal
Moderator
Moderator
Posts: 3004
Joined: Tue, 09 Dec 2003 9:38 pm
Location: Terra Australis Incognita

Post by jpatokal » Fri, 01 May 2009 5:24 pm

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.
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?
Vaguely heretical thoughts on travel technology at Gyrovague

User avatar
Strong Eagle
Moderator
Moderator
Posts: 11732
Joined: Sat, 10 Jul 2004 12:13 am
Answers: 10
Location: Off The Red Dot
Contact:

Post by Strong Eagle » Fri, 01 May 2009 5:32 pm

jpatokal wrote:
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]

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.

User avatar
sierra2469alpha
Editor
Editor
Posts: 1381
Joined: Tue, 27 Feb 2007 10:50 am
Location: Singapore (Finally!)

Post by sierra2469alpha » Fri, 01 May 2009 5:47 pm

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.

OogieBoogie
Regular
Regular
Posts: 130
Joined: Fri, 17 Apr 2009 9:54 am
Location: Singapore East Coast

Post by OogieBoogie » Sat, 02 May 2009 1:17 pm

learn the basis with classic C, then move on C#.
C++ is so messy and complicated and low level...

An easy way to begin to learn programmation is with an Excel. Make VBA macro for Excel spreasheets, it's really easy and you can make really powerfull stuff with it.

User avatar
jpatokal
Moderator
Moderator
Posts: 3004
Joined: Tue, 09 Dec 2003 9:38 pm
Location: Terra Australis Incognita

Post by jpatokal » Sat, 02 May 2009 9:09 pm

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 :)
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!
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.
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?

.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

User avatar
Strong Eagle
Moderator
Moderator
Posts: 11732
Joined: Sat, 10 Jul 2004 12:13 am
Answers: 10
Location: Off The Red Dot
Contact:

Post by Strong Eagle » Tue, 12 May 2009 6:46 am

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

Post Reply

Return to “Computer, Internet, Phone & Electronics”

Who is online

Users browsing this forum: No registered users and 2 guests