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.

I am about to graduate from a good US school with a Computer Science degree, having good grades and high GPA. I have no freaking clue how to write a good program, how to properly test it... nada, zero.

We were never taught how to write software. Yeah, sure the Computer Architecture class is important, and I can tell you a lot about how MIPS processor works, and I can tell you about Binary Trees and Red-Black Trees and running time of operations in Big Oh, but it has nothing to do with programming in "real" life. Heavens to Betsy, none of my classmates know how to use STLs or write templated code! To be honest, I found many of my classes to be a waste of time.

What should I do? How do I step into real life and learn how to program ?

share|improve this question

closed as off topic by gnat, Walter, Jim G., GlenH7, Robert Harvey Nov 28 '12 at 18:36

Questions on Programmers Stack Exchange are expected to relate to software development within the scope defined by the community. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about reopening questions here.If this question can be reworded to fit the rules in the help center, please edit the question.

3  
Unfortunately the best answer would be to apply for internships. For you it may be too late, but for anyone else in this situation earlier in their college career, that's what you need to be doing. –  xaxxon Nov 28 '12 at 4:06
1  
Psst... "graduage" –  Erik Reppen Nov 28 '12 at 5:31
4  
"How to step into real life and learn how to program ?": By doing it. And it is not difficult (especially compared to learning about Red-Black trees and all the theory stuff that you have already managed to learn). Learning to program requires practice, time, and dedication, but all the theory you have learned will make is much easier. –  Giorgio Nov 28 '12 at 9:46
3  
While it's not good that you didn't learn practical programming skills, don't underestimate the value of your education. If you know the theory, it's much easier to learn programming then vice versa. And you have a good chance to become an excellent programmer. I remember a friend telling me that a few decade decades ago one institute developing computers preferred hiring mathematicians over programmers - mathematicians were able to learn and understand new concepts much more easily. –  Petr Pudlák Nov 28 '12 at 13:37
1  
related meta discussion: Why was this question closed? –  gnat Nov 30 '12 at 7:05
show 6 more comments

8 Answers

You learn to program by programming. If you want to get some actual experience, pick an open-source project and try and fix some bugs in it or add a new feature or two. Or find a moderately complex program that you enjoy (simple games work well) and try to write a clone of it.

When you're actually trying to accomplish something with a real purpose, you end up having to stretch yourself. You learn to do new things, or new and better ways to do things you already knew about. You'll run into bugs and problems, and have to think about ways around them.

And don't be afraid to ask questions, on here or on StackOverflow. But here's a free tip for you: don't ask like a n00b. It'll get your question closed. Here, you said, "I've just about finished up a college degree in CS, and I don't feel like I've learned much about programming. What do I need to do?" That's good. That fits the pattern we like to see: "I want to accomplish X, I've tried Y but it doesn't seem to be working. What am I missing?"

Too many questions look like "I want X, how do I do it?" Those look lazy, and they tend to get closed and buried in downvotes. But if you show that you've put in some real effort, you'll find lots of more experienced coders who are friendly and willing to help out.

And remember not to be too hard on yourself; you shouldn't expect to be good at it yet. It takes 10 years of serious, dedicated study and practice to get good at anything, including programming. If you're just getting out of college, you're not even to the halfway mark, especially as a good deal of your time in college was spent focusing on stuff that has nothing to do with your major.

Try to find an entry-level job in programming. I learned more about building real-world software in my first six months on the job than in all my years of college and amateur work put together. Once you've got some skills under your belt, (and once you've built a bit of reputation by contributing to open-source projects or making other contributions to the community,) you can get a better job.

And last, get active on StackOverflow from the other side: once you start learning some things, try to answer some questions for the next wave of newcomers. There's a reason why the words for "teacher" and "master" are the same in several languages. Explaining something to someone in a clear, easily-understandable way requires you to understand it very well for yourself first, and in the process of trying to explain it, you can receive all sorts of valuable insights.

share|improve this answer
    
Excellent answer. –  DC_ Nov 28 '12 at 3:54
    
Excellent answer, thank you ! I was thinking about working on some open source projects as well, specifically debugging, since I like doing it. –  newprint Nov 28 '12 at 3:58
2  
+1 for "the process of trying to explain it". Quite often when answering a question I will pause, realise that there's some key knowledge I'm missing myself, and prompt myself to go and learn it. –  J.Ashworth Nov 28 '12 at 4:23
    
rodrigoalvesvieira.com/copy-unix –  Droogans Nov 28 '12 at 22:40
add comment

