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.

Possible Duplicate:
Should I keep investing into data structures and algorithms?

I'm a CS student. I want to become a really great programmer, what do I need to do to be come a great programmer? Other then writing lots of code, I've heard that studying algorithms and theory (logic!) is help. What do you recommend to become the best? What do I need to read? What do I need to study?

share|improve this question
    
You should move this question to programmers.stackexchange.com –  Nix Mar 1 '11 at 0:51
    
votes will take care of it, Nix. –  Femaref Mar 1 '11 at 0:51
add comment

migrated from stackoverflow.com Mar 1 '11 at 0:55

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

marked as duplicate by Yannis Rizos Mar 7 '12 at 18:19

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

7 Answers

up vote 11 down vote accepted

Programming is as vast and diverse as there are programs. You could have a very fruitful career without ever having to worry about algorithmic complexity. I have been developing database type applications that help save lives everyday yet never had to compute the BigO notation of anything I produced.

This said, algorithmic is an important part of the domain and can be a good asset if you learn it. Learning it will open your mind to certain problems you could encounter, on how to measure it and it will teach you some common patterns you can use to solve them.

So yes, the study of algorithmic will make you a better programmer this I am certain of.

I think a more important question you should ask yourself at this point is what kind of problems you want to solve as a career. Knowing this will help you getting the right tools to give you a head start. Algorithmic is an important theoretical tool to have, but so is cognitive ergonomics, architectural patterns, information theory. There are also many down to earth knowledge such as learning the different patterns in the Software development process that are often frowned upon as boring and uninteresting while learning the trade yet play a crucial role when creating software in the industry.

This was by no means a comprehensive list but all are, in my experience, equally valuable in making you a great programmer. It all depends on the problems you wish to solve with programming and the approach you wish to use to solve them.

--- EDIT --- As Earlz mentioned in the comments after you learned the skills they remain with you all the way. So even though I never did a complete in depth bigO analysis of a system the knowledge remains available, I guess it gives you a supplementary sense by which get a feel for a system. I once came across a simple logging system whose implementation ran in factorial order. I think had the programmer learned about algorithmic complexity he would have noticed that and coded away from it instead I got the old rhetoric "it's just logging, it does not affect the runtime". Of course he was not the one that had to tell the customer they had to wait approximately 6.4 billion years before their data import would complete.

This would be true for pretty much all of such fundamental body on knowledge. Even though you do not actively use it the knowledge gained remains and influence your daily tasks. Learning a specific language, methodology or system is good for the short term but is doomed by obsolescence before you even opened the book.

share|improve this answer
    
Am I the only one that constructs a "summarized/crude" BigO notation for every loop/recursion I make subconsciously? –  Earlz Mar 1 '11 at 3:28
    
no, I also do... somewhat. I think it is a side effect of learning it properly in the first place. The knowledge stays, however I never had to do an in-depth analysis of a whole system like I learned how to in my classes. This said, it does help to gain a feel for a system and as such probably prevents us from creating monstrosity. –  Newtopian Mar 1 '11 at 5:17
add comment

To become a real programmer, you definitely need to study algorithms to at least some degree. There's a lot there that isn't crucial to programming, but without at least a reasonable amount of knowledge, you're pretty much sunk.

There are a number of classics in the field, most obviously:

  1. The Art of Computer Programming, by Donald Knuth
  2. Introduction to Algorithms, by Cormen, Leiserson, Rivest and Stein.

Personally, I tend to prefer Knuth, but both are entirely adequate, and the other covers more in the way of newer algorithms (though the newer edition of Knuth is undoubtedly better in that respect as well -- I haven't updated my copies since I bought them somewhere around 30 years ago.

share|improve this answer
1  
In my (limited) experience, Knuth has a lucid style that drags you right up the pseudocode. Then he drops you in a swamp of unstructured, low-level drudgery that makes your head hurt. But then, I've only seriously tried to grasp one "fascicle" of TAOCP part 4. –  larsmans Mar 1 '11 at 1:08
add comment

Study data structures. Knowing the right data structures is a great help in knowing how to organize a program, and the applicable algorithms tend to follow from them.

E.g., learn to understand from specifications (of a single function or an entire program) if you can keep data in an array or whether you need a hash table, tree, etc.

Also, know your libraries; modern programming languages tend to organize their libraries around data structures such as arrays/vector, sets, maps, etc. You may never have to implement a red-black tree yourself, but know when you need it and which part of the standard library implement one (or a similar structure in terms of performance).

share|improve this answer
add comment

Absolutely essential. Central. Nothing matters more.

Some people claim that they never make use of the junk they learned in Algorithms class.

Yet, weirdly, they seem to know when to avoid nested loops and make use of pointers.

So, they can claim they never made use of it. But it clearly influences their coding.

share|improve this answer
    
What's a good starting point to learn if you're at the end of your Uni but haven't really seen much about algorithms. My university degree taught me more about business programming and program flow but didn't really delve much into the Comp Sci regions. I think it would round me off nicely if I spend some time learning the under the hood things. I keep hearing about O(n) and other related things but have never bothered to ask where to begin until now. Thanks! –  Sergio Mar 1 '11 at 1:39
1  
That's just silly. I wouldn't go so far as to say "Nothing matters less" but there are a whole buncha things that get in line ahead of algorithm design in the making of a real programmer: problem analysis, DB design, module design, debugging... –  Malvolio Mar 1 '11 at 3:31
add comment

Depends on what you mean by "great programmer." I'd (arbitrarily) divide greatness into three equally bins:

  1. Creative: faced with a challenging new problem, you quickly determine an efficient solution.
  2. Responsible: you produce lucid, clear, maintainable code and never, ever break the build
  3. Encyclopedic: given an obscure problem interfacing with the external world of libraries, frameworks, OSes, etc, you instantly know how to address it.

Ideally, we'd all like to be all types, but that's not generally possible. The place where algorithms and theory will really help is the first sort. As a computer science researcher, I use that all the time, type 2 expertise less often than I'd like, and type 3 rarely at all.

As for a reference: The CLR algorithms textbook is a classic, and a good read. There's probably some class uses of it online that present well --- try MIT OpenCourseWare. The most important thing, IMHO, is to get a strong intuition for asymptotic complexity. If you do so following the path laid down in a text like CLR, you'll also end up with a basic literacy of data structures and algorithms that will serve you well.

share|improve this answer
add comment

How is a great programmer measured? How do you want to be measured?

The answers you give for these questions might help influence you today, but they will continue to come up again throughout your career.

Having technical proficiency will certainly be fundamental to achieving success. However, in order to distinguish yourself, there are options. There is often more than one path to nearly any destination. Perhaps becoming a great programmer can be achieved by a superior ability to dissect and digest a domain and a cross study of a particular domain now might help. Perhaps it can be achieved in a less specific manner, through an indispensible ability to identify user intent through an understanding of psychology and sociology. Perhaps instead it comes knowing more about business: being effective at marketing so that you know what people want before they are even aware that it can exist, and then convinving them they not just want it, but depend on it. Perhaps it is something else.

The advice I would give is that while programming might be a craft you hone, don't purposefully omit a deeper study of other fields where you have a natural talent or interest.

share|improve this answer
add comment

This is a little difficult question to answer, especially as we get more and more powerful abstraction/libraries there will be little need to learn these things.

Phase I:

Thousands of business executives can continue to program on a tool called Microsoft excel even without knowing they are actually programming. They can continue to define a work flow(heuristic), sort data, manage data, query data. Automate their tasks and what not even without knowing a word of programming. Excel figures out what the right algorithms are for them when they sort and search.

Now how do you sell the idea of algorithms to them?

Phase II:

Back in the day, do you remember it would be impossible to implement any decent application without actually remembering the API. You had to either remember them or keep looking them up in the manual. Ctrl-space in eclipse has largely eliminated the need for any such thing today.

Phase III:

In the near future IDE's and tools will have intelligence to suggest what solution(algorithmically) would be more appropriately for you based on inputs you give to it. Or there might be functions like sort() et al. Which will intelligently workout what algorithm you would need looking at the time and space complexity.

Water bed theory of complexity:

Abstractions are winning big time, you need not have to worry about a level of complexity which is already handled by the library or the language. Everytime a abstraction is invented their is lesser need to have a look at the complexity below it.

share|improve this answer
    
Like water beds, most abstractions are leaky -- they do not completely hide the layer below, nor are they quite as powerful. –  kevin cline Mar 1 '11 at 14:11
add comment

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