I'm a marketing person with an idea for an app that I want to launch. Should I spend a few weeks or months learning how to code or should I save up some money and hire a programmer?
Are there examples of successful startups that were built purely by contractors on platforms like eLance and Odesk?
Getting Started Code Contractor Startups Programming
It depends on how much money you have. If you do have a decent budget, finding a good freelance developer is likely to succeed better than going for the bottom of the pile (elance and oDesk especially).
A good way to save money is to go as far as you can by yourself in prototyping your app. Draw every screen using a wireframe tool (Balsamiq is great for web, AppCooker is great for iPhone apps, etc.).
As from what I'd read, it is best to leave task like this to someone who knows it better. It would free up your time to do other aspects of the business
Software development is so much more than just stringing some lines of source code together, and it takes years to get good at. Compare it to being a successful author. Anybody can learn to write characters and put words on a page. Becoming an author with enough skills to create books that can actually sell well enough to keep the creator in the black takes so much more time and effort.
It's possible for you to learn enough to make a mockup or a prototype, but unless you've got some serious time on your hands, I'd suggest finding somebody else who can help you bring your vision to life, and free yourself up to do what you're already really good at.
For me the answer is "both". I needed a prototype that could be programmed entirely in JavaScript and because it's evolving over time it was hard to find a programmer to take it on, so I learned JavaScript. That's been great for me to tweak the algorithm myself instead of always having to get a contractor to do it.
Anything more complex than that I'm going to have to find a contractor*. For HTML/CSS I was actually able to have our Photoshop design turned into a Twitter Bootstrap template for only $150.
* We're in prototyping mode and it doesn't make sense to find a technical co-founder and give him/her equity in a product in which the competitive advantage in our case has little to do with the technology.
You got ask yourself, how much do you value your time? Is the time you'll spend learning programming, crafting rookie quality code and debugging worth less than what you could pay a professional to do it? Time is money!
As a professional IT contractor I can advice you to find a good IT provider that you can trust in your circle. Technological aspects of most startups and SMBs are often lacking and hamper business growth.
I agree with Alain Raynaud that at least prototyping is a good investment of your time.
I would suggest you to hire a contractor AND learn to code, at least a bit.
If you don't know anything about programming, it can be hard to guess what is doable, what is easy, what is difficult.
You will be better at estimating how much a feature's development should cost, and you will be wiser when designing a new application, knowing pragmatic ways to make the app significantly easier to develop.
Another thing is that programming makes you more aware about a platform's philosophy, for instance the fact that Android apps are not supposed to be closed, or the recommended way to implement navigation between screens. These things usually have an impact on your application from the very beginning.