"Good school" means different things. Some high quality schools focus on research, and thus their undergraduate programs are very algorithm or architecture oriented. These "good schools" (and they often are) typically don't teach "trade school" type topics: how to use particular languages or frameworks (including testing frameworks).

The advantage of this type of education is a broader understanding of what is happening, why code is the way it is, and how connected pieces work together. Programmers from these "good schools" may have a greater ability to abstract and build mental models.

A college degree—in any subject—is often viewed as a documented ability to learn. a CS degree, then, is a documented ability to learn mathematically and architecturally complex technical topics. It's a good skill to have.

Another reason (besides research) that "good schools" take this approach is that businesses vary widely in their approach to testing, collaboration, agile practices (or not), and pretty much everything else. Even if they were to teach some of these topics (a good treatment of which often requires more than three credit hours), there is no guarantee they would match the needs of the company you join.

You've got a great start, but it's still up to you.

share|improve this answer
add comment

Academia has tended to be useless on the subject on writing code because it really is a trade skill, or craft. You get better by doing, by sharing opinions and getting feedback from others, and by eventually developing a broad base of experience to draw from when making critical architecture and technology choices in a sea of overwhelmingly bad advice, IT managers that are all too susceptible to sales pitches about things they know nothing about, and developers practically snorting lines of Kool Aid.

First of all, when looking for advice/ideas, trust no one who is overly specific/vehement about principles of the craft being sacrosanct. There is no Kool Aid like programmer Kool Aid. It is a swirling maelstrom of purple flavor that distorts reality and promotes stupid ideas or drastically wrong interpretations of perfectly good ones all the good god damn time. Fortunately there is a litmus test. It goes like this. "So if you couldn't do/use that solution/language/framework/pattern, what would you use instead?" Rookies masquerading as experts will have no interest in even trying to answer this question.

Good code, I have come to the conclusion, is 3 things:

  • Easy to read
  • Easy to modify
  • Easy to move sections of into other contexts/apps for re-use

If there is one principle that informs most of the others, IMO, it's the DRY principle. Any time you're having Deja Vu, it's time to ask yourself if it isn't time to abstract something out for re-use.

General Tips:

  • Avoid cascading inheritance in general but definitely anything that goes more than 2-3 levels deep
  • Ignore explanations of OOP that don't make immediate sense. Here's mine:

You put the inherently messy stuff that all relates to a subset or domain of problems to solve in a box and you bury it under a pretty interface so the next dev doesn't have to be bothered reading the stuff that will always be painful, (even to you two weeks later) and they can just use your box to do things without being required to know how they're done exactly.

The box also helps prevent getting that mess tangled with your other messes so you can move your messes around much more easily and use them in other places without threatening to tangle your mess with somebody else's messes.

As long as that pretty interface delivers as promised you can have multiple sets of messes inside your object for dealing with different environments and circumstances but always by working the same exact same way on the outside. But the general principle really is: objects are boxes with pretty buttons that you use to hide the messes. Also, there's inheritance, which generally stinks when used to excess but can occasionally be useful.

  • If you don't look at everything you've ever written and see gobs of ways you could have done it better, you're doing it wrong.
  • Once you get good at one particular language. Learn a very different one with a very different syntax. The sooner your brain can start to see how things work outside of the syntax and with a very different set of rules for certain things, the sooner you'll start to really become an ace at the language you thought you knew really well in the first place. Languages ultimately boil down to giant sets of (sometimes awful and stupid) design tradeoff choices.
  • Don't sweat knowing how to write the code from memory. The more critical thing is to know what's on the menu so you know what to Google later when a need arises.
  • Don't be afraid to challenge strong opinions, including your own. I have lots of them and I'm wrong all the time.
  • Design patterns should not be confused with recipes.
share|improve this answer
    
"IT managers that are all too susceptible to sales pitches about things they know nothing about, and developers practically snorting lines of Kool Aid." - I'm printing this out and framing it. –  Graham Nov 28 '12 at 13:42
    
+1 for "Don't sweat knowing how to write the code from memory" this is why Google exists. –  Ramhound Nov 28 '12 at 14:36
add comment

I was exactly the same as you: graduating with a CS degree with no real experience programming. About a semester before I graduated, I got a local job as a software developer having never worked on a software development project outside of school. I learned a ton from the job -- more than I ever learned in school (however, I think this would apply to any job).

