Is it counter-productive to admit obvious weaknesses when applying for a position? A bit of context before hand. I am a second year PhD student. In the course of my studies, I have slowly shifted from aerospace engineering towards computer science. Now, my research involves developing software applicable for aerospace systems. I am fairly competent in programming and related subjects, even though I sometimes find my lack of background in those subjects to be penalysing.

I found a summer program in which I am highly interested in. However, it was mainly designed for CS students. In my application, I want to make a case that even though I am not an ideal candidate for this program (which in my opinion is quite obvious, even though I have proven capabilities in some of the subjects required) I still think I should get accepted. One of the my main arguments is that everything I have learned so far on programming and related subjects was through self-study (mainly online tutorials), which shows I am highly motivated and can work independently.

So it got me thinking. In general, is it a good idea to admit his own weaknesses when applying for a specific position?
Describe yourself accurately enough to let the program organizers decide if you will benefit from the course. In that sense, yes, you should admit your weaknesses, but it's indeed counterproductive to actually phrase things that way - you are the applicant; it's not your job to decide what is a significant weakness.

You obviously think you are ready for the course and would benefit - let the organizers know what your reasons are, and why you are enthusiastic. If you are applying on the strength of being a good software developer in general, including a link to some public code you've written might help.

(And if you are feeling self-conscious about not having an undergraduate CS degree, go and get something like Cormen et al.'s "Introduction to Algorithms" and go through it cover to cover. You will hit most of the things you would be expected to know cold.)