Kuro5hin.org: technology and culture, from the trenches
create account | help/FAQ | contact | links | search | IRC | site news
[ Everything | Diaries | Technology | Science | Culture | Politics | Media | News | Internet | Op-Ed | Fiction | Meta | MLP ]
We need your support: buy an ad | premium membership

[P]
Where to learn coding theory?

By Skippy in Technology
Sat Oct 07, 2000 at 09:39:48 AM EST
Tags: Help! (Ask Kuro5hin) (all tags)
Help! (Ask Kuro5hin)

I have only recently begun to learn programming. Recently here on K5 there was a rant posted and some decent discussion concerning CS degree holders and their ability, or lack thereof, to learn new languages. One of the points that most seemed to agree on was that a CS degree is great for learning the theories that good coding is based on. Learning a language by trial and errror and poking around is fine, but I'd like some pointers on where to learn coding theory.


I'd like to eventually have a good grounding in theory so that I can someday be a well balanced programmer but formal education and I don't get along very well. My question is what resources, other than the aforementioned degree, do people recommend? I don't mind spending a LOT of time on this and would like to eventually have an equivalent level of knowledge to the degree. All suggestions are welcome, from books to seminars and whatever else someone might suggest. Thanks for sharing any knowledge you have.

Sponsors

Voxel dot net
o Managed Hosting
o VoxCAST Content Delivery
o Raw Infrastructure

Login

Poll
Best non-college programming theory resources
o Books 43%
o Websites 8%
o Seminars 0%
o Other programmers 24%
o Suck it up and get the degree 24%

Votes: 58
Results | Other Polls

Related Links
o rant
o Also by Skippy


Display: Sort:
Where to learn coding theory? | 19 comments (19 topical, editorial, 0 hidden)
Programming (3.16 / 6) (#1)
by mondo_t on Sat Oct 07, 2000 at 12:33:15 AM EST

Well I think the best way to learn this would be the degree in programming. Nothing can beat this unless you have been programming since you were born, but not many people have been doing this. Another thing I think help builds your programming skills is writing code as much as possible for tasks that you do a lot or things you dont like to do. This will help you learn your code, and its like doing proofs in math. The more you do the more you will understand how to do them. My last idea is IRC. IRC may be kinda crazy for some people, but if you can usually find someone to help you. Well thats it. Mondo_t--

It depends on the individual person... (3.37 / 8) (#2)
by magney on Sat Oct 07, 2000 at 12:43:10 AM EST

Everyone learns differently. Some people learn well in a lecture setting, others do better by reading books; some people do better when they learn at their own pace with no pressure, others do better by having regular exams and assignments.

If you don't know what category you fit in, my suggestion is this: If you have a university handy, try to find a course that teaches what you want to know, buy the book (perhaps NOT from the campus bookstore), and try learning on your own time. If it works, you've saved yourself tuition; if it doesn't, at least you're well prepared for the class.

Me, I know I do best with book learning at my own pace. This is, to be honest, partly because I'm lazy, and consequently my natural pace is somewhat slower than that of the average college course. :-)

Do I look like I speak for my employer?

I just found an excellent reference on the subject (2.87 / 8) (#3)
by Sheetrock on Sat Oct 07, 2000 at 12:50:01 AM EST

The best book I've seen on the topic is Code Complete by Steve McConnell. I just picked up a copy a couple of weeks ago after seeing it recommended online in a FAQ (forgot which) and am quite impressed with it. He doesn't focus on any particular language, and while the book is mostly about effective coding stategies he also talks about design and testing. I've been programming for a while now, but I've still found enough useful information in this book to justify buying it.

get Knuth (4.44 / 9) (#4)
by blaine on Sat Oct 07, 2000 at 12:52:50 AM EST

I've said it before, but I'll plug it again: get Donald Knuth's "The Art of Computer Programming".

Admittedly, it is very difficult, and takes a lot of work to get through. However, the 3 volumes that exist thus far will teach you a lot about coding theory.

The biggest downside of Knuth: all the algorithms are done in a fictional assembly language, called MIX. Personally, I don't mind it. However, if you haven't done any assembly, you might be a bit confused by it. Then again, using an assembly language helps you understand what you're doing to a greater degree of detail.

Other than Knuth, I would say that the best way outside of college to learn is this:

1. Code. A lot. Code silly things, code practical things. Code anything that you can think of.

2. Join the mailing lists of a few open source projects. Pick large ones. I recommend Crystal Space personally. Don't post at first, just lurk. Read what people have to say. You will often find that you learn all sorts of interesting little bits of information just by seeing what people talk about with regards to the project.

3. Read lots of books. I personally recommend O'Reilly 's books, but don't focus on the "Nutshell" books at first. Begin with books like "Programming Perl". [sort of a skip over the earlier Perl book, but it is an interesting book].

4. Code. A lot. Often. Everything.

5. READ. READ. READ.

6. Frequest comp.lang.*

7. When you are comfortable with programming, start a small project with reasonable but challenging goals.

8. READ. READ. READ.

Get the idea? :)

In general, you need to code a LOT. The only way you're going to become good is to practice. Books are your friends. And the internet is a great resource.

Go get 'em! :)

Re: get Knuth (2.00 / 1) (#10)
by mikpos on Sat Oct 07, 2000 at 11:31:07 AM EST

Agreed. A huge amount of theory (such as functions, pointers, arrays, threads, bignums, etc.) are things that people will come up with on their own given enough time. Once they're told about the basics of other things (such as objects and graphs), they'll be able to figure out a bunch more (distributed objects, more specific graphs such as queues and stacks, game trees, etc.).

Not to say that reading and talking to other coders (which is what I voted for) isn't useful. It can speed up the process, but you will never get a good understanding of something unless you implement it (or something like it) yourself.

[ Parent ]

Books (3.33 / 6) (#5)
by terran on Sat Oct 07, 2000 at 01:14:44 AM EST

The three most commonlyl recommended books on the subject are Structure and Interpretation of Computer Programs by Abelson and Sussman (ISBN 0262011530), Introduction to Algorithms by Cormen, Leiserson, and Rivest (ISBN 0070131430), and The Art of Computer Programming by Knuth (ISBN 0201485419).

Personally, I like the second of those. Knuth uses an artificial assembly language througout, and I find the needless introduction of a new language to be an affront to my own ideas of elegance, which lie along the lines of Occam's Razor (a personal preference). SICP is a bit too elementary for many purposes.

What worked for me (3.55 / 9) (#6)
by Mendax Veritas on Sat Oct 07, 2000 at 01:50:57 AM EST

Well, I can tell you what worked for me. I don't get along too well with formal education, either (including seminars), so this may be of some relevance to you. Or maybe not.

First, credentials: I've been a professional software engineer for almost 15 years now. I've played a major role in several well-known products for MS-DOS and MS Windows, such as Norton Utilities, Norton Anti-Virus (early '90s) and the After Dark screen saver (version 3.0 for Windows, the first one that really worked right). I'm currently with a network management company in Silicon Valley which went from being a startup in '96 to being acquired for a nice chunk of change last year. Technology I conceived and implemented almost entirely by myself played a central role in the success of our products.

Despite all this, I have no college degree whatsoever, although I (perhaps arrogantly) feel that my technical skills and theoretical knowledge of computer science and software engineering are as good as that of anyone I've ever worked with. (Or perhaps not so arrogantly -- my manager, a very capable technical fellow himself, recently said much the same of me.)

So, how did I get this way without a proper university education?

What I've always tended to do is, more or less at random, become curious about some aspect of programming or CS (they are not the same thing) that I have never previously explored in detail. This aspect might be "how networks work", or "functional programming" (my most recent obsession), or some unfamiliar language (I'm a definite language junkie, though I'm getting more selective as I get older). I then look for authoritative sources of information about it, such as a well-regarded book or a web site full of relevant papers and tutorials. I download any freely-available tools that may be of use (compilers, for example). I come up with interesting little projects to do to get first-hand experience. I join a newsgroup or a mailing list (preferably the latter) and participate in it by asking hopefully-intelligent questions and trying to answer other newbies' questions when I think I can. (This occasionally leads to "no, that's wrong" replies from people who know better, but that's all to the good.) I debate theory with experts in these forums, too, once I think I have half a clue about it. Most importantly, I try to understand fully both the theoretical background and the practical issues. And I always remain model-agnostic; learning a new paradigm only to treat it like the Holy Grail is merely the path to mindless fanaticism, not true understanding.

I feel like this may sound too pompous and self-satisfied, for which I apologize; the error is in my expressive abilities, not my judgment of myself, I think. I know I don't know everything, or have perfect judgment. That said, I think I've demonstrated, in my career, that I'm a very good engineer, and the above is the best quick summary I can manage at the moment of what I think has been most crucial in my becoming one.

In case you didn't see the thread on CASE tools... (1.80 / 5) (#7)
by chewie on Sat Oct 07, 2000 at 02:48:57 AM EST

I posted a comment in the recent thread on CASE Tools (here).
assert(expired(knowledge)); /* core dump */
Another vote for Knuth (3.60 / 5) (#8)
by marm on Sat Oct 07, 2000 at 06:47:22 AM EST

As others have commented already, my own personal favourite is Knuth's 'Art of Computer Programming' series. At least check out volume one, 'Fundamental Algorithms' even if you leave the rest. This is truly a classic Computer Science textbook, and deservedly so.

Some people complain that it's not real-worldly enough, using its own hybrid (and, by todays standards, very simplistic) assembly language called MIX rather than a well-known 'real' language. However, this has a couple of big advantages to this approach which people usually seem to overlook:

1) The book has not dated, despite the fact that it is largely unchanged since the early 1970's. How useful will a book with all the examples in C++ or Java be 30 years down the line? Will anyone still be using these languages?
MIX avoids this problem. By being a very simplistic language all of its own, but based in reality (it is essentially a mix of late 60's/early 70's mainframe assembler) it remains relevant. High-level languages come and go, but assembler is assembler, and remains largely similar today even to the assembly language of 30 years ago.

2) You are forced to understand the problem and solution at a deeper level. How much do you actually know about how the machine itself deals with your linked list, your binary tree, your whatever? By having the code examples close to the metal you gain an understanding of how these things work from the machine's point of view, which results in better code of your own. As MIX is also not a 'real' language, there's no way you can cheat by doing cut-and-paste coding.

If you're worried that MIX is outdated even amongst assembly language... well, I understand that the most recent editions of these books have been updated (or possibly, are still being updated? I dunno, I'm very proud of my early 70's editions of these books :)) to use a more modern version of MIX which takes into account some of the changes in computer design over the last 30 years - RISC, for example. Nonetheless, the principles on which the original MIX is based still hold true today, so don't let that put you off.

Most computer books tell you how to do something in a specific way. 'The Art of Computer Programming' is different. It teaches understanding.



Knuth is fine if you have time for something else (2.50 / 2) (#9)
by datafred on Sat Oct 07, 2000 at 08:50:01 AM EST

Today's systems (object-oriented, component-oriented, etc.) involve a lot more of theoretical foundations than what's found in Knuth. If you're ready to read Knuth, and something about OOD, Design Patterns etc., fine. If you suggest reading just Knuth and then "get the rest from practice", that's a very bad idea.

[ Parent ]
Re: Knuth is fine if you have time for something e (2.00 / 1) (#11)
by Skippy on Sat Oct 07, 2000 at 02:17:35 PM EST

What else would you recommend? I'd love to learn OOD and I haven't seen any suggestions yet. There's got to be more to programming theory than Knuth which I WILL read because of the number of recommendations here.
# I am now finished talking out my ass about things that I am not qualified to discuss. #
[ Parent ]
Re: Knuth is fine if you have time for something e (4.00 / 1) (#15)
by Carnage4Life on Sun Oct 08, 2000 at 10:46:54 AM EST

What else would you recommend? I'd love to learn OOD and I haven't seen any suggestions yet.

Because no one has written the definitive OOD book yet. Most people learn OOD in the introductory blurb on Objects in whatever book they learned whatever OO language they know (e.g. C++, Java, etc).

Books like Design Patterns (one of the best books I've ever seen) or SedgeWick's Algorithms in C++ only make sense if you are already grounded in OOD. Frankly after taking quite a few classes in C++ and Java in two colleges, I can state almost unequivocably that very few people understand how to truly do OOD.

The best introduction to OOD I have found is this one by Mark Guzdial, it is done for SmallTalk (one of the purest OO languages unlike C++ and Java) but the syntax is unimportant because the concepts are explained in a crystal-clear manner.



[ Parent ]
What else? (3.00 / 2) (#12)
by Skippy on Sat Oct 07, 2000 at 02:23:53 PM EST

While I appreciate the comments so far, I'm looking for more. Where do I learn the difference between a procedural and a functional language. What sorts of projects are they good for. What about OO design. How does platform and its endian-ness affect the way you code? I don't even know the questions to ask. Where does one learn these things.

So far the comments mostly boil down to "Read Knuth" and "Code a lot". While I'll accept those as valid answers, my hope was to avoid a lot of the trial and error learning associated with "Code a lot". Not all, since that's not feasible, but I'd rather not re-invent the wheel a couple of hundred times. Thanks for everything so far, but please don't stop.
# I am now finished talking out my ass about things that I am not qualified to discuss. #

Re: What else? (5.00 / 1) (#13)
by Mendax Veritas on Sat Oct 07, 2000 at 04:55:54 PM EST

I trust you read my reply; it was far from just "read Knuth and code a lot". But if direct sources are what you want, here you go, at the risk of indulging in MLP...

I don't have URLs handy for all of these, but Google should get you to them quickly.

Functional languages: Haskell web site, Erlang web site, Philip Wadler's site at Bell Labs, Prof. John Hughes' site in the UK (which in turn has pointers to many useful tutorial papers, including an online book by a Cambridge professor on lambda calculus for programmers, which you must read if you want to understand functional programming), Simon Peyton-Jones' site at Microsoft Research UK. Also the Scheme site at Rice University, where you can get tutorials and the excellent DrScheme compiler and associated tools.

Type theory (very important in modern statically-typed functional languages, and interesting even if you aren't into functional programming): Luca Cardelli's site at Microsoft Research UK. Cardelli is one of the top theorists in this area, and has written many interesting papers.

Object-orientation: Learn Smalltalk and Java for two rather different approaches to this concept. There are at least three freely-available Smalltalk environments, one of which was written by a team headed by Alan Kay, who was one of Smalltalk's original designers and invented the term "object-oriented programming". That one's at Disney if you can find it; I don't recall its name offhand. Then there's another one called Dolphin Smalltalk that is nice, and IBM has one that is commercially sold, but there is also a free version. Java, of course, you can get from Sun.

[ Parent ]

Re: What else? (3.00 / 1) (#14)
by Carnage4Life on Sat Oct 07, 2000 at 08:52:18 PM EST

While I appreciate the comments so far, I'm looking for more. Where do I learn the difference between a procedural and a functional language. What sorts of projects are they good for. What about OO design. How does platform and its endian-ness affect the way you code? I don't even know the questions to ask. Where does one learn these things.

It seems you are asking questions that only going to school or experience can answer. If you don't want to go to school, I can only suggest the next best thing:
    1.) Pick a good school such as MIT, Caltech, CMU, Berkley or Georgia Tech (shameless plug).
    2.) Go to the CS department web page and read the course descriptions.
    3.) If you see anything that catches your fancy, buy the textbook and read it.
    4.) Rinse and repeat.


[ Parent ]
Functional, procedural, OO, etc... (3.50 / 2) (#16)
by bgalehouse on Sun Oct 08, 2000 at 02:54:40 PM EST

Functional programming is all about values and recursion. Pure functional has trouble with interactivity. Personally, I really like SML. It is functional enough to learn recursion, but has enough procedural abilities that I./O doesn't feel like pulling teeth. 'ML for the working programmer' is a pretty good book to get started with. The big ugly implementation of SML is SML/NJ, which is easy to search for. There are also some lighterweight version. If you want a fun little functional programming challenge, read the documentation for SML/NJ's continuation feature (callcc, is the function name, I think). Then, for the second half of the challenge, use it to write a threading package with pipes for inter-thread communication. This is about 50 lines, does involves some non-functional aspects of the langue, and it is not obvious without a good functional mindset.

For procedural languages, C and assembly are both great. You might want to look at it in the context of a particular type of problem, say operating systems. I, at least, find procedural languages a touch dull otherwise :-) I've recently been reading Schimmel's 'UNIX Systems for Modern Architectures'. This, for me, was a great intro into the unix kernel. It is mostly trying to expain how to handle caches and SMP, but in passing you learn roughly how Unixes tend to lay out memory, what interupt handlers tend to take care of, how the major system call work, etc.

For OO, I'd second the recommendation that you learn Java and/or Smalltalk. I know that using the Java libraries will give you a nice initial view into the patterns world. Swing is all Model-View-Controller, classes that end with 'Listener' abound, etc. In Java, you might want some intro book to get started, but learn to rely on the JavaDoc style documentation as early as possible. (is a seperate download from Sun, from the same page as the JVM) Once you have the syntax and the rough package structure down, it is by far the best daily reference. This situation is probably similar in Smalltalk, but I don't know that scene so well.

Some advice (none / 0) (#17)
by durandel on Tue Oct 10, 2000 at 05:32:35 PM EST

Well I dont know how important age plays into the mix of your question here. I just turned 24 and have a great job while im finishing up my CS degree. In my experience about learning theory. I learned a lot of coding theory on my own from books and work experience and from the classroom. All that has made me a good programmer. I think that the most enjoyable things to learn about programming and computers in general is not just coding theory. Data structures, Algorithms, Assembler/Compiler designs, Operating systems, Microcontrollers, Usability engineering... Thats what i really liked most. All the things that everyone said I'd never use in real life were really the most valuable things i ever learned about computers. While at first i hated the CS program because all we did was learning the basics and writing stupid programs. "Why the hell am i doing this!?" When i got into the more theoretical upper level courses is when i really started to love what i was learning. Personally... Learning WHAT, WHEN, WHERE is alright, but learning WHY was always the most interesting. Maybe it might be the same for you. You dont have to go to college to learn this stuff. But I do believe that a good solid CS degree program is the best path for a person to get a good firm understanding of why things are the way they are in computing. Maybe it's true that i'll never have to write my own Assembler or Operating system. But I think im much better off for knowing how they really work and Im glad i had to code that stuff up when i was in those classes. The parties are great too!

Some advice (5.00 / 1) (#18)
by durandel on Tue Oct 10, 2000 at 05:33:04 PM EST

Well I dont know how important age plays into the mix of your question here. I just turned 24 and have a great job while im finishing up my CS degree.

In my experience about learning theory. I learned a lot of coding theory on my own from books and work experience and from the classroom. All that has made me a good programmer. I think that the most enjoyable things to learn about programming and computers in general is not just coding theory. Data structures, Algorithms, Assembler/Compiler designs, Operating systems, Microcontrollers, Usability engineering... Thats what i really liked most.

All the things that everyone said I'd never use in real life were really the most valuable things i ever learned about computers. While at first i hated the CS program because all we did was learning the basics and writing stupid programs. "Why the hell am i doing this!?" When i got into the more theoretical upper level courses is when i really started to love what i was learning.

Personally... Learning WHAT, WHEN, WHERE is alright, but learning WHY was always the most interesting.

Maybe it might be the same for you. You dont have to go to college to learn this stuff. But I do believe that a good solid CS degree program is the best path for a person to get a good firm understanding of why things are the way they are in computing. Maybe it's true that i'll never have to write my own Assembler or Operating system. But I think im much better off for knowing how they really work and Im glad i had to code that stuff up when i was in those classes.

The parties are great too!

is coding that important? (none / 0) (#19)
by hstl on Mon Feb 05, 2001 at 12:00:01 AM EST

Personally I find that what people want is problem solving skill, not programming skill. Most people, once fairly familiar with one language can pick up others pretty easily (thinks like going from Procedural to OO can be tricky I guess, but you get your head around it).
The hardest thing, and something I did not realise until I "learnt" to code with others at university, is the problem solving. Most of my fellow students got a MUCH better grip on the commands than I did, but they learnt things by rote. I, on the other hand, had been coding bits and pieces over the years. When it came down to doing assignments I seemed to do much better because I had experience in thinking "how can I make a computer solve this?". A lot of other students went "Hey!.. this wasn't in the textbook!", curled up in the corner and died of shock.
Where was I? oh yeah, get a reference book or 2 on a fairly flexible language which is suited to stuff you want to do (C is good, but if you are very Windows oriented maybe Visual Basic), and write bits and pieces of code which you find useful. Always missing your favorite TV show because your too busy on IRC? write an alarm clock type program. Once it works, intergrate it with your script. Stuff like that makes you learn about all sorts of stuff, and you can call upon that experience in the future.
Good luck anyway,
Hostile

"If you want an image of the future, imagine a boot, stamping on a human face, forever." -- George Orwell, "1984"
Where to learn coding theory? | 19 comments (19 topical, 0 editorial, 0 hidden)
Display: Sort:

kuro5hin.org

[XML]
All trademarks and copyrights on this page are owned by their respective companies. The Rest 2000 - Present Kuro5hin.org Inc.
See our legalese page for copyright policies. Please also read our Privacy Policy.
Kuro5hin.org is powered by Free Software, including Apache, Perl, and Linux, The Scoop Engine that runs this site is freely available, under the terms of the GPL.
Need some help? Email help@kuro5hin.org.
My heart's the long stairs.

Powered by Scoop create account | help/FAQ | mission | links | search | IRC | YOU choose the stories!