Don't be discouraged about your supposed inability to program; if you're smart enough to get a CS degree, you're smart enough to learn it. Your knowledge will prove to be helpful .. perhaps even invaluable .. in your new job. You'll be thankful that you know all the data structures, design patterns, computational time calculations, etc. that you've learned because you will be able to apply them to your work. (Even if you don't remember specifics, at least you know what to look up!) If you can write a simple program in your given language of choice, you're probably ahead of the curve.

If you're graduating from a good school with a good GPA, I don't think you'll have any problem landing a good entry-level job. You will pick up programming really quickly after that. It's worth noting that you will learn to program differently at every job -- at least a little bit. Every workplace has their own set of rules, standards, and preferences. You will probably end up working with people who are brilliant programmers and people who can't even as program as well as you can now, but who have been there for years.

An important part of your question is why do you want to learn to program? I think there are two possibilities in your case:

  1. You enjoy it as a hobby and want to improve for your own sake
  2. You want to make it your career

I'm willing to guess that both probably apply to you. Other answers are suggesting that you pick up an open source project to work on, but I think this applies more to #1 than #2. I certainly encourage it, but without professional experience (and years of it) you will probably not land higher than an entry level position. #1 can certainly feed into #2, though. If #2 applies, my suggestion is to find work quickly! You don't want to explain gaps of unemployment on your resume.

You also have to realize that for #2 (and even #1, especially if you want to work on a team) there is a lot more to it than programming. I do spend a lot of time programming, but a lot of my job also consists of designing, communicating, writing documentation, reviewing code, and a lot of other stuff I don't necessarily want to do besides program. I picked up all those skills (to the extent that I have them) on the job too. Your main goal is to solve problems, and school should have given you a good basis for that.

Don't expect to "get good" at programming. I've been working for four years now and all my current code looks brilliant to me while all the code I wrote in the past year looks like it was written by a blind monkey (this has been ongoing for me). There are such a vast number of concepts and possibilities that it's impossible for one person to learn them all. Heck, I don't even know what STL and "templated code" mean!

share|improve this answer
    
"...and all my current code looks brilliant to me while all the code I wrote in the past year looks like it was written by a blind monkey" - FYI, this never stops happening, and that's a GOOD thing. If your code today looks the same as your code from 3-4 years ago, it means you haven't learned anything in that time. –  Graham Nov 28 '12 at 13:43
add comment

If you have good grades on a Computer Science school and you don't have a clue how to write a good program, then it is not a good school. I can't really imagine how they teached you the algorithms and data structures without having a practice class where you could try implementing them. A school should prepare you for employment - if it didn't do that and you still achieved good marks, something is very very wrong.

What now?

  • Teach yourself - there are lots of good tutorials on the internet, lots of good books with exercises after every lessons.

  • Apply for a junior job. Don't worry if you are underpaid, with your skill from school, you will be able to progress fast.

What I consider to be a good Science school

To compare with my Computer Science school in Europe (note that none of my classmates have problems finding a good job, most of them are paid very well and they are not starting on junior posts)

Year 1

  • Lots of maths (calculus, algebra, discrete math, combinatorics, logic) - teaching us logical thought, concept of mathematical proofs, concept of graphs and graph algorithms
  • basic programming using Pascal with two programming tests at the end of semester, one using computer, one simply on paper, with several non-trivial individual projects (e.g. my Minesweeper, ported do Delphi in the 2nd semester, with a next-move help algorithm).
  • Computer hardware internals class

Year 2

  • Still a lot of maths
  • Algorithms and Data Structures theory + practice class
  • C/C++/Java programming languages, each with an individual semestral project and a final test
  • Unix shell scripting with a final tests

Year 3

  • Operating systems - including a team project when we were actually writing an operating system on a simulated processor (threads, virtual memory managment, system calls etc). Great emphasis on code quality and documentation.
  • Individual project - 1st semester = design architecture and document it, 2nd semester = implementation
  • Grammars and state machines (theory)
  • Different programming languages (Prolog, LISP, Haskell)
  • Lots of optional classes (web, games, AI, advanced graphics etc)

Year 4

  • Complexity, Computability
  • Compilers theory + writing a compiler for Pascal as a year project (step by step - lexical analysis, syntactic analysis etc.)
  • Starting 2-year team project for a company (lots of companies support student projects, we were working for Sun Microsystems)
  • Code Quality class
  • Testing class
  • Middleware class
  • Automatic code verification class

Year 5

  • Master thesis (a very big individual programming/theory project)
  • lots of optional classes
share|improve this answer
1  
You outline a Master's degree, the traditional B.S. degree is 4 years and doesn't have a thesis. –  Ramhound Nov 28 '12 at 14:38
    
@Ramhound The number of years is different in every country. Actually I got my BS degree after the third year and many classmates didn't continue and started working immediately after finishing the 3rd year. –  Sulthan Nov 28 '12 at 14:44
    
Its possible to finish 120 credits in 3 years. The question is also localized to US, my comment, is based on that fact. –  Ramhound Nov 28 '12 at 15:52
add comment

Strangely enough, nobody mentioned the partecipation to an open source project as a way to rapidly improve your practical programming skills.

The only way to learn how to write real-world code is by facing real-world problems and solving them with real-world code that real people will use. This is the only way to get feedback (both from your programmer peers and from your users). Feedback is the only way to know if you are doing the right thing.

You do not need any internship program or any job opportunity to get feedback. Just join a small group of desperate programmers out there and start writing code with them. Just do not dive into the linux kernel or anything too complex.

The best way to find a group of friends to work with is the web. Just discuss your ideas in forum like this one and/or visit one of the many open source code repositories out there, like:

http://sourceforge.net/

https://github.com/

Look for something that can fascinate you, study the code a little bit and, if you feel you can write some code for the project, contact the other programmers and ask if they would like a new partner. Most likely, they will be happy to give you some simple bug to fix or some simple new feature to implement. For sure, they will understand your weaknesses (they were like you, some time ago) and will be more than willing to help you.

Of course, they will expect that you study a lot by yourself. You will have to read a lot of tutorial and documentation on the web and you will have to buy and read a few books. This profession requires a lot of reading, studying, experimenting, tweaking and so on. But you will not be alone.

Should you decide to go this way, take into account a couple of things:

  1. You will need a relatively simple language to start with. Java and, even better, Python are usually considered good starting points. Stay away from very large language like C++ (C++ can be extremely easy and pleasant to use, for example if you use Qt, but it is terribly large). Stay away from functional languages like lisp, scheme, haskell and so on. They are quite hard to handle.

  2. You will need a relatively easy task to deal with. Command-line programs (like imagemagick, for example) are the easiest to understand (but do not overlook them). GUI programs require a lot of code and can be quite complex. Web applications (PHP, Ruby, Python, etc.) can seem to be easy but this is not always true. Managing web framework like Ruby-on-rails and Django can be hard at times (depending on the task at hand). If possible, try to work with a small group of developers (2 - 5 people) on a small project. Stay away from those gigantic crowds of code ninjas out there (Eclipse IDE, Linux kernel and so on). When in doubt, ask around for suggestions.

  3. You will need focus. Do not expect to be able to code fluently in a few weeks or a couple of months. Give yourself at least 8 - 12 months to learn the basics. Do not jump around from Python to C++ and from Ruby-on-Rails to Qt. Stay on a single platform and a single language for some time. Once learned the fundamentals of programming, you will be free to experiment.

In any case, do not give up. This is a hard profession but it is also highly rewarding, both in terms of money and career and in terms of... fun.

share|improve this answer
    
I mentioned open source participation in my answer, which I think was the first one for this question. –  Mason Wheeler Nov 28 '12 at 23:17
    
Ooops, sorry. I did not noticed it. –  AlexBottoni Nov 29 '12 at 7:45
add comment

It would be helpful to start with coding small and useful applications. We do learn while coding and starting with simple app like calculator is all it take.

Once you have accomplished simple applications, move to more functional apps that work with database/web services. For example: student loan registration or inventory management type of software.

After couple of completed applications, you will definitely get confidence of accomplishment that will pave your way to the software developer work/position.

In addition, try to read and understand code of other developers. It is also good practce once you have fundamental understanding and would like to learn how experienced developers write the code. The resources like codeplex.com, sourceforge.net, etc.. are some of the good resources to look.

share|improve this answer
add comment

Heres what I did, I actually started out with PHP and went to a lots of forums ( I was not a member of stack exchange back then I am new here ) and answered questions also in the forum users would ask how to do this with then I would build it up and send it to them . Luckily I found that one of the members needed help with some herb selling website with shopping cart and stuff , so we built that together with all the HTML PHP CSS Javascript etc. Also I followed some tutorials on youtube and try to accomplish the tutorial's objective ahead of time if everything worked fine great . If not then just follow the tutorial. Right now I am learning C++ I am using a book this time with lots of exercises which are really fun to do . Thanks to the stack exchange community if you ever find yourself stuck somewhere there are awesome people here to help you out. Good Luck

share|improve this answer
    
Please, don't down vote. I am want to hear opinions from all sides. –  newprint Nov 28 '12 at 21:26
add comment

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