If you are serious about this, then start with plain C. I recommend http://c.learncodethehardway.org/book/. It is a series of coding exercises that will help you learn C. As most other programming languages nowadays are derivatives of C (either borrow much of the C syntax as is the case with C#, C++, etc. or are built on C as is the case with higher-level languages like Python), just learning plain C is a gateway to so much more.
After learning C, probably also familiarize yourself with x86 assembly (which is the machine code that all programming languages devolves to--super low level) and get a better understanding of processor architecture and development. The Intel Developer's Manual is a good place to start (or die as is the case with most): http://www.intel.com/content/dam/www/pu 325462.pdf. However, as 3500 pages is a bit much for any person and the 3DS uses the ARM architecture, you may want to read up on ARM, but still learn x86 assembly as it will be of vital importance.
There is some stuff in the 3DS homebrew wiki: http://3dbrew.org/wiki/Setting_up_Devel nvironment.
I myself have never directly made homebrew applications, but I have reverse engineered a few. There is also an IRC channel for the homebrew wiki too, so you might want to check that out.
Hope this helps.