Ask HN: c++ or iPhone?

5 points by nickfox ↗ HN
I am trying to make a decision on whether to pursue c++ or iPhone programming. I have been a contractor for 12 years working mostly in corporate microsoft shops doing 3-tier programming. In today's environment, I want to gain a more competitive edge so I'm trying to figure out how best to improve my skill set. I like c++ because it is in high demand and it is the language that separates the men from the boys. I like iPhone because cell phone programming is going to be a large part of the wave of the future. As far as "following my passion," both are equally exciting to me, but I need to fully commit to one or the other at this point in time. What are your thoughts on this?

20 comments

[ 4.5 ms ] story [ 56.0 ms ] thread
What languages do you currently know?
I work well on all 3 tiers, so c#, sql, javascript. I am also a sun certified java 2 programmer and have done 2 years of J2ME programming on cell phones. I am also proficient in a number of other languages but the ones above are my "paying languages."
Sounds like you should be able to learn either objective c or c++ pretty quickly, as they both have bits in common with c# and java.

I would recommend coming up with some project in either language that interests you, and gives you a reason and a purpose to learn the language.

Do you want to learn for personal projects, or for your job?

My real interest is in getting to the "next level." Being self-employed for the past 12 years has been good but now I want to start my own business(es) and be an entrepreneur. Building subscription based websites is one of the ways I plan to accomplish that.

One of my "problems" is that I get excited about all sorts of things so I really need to focus on getting projects finished. That's why I feel I need to be in an either/or place right now, so that I don't over extend myself...

iPhone, iPhone, iPhone. If you know OOP and C (that's regular C), you can pick up Objective-C in a matter of hours. If you don't know C already, you'll have to learn it anyway as part of C++.

C++ is not generally a language people ought to learn unless they have to.

Today, I just finished a book called "Pointers on C" by Kenneth Reek. I read it to come up to speed on pointers and now feel comfortable with that. That's why I posted today, I am now at the fork in the road...
How are you planning on tackling each task? Do you have a project in mind that you will create using either c++ or objc/cocoa touch?

Plus, does it have to be "either/or"? Spend a few days learning one, spend a few days learning the other. You should have gotten to some non-trivial level with each one and more of a taste for what you actually want to do.

Yes, I actually do have tasks for each. I have been doing some work with MAPI (messaging API) and see an opportunity to create a subscription based website doing electronic forensics. That would be on the c++ side.

On the iPhone/objective-C side, I have a project in mind integrating iPhones with a dieting website. So many choices, so little time...

C++ programming is like a monkey fucking a ball. You would probably want to stab your eyes out.

C / Objective-C will probably provide you with more joy and opportunity to work on the iPhone.

I suspect other mobile platforms either use C or Java for programming apps (as opposed to C++), but I might be wrong.

I think you're right, the little c++ programming I have done has been an exercise in frustration. But it was mainly because of my lack of skill. And I do think that iPhone programming would me more fun...
If you learn iPhone programming, you'll learn essentially the equivalent of C++ in the process, so you win on both sides.

If you just try to learn C++ with no clear purpose, I'm not so sure your learning will stick.

So go with the iPhone, you'll enjoy it more and you'll learn just as much.

I'd have to recommend c++. I own an iPhone myself, so they are definitely fun, but c++ is more ubiquitous. Personally I know C far better than c++ (which is a superset of C). The main difference is c++ has classes and more "object oriented" concepts. For the long-haul c++ I think will have more staying power than the iPhone - who knows, maybe the iPhone will be not as popular in a few years, but c++ will still be here.
There is one thing about c++, it scares me more than iPhone programming. I tend to be the kind of person that vigorously attacks things that scare me. I get a lot more satisfaction out of it and feel more alive...
I have been working on iPhone development for the past few weeks. The entry level to learn obj C is actually quite high because I really cannot find any book that helps me to learn obj C. Most of the books that I stumbled upon require me to learn some sort of C or C++ before learning obj C.

After I finished the iPhone project, I am learning C++ now because I believe that it will definitely helps to understand more about obj C.

P/S: I used Beginning Iphone Development, Cocoa Programming For Mac OSX, and the Apple Iphone documentations to learn obj C.

I am learning iPhone programming right now, and I had no Obj C background (but I do have strong Java and Perl experience, and did a lot of C in school)

I highly recommend Stephen Kochan's Programming In Objective C 2.0 - great introduction to the language and its somewhat funky syntax (if you've been immersed in Java etc for a while), plus a whole section dealing with the iPhone SDK to get you started.

Why are the only choices C++ and iPhone?

You mean Objective C on the iPhone, since you can do C++ on the iPhone too.

Almost definitely Objective C + iPhone if these are the only choices you have. It's helpful to switch programming environments once in a while to gain a new perspective.

What work do you do which makes C++ in high demand? Also, C++ isn't the language that separates men from boys.

How do you do C++ on the iPhone? I thought it required Objective C and working with the Cocoa GUI?
Cocoa Touch does require Objective C. But the environment blends very well with C and C++. The beauty is you don't need to worry about calling conventions, or go through some native code invocation API. So you can write the GUI code in Objective C and other parts in C++ if you wish. Though, other than to reuse existing code/libraries, I doubt most people will want to do that.
Well, I've made my decision. I'm going to go with iPhone programming. I've actually done enough c++ programming to know what it's about. Having never done any iPhone programming, I can't make a real comparison. The library has an online copy of "Beginning iPhone Development" by Mark and LaMarche and I will work through that after working through Apple's Objective-C book. Thanks for all your input.