How did you start learning C++?

Pages: 1234

Java's great and all, but there are areas that really need to catch up with the times if it's going to continue to be a serious technology.


I can see just the opposite - C++ is constantly playing catch-up to Java, even in the performance related features. E.g. just recently C++ got atomics and futures in STL. Java has had them for 8 years. Similar thing - threading: Java has had it since beginning, C++ was till C++11 thread agnostic, so you couldn't do e.g double checked locking properly. Still C++ doesn't have support for lockless concurrent containers.

C++ is awesome in some aspects, but evolves too slow IMHO. We laugh at Sun/Oracle for taking almost 4 years to add lambdas, but C++ committee needed even longer.


10-minute pauses


Huh? Either ancient hardware or something totally borken. On our low end server, Java CMS GC scans a 16 GB heap in 200-300 ms, and that is mostly concurrent, without pausing. If pauses are problem, you can always switch to new incremental G1, which additionally defragments memory.
It allows for sub 100ms pauses even for very large heaps (>64 GB).
So... I go to C++ forums, I learn Java....
Yeah, as Bjarne Stroustrup says (in a link I posted earlier) "You can't call yourself a professional programmer if you only know one language." He then goes on to say the seven languages you should know (if you know these you can pretty much use any language) are C, C++, C#, Python, Ruby, Java, and Javascript. Honestly, if you go to a <language> site and they only talk about that language even in the off topic forums you should run like hell away from them.
I think he is seriously missing some functional/declarative languages. I'd add at least one of the following: Scala, Haskell, Clojure/Scheme/Common Lisp, Erlang. I'd also add some variant of SQL or shell script. It is better to know languages from different groups than to know languages from one. The ones Stroustrup lists are chosen by popularity and most are general purpose, imperative with Algol-like syntax.
Last edited on
Actually I would have only added a SQL variant for declarative as C/C++/C# are functional.
C, C++ and C# aren't functional. C is purely imperative/procedural, C++ is imperative and object-oriented, and C# is purely object-oriented.

In procedural languages, you say how to do things. In declarative languages, you declare what things are. Functional languages are a subset of declarative languages.
Last edited on
Oh, thought C was functional, but I know C++ and C# is. Either that or my CS course in college was wrong (and upon checking, apparently wikipedia is wrong too).

Wiki says:

C is Imperative(procedural), structured
C++ is Multi-paradigm: procedural, functional, object-oriented, generic
C# is Multi-paradigm: structured, imperative, object-oriented, event-driven, functional, generic, reflective
They aren't functional languages, they just have a few features of functional languages (closures and anonymous functions, for example). It's possible to write imperative code in Haskell, but Haskell is a purely functional language, not an imperative one. The fact that it has syntactic sugar for imperative features doesn't make it imperative. Similarly, the fact that C# and C++ implement some functional features doesn't make them functional. All the Wikipedia article is saying is that they implement some features from the functional paradigm, not that they are functional.
Do C++, C# (and Java with lambdas) allow you to write code effectively without mutable state? No, unless you roll your own standard library from scratch. So they are not functional. Lambdas are not enough.
Barnes did say you should learn "one of the functional languages", he just didn't say which one.

http://en.wikipedia.org/wiki/List_of_programming_languages_by_type#Functional_languages
Last edited on
Just means my CS course was wrong. Wish I had kept my book from it or the worksheets that had the quotes saying you could use C++ as a procedural or functional language as well as for oo. Of course it was a course where the book was a D.S. Malik book and from DeVry, probably the two worse names that shouldn't be in a sentence.

Oh well, I suck at programming anyways :).
me too ^_^
Oh well, I suck at programming anyways :).

I've learned throughout my life that one of the keys to success is to believe in yourself and to be persistent.

I think it was some famous monk who said something like,

"If thou thinkest thou cannot succed, thy despondency shall make it so. But if thou perceiveth, thy obstacles shall be overcome.", or something like that.

What I get out of it is that a persons attitude is one of his/her main obstacles.

