Learning to code is NOTHING at all like learning a foreign language, unless you think you can pick up the core elements of a language in a weekend.
Learning to write code is vastly, vastly easier than learning a foreign tongue. You can write real code that solves real problems within just a few hours of studying, say, interpreted languages like Perl or even shell scripts. Will your code be admired for its beauty and efficiency? No. But it will be functional.
Writing apps is "as easy as Apple says" for people skilled in the vernacular of developing applications, but that's a very broad net that includes interfaces, databases, interacting with libraries, and the code to glue everything together.
It's not at all like writing HTML to build a web page (which, by the way, is not writing code like many think it is).
If you want to learn to write code, you should first and foremost become familiar with textual interfaces to your computer. Many, many, many things in all computer languages assume core competency in these skills.
Next, learn interpreted languages like Perl or Ruby. You can also use these to build apps if you so choose.
Finally -- and most importantly -- have a project with clear goals in mind. Nothing helps you learn more than "I want to do X but have no idea to do it."