Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

Programming isn't alien to me. I first starting doing markup (HTML, now please don't laugh at me) when I was 12 and a little bit of BASIC when I was 13 (I knew much about Flowcharts, Pseudocodes at this point), but then I was admonished into Biology in high school and hence missed out on "real" programming knowledge of languages such as C, Java, etcetera. I took up CS for my UG B.E. (similar to BS, but way more theoretical). I learnt C & C++ (to a lesser extent) on my own (my prof was a total pain and the class was filled with code-jocks (who had already learnt it in school, and hence paid no attention to class and didn't let lesser mortals like me to pay any attention to class either)) and could whip up an awesome addition or multiplication program (ones which now even kinder-gardeners' whip up with way more finesse) and a piss-poor knowledge of Java (which has even grown rusty in recent times).

My main problem is that I've always felt inadequate and strangled by my limited programming skills and belittled by the code-jocks (believe me, I've come across this site ages ago, but could just now build up the courage to actually post a question) and have been at times even depressed over said inability. Most people say that Programming isn't necessarily about the language but the state of mind that the person has and the techniques they employ to solve problems/issues. I agree with such sentiments, but can I ever acquire such a "state of mind", and if such how should I approach "Programming/Coding", and if there are any set ways and steps one most go through to attain the "Zen of Coding". How do I do so? Also, it wouldn't hurt if some Saint wanted to mentor this downtrodden piece of $#!^.

P.S. I would forever be grateful to any person who considers me worth their time, and as a bonus would name my first piece of Software I ship after them. (If I ever get to ship one, i.e.,)

TL;DR: Never really learnt "Programming/Coding", can't solve problems even if I try to. Help me!

share|improve this question

migrated from stackoverflow.com Apr 9 '11 at 1:34

This question came from our site for professional and enthusiast programmers.

closed as not constructive by gnat, Yannis Rizos Mar 3 '12 at 10:21

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.If this question can be reworded to fit the rules in the help center, please edit the question.

19  
Don't get so down on yourself. No-one came out of the womb programming. The more you code, the more you'll think in code. Have fun with it. –  Steve Evers Apr 9 '11 at 2:26
1  
+1 for honesty and openness –  louisgab Apr 9 '11 at 3:17
9  
If you're thinking "Hm, the bug is probably in my code, not the compiler" you're on the way of thinking like a programmer (well, like most programmers). –  gablin Apr 9 '11 at 7:40
5  
@SnOrfus: No-one except for Jon Skeet ;) –  back2dos Dec 7 '11 at 12:40
4  
from one noob to another: Practice is the key! –  Wildling Dec 7 '11 at 16:17

17 Answers 17

up vote 19 down vote accepted

I'd argue the best way is to simply spend more time on it (search for the 10000 hour rule). Find something you want to get done and set out to get it done. Pick something that's beyond your current ability, but not so far out that you won't be able to finish in a reasonable amount of time. If you really enjoy it, you'll find yourself repeating this until you're really good at it. If you don't enjoy it, then perhaps it's not the right thing for you. Try to challenge yourself though, you'll probably enjoy it.

share|improve this answer
9  
Ameen: Don't worry about other languages. Learn one. Move on later, after you've put 10,000 hours into Java. Life is long, there are a lot of languages, you won't learn them all. New ones are invented all the time. Learn one thing now. Worry about the future after that. –  S.Lott Apr 9 '11 at 2:11
1  
"spending more time on it" in a vague way is not effective. –  Rein Henrichs Apr 23 '11 at 17:23
1  
Also a good strategy is to learn an Object-Oriented programming language and to learn a Functional programming language. Learn a statically typed language and a dynamically typed language. You will be a well rounded developer. –  Chiron Apr 23 '11 at 23:44
1  
@BSeven You need to check out Peter Norvig's essay on "Learn Programming in 10 years" its similar to this and sheds a ton of light on a few major issues newcomers to programming face. –  Ameen Dec 8 '11 at 17:13

There are a lot of good comments about practice on here, it really does make all the difference.

You should worry less about "code jocks" and take their advice or comments for what they are. If they're hard to deal with in a thread, they're probably hard to deal with in real life also ; and really, who has time to worry about their social ineptitude?

The end result is, there are thousands of ways to approach programming tasks. A lot of things boil down to personal preferences. I for instance, hate reading code with tenary operators. Others, love them. Do I think they're right or wrong?.. actually, neither. It's personal preference though a lot of heated debates will be had on the topic.

If someone berates your code because you took 25 lines instead of 20 I would tend to just ignore them unless they have found an actual flaw in logic. Sometimes in the real world, we have to just get things done (and who really wants to listen to someone chest puffing about how complicated... err, elegant they managed to make a piece of code that should have been done in 10 minutes). Can you learn something from endless philosophical debates on how far to abstract things? Sure... but there is dimishing returns in getting sucked into constant 100% elegance. It's not realistic all the time as much as we'd like to pretend that it is. Some of my least elegant code that I'd be embarrased to share with anyone (that I wrote in the beginning of my career) has saved people weeks upon weeks worth of time, been used since its inception over a decade ago and would have to be pried from the users' cold dead fingers (and also works, has never broken thus has never been given time to go back and "clean up" which is always the story).

There's a great blog post by Joel Spolsky called the Duct Tape Programmer. It's a great read and IMO puts some of your fears into perspective.

http://www.joelonsoftware.com/items/2009/09/23.html

I'm not saying write crap code and ignore best practices, but take ranty programmers with a grain of salt.

share|improve this answer

Ask yourself why you actually feel lack of confidence. I think it's because you care what your peers think, and that's completely understandable. But to be truly zen about it, you need to clear such thoughts and only compare yourself to yourself over time. Be guided by your interest, learn and work hard, and you'll become a good programmer without all the psych BS.

It's not really confidence you need, it's less noise in your path of progress.

share|improve this answer

Three things to consider: (Or not, of course.)

  1. Practice. What if failure meant nothing more than an indication you are practicing? If you gave up learning to walk the first time you fell, you'd still be crawling about.
  2. Play with whatever you're doing. Play is simply trying something and noticing what happens. Give up judging good/bad results, just play and see what happens. Give up being attached to a particular result, just try something and see what happens.
  3. What if you're not the only programmer in the world who ever felt this way?
share|improve this answer

In development it seems that the paradox "the more you know, the more you know you don't know" holds true.

If you are a thoughtful, honest person, you will need to accept this fact and learn to deal with it.

Confidence, in the sense implied by the question, is a very personal thing that really has nothing to do with a particular skill set or methodology.

On a more shallow note, the sentiment described in http://www.kalzumeus.com/2011/10/28/dont-call-yourself-a-programmer/ (section: You radically overestimate the average skill of the competition because of the crowd you hang around with) has always helped me.

I would suggest that you learn to be more confident in the work that you have done as opposed to building confidence in your skills as a whole. The single best way to do this is to write repeatable tests for all of your code. It will work wonders on your psyche.

share|improve this answer

Your brain doesn't like to work too hard. Given the choice, it prefers to take the easy way out. This is why it's easy to give up on things when you try to tackle something too ambitious - too much to learn, too many fiddly details to get right, too much yak shaving.

There are several things you can do to combat this. First off is energy. Try to do your practicing when you are well rested and well fed, or your brain literally won't have enough fuel for complex abstract thought. Second trick is interest or importance. If you can convince your brain that knowing maven is vital to escape the tiger chasing you, you will learn and retain more than when your brain thinks it is a meaningless side task on the way to what you really want. A third factor that is important is to stretch without overdoing it. Some effort will give you that buzz from achievement, and will help form new mental pathways, without being unachievable.

There is also something to be said for repeated practice. You want enough variation to be novel, but enough similarity that you get to exercise the same actions and ingrain them.

One further point is that you should attempt to roll up your sleeves and get your hands dirty. It is easy to spend a lot of time thinking about alternate approaches or the ideal solution, to the extent that you never get started. This is an example of your brain trying to take the easier way out. Try to recognize when this is happening to you and avoid it by trying to get started. Even a test or experiment is good. This also has the side benefit of making your brain want the closure of completing the task or finding the better solution.

share|improve this answer

I used to feel the same way, and it was actually the Stack Exchange sites that helped give me confidence.

I started using StackOverflow to find answers for my questions, and one day I saw one I knew the answer to. I posted the answer, got some up-votes and a comment saying it was a good answer, and that encouraged me to look around for other questions I could answer.

It soon grew into an addiction for me, finding unanswered questions that I could solve, and as time went by I started gaining confidence in my answers. I no longer had to say "I think this is because...." or "This should cause..." but could instead say with some confidence that "This is because... " or "This causes..."

I like puzzles, and to me SO questions were like mini-programming puzzles, with the added benefit of getting some positive feedback if I got the answer right. If I got an answer wrong, I just deleted it and learned from other people's solutions to the same problem.

So my recommendation would be to go on SO and browse the questions in whatever tag you're interested in, and look for some you think you can find answers to. There's nothing quite like people telling you your programming answers are helpful/good to give you confidence in your programming ability :)

share|improve this answer

Confidence is not something you should try to feel about your skills. Confidence is poorly (likely even negatively) correlated with actual skill. You should be working to improve your professional (or valued hobby) skill set no matter what you feel about your current skill level.

Confidence is something that other people, those whom you think are competent, should come to feel about your skills after working with you or seeing your work.

share|improve this answer

You will never feel confident about your programming skills.

The way you describe your skills, points to a mindset where you will be never satisfied with your skills. You mastered C++? Wait there is Java! You mastered Java? Wait there is Parallel Programming. You mastered Parallel Programming in C++ and Java? Wait there is SOA! There is OOD! And MVC! SOLID! Functional Programming! Web Programming! Cloud Programming! Mobile Programming!

The point is not to feel depressed because of this. You need to push some buttons in your head: Your doubt about your skills is pure fuel. You will likely never reach some satisfying level of programming skills. As long this is the case, you will move forward. The hard part is to realize it and do something against it, although there will be never a goal. The longer you can bear it the higher your skill level will be.

share|improve this answer

Ship things. It's the only way. Get stuff done. At work, your own projects, open source projects. Start shipping things. They can be very small things, like a bug fix or a minimum marketable feature. Just start shipping things. Nothing is more satisfying or confidence-building than success.

Edit: You should read Ship It. It's great.

Edit again: Experience doing anything other than shipping is just experience failing. I've seen a lot of "senior" developers whose main experience was not shipping things (and finding excuses for not shipping them). Real artists ship.

share|improve this answer

There's always inertia to overcome when learning new things. The curious programmers I've known struggle to find the motivation to continue to learn new languages and paradigms. They'll say, "I need a project to try out X on." in order to learn X. A few will actually find/invent that project.

Be advised that a career in programming will be a lifelong process of frustration, study, experiment, and tilting against windmills. Until the AIs take over everything.

If you're still doing real science, then you should be able to imagine a project/need of some kind. For example, combining data from multiple sources on or off the internet. This might inspire you're learning javascript or R or even Excel/VBA. If you can connect some dots for others in your field, you'll get recognized, et voila, you'll be a programmer.

Use but be wary of mentors. Question authority.

And by the way, "zen coding" is an oxymoron.

share|improve this answer

Funny thing is:

programmer`s mind isn't that much about computer, programming language,
design-patterns or algorithms

It's about understanding subtleties of real world, interaction between things. Ability to think abstract. Ability to notice things and remember them. That inevitably leads to good problem solving.

Implementation, code itself comes only after that - after You have successfully
solved given problem inside Your mind.

share|improve this answer

Approach programming with a more positive, learners attitude. Nobody knows everything. Second, Find out why you are interested in programming be it that you enjoy:

  • problem solving
  • learning new things
  • making a computer bend to your will
  • something else...

Once you know what you love about programming, you can focus your learning efforts in that direction. I am a tinkerer/problem solver. It makes me extremely pragmatic. Algorithms and data structures, computer science theory in general put me to sleep.

My background is similar to yours. Started building computers at age 10. Did a little HTML/C++ in my mid-teens...got bored with it...quit for a few years. I never stopped playing around with the computer though.

Now, I'm loving programming. So what changed? I found my motivation. I started working where I'm given a plethora of problems to be solve. Finding clever, simple solutions to complex problems really gets my fire burning.

Finally, don't worry about how others code or if its "right" or not. Its right if it does what you want it to do. Once you begin working on a team then standards become important. This is much due to the fact that other people will need to be able to interpret and modify your work. Design standards is not something a new programmer should concern themselves over.

share|improve this answer

It's very simple: be interested in it! You seem to be, already, so find something that you think it would be cool to do, and then do it, asking whatever questions you need to on the way, using whatever resources you can, to put together the project just the way you want it. Rinse and repeat, and you'll find yourself being an awesome programmer without even having exerted much effort, since it was interesting/fun along the way.

Also, strike a fine balance between figuring stuff out and asking a lot of questions. At the beginning, especially, it's a huge help to have others tell you where you're going wrong, to kind of boost you over the first part of the learning curve. From there, try to figure things out on your own, and if you get stuck after a while then ask a question about it. What I often do is post a question on SO, and then go look for the answer, checking SO occasionally in the process. Sometimes I find the answer first, sometimes it finds me first.

Don't worry so much about which technology, though it might be really fun to do graphics with HTML5 + JavaScript + the canvas tag, since it is pretty easy to set up, the rewards are immediate, and you can share them.

share|improve this answer

'problem', 'inadequate', 'strangled', 'limited X skills', 'belittled', 'depressed', 'inability' in one sentence, all directed toward yourself suggests to me some unhealed wound/s from the past still hurting you. If you find ways to overcome those, programming or any such art/craft would be very easy to master. Perhaps reading about other people's resilience would help here. Everyone goes through hurting times in their lives. If those hurts/wounds are not healed, their successes wouldn't have come by. Heal your wound/s first. Programming can wait for later.

As for programming skills, how I learn a new language and start thinking like others who already program in that language is, first, read up everything I can lay my hands on that is related to that language. Then, when I have read enough, start writing small programs.

share|improve this answer
2  
In this same vein, if you want to see someone who had the same problem and a community rally around him and his problems, be sure to read this Hacker News thread. –  Wes Baker Apr 9 '11 at 2:02
3  
+1 for the suggestion to read up on documentation and tutorials. And as for the first part, I agree that a lot of wounds are unhealed. (What is a psychologist doing on this site?) But unfortunately some wounds can't be healed as easily as others. But I've come to terms with them, and frankly they aren't as much of a pain as they once used to be. And being idle only pushes me towards such negative thoughts and the only way to do that is through keeping myself occupied by Coding, etc. Thanks a lot for your suggestions, and you my friend have stumped me with your psychic skills. –  Ameen Apr 9 '11 at 2:11

WhiteFang34 is totally right. As a biologist myself, I found that the only way I have to learn programming is to just start doing it. Read a few books, have google and SO always at hand, and "just do it". Your programs will be very basic, badly coded and buggy at the beginning, and you will get better and better with time. I don't have the time to take programming classes, but I do spend a lot of time coding (because it's fun to do it).

Choose a language that will allow you to think more about what you want to do and less how to do it. c is not a very good example of that. Try higher level languages like java or c#, because they will let you do more, so you will get the courage of trying more and more.

(That is, of course, assuming that you are not pursuing a career as a professional programmer, in which case I would just say go back to school...)

Good luck,and have a happy coding

PS: Oh, and you will need a lot of laziness, impatience and hubris

http://c2.com/cgi/wiki?LazinessImpatienceHubris

share|improve this answer

A few things you'll need to really get going:

Perseverance: Becoming a good programmer takes time an practise. You'll need to write a lot of bad code before you write any good code - a lot of bad code. Thankfully, you have resources like this site to help you out. As long as you keep committed to learning to program, you'll be able to put together simple games and utilities in no time!

Goals: Set some goals for yourself. Say learn how to use STL in C++ in two weeks. See how well you do. If you take longer, keep track of how much longer, it'll help you do better in the future. I learned this trick from a co-worker; he could estimate, to the day, how long nearly any task would take him. Doing this has helped me keep tabs on how long I spend on personal projects, and helps me keep them from ballooning out of control (scope management they call it).

Curiosity: You have to be interested and engaged. If you're not the type of person who doesn't approach problems with a desire to find the solution, starting out programming is going to be difficult at first, and debugging can be nightmarish. But it doesn't have to be so. If you have a problem, ask on sites like this, google your error. If you can't figure out how to implement something, ask! There are always people out there who are willing to help!

Confidence: Be confident in what you are wanting to do, and confident enough to ask questions. If someone shows you another way to do something, don't be defensive, or down on yourself thinking you did it wrong; think of it as you being taught a different approach to solve your problem!

Above all, keep a positive outlook, read lots of tutorials, and ask lots of questions, and you'll be a happy programmer! Another bit of advice I have to give is to pick a language, a stick with that until you're more confident. You have lots of time to learn a range of languages, but when you're starting out, just work with one.

Good luck! And remember, this is supposed to be fun! =D

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.