Off Topic: The Flood
This topic has moved here: Subject: Taking on programming
  • Subject: Taking on programming
  • Pages:
  • 1
  • 2
  • of 2
Subject: Taking on programming

so flood, i just started a basic tutorial on c++.
any good advice or tips you can hand me out?

  • 12.01.2012 6:47 PM PDT

iPhone 4S 64GB Black.

Make a programme.

  • 12.01.2012 6:48 PM PDT

Link or it didn't happen.

Advice? Don't start with C++.

  • 12.01.2012 6:49 PM PDT


Posted by: TomoK12
Make a programme.

Sounds like something that doesn´t has anything to do with programming, lol.

  • 12.01.2012 6:49 PM PDT


Posted by: ferza 11
Advice? Don't start with C++.

with which one should i?

  • 12.01.2012 6:50 PM PDT

I play halo 3 for enjoyment. I've noticed this game and community has changed alot since it's release.

C or Java

Posted by: JusT CoLL

Posted by: ferza 11
Advice? Don't start with C++.

with which one should i?

  • 12.01.2012 6:50 PM PDT

RIP Logan ~B.B.

Always increment you loop control variables appropriately.

  • 12.01.2012 6:51 PM PDT

iPhone 4S 64GB Black.


Posted by: JusT CoLL

Posted by: TomoK12
Make a programme.

Sounds like something that doesn´t has anything to do with programming, lol.

"...doesn't has..."

What?

  • 12.01.2012 6:52 PM PDT

Is it your first language ever? I HIGHLY recommend you learn python first. If you are an absolute fresh out of the box noob, learn from this.

[Edited on 12.01.2012 6:52 PM PST]

  • 12.01.2012 6:52 PM PDT

Tank beats everything!

I started with Python, and then switched to C++. Learning Python was sort of helpful, it was just basically easier to read and comprehend than C++.

  • 12.01.2012 6:53 PM PDT

RIP Logan ~B.B.


Posted by: ferza 11
Advice? Don't start with C++.

Any object-orientated, C-based language is fine to start with. If you learn one of them, you know them all. I think most schools have been gravitating towards Java as the intro language.

  • 12.01.2012 6:53 PM PDT


Posted by: XxxBanexxX
Is it your first language ever? I HIGHLY recommend you learn python first. If you are an absolute fresh out of the box noob, learn from this.

i´m absolutely one, checking link right now.

  • 12.01.2012 6:54 PM PDT
  • gamertag: [none]
  • user homepage:

This is the book I used when I was first learning ten years ago. Get it or something similar. Set realistic goals (e.g. a chapter a night).

  • 12.01.2012 6:54 PM PDT

RIP Logan ~B.B.

Also, watch out for fenceposts. Will happen constantly when you start out.

  • 12.01.2012 6:57 PM PDT
  •  | 
  • Exalted Mythic Member

I am...whimsical today.

If you're using Quincy know that sometimes it will show a character as being in the file, but not actually compile that characther. Select your whole code, cut, and then paste to reveal the bits it's missed.

Non-specific compiler advice: Practice writing code. Get a feel for the stuff your code can do, and for the stuff your code can't do.
Also get a feel for the stuff your code can do, but will spend an age doing.

Don't be afraid to create functions outside your 'main' program. If you need to do the same thing a few different times it's easier to create a function that does what you need to do, and then call that rather than writing out whatever it is you need to do several times.

As a general bit of advice, get into the habit of structuring your code so that others can read it easily. Indent nested expressions, for example. Commenting your code, even if it's just for you to refer to later, is very helpful. If you'd like someone else to read over your program it's a MUST

  • 12.01.2012 6:57 PM PDT


Posted by: Obi Wan Stevobi
Also, watch out for fenceposts. Will happen constantly when you start out.

fenceposts?

  • 12.01.2012 7:00 PM PDT


Posted by: Guscon
If you're using Quincy know that sometimes it will show a character as being in the file, but not actually compile that characther. Select your whole code, cut, and then paste to reveal the bits it's missed.

Non-specific compiler advice: Practice writing code. Get a feel for the stuff your code can do, and for the stuff your code can't do.
Also get a feel for the stuff your code can do, but will spend an age doing.

Don't be afraid to create functions outside your 'main' program. If you need to do the same thing a few different times it's easier to create a function that does what you need to do, and then call that rather than writing out whatever it is you need to do several times.

As a general bit of advice, get into the habit of structuring your code so that others can read it easily. Indent nested expressions, for example. Commenting your code, even if it's just for you to refer to later, is very helpful. If you'd like someone else to read over your program it's a MUST

thanks for the general advice, a programmer from my college said that too. i think i´ll stick to python for now.

  • 12.01.2012 7:02 PM PDT

Are you in college? You could take a computer science class.

  • 12.01.2012 7:04 PM PDT
  •  | 
  • Exalted Mythic Member

I am...whimsical today.

Posted by: JusT CoLL
Posted by: Obi Wan Stevobi
Also, watch out for fenceposts. Will happen constantly when you start out.
fenceposts?
I'd assume he means the ';' and the end of a line, if only for the amount of time that's stopped my code from successfully compiling :)

  • 12.01.2012 7:05 PM PDT

RIP Logan ~B.B.


Posted by: JusT CoLL

Posted by: Obi Wan Stevobi
Also, watch out for fenceposts. Will happen constantly when you start out.

fenceposts?

They call fenceposting being off by one iteration. This happens a lot because array indexes start at 0, but we logically always start counting at one. If you are trying to do something like display a list, and the last expected result is missing, the first expected result is missing, or you get an out of bounds error, you probably fenceposted. The last index of an array is the same as the size of the array-1. You will forget that -1 many times in your life.

They call it a fencepost because people often make one too few fenceposts when building a fence. If you want to fence a 100 ft line, with posts every 10 ft, you need 11 fence posts. Most people assume 10 because 100/10=10, but they forget they need a post at 0 as well.

[Edited on 12.01.2012 7:10 PM PST]

  • 12.01.2012 7:06 PM PDT


Posted by: Obi Wan Stevobi

Posted by: JusT CoLL

Posted by: Obi Wan Stevobi
Also, watch out for fenceposts. Will happen constantly when you start out.

fenceposts?

They call fenceposting being off by one iteration. This happens a lot because array indexes start at 0, but we logically always start counting at one. If you are trying to do something like display a list, and the last expected result is missing, the first expected result is missing, or you get an out of bounds error, you probably fenceposted. The last index of an array is the same as the size of the array-1. You will forget that -1 many times in your life.

i see, thanks for the advice :)

  • 12.01.2012 7:09 PM PDT

seems like a very freuent problem, but this will help me to evade that mistake.

  • 12.01.2012 7:12 PM PDT
  • gamertag: [none]
  • user homepage:


Posted by: WitchDocktor
I'm having an issue, when i type,

print, "Hello world!"

it gives me a syntax error
Remove the comma after print. It should look like this.

  • 12.01.2012 7:32 PM PDT

  • Pages:
  • 1
  • 2
  • of 2