36

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!

9
  • 22
    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. Commented Apr 9, 2011 at 2:26
  • 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
    Commented Apr 9, 2011 at 7:40
  • 5
    @SnOrfus: No-one except for Jon Skeet ;)
    – back2dos
    Commented Dec 7, 2011 at 12:40
  • 4
    from one noob to another: Practice is the key!
    – Chani
    Commented Dec 7, 2011 at 16:17
  • 1
    @Snorfus I bet A few people did! :P
    – Mark C
    Commented Dec 7, 2011 at 19:24

17 Answers 17

27

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.

8
  • The 10000 hour rule suggestion sounds like a fair one. Really intriguing, but which language should I choose which would still be relevant & offers the same flexibility of new languages (for eg: If I learnt Java in depth with all the concepts, I would be able to migrate to Scala, Processing, Clojure, etc fairly easily).
    – Ameen
    Commented Apr 9, 2011 at 1:46
  • 12
    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
    Commented Apr 9, 2011 at 2:11
  • 2
    "spending more time on it" in a vague way is not effective. Commented Apr 23, 2011 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
    Commented Apr 23, 2011 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
    Commented Dec 8, 2011 at 17:13
17

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.

13

'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.

4
  • 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
    Commented Apr 9, 2011 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
    Commented Apr 9, 2011 at 2:11
  • @Wes Baker: Thank you very much for that Hacker News thread. I can certainly relate to the OP's thoughts (although I haven't had it so bad). I (think) have fairly decent knowledge on Operating Systems, Computer Architecture, Algorithms, Data Structures, Computer Networks, Cryptography, Data Warehousing, etc. (although I need to brush them up). As I'd said I know all of these subjects from a theoretical POV, and haven't actually done practical stuff on it. Will certainly skim through that thread, lots of awesome advice over there as well. Tyvm!
    – Ameen
    Commented Apr 9, 2011 at 2:21
  • @Ameen By 'everything', I don't limit to docs and tutorials. Code others have written, the idioms they have used, errors, exceptions, etc others have faced and their solutions, etc as well. I am not a psychic or psychologist by any means.
    – vpit3833
    Commented Apr 9, 2011 at 6:36
9

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

3
  • Thanks for your insightful input. One of my problems has always been the fact that I have (often) aimed too high and fell down face-first. My Subconscious might have taken a "Burned once, twice shy" approach and maybe is blocking my attempts to rectify that. I have always been curious, but the lack of a mentor has led me to ignore my curiosity. And seriously SE is looking way more awesomer as time passes, I shall surely peruse this awesome resource and attain my goal of becoming a proper programmer. Thanks a lot, I seriously can't say how much your post means to me.
    – Ameen
    Commented Apr 9, 2011 at 1:54
  • I'm happy to help! =D
    – bryanegr
    Commented Apr 9, 2011 at 2:04
  • Best goal: ship code!
    – user1249
    Commented Dec 7, 2011 at 18:13
7

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.

4

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

4

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.

4

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.

3

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.

1
  • Thank you very much. I am very much interested in Programming ( I do solve problems in my head - and of course in algorithms, flow-charts, etc.) I seem to be lacking the sticking to a project and going on with it and asking for help when stuck on a dead end. ( all of that has to end now, though :) Thanks to SE) Also, I've been hugely interested about HTML5+JavaScript stuff (partial page loading - Mashable implements this in awesome fashion, Answers loading on SE, etc). Don't really know decent resources for them to learn from though (W3C-Schools are supposedly quacks; W3Fools says so!)
    – Ameen
    Commented Apr 9, 2011 at 2:28
3

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.

3

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.

3

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.

1
  • Wow, that's an entirely new way of looking at this. Love the way you put it, there will always be something that you'll want to do. I really should start turning my negatives into positives. Thanks a lot. Appreciate it!
    – Ameen
    Commented Dec 8, 2011 at 17:09
3

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 :)

1
  • Sure, I need to do that. But my ego kicks in and says "You're not good enough to others to do stuff, heck you're not even good enough to be here". I know it sounds silly, and as some people here have mentioned it, maybe I'm just afraid to stress my brain out, but I will, I'll stress that lump of fat till its nothing. Thanks a lot for the suggestion and I shall try to stick to my new habit of scouring SE for interesting questions each day to solve. Thank you for taking you're time out and answering my silly question. I really appreciate it!
    – Ameen
    Commented Dec 8, 2011 at 17:17
3

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.

1
  • Wow, you've just nailed down the biggest culprit I've ever suspected. My brain, I've always had a problem with getting cold feet, and most of the time I end up sabotaging myself. There's always some excuse I make up to avoid doing what's important. I need to become a hacker and stop worrying about failing monumentally due to past failures. I need to hack my life so that I become the quintessential "Yes man". Thank you for pointing out some of the flaws in me that I really needed to change, and I hope to do that asap. Thanks a ton, and I can never thank you enough for this! Cheers.
    – Ameen
    Commented Dec 8, 2011 at 17:05
2

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?
1
  • Great! Points indeed :) Commented Jan 8, 2023 at 8:15
2

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.

1

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.

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