When I read your constant posts of self doubt, I think to myself, "It's no wonder this guy is not successful, his attitude pretty much prevents it".

Someone with the same talent as you but with a positive attitude would run circles around you.
Last edited on
closed account (iw0XoG1T)
I've learned throughout my life that one of the keys to success is to believe in yourself and to be persistent.


Self-confidence is not nearly as important as hard work and talent. And often over-confidence results in failure, and hurts others. I worked with talented people who had a bad attitude, and nit-wits with a great attitude--I prefer the former.

Most people mean financial success when the say success, it is possible that for making money your attitude is important, but I judge success with a different ruler.
Last edited on
Self-confidence is not nearly as important as hard work and talent. And often over-confidence results in failure, and hurts others.

By persistence I mean to consistently work hard and not give up.

Probably most related is that people who don't believe in themselves aren't likely to be persistent.

People who think they are going to fail before they start tend to give up or not even try.

People who believe that they can accomplish something if they try hard enough tend to not give up so quickly. I think this is why they tend to be more successful in their endeavors.

Last edited on
closed account (iw0XoG1T)
Probably most related is that people who don't believe in themselves aren't likely to be persistent.


I have relative who wanted to be a Doctor--his brother was a Doctor(MD), but he could get in no medical school in the States. So he went to Mexico, but to do residency in the States there is an exam that you must pass. He failed twice, then is own brother the Doctor told him to give his dream up. But he passed on his third try.

Then he failed his residency, I didn't even know it was possible to fail a residency. Then he got another hospital to do his residency in in Florida.

Today he is a doctor. He never gives up. Now to some this is a story about how persistence pays off. To others this scares them that capability is not valued as much as persistence in our society.
Today he is a doctor. He never gives up. Now to some this is a story about how persistence pays off. To others this scares them that capability is not valued as much as persistence in our society.

Persistence and capability are not two things which can be compared in a one wins one loses format. Persistence earns capability. The first brother who was a doctor must have been persistent himself to become a doctor.

In regards to programming, for example if you want to be a game developer someday, you aren't necessarily going to be working in life or death environments. Your employers will determine wether you are useful or not and hire or fire you accordingly.

Or if your an entrepreneur, if people like your software, who cares how persistent you had to be to make it.
Last edited on
@BHXSpecter

Hang in there buddy, believe in yourself. As I said earlier gain confidence in small steps - don't look back. I am sure there are plenty of people on this site who believe in you too - use that idea to put some wind in your sails. A big part of self confidence is realising that there are a number of people who do like what you do.

For now, try not to compare yourself to others, instead concentrate on your ever increasing list of skills.
iseeplusplus wrote:
When I read your constant posts of self doubt, I think to myself, "It's no wonder this guy is not successful, his attitude pretty much prevents it".

I didn't start out like that, after 16 or so years of continually being told "you can't do it", "you have bitten off more than you can chew", "you're stupid, you don't understand it", "learn another language then come back to C++", etc. I'm constantly told, every time I hit a problem, to learn C, C#, Java, Haskell, Python, Lua, Perl, Ruby, Assembly, PHP, D, J, Erlang, etc.

Most of my problems are due to, when I seek help, I get criticized for trying to understand something I am hung up on. For example, when I kept continuously trying to understand and find a way around the collision response bug in my pong clones (as it kept appearing EVERY single time I wrote it from scratch) I got this reply from a few users "the fact you are still having issues with this just shows you aren't cut out to be a programmer because you can't figure out something so simple."
Most of my problems are due to, when I seek help, I get criticized for trying to understand something I am hung up on.


No, they aren't. Most of your problems stem from the fact that you give up. If you want to accomplish something, simply don't give up. Many people have endured far more than criticism to accomplish what was necessary to pursue their dreams.

Shifting the blame to other people is helpful if you don't want to look it squarely in the face, I suppose, but if you don't recognize the real problem your chances of surmounting it are quite low. So choke up whatever self-confidence level is needed to not give up in the face of criticism and get to it... or keep whining in the lounge. Whatever.
Pages: 1234