views:

1523

answers:

21

Unfortunately I am a CS graduate. I have the working knowledge of algorithms and stuffs like that. But my confidence in programming is becoming littler every day. The problem is not that I don't know how to code. I have significant knowledge of the syntax of a couple of languages - C, java, python, ruby etc. But the problem is that I seem to have stuck at the same point because of some obstacles.

For instance, I tried to solve the problems in acm online judge. I select even the silliest problems which I would not otherwise consider. But even for those silly problems I am consistently getting wrong answers. So my confidence is becoming lower. Moreover, I tried to implement the B-tree in C using all those pointers and I am getting all those segmentation faults even though I successfully implemented in java. I have fixed segmentation faults before but this time it has become elusive and made me really frustrated.

Above all, I am a really slow coder and have the urge to improve the coding speed. So this is kind of a vicious circle. All these are making me really unhappy and want me to quit but I can't quit because I have already got my education in CS and I really like programming despite all these (because of the satisfaction it gives when it produces a workable thing). Now what I can do about improving my confidence?

+13  A: 

You need to keep writing code and have the confidence in yourself to push through. No one is born a great programmer. Even though sometimes you might fail or not have your programs turn out quite the way you want, you cannot let yourself get discouraged. With more practice and experience eventually you'll see a difference in yourself, if being a great programmer is really what you want.

If you want to practice and improve your programming skills, you can start by having a look at the following sites:

  • Code Kata - This site has posted many simple programming tasks; the basic premise is that you solve them as practice to become a better programmer.

  • Project Euler - The first problems are quite simple and will be good confidence boosters, although the problems quickly become challenging.

  • Ruby Quiz - Although the site is no longer maintained, there are some great fun, challenging quizzes here. You can just read some questions and code up your own solutions, then read over other people's solutions to compare and learn more about the Ruby language.

On the other hand, maybe programming just isn't your thing. That's fine, there are plenty of CS grads that are doing great working in IT, QA (Testing), Management, etc. Maybe its time for you to see what else is out there?

Justin Ethier
+19  A: 

Apparently, there is some data that to get really good at anything, it requires 10,000 hours of practice: 10k hours.

You may not need all 10K just to get decent, but you'll find no substitute, or shortcut. You've got to put in the sweat equity.

dicroce
That reminds me of the article, "Teach Yourself Programming in Ten Years" which is well worth reading: http://norvig.com/21-days.html
David Johnstone
+2  A: 

On programming languages: If you can code in Java, like you said you can, then use that. Stick to your strengths. Develop your Java ability to a high level, then explore other languages, knowing that you have your Java knowledge to fall back on if your "expeditions" go pear-shaped.

On actual coding: Pick a project to work on, something that you're deeply interested in. For example, do you like card games? Then implement that game as a computer program. Develop the notion of coding as a personal hobby, aside from any professional directions. Find something you love, then build it.

(The point of this is that when you do something out of passion, you are more likely to be able to avoid letting your sense of pressure and self-criticism get the better of you.)

Good luck! :-)

Chris Jester-Young
+5  A: 

Pretend it's an assignment; you have to squash all the bugs and get the damn thing to work, otherwise you'll get an F.

We all spend hours fighting nasty memory bugs when we work in C/C++.

hasen j
Sometimes hours turn into days and weeks with really complex software (multithreaded, distributed, or simple huge scale).
Tadeusz A. Kadłubowski
+2  A: 

Don't admit you're slow because you might be fooling yourself. Bugs are part of life. You make many suggestions about why you can't do it but those are likely harsh because if you get a wrong answer -even to a simple problem - you're supposed to work out the bugs by refinement and run it again instead of lamenting it. That's what we (programmers) all do on a daily basis and an employer can't ask for anything better than working code which, for the most part, we all eventually get to one way or another. Now if you don't like the little details and would rather get them included the first time without having to spend time on them, then that's another problem.

Now if you're looking to code fast and furious and to always get it right the first time you're not in the real world of programming - you're in academic land. Sure some programmers can do that but they are few and far between and you don't need to compare yourself to them.

Here's a suggestion: if you think you're too slow at finishing a problem at work just say to your boss you're 99% done and want to test a few things at home tonight, and will show him tomorrow. Then go home and finish the other 30% of it. Eventually you'll either talk yourself out of programming or learn techniques through experience to better handle it. But you have to gain the experience first.

And about Java vs C/C++ seg faults. Heck you're never going to get a seg fault in Java even if you write the worst code on the face of the earth. Java is a confidence booster. Low-level languages are tough so you have to deal with the crap.

Lastly no pity party. You'll likely talk yourself out of many things in life it that's an overall attitude. You've only got one life to live so if you like programming then program darnit!

John K
+1  A: 

Maybe you're just burned out too, take a 5 day break if you can and see if that helps.

Arthur Kalliokoski
+2  A: 

Try to concentrate on doing things that you really like. When you work on something that you REALLY like you'll start encountering a lot of problems, it will inevitably be the case that other people encounter the same problems in other fields, so you'll be able to apply the solutions across the board. In the early days I was even getting lost in my own code, but after a year of working on stuff that I like I ended up solving a lot of issues which I don't think I would have been encouraged to solve before that. Now I feel like I have a tool set of solutions for various problems, I just have to recall them and apply them... this allows me to solve more complex problems.

The other thing that helps me feel better about my skills is answering questions here: if you have a good tool set of solutions, you should be able to answer question in stackoverflow and people should like your answers. Read a lot of the questions in stackoverflow that are within your field and your interests, you'll learn a lot from them and this will also help you get more tricks up your sleeve :).

Lirik
+1  A: 

Start with small problems. Almost all big problems can be reduced to a lot of small problems.

Define an input, and expected output. Make that happen.

Then extend that... think of what you start with, and all of the transformative steps to get to what you want. Try to avoid thinking of code as "doing" things, rather think of it as collecting and transforming data.

Getting overwhelmed usually happens because you look at too big of a problem and try to solve it all at once. Bite-sized pieces are a great way to get past that.

kyoryu
+2  A: 

Dude!! I feel for you :)

What you may be experiencing here is the gulf between academic knowledge and the real world. You have learnt the theory, little bits of languages and some algorithmns, but have only a little idea of how to apply this to real world examples.

I would suggest two things:

  • pick an (immature) open source project, grab the source, and try to add some functionality to it. If you succeed, then don't submit the code immediately, instead analyze it and see if you could do it better, polish it some more. Once you are happy, then submit it. I'm not a huge fan of people learning on OSS projects, but it may be quite beneficial for you.

  • do some development that is a little simpler than C++/Java/etc. Do some web development work using HTML and some scripting languages. Or learn how to do some business analysis type coding, such as Excel macros. By doing smaller, simpler and more self contained things you will build confidence and experience in the real world.

If you do these things and then find you are still not happy, then think about getting onvolved in another role that is not directly development, such as testing, product management, business analyst, etc. At least give yourself a chance before swapping vocation though.

slugster
A: 

Set yourself some goals where you get to practice on writing lots of code and hopefully they are useful tool to you or others too. I remember two or so years ago there is this guy set himself up a challenge (I think its call Ninja Challenge) and he set out to create 10 applications in 10 days. I actually downloaded and evaluated some of the project and they were pretty impressive. Practise will be the best way to speed up your coding skills. Perhaps as a start dont be too harsh and set goal like 5 apps in 5 weeks and really give it a crack. Post questions here on thing you arent sure or looking for more optimize way to do thing so you can learn from it as well.

Fadrian Sudaman
+27  A: 
  • First I will say that a full 40% of people that make money as programmers especially in the enterprise business world can't code at all. My manager once told me if he gets to a team and only 30% of the people can't code he knows he is on a good team.

  • ACM problems Are hard problems you will get a lot of intro coding assignments like take this object and add a field to it and store it in the database.

  • Speed comes with time and experience like every one else said write a lot of code and you will improve. Also alot of people sacrifice style good practice, and design to code as fast as they can, and end up just fixing more defects later.

  • You care about improving, most people don't, end of story. I have had more then one programmer tell me they don't even have a computer at home because they can't stand to be on it after they leave work. By caring you will always have the edge.

rerun
+1 For the not having a computer at home comment. I've seen this so often - and it always means that he/she only chose programming because they thought it 'a good career choice'. People like that are never any good at the job.
Cruachan
+1 for "full 40% of people that make money as programmers especially in the enterprise business world can't code at all".
fastcodejava
so 40% of working programmers can't actually do the job? Can you cite a study or was that number just pulled out of your ass? It's not that I think you're wrong, trust me, I've met some real winners over the years. What you mean to say is 40% aren't as good as the other 60%. And you can apply that logic to any skill, not just programming.
Jack Marchetti
I pulled it out of my personal experience. There are people on every team that are not given coding assignments they do project admin tasks other important tasks but are not trusted to work on the project. just my .02.
rerun
+1  A: 

You should feel proud, that you are CS graduate. :) .
1) Start making small utility programs which helps you do better your day to work. e.g related file meta data,images library program,web etc. As you know python already; it offers huge library and solutions on net. Do xplore them use in your projects 2) Share your programs with friends/forums. Contribute to other forum/ blogs etc. and don't be so -ve.. this is not the End of World

Even just writing '1 program a day' (from simple to complex one) and within 2-3 months you will be able to do program those ACM puzzles type also.

aberry
+1  A: 

Minor advice regarding pointers and segfaults: use the best tools you can find. Beginner programmers write:

printf("Foo is %p", foo);

all over the place to look for NULL pointer dereferences. That's slow and ineffective.

Good tools you should learn:

  • debugger (depends on your platform, gdb on Linux)
  • valgrind (on Linux and OS X)
  • dtrace (on Solaris and OS X)
  • umem (on Solaris)

The problems that are overwhelming without good tools look trivial after you arm yourself with a professional toolbox.

Tadeusz A. Kadłubowski
+1 for valgrind. I switched from Solaris to Linux purely for that tool. dtrace on Solaris is hideous in comparison.
Andy Shellam
@Andy: The downside is that valgrind is totally not suitable for use on life production systems.
Tadeusz A. Kadłubowski
@Tadeusz - Why? I know you'd have to recompile the app being debugged with debugging symbols, but is there any other reason?
Andy Shellam
@Andy: Valgrind is slow. Enough said. Full memcheck slows down program execution to a crowl.
Tadeusz A. Kadłubowski
+1  A: 

It's like if you want to be a good pianist,
you have to do a lot of scales and a lot of practice,
and a lot of that is kind of boring, it's work.
But you need to do that before you can really be very expressive and really play beautiful music.
You have to go through that phase of practice and drill.
- Terry Tao

I guess your problem is not LOGIC but implementation.

Believe me programming is art and everybody faces those kind of difficulties.

Dude, you seriously need this book. It will teach you how to implement.

and When in doubt come to STACKOVERFLOW!!!! We're here all the day!! ;) cheers!!

alt text

First try simpler things.

TheMachineCharmer
+2  A: 

With respect to coding perhaps you're taking on too many languages at once?

C, java, python, ruby

That's a lot of languages to learn especially when you are just starting out.

Like others have already said start smaller. Writing a B-tree isn't the easiest thing to do. I find it hard to motivate myself to write code for things that someone else has already written better than I could ever write... I'm coming back to the B-tree example here. So perhaps you should find something that you are little more passionate about?

Kane
+1  A: 

Well if I interviewed you and you could prove that you have tried the problems in acm online judge then you have a real advantage over others that have not. We could discuss the problems you tried an see if we could work them out together. I could probably learn something too!

I would admit to you that I wasn't even aware of these problems with no sense of shame or embarrassment. One cannot know it all!

As for the slow coding. Well in my experience there is far too much 'quick coding'. And the result is dirty and smelly code at the function level all the way up to the top-level architectural view. And this is a relative issue; on what criteria and evidence do you judge yourself to be slow?

You get frustrated? While debugging? With your own stupidity never mind other peoples'? Yeah, that's part of the game. But as you say, it is satisfying when you think you understand something.

You are less able than some other people: you are more capable than some other people. All depending what the criteria are and the methods of assessment. And just what kind of day your having!

You enjoy programming, don't give up on this that enriches your life.

People here have already given their good advice.

I myself can only urge to to take a broader view of programming and software engineering and I recommend that you read the following 2 books:

Dreaming in Code - shows even very clever coders can mess up - 'Software is hard'

Code Complete - gives a good overview of the coding process.

Learn one thing at at time and learn it well. Create a reasoned plan and stick to it unless you have very compelling reasons to change it. Confidence then will not be an issue, you will attack every problem without this emotion even those problems that are not familiar to you. The you will you make an above average manager!

I am an average programmer by definition.

Sam
+1 for recommending code complete. It's such a excellent book.
Lucas T
+1  A: 

Shooting from the hip here, but maybe your CS studies are making you focus too much on algorithms and dry stuff like that, and less on 'shipping' something which rocks. The thing that gives programming a buzz, for me at least, is the creative side. Coming up with solutions that DO something.

As others have suggested, do a bit of web. Or come up with an idea for a handy little program for: keeping track of your music collection, anything, address book, etc.

Benjol
It sounds corny, but ... I get most of my job satisfaction not from knowing that I've coded something properly, not from knowing that I've done something that worked, not even knowing that I've achieved something I struggled with, but seeing what I've done being used by people. I worked for a travel agency and developed their booking system. Everytime I walk past one of their travel agents, I look in the window at their computer screens and the software they're using, and I smile knowing that I did that.
Andy Shellam
A: 

Practice no-action; Attend to do-nothing; Taste the flavorless, Magnify the small, Multiply the few, Return love for hate.

Deal with the difficult while it is yet easy; Deal with the great while it is yet small;

The difficult develops naturally from the easy, And the great from the small; So the sage, by dealing with the small, Achieves the great.

Who finds it easy to promise finds it hard to be trusted; Who takes things lightly finds things difficult; The sage recognizes difficulty, and so has none.

fuzzy lollipop
A: 

Have you tried Test-driven development (TDD)? This technique lets you evolve a solution and verify that it works. Try it with some simple katas, as Justin Ethier suggests. There are several books on the subject, such as Test Driven Development: By Example.

Nothing builds confidence like test coverage.

TrueWill
A: 

Practice everyday

kuchipatchikun
A: 

I had that kind of confidence block. The best remedy I think, is finding a practical problem you'd like to see realized. Something that is really simple, and does that one thing well. The Unix-way in a nutshell. If you actually need that application in addition, you will hopefully have some real motivation to get it working. Doing constructed problems is not the way I think to gain confidence.

I wanted a simple networked audio for myself, and I've had great fun for the last 3 months at least :p

Maister