News for hackers. Stuff that matters.
Re:What skills do self-taught programmers commonly lack? by freshfunk on Tuesday April 05, 2011 @12:48AM (#2409746)
A few things:

- Renowned CS programs spend less time than you think teaching you how to actually program. Programming is simply a tool to teach things like theory, algorithms, mathematics, logic, artificial intelligence, operating systems, graphics, and so on. I actually took a class on programming C++ and it was one of those independent self-teaching classes. :)

- I think one needs to differentiate between programs that teach programming as a trade and a CS program at a top school. I imagine the experiences are quite different. Much like there would be a difference between someone who learned from Learn C++ in 21 Days vs the hallowed Abelsson and Sussman (Alyssa P Hacker anyone?).

- I think most lower division books can be read by anyone and they would glean the same amount of knowledge. In fact, I would say there isn't much difference if someone went to somewhere like OpenCourseWare and learned it themselves.

- I think you'll find more difficulty at the top end. While it's possible that self-taught programmers would do these exercises, if I ever meet one I'll bow down before him. I'm talking about classes like CS 162 Operating Systems (http://inst.eecs.berkeley.edu/~cs162/sp11/) or CS 170 Efficient Algorithms and Intractable Problems (http://inst.eecs.berkeley.edu/~cs170/sp11/).

- With that said, I personally rarely (if ever) use the things I learned in these classes. Perhaps if I wanted to write my own language, my compilers class would be useful. Or maybe if I got really deep into machine learning, then my AI class would have been more use.

So, I guess with that said, it's really about what doors were open to me on matters that, even when taught, seemed impossible to understand. Doing it self-taught is just that much harder unless you're the guy from Good Will Hunting.

All in all, I'd say that for the majority of people who are not that specialized (like web developers) it doesn't make much of a difference. The people for whom it made a real difference went on to do research in a specific area and are the ones who are hired for some specific knowledge they have (eg. classification algorithms, machine learning algorithms, security, complex statistical models).

Re:What skills do self-taught programmers commonly lack? by freshfunk on Tuesday April 05, 2011 @12:51AM (#2409756)
One more thing: This is why I always find it sort of useless during tech interviews to ask someone who's been out of school for a long time the difference between a thread and a process or the difference between sorting algorithms.

It's like people couldn't think of an original question that might actually be of some use to the actual job you'd be doing.

Re:What skills do self-taught programmers commonly lack? by strlen on Tuesday April 05, 2011 @01:54AM (#2409876)
> ask someone who's been out of school for a long time the difference between a thread and a process

Quite the contrary: if you're in the industry, the difference between a thread a process should be very hot in your page cache. Understanding why ``system("cd ..");'' won't work is pretty vital.

As for sorting algorithm, you should at least know the big-Oh for a good sorting algorithm. In many specialties of programming, understanding what "amortized" means (e.g., in the context of quicksort's performance) is also important.

Somebody out of school may naively think that quicksort is always good as it's O(log N) or (if they never took an OS class-- and OS classes are, unfortunately, optional in some universities) not fully understand why their code is burning up 100% of a single core in a 8-core machine and leaving the other 7 idle.

On the other hand, I can agree that asking questions which are only answered from memory (i.e., either you know the trick or you don't) that will only be in a recent graduates page cache (e.g., remembering all the rules of a red black tree, or a dynamic programming solution to a classic problem) but can -- and should -- be looked up, doesn't make sense (if I see you implementing a balanced tree in a project without at least cracking CLRS open and looking at existing implementations, I'll have a chat with you...)

Re:What skills do self-taught programmers commonly lack? by fhars on Tuesday April 05, 2011 @03:28AM (#2410057)
But "amortized" is irrelevant in the context of quicksort, as it is not an amortized algorithm. You may hit an unlucky streak and get the worst case of O(n^2) behaviour on every call. An amortized algorithm on the other had would guarantee that while each individual operation on a data structure may hit the worst case, it will always (and not just in the average case) average out over many operations on the same data structure.
Re:What skills do self-taught programmers commonly lack? by strlen on Tuesday April 05, 2011 @04:06AM (#2410124)
Doh, screw up on my part. You are completely right. An amortized algorithm would be something like a dynamic array (std::vector or ArrayList) in this case, which is doubled every time it hits capacity.
Re:What skills do self-taught programmers commonly lack? by freshfunk on Tuesday April 05, 2011 @11:38AM (#2411347)
On the contrary, it's irrelevant if you're not writing a sorting algorithm or your main role doesn't consist of writing any algorithms. Most web developers I know simply call sort() in whatever language they're using instead of reinventing the wheel. Even my work in Objective-C where I handle retaining and releasing memory, I still call sort() (and compare()) without caring about algorithm efficiency.
Re:What skills do self-taught programmers commonly lack? by strlen on Tuesday April 05, 2011 @12:49PM (#2411644)
If you're calling a sorting algorithm, you should still know about the efficiency of that sorting algorithm takes so you can make a choice between sorting an array or indexing using a data structure (which data structure).

Web is just a UI to layer software that _does something_, algorithms are a way to get that something done. Have you ever needed to understand why e.g., a SQL JOIN is taking too long? That's an example where algorithms matter (in selecting the index type, knowing whether to use a join between two tables or to denormalize etc...)

Knowing how to do your own memory management and knowing Objective C is great and valuable, but if mobile/Mac desktop application development were to become less valuable and more commodity (right now, I don't think it will happen-- but I can't predict the market), will you be able to apply these skills to (say) working on more complex C and C++ software such as a web browser?

Re:What skills do self-taught programmers commonly lack? by freshfunk on Tuesday April 05, 2011 @01:42PM (#2411888)
IMO, I think you're spending more time talking about edge cases than the norm. How many people are web developers vs those developing web browsers?

Understanding query cost has more to do with data structures than algorithms. Why does the optimizer seek vs scan? What column(s) do I need to index and how should it be structured? You really don't need to understand how things get sorted in a b-tree.

Knowing normal forms is also different from algorithms. Ergo, it would be more useful to ask "When would you denormalized your data?" instead of "What's the difference between Quicksort and Bubble Sort?"

Objective-C is really just one of many languages I know and use. It just happens to be the most recent. Oddly enough I did spend some time (many years ago) implementing my own browser for a job. We used Java and, again, I never really had to know the complexities of sorting algorithms.

Re:What skills do self-taught programmers commonly lack? by strlen on Tuesday April 05, 2011 @04:07AM (#2410127)
Err, as fhars poster pointed out quicksort is not an amortized algorithm, I should have used a better example. It is, however, a good example of an algorithm with a worst case running time of N^2.