I've dedicated myself for the last 2 years to the task of completely mastering C++. I had used C++ on and off for a long time but never really made an attempt to really know it so I read, and researched and practiced and read again.
It didn't take long to realize that if you want to use C++ effectively, you better establish or learn, some best practices.. alot of them! Every time I peeled back a layer of functionality, I found 5 more underneath. After 2 years, I was starting to wonder.. how long will I have to do this? How many gotchas can one language have? Why do people use this fricken language anyway?
One of the more valuable resources I found while searching for good sources of C++ information was this one.. the C++ FAQ LITE. If you are a C++ programmer, you should be doing the things that are described here.
This FAQ has gems of information like this:
[18.5] What's the difference between "const Fred* p", "Fred* const p" and "const Fred* const p"?
You have to read pointer declarations right-to-left.
- const Fred* p means "p points to a Fred that is const" — that is, the Fred object can't be changed via p.
- Fred* const p means "p is a const pointer to a Fred" — that is, you can change the Fred object via p, but you can't change the pointer p itself.
- const Fred* const p means "p is a const pointer to a const Fred" — that is, you can't change the pointer p itself, nor can you change the Fred object via p.
This was all well and good until one day I found the C++ FQA LITE (frequently questioned answers). The floodgates were opened. All the things that have been bugging me for years about C++ were laid out in a very well considered manner. If you are a C++ programmer that has had enough, you should read this. Heck, you should read it even if you aren't a C++ programmer, it's very entertaining. You'll find gems such as:
The idea to overload "bitwise exclusive or" to mean "power" is just stupid. I wonder where they get these ideas. It's as if someone decided to overload "bitwise left shift" to mean "print to file". Wait a minute - they did that, too... Oh well.
I had been fooling myself for years that C++ was the way it was for a good reason and that if I just kept at it, it would all make sense and I would be master of all that I survey... NOT. It was a great relief however to know that I didn't have to keep slugging it out. I could give up and not feel ashamed. But now what?
I still have to use C++ at work which is fine but what about my own development projects?
I decided to stick to what I had already considered to be the more important requirements for a language. It had to be well thought out, clean, powerful, backed up by a large selection of libraries and be cross platform. Oh, and I shouldn't have to be a masochist to want to use it everyday.
After some consideration Java and Python were the front runners and after a little more consideration Java seemed the clear winner. Python still looks interesting and I may yet give it some time in the future but for right now, Java is it.
Java has come a long way from when it first burst onto the scene back in 1996 (when the JDK 1.0 was release). I have to admit that I held alot of biased opinions of it over the years based purely on what was known about it in that first year or two of its existence. When I finally got around to giving it serious consideration, I found a robust developement framework that I should have adopted years ago.
So.. It's Java time!