Pages: [1] 2 :: one page |
Author |
Thread Statistics | Show CCP posts - 0 post(s) |

ReaperOfSly
Gallente Lyrus Associates The Star Fraction
|
Posted - 2008.09.09 19:38:00 -
[1]
I've been teaching myself C++ and only have about 2 weeks of learning under my belt. I'm comfortable with strings, arrays, pointers (more or less), functions, what the various data types are, how to use relational operators, etc. Just starting to play around with classes and structs. But I'm very much aware that I have a hell of a lot to learn. Since I'm not taking a class, how do I tell when I am "competent" at C++? __________________________
Quote: ...bored, skint, no charter, and a ship that looks like an explosion in a girder factory...
|

ReaperOfSly
Gallente Lyrus Associates The Star Fraction
|
Posted - 2008.09.09 19:38:00 -
[2]
I've been teaching myself C++ and only have about 2 weeks of learning under my belt. I'm comfortable with strings, arrays, pointers (more or less), functions, what the various data types are, how to use relational operators, etc. Just starting to play around with classes and structs. But I'm very much aware that I have a hell of a lot to learn. Since I'm not taking a class, how do I tell when I am "competent" at C++? __________________________
Quote: ...bored, skint, no charter, and a ship that looks like an explosion in a girder factory...
|

CryoHead
|
Posted - 2008.09.09 19:51:00 -
[3]
When you'll look like this or this.

|

CryoHead
|
Posted - 2008.09.09 19:51:00 -
[4]
When you'll look like this or this.

|

Keta Min
Pre-nerfed Tactics
|
Posted - 2008.09.09 21:36:00 -
[5]
when you've finished some projects and your stuff works without shit suddenly exploding.
|

Vabjekf
|
Posted - 2008.09.09 21:48:00 -
[6]
when you start wishing you had picked another language
|

ReaperOfSly
Gallente Lyrus Associates The Star Fraction
|
Posted - 2008.09.09 22:23:00 -
[7]
Originally by: Keta Min when you've finished some projects and your stuff works without shit suddenly exploding.
The most complicated thing I've managed so far is a prime number generator.  __________________________
Quote: ...bored, skint, no charter, and a ship that looks like an explosion in a girder factory...
|

Norwood Franskly
Minmatar Fleet of the Damned Dark Trinity Alliance
|
Posted - 2008.09.09 23:40:00 -
[8]
I did what you did, taught myself C++ out of a book it was painful as all hell learning it. I know C really well (work with it almost daily). I wanted to write a quick gui front end for some stuff I'd written (needed to connect to an oracle DB extract data, then tidy it up and display it to the user once my C program had finished with it). I thought no problem C++ will be a breeze.
I bought a few books and dived right into it *ugh* its a messy messy language to work with, don't get me wrong I love my C but C++ has just had so many things crammed into it over the years I get the feeling it's about to collapse under it's own bloated weight at any minute. I got my project done but it wasn't pretty, haven't really touched C++ since then. A guy at work introduced me to Perl I love it, absolutely perfect language when you need to throw something together quickly that just works, haven't looked back since then.
As for your question I'd recommend wrapping your head around classes and templates when you can make sense of those two things you should be well on your way to being competent with the language.
|

Sharupak
Minmatar Brutor tribe
|
Posted - 2008.09.10 00:17:00 -
[9]
Originally by: CryoHead
When you'll look like this or this.

Nah, thats what they look like when they are still in high school. This is what they look like when they get employed as a programmer... Linkage _______________________________________________ RuntimeError: ChainEvent is blocking by design, but you're block trapped. You have'll have to find some alternative means to do Your Thing, dude. |

NanDe YaNen
The Funkalistic
|
Posted - 2008.09.10 00:20:00 -
[10]
Programming is a means to an end. Choose an end that requires programming. When you do that, if it was too easy or short of your goals, pick something a little harder.
Whatever you do, I recommend setting your intermediate goals at very short intervals that don't require a lot of work to achieve. I've tried learning to program in one fell swoop. I eventually learned how while working on small hello-world type stuff in OGRE. Adding little bite-sized pieces of functionality without paying attention to overall design.
You're usually not smart enough at overall design to be able to efficiently worry about it for a long time. It's like a virgin talking about relationships, or an Eve player talking about getting laid ---------------------------------------
Originally by: Red Raider A happy gamer isnt on the forums, they are playing the game unless they have an idea that they honestly think is helping out.
|

Sharupak
Minmatar Brutor tribe
|
Posted - 2008.09.10 00:34:00 -
[11]
Originally by: ReaperOfSly
Originally by: Keta Min when you've finished some projects and your stuff works without shit suddenly exploding.
The most complicated thing I've managed so far is a prime number generator. 
LOL! I just did the regular number counter one time and I was curious to see how long the computer would take to count to a million.
It takes a long ****ing time LOL! _______________________________________________ RuntimeError: ChainEvent is blocking by design, but you're block trapped. You have'll have to find some alternative means to do Your Thing, dude. |

ReaperOfSly
Gallente Lyrus Associates The Star Fraction
|
Posted - 2008.09.10 09:37:00 -
[12]
Originally by: Sharupak
Originally by: ReaperOfSly
Originally by: Keta Min when you've finished some projects and your stuff works without shit suddenly exploding.
The most complicated thing I've managed so far is a prime number generator. 
LOL! I just did the regular number counter one time and I was curious to see how long the computer would take to count to a million.
It takes a long ****ing time LOL!
That's odd. It takes my program 3 and a half minutes to find all the primes between 1 and 100 million. Regular numbers (if I remember correctly are factors of a power of 60) should be much easier to find. They'll just be of the form 2^i * 3^j * 5^k. Just count up each of the i's j's and k's.
Okie dokie, I'll have a crack at this. __________________________
Quote: ...bored, skint, no charter, and a ship that looks like an explosion in a girder factory...
|

ReaperOfSly
Gallente Lyrus Associates The Star Fraction
|
Posted - 2008.09.10 10:25:00 -
[13]
Almost done, I'm just stuck on trying to create a quicksort algorithm for my array of regular numbers. It keeps accusing me of trying to convert doubles into chars, which is blatently untrue. The word "char" doesn't even APPEAR in the code.  __________________________
Quote: ...bored, skint, no charter, and a ship that looks like an explosion in a girder factory...
|

Victor Valka
Caldari Kissaki Corporation
|
Posted - 2008.09.10 10:29:00 -
[14]
Originally by: ReaperOfSly
Originally by: Sharupak
Originally by: ReaperOfSly
Originally by: Keta Min when you've finished some projects and your stuff works without shit suddenly exploding.
The most complicated thing I've managed so far is a prime number generator. 
LOL! I just did the regular number counter one time and I was curious to see how long the computer would take to count to a million.
It takes a long ****ing time LOL!
That's odd. It takes my program 3 and a half minutes to find all the primes between 1 and 100 million. Regular numbers (if I remember correctly are factors of a power of 60) should be much easier to find. They'll just be of the form 2^i * 3^j * 5^k. Just count up each of the i's j's and k's.
Okie dokie, I'll have a crack at this.
No. He meant something like this:
### i = 0 x = 1000000 #one million
while i <= x - 1: i += 1
print i ### Take Py ~2sec. Unless you're a complete beginner and do something in the tune of:### i = 0 x = 1000000 #one million
while i <= x - 1: i += 1 print i
print i ### This takes so much more time.... 
Originally by: Spaztick You are not outnumbered, you are in a target-rich environment.
|

ReaperOfSly
Gallente Lyrus Associates The Star Fraction
|
Posted - 2008.09.10 10:51:00 -
[15]
I don't see the difference except the second one outputs twice. __________________________
Quote: ...bored, skint, no charter, and a ship that looks like an explosion in a girder factory...
|

Sharupak
Minmatar Brutor tribe
|
Posted - 2008.09.10 11:03:00 -
[16]
Originally by: Victor Valka
Originally by: ReaperOfSly
Originally by: Sharupak
Originally by: ReaperOfSly
Originally by: Keta Min when you've finished some projects and your stuff works without shit suddenly exploding.
The most complicated thing I've managed so far is a prime number generator. 
LOL! I just did the regular number counter one time and I was curious to see how long the computer would take to count to a million.
It takes a long ****ing time LOL!
That's odd. It takes my program 3 and a half minutes to find all the primes between 1 and 100 million. Regular numbers (if I remember correctly are factors of a power of 60) should be much easier to find. They'll just be of the form 2^i * 3^j * 5^k. Just count up each of the i's j's and k's.
Okie dokie, I'll have a crack at this.
No. He meant something like this:
### i = 0 x = 1000000 #one million
while i <= x - 1: i += 1
print i ### Take Py ~2sec. Unless you're a complete beginner and do something in the tune of:### i = 0 x = 1000000 #one million
while i <= x - 1: i += 1 print i
print i ### This takes so much more time.... 
Yup, option 2 _______________________________________________ RuntimeError: ChainEvent is blocking by design, but you're block trapped. You have'll have to find some alternative means to do Your Thing, dude. |

Nyphur
Pillowsoft
|
Posted - 2008.09.10 11:12:00 -
[17]
Originally by: ReaperOfSly I don't see the difference except the second one outputs twice.
The first one counts to a million, then outputs the text "1000000". The second counts to a million and outputs the current number as text each cycle, then finally outputs "1000000" again. Printing text just requires a lot of processing overhead, that's all.
Pillowsoft - Join the Pillowsoft Gallente Militia, get free ships and support. |

Pan Crastus
Anti-Metagaming League
|
Posted - 2008.09.10 11:20:00 -
[18]
C++ was fun in the 90's, but nowdays it's a huge waste of time to learn unless you really want to use it for its remaining 4-5 years in specific areas where there isn't a good replacement for it yet.
In order to be considered competent at C++ nowdays, you will need to be proficient at OOP, using Templates/STL and at least know something about thread safety. IMHO.
How to PVP: 1. buy ISK with GTCs, 2. fit cloak, learn aggro mechanics, 3. buy second account for metagaming
|

ReaperOfSly
Gallente Lyrus Associates The Star Fraction
|
Posted - 2008.09.10 11:36:00 -
[19]
Well I've been applying for jobs, and a fair few of them ask you to know C++ or be willing to self-learn it. So it's hardly pointless. __________________________
Quote: ...bored, skint, no charter, and a ship that looks like an explosion in a girder factory...
|

Louis deGuerre
Gallente Federation Zone Operations Command
|
Posted - 2008.09.10 11:51:00 -
[20]
Learning C++ is extremely usefull as you will have to learn how memory and pointers work. After you've finally mastered it and understand how to program efficiently you can move to Java which will handle all that for you. You will code shit in Java as well if you haven't learned to code in C++ first.
Ah, those golden days of hunting those 4 bits that didn't get deallocated in a 100.000 line program...*sighs*. -------------------------------------------------- If you know the enemy and know yourself, you need not fear the result of a hundred battles - Sun Tzu |

Victor Valka
Caldari Kissaki Corporation
|
Posted - 2008.09.10 14:00:00 -
[21]
Originally by: Nyphur
Originally by: ReaperOfSly I don't see the difference except the second one outputs twice.
The first one counts to a million, then outputs the text "1000000". The second counts to a million and outputs the current number as text each cycle, then finally outputs "1000000" again. Printing text just requires a lot of processing overhead, that's all.
It is not so much the processing overhead as it is the output lag. The program can only continue processing once the OS has returned control to it after the device driver has returned to OS. Uh. At least I think that's the correct way to explain it.
Anyone care to correct me? 
Originally by: Spaztick You are not outnumbered, you are in a target-rich environment.
|

ReaperOfSly
Gallente Lyrus Associates The Star Fraction
|
Posted - 2008.09.10 14:16:00 -
[22]
Originally by: Victor Valka
Originally by: Nyphur
Originally by: ReaperOfSly I don't see the difference except the second one outputs twice.
The first one counts to a million, then outputs the text "1000000". The second counts to a million and outputs the current number as text each cycle, then finally outputs "1000000" again. Printing text just requires a lot of processing overhead, that's all.
It is not so much the processing overhead as it is the output lag. The program can only continue processing once the OS has returned control to it after the device driver has returned to OS. Uh. At least I think that's the correct way to explain it.
Anyone care to correct me? 
My understanding was that quite a bit of the lag was created by converting between binary and decimal integers. The variable is stored in the computer as binary, it then needs to perform a calculation to convert it to decimal and display the result. __________________________
Quote: ...bored, skint, no charter, and a ship that looks like an explosion in a girder factory...
|

Ami Nia
|
Posted - 2008.09.10 14:40:00 -
[23]
Originally by: ReaperOfSly My understanding was that quite a bit of the lag was created by converting between binary and decimal integers. The variable is stored in the computer as binary, it then needs to perform a calculation to convert it to decimal and display the result.
In C/C++, depending on your output medium, chances are that you spend much more time actually outputting it than you spend converting. But it all depends. It is very easy to check, however: convert it to a string in a static buffer without printing. Time the difference between this and actually printing it.
---
Originally by: CCP Mitnal So we can 1 v 1 with Garmon.
|

LordSwift
INTERSTELLAR ENTERPRISE
|
Posted - 2008.09.10 14:46:00 -
[24]
My brain hurts reading your nerd speak. I have personally tried to teach myself C++, maybe i dont have the drive to sit down and teach myself. Maybe i should go back to college. (Yeah i know im dumb) Hehe!! Wish i could go back. Well done on getting further than me. All i managed to write is a small program that asks you to enter your name and then says "Hello Lordswift" Back to me.

|

Nyphur
Pillowsoft
|
Posted - 2008.09.10 15:07:00 -
[25]
Edited by: Nyphur on 10/09/2008 15:08:49
Originally by: Victor Valka It is not so much the processing overhead as it is the output lag. The program can only continue processing once the OS has returned control to it after the device driver has returned to OS. Uh. At least I think that's the correct way to explain it.
Anyone care to correct me? 
Yeah that's correct as far as I know. I couldn't think of a better term than processing overhead at the time.
Originally by: Pan Crastus C++ was fun in the 90's, but nowdays it's a huge waste of time to learn unless you really want to use it for its remaining 4-5 years in specific areas where there isn't a good replacement for it yet.
The majority of companies putting out 3D games still use C/C++ for efficiency reasons.
I prefer languages that handle crap like garbage collection and thread safety themselves, I've never had the misfortune of having to hunt down a dozen little memory leaks in a program and I don't intend to get into that position. I've been using C# with the XNA framework lately and it's fairly good. There's a decent active development community and both C# and XNA have excellent documentation. C# is more like Java than it is like C, I actually find it a lot easier to deal with than C but that's probably because I've used Java a lot.
Pillowsoft - Join the Pillowsoft Gallente Militia, get free ships and support. |

Pan Crastus
Anti-Metagaming League
|
Posted - 2008.09.10 15:14:00 -
[26]
Originally by: Louis deGuerre Learning C++ is extremely usefull as you will have to learn how memory and pointers work.
That's ANSI C you're thinking of ...
Quote:
After you've finally mastered it and understand how to program efficiently you can move to Java which will handle all that for you. You will code shit in Java as well if you haven't learned to code in C++ first.
Many people, including me, think that having "OK" knowledge of C/C++ is actually harmful if you want to be a good Java programmer.
Quote:
Ah, those golden days of hunting those 4 bits that didn't get deallocated in a 100.000 line program...*sighs*.
man alloca(3) ...
Also, Java has garbage collection. ;-P
How to PVP: 1. buy ISK with GTCs, 2. fit cloak, learn aggro mechanics, 3. buy second account for metagaming
|

Sothis Antares
PBA Corporation
|
Posted - 2008.09.11 19:00:00 -
[27]
poasting in a nerd wannabe thread. also, c++ > java

|

Crumplecorn
Gallente Eve Cluster Explorations
|
Posted - 2008.09.11 22:01:00 -
[28]
I got a C++ compiler for christmas when I was 13, my first PC language. I never learned a huge amount of the language, but it got me into good programming habits early on.
I would say you're competent at it when you've been using it for a few years and can spot obscure problems with other people's code on sight. -
DesuSigs |

Mankirks Wife
|
Posted - 2008.09.12 03:08:00 -
[29]
As was said above, when you finish some projects and they work and someone else can look at your code and make sense of it.
As a side bonus, once you've learned C++ you can learn anything - the principles are the same, the syntax is usually similar. After I did some stuff in C++ I did some projects in perl, php, javascript, and even Ruby.
Don't really use my programming skills much anymore though - wasn't making me any money. ---
|

Rialtor
Amarr Yarrrateers
|
Posted - 2008.09.12 17:22:00 -
[30]
Edited by: Rialtor on 12/09/2008 17:23:14
Originally by: ReaperOfSly I've been teaching myself C++ and only have about 2 weeks of learning under my belt. I'm comfortable with strings, arrays, pointers (more or less), functions, what the various data types are, how to use relational operators, etc. Just starting to play around with classes and structs. But I'm very much aware that I have a hell of a lot to learn. Since I'm not taking a class, how do I tell when I am "competent" at C++?
You're competent at C++ at about the time you realize that the answer to the question doesn't really matter. Knowledge of the syntax of C++ doesn't really matter. It's nothing 5 minutes on google wouldn't accomplish for a particular function or library. A programming language is just a some syntactic and semantic rules.
What is important is being a good programmer. Change you mindset to think that C++ is just a tool you're using to understand programming concepts. Once you understand the underlying concepts that's when you realize that language isn't really the important part.
But C++ is a good choice to start learning these concepts in since it's a more "raw" programming language.
If you're really serious about continuing your studies. Just understand what functions are, and some basic output commands. Then move to creating Objects, learn what the different types of constructors are, overloading, etc. Knowing what objects are and how they work is the foundation to Object Oriented Programming. After that I suggest getting a book on Programming Languages so you start to abstract your view of programming. Then start to learn some more advanced algorithms and data structures.
Also, you might want to look at applications of C++ itself, and why it is still used today to know where to focus your studies. After you learn about OOP and Advanced Data Structures like Mutexes. You can start to have a mindset to work on multithreaded applications. So about the time you get the hang of OOP and multithreading, I'd say you're now competent at C++. Also to have it working in a real-life application, not just code snippets from somewhere. A text editor is a good example of something you can make that's simple, and uses both of those concepts.
---- sig ----
Never doubt that a small group of thoughtful, committed citizens can change the world... Indeed, it's the only thing that ever has. |
|
|
Pages: [1] 2 :: one page |
First page | Previous page | Next page | Last page |