85 comments

[ 2.7 ms ] story [ 134 ms ] thread
if my program compiled and my unit tests demonstrated correctness, that was enough.

...

Your professors taught you unit testing? In terms of learning the "practical" side of programming, I think that right there gives you a leg up on most CS students.

(comment deleted)
(comment deleted)
Carnegie Mellon is quite a stronghold of this. They don't teach much coding -- they hand you the books, give you projects and grade the results. If you produce workable code, mostly you win :-)

It's telling that CMU is considered such a great tech school. Even the best don't know how to teach programming (yet?).

On the contrary, I don't really think that it is the University's job to teach "programming". University traditionally focuses around teaching the skills to do research. Higher level skills such as analysis and problem solving. Consider learning history. It is expected that you "know" how to write an essay. You may be critiqued on it, but it is not the primary motivation for your study of that subject.

My personal opinion is that university is not a place to learn tools (i.e. programming), but to learn to apply knowledge to form solutions to complex problems. We learn about algorithms, data structures and techniques because that is what we need to know to learn to solve hard problems. Programming, while not separate from this (i.e. you can hardly build anything without knowing how to use a screwdriver) is something that is assumed knowledge. Teaching it at university would waste valuable time in courses that are already too packed to give rigorous treatment of all topics covered.

The CS undergrad curriculums that I have been a part of (on the student and teaching side) were designed so that people with no prior exposure to CS or programming could succeed. For that reason, the introductory class taught programming. Sure, they (we) tried to instill general CS concepts along the way, but the fundamental task was to teach the students how to think algorithmically, how to use that skill to solve a particular problem, and, yes, how to use the particular tools we chose (that is, the language, compiler, editor or IDE).

To do otherwise is to require that incoming students already know how to program. That is, I think, indefensible. If students want to test out of the introductory course, fine. But it must exist, just as the intro to physics course must exist for physics majors.

I'd say you're wrong.

I don't think we should assume the students have the knowledge 1) because they obviously don't have the knowledge and 2) it doesn't match the methodology of every other applied science. I don't assume that students are competent to work in a biology lab before college. Why should Computer Science get a free pass from teaching the lab work techniques that all other applied sciences are expected to teach?

It's funny because I was going to bring up a complete counter point to one of the features of the article, in which TAs never read code, using CMU as the school. I'm a TA for our operating systems class (http://www.cs.cmu.edu/~410/), and We Read Your Code. Every line.

We print out thread libraries (~1000 lines of code) and kernels (~4000 lines of code, prints on 70 sheets of paper or more), and then we go over it with a red pen. We think it's some of the best feedback people get at any school. For the kernel, each group gets a one-on-one meeting with one of the TAs (or the professor) to go over the whole kernel.

I've graded some really abysmal project 0s, but by the time they get to the bigger projects we've stamped out some of the bad habits, and I'm happy to read code written by those students, because they learn the most and produce good results by the end.

The philosophy is that code is for people to read; the next guy to maintain the code in 6 months (or just you 24 hours later with no sleep in between); your reviewers, and so on.

I have been trying to learn to code for about 3 years. Recently - I succeeded (in getting started!).

I had been on courses, bought books, read tutorials etc. but at the end of each forced exercise I still could not build a decent rails app. Then, after coming back from the US 6 months ago, I decided I wanted a GroupMe clone for the UK. So I built one.

http://bit.ly/groupmeclone

The SMS is disabled on that version as I have no intention of subsidising peoples' group-messages but the fact is it WORKS and finally learnt to code.

The controller is fat, the model is thin, there are no tests, there are lots of lengthy if-else statements, there are lots of bugs but I do not care because I finally learnt to code.

I have built little scripts for managing my kindle (https://gist.github.com/1404068) and scripts to get my Instragram pics (https://gist.github.com/1399696) and I love it.

I feel like I can finally call myself a rank amateur nuby Hacker. It feels good.

Congratulations on your first app. It's a good feeling indeed. :)

I recently wrote a ton of Node.js example scripts (chat, group chat, notifications, interaction with PHP, etc), because I had never worked with Node before. I knew PHP, a bit of Rails, and C, but it really feels good to learn a new language or way of programming. I didn't need books or anything, just a bit of example code.

Obviously, since I knew JS, Node wasn't too difficult, but it's an extension of what I previously knew so it took a while to get used to. I also learned a lot more about JS in the process. Self-teaching yourself to code has amazing results.

Thanks a lot! Node looks really clever. Right now I am learning C as I am really interested in computer vision. It is a massive leap above my current skill-set but you have to start somewhere.
That's quite inspiring. I would like to be where you are at, skill wise, in a few months time. Overcoming the inertia (and finding time after 12 hour work days), is proving quite the challenge.

How many hours did you spend per day, roughly, and how many all told?

I would guess I spent at least 40+ hours a week for about 6 weeks. That is when I started having a much higher number of "ah-haaaa" moments. It must be very hard if you hard if you have a full-time job.

Is there something that you really want that is not available? That could be the driver you need to get you excited about firing up terminal.

>> The SMS is disabled on that version as I have no intention of subsidising peoples' group-messages

If you are interested in advancing that project, you may want to consider sending the SMS messages via email, which would be free. Each user would need to define their gateway when they set up their account. Many carriers have SMS gateways, and an easy way to translate a phone number into an email address that delivers by SMS.

See: http://en.wikipedia.org/wiki/List_of_SMS_gateways

Oh that is very cool. I would definitely invest the time if I was still interested in the project but I have finally found something I want to focus all my attention on. Thanks!
(comment deleted)
I agree with the premise. However, the whole world runs on sloppy, inelegant, and downright ugly code. I strive to write pretty code but the truth is it doesn't matter that much. Just getting it done and out the door counts for so much more.
Just getting it done and out the door counts for so much more right now. It matters far less in a day, week, month or year when you or the next guy has to maintain it.

Though now that I reflect for a second I have to acknowledge that it's all that matters to the stakeholders, and not necessarily to the coders (nor future maintainers).

Very true. As a current CS student, I couldn't agree more.

From what I've seen thus far, most school assignments are pretty easy to stumble through without really understanding what you're doing. As much useful stuff as I've learned in class, it's been personal projects that have really solidified things and taught me the most valuable lessons.

(comment deleted)
Who says there was a conversion? It's possible to grow up as both. I know a few CS guys who were national level swimmers, and one who was international caliber and only went CS after completing a masters in EE.
I mostly had the same experience as the author in university, with the sole exception of the C++ class. That class was brutal -- you had the match the style guide exactly, have good variable names, good comments, const-correctness, etc.

When I've taught programming to beginners, I try and demonstrate good code and when I see ugly code I point them in a better direction. I have, however, had students be stubbornly focused on the output of their code and ignore all my advice. No matter how ugly and hard to debug their code was, they refused to believe it mattered.

I disagree, I often see people in the CS program who haven't done a lick of programming outside assignments and don't bother teaching themselves anything beyond whats required for class.
Regardless, they tend not to go anywhere meaningful professionally.

I wouldn't be surprised if 10-15 years down the line, these mediocre corporate programmers (they can only survive in a large organization, where you don't have to pull your weight nearly as much as on a 10 person team) they become managers from hell.

There is a difference between "self-taught" and "polishing skills with experience".

Whatever you study in school, you will never be 100% prepeared to work.

That being said, code/program design IS a very important skill that seems to be hard to teach in school.

The thing about coding is that you have to be self taught. Languages, techniques, and technology in general moves so fast that by the time you get a degree everything you've learned as far as coding goes is already being replaced.

I learned simple HTML when I was 11 and have been self teaching myself ever since. I'm not in my second year of a degree in CS and what I've found is that the language and the code itself is not important. What's important are the concepts. Types, objects, methods, the theories behind programming, and all of those less tangible things are what's important because that is the basic foundation of programming.

Programming is different than other skills. It's as much of an art as it is a science. The science is relatively unchanging but the art does. Your code is always evolving and there's always the potential for you to make yourself obsolete if you don't continue to teach yourself. I focus on the web and in working in web design in particular I'm seeing a trend that speaks to the idea that you must always be teaching yourself. There are oodles and oodles of web design/development firms out there that have been around since the late 90's that you can tell have been around since the late 90's. Their work looks dated in terms of design and their techniques look like they're right out of 1997! The guys working there used to be young and up on the latest trends but it's obvious they've stopped learning and young guys are passing them up easily. Even people with less than half their experience are writing better code and have prettier output.

I think you can tell who got into programming just to get a job and who got into it out of passion by looking at their work. If it continually improves they've got passion, if it plateaus at a certain point then they're just employed and nothing more.

In the end being self taught is a requirement and never an option in this field. Once you have the foundational knowledge of programming then everything else is just a matter of keeping up with new tech and learning some new syntax every so often.

Counterexample?

I'm self-taught. I'm trying to filter for confirmation bias here.

I dated a girl (it was awesome but it didn't last) who was a C.S. grad student but wasn't the type to "autodidact" at anything. She was also a stunning musician, an entrepreneur, and an investor.

Ok, basically I'm trying to paint the picture of someone who is clearly my superior in many areas, and understands C.S., but isn't self taught.

I couldn't pretend to know all the reasons, but she wasn't in it just for the job or the money. She seemed a genuine hacker but just not in the same sense as me.

I think you're misunderstanding me. I'm not saying that only self-taught programmers are good. In fact I think it's extremely important to get that initial education. I was just commenting on the fact that programming is a field where you're forced to continually learn new things long after your training ends. Your example is probably missing a lot of things. While I'm sure she was a great hacker I'm willing to bet that she continued her education on her own like all of us do. If you're programming then chances are that you're learning things you weren't taught in school all the time. Given that the industry changes noticeably between the time you enter a program of study and graduate it's inevitable.

I also made another point about how some programmers never try to branch out beyond what they're comfortable with coming out of the gate (i.e. they stop learning) which could have made it seem like I was saying something else.

I'm not sure I can fully agree with the idea that programmers are self-taught in the sense of writing good code. I'm a student at the University of Waterloo, and in the courses in 1st and 2nd year a sizeable chunk of the marks depends on readability/documentation and such. We have coding guidelines and we lose marks for not following them. Needless to say, this doesn't mean most students at Waterloo write good, well-documented, readable code. Most of them are focused on getting the program to work, sprinkling in obvious comments (i.e. "//setting width to 60" ) and debugging when the tests fail. When they get marks off for poor documentation/readability they either complain or brush it off, claiming that since their program worked the rest isn't a big deal.

Bottom line: in my experience, the reason most programmers are self-taught with regard to writing good code is not that no one tries to teach them. It's that most of them don't think they NEED to know (i.e. don't place enough importance on it) and are willing to lose marks for it until they get to a job and they have no to choice but to, you guessed it, teach themselves. There are people who try to make the best out of their education, and these can be very good coders who learned by making the best of their education.

(Note: obviously this is a generalization - there are plenty of students who try to write good code.)

No personal reflection, but what "good code" means in a professional context is quite a bit removed from student assignments.

There are just some things you'll never learn, for example, until you have to interact daily with code you wrote a year ago.

Student assignments also rarely operate in the sheer magnitude of real world programs.

In university, I think the longest assignment I had was in the ballpark of a couple thousand lines of code and you could pretty readily keep it all your head as you solved the problem, there's not too much abstraction or delegation of responsibilities, no interfacing with 3rd parties, few library dependencies, it's all written in a single language, etc, etc. And you wrote it all from scratch by yourself or in a small team with (likely) equally inexperienced peers, so you know all the clever tricks that were employed.

On the job, I deal with company's code base that's over a million lines of code and uses a very messy database, maintained by dozens of people or varying skill levels over the last decade, wrought from an unholy amalgamation of 3 different programming languages spread over several servers and reliant on a half dozen "support utilities" to keep applying band-aids to bugs that "aren't cost effective to fix".

Writing good code the interacts with bad code is one of my hardest professional endeavors.

Few of the good programmers I know write much in the way of comments. 1 good comment per 30-50 lines of code is actually plenty as long as the code is readable. (Edit: Plus one comment per WTF.) The problem is writing readable code is difficult and must be maintained.

PS: At best a comment only says what someone thinks the code does. Program for long enough and you will get bitten by this.

Furthermore, on a team of any size, it is virtually guaranteed that someone will change the code without changing the comment as well. Then you have a bunch of comments that are not only useless, but actively misleading.
Actually, according to this article, "All programmer’s are self-taught."

Unfortunately, some are also self-taught in grammar and punctuation. (I had to. My snark quota is done for the day.)

Sorry about that, fixed now.
As someone who has taught and TAed many students, I always tried to comment on coding style, explain what good style is, and why. This becomes more difficult as the number of students scales.
I'm not sure I agree. Yes to a certain degree, I think that programmers are self-taught, but I think like most things in life, most of the learning comes from your peer group. Working on a project in a small team with other motivated developers is a much more enriching learning experience than doing solo class projects or teaching yourself some new technology.
I disagree with this post. There are professors out there who do in fact teach code style in a very hands on and personal manner. Chris Riesbeck [1] at Northwestern University has made a great system to teach good coding practices in a number of languages. Many of my fellow alumni have learned good coding practices from him. Its an inside joke to talk about "Riesbeck crying" when messy code is written.

[1] http://www.cs.northwestern.edu/~riesbeck/critiquing.html

I think CS departments should offer at least one course that spends a little time focusing on writing quality code.

The Software Engineering course I took at university was a pretty good introduction to "programming". One of our required texts for the course was Code Complete by Steve McConnell. We were required to read all the chapters that focused on programming style.

Programming is unusually accessible compared to other skills. If I wanted to learn how to raise farm animals, where would I start? A person needs only a few common things to try programming: an off-the-shelf computer, maybe a book, and these days an Internet connection. After that, they require only the traits common to any other hobby, such as free time and enough imagination to figure out what is going to be built. (I'm glazing over a few details of course, such as the fact that knowing how to type would certainly speed things up.)

Programming is also an unusually marketable hobby skill. With many hobbies you can invest a lot of time and effort and produce beautiful things, but that's liable to only gain you praise; in programming, it can gain you a really good job. This is a pretty smart investment: for a modest expenditure yourself you might net a high income so it should not be surprising if people often teach themselves.

Besides, when I hire someone I like seeing evidence of side projects that reveal a certain passion for doing good software work. I wouldn't hire an artist or designer without seeing a portfolio either, and software has a lot of things in common with art and design.

I agree that coding is generally not "taught" in lectures or recitations, but, like the article says, we learn from other people -- other people's code, their comments on our code, etc. In fact, I feel like that may be the only way to learn how to write good code and isn't something that can easily be self-taught.

Working with and learning from other people is way more effective (than just writing code) in figuring out how to identify good and bad code. And I think formal CS education usually gives people the right tools (like algos, design patterns, data structures, etc.) to understand and work with others.

I agree. As a third year undergrad also I've noticed that the focus on the code itself has diminished to almost zero from CS 101. At least in that course my professor mentioned a few things about code quality and design like DRY, loose-coupling, etc. My data structures professor's sample code which he would give out had single capital letters as variables, single lowercase letter variables, and awful and inconsistent indentation. I understand that it's data structures and not an open source project being maintained by the professor, but there were students in the course who barely had any experience programming outside of school. My guess is that the professor's neglect for any sort of code conventions will carry over with those students.

My school does offer a class called "Production Quality Software" but it's a graduate course and if you want to take it as an undergrad you only get 3 credits.

IMO the situation is not good.

My school experience was almost the same with one awkward and notable exception: writing a cache emulator implementing 3 different strategies for an Operating Systems class. I still hurt when I remember the TA took points for... indirection. Apparently an abstract C++ class with 3 subclasses was a no-no in the OS world.
I find myself very good at picking up small examples of code. I think the real challenge in programming isn't learning how if statements, loops, arrays, etc. work but how to put them together to do what you want. This is the real challenge and I believe this is a combination of self-teaching (maybe experiences) and natural ability.
Loops are to software development as spelling is to writing a novel.
College is an interesting beast. It is a great tool to mature bright teenagers into contributing adults for society. It does this in several ways: throws you into a small space full of diverse people, challenges you mentally to an almost breaking point and forges you into the mold of a person you will be for the rest of your life. Oh, and you'll learn some professional skills, as well.

For high tech industries, this is even more pronounced. I apply very little of what I learned in college to my everyday activities (though I do love a good compilers or garbage collection nerd-out). This is okay with me: I know that without college I wouldn't be who I am today and probably not as prepared to make my mark on the world.

The more cynic of us will say that CS programs teach for one thing: post-graduate courses. This is, to a degree, true. However, the VIM trick that I picked up at work today is NOT the sort of thing I would have been happy with a professor 'challenging' me on during my courses.

How you become a good programmer is through: experience, lots of boring little things that add up and working with good programmers (which almost categorically disqualifies professors and fellow students).

Want to learn to program? Work up! Always be the worst person on the team. Find people better than you and listen.

Edit: Also, good programmers: part of your job is to make people around you better. Don't shoo away the wide-eyed and eager of us (me).

> However, the VIM trick that I picked up at work today is NOT the sort of thing I would have been happy with a professor 'challenging' me on during my courses.

University teaches you the things that you cannot learn on your own.

University may expose you to concepts that you might never have encountered on your own. But there's nothing that you can't learn on your own, and in fact the history of learning is full of the contributions of self-educated savants.
The problem with self-education is that it's too easy to ignore those subjects because they don't seem interesting or relevant. Someone who is interested in web programming may not see the need for learning assembler, but most of those who learned it would probably say that it was not a useless experience.
That's a lot weaker statement than "things you cannot learn on your own".

Unfortunately most discussions about college education is rationalizing rhetoric - college is such a broad term, and can vary from diploma mill to top level educational instutions. Anyone willing to argue for or against it in this vague concepts is just rationalizing their beliefs. Second, as a person who wen't to college to get my degree after working in the industry for years, I noticed a lot of people don't realize that the time you go to college is the same time you start to grow up, get independent, thinking differently, associating with different kinds of people, all those changes people attribute to "college experience" in classic lines such as "college changed my way of thinking" or "college taught me how to learn" "I started socializing with different people" etc. are actually natural changes you will experience even if you don't go to college at that age, so I think people arguing for college from reflection are actually misattributing the cause.

so formal education is for people who don't have the discipline to learn the things they need to know on their own?
I consider myself a mostly self educated person. the total sum of my college experience probably totals just over a year at various intervals. The majority of my education comes from reading books, watching lectures online, and just plain doing things wrong. I don't typically learn something purely for the practical benefits. I have a drive to learn. When I learned assembly, it was only because I was interested in learning more.
I have been trying to teach myself spherical trig on my own. I am struggling but the big issue I think is actually that with my ADD, I struggle to do some kinds of problems. I figure I will get it though. Why am I doing this? Because it is a challenge.

I would probably benefit from some mentoring, but that's not forthcoming.

I think a lot of this is the same for coding. You can learn whatever you want to/need to on your own. What a university gives you ideally is a level of mentoring and collaboration that can bring you to the next level (yes that includes, say, learning assembly, something I have taught myself the basics of but never gotten to the point where I feel comfortable in it).

For all this though, I agree that college is supposed to teach you the one think you can't learn on your own: critical thinking. I don't see how one can learn critical thinking on one's own, or at least not well. Not saying it can't be done outside of college. Just saying it can't be done in isolation.

From the sound of the original article though, it sounds like the author didn't feel like he was getting this, and that's kinda scary.

In some idealistic sense it's true there is nothing you cannot learn on your own, but in practice there is loads of stuff no-one ever learns except by doing a PhD.
(comment deleted)
There are far more cost-effective ways to mature bright teenagers into contributing adults for society. Arguably more effective ways at large as well.
Please argue for one as an example.
Alright, I'll speak for myself as that's the path I'm still walking and the one I know best. I'm 19, matriculated into Harvard for one semester, then dropped out and took on the Thiel Fellowship. Under the Thiel Fellowship, we're granted $100k (pegged around college ed prices) for two years to pursue an entrepreneurial project.

In the past year since leaving school, I've had more opportunity for maturity than I ever did in college. I've had the freedom to explore, and I've used that to travel to all 7 continents and broaden my internal horizons of the world. I've had the freedom to discover, and now I'm fortunate enough to have found a passion I can pursue with my full attention. I never had luxury of doing that in school - there's no time to step back and wonder why you're doing what you're doing as you're too busy being pushed through the grind of 'doing'.

I've had the freedom to become personally responsible. Being devoid of extrinsic pressures (must get good grades, build resume, get job, etc.) for the first time in my life means that I've had to replace those driving forces with intrinsic drive and accountability.

I've been living on my own in SF since June, and that's been a wild ride of being liable for every aspect of my own survival and well-being :). Being an entrepreneur means I have to account for a 24 hours each day on my own, as I don't even have an employer to provide a cover story for 8-9 hours every day. I'm not saying I account for all those hours nearly as well as I could and in fact I certainly don't (case in point), but this is offering me the opportunity to learn to be accountable, and that's exactly the point.

College is a pseudo-diverse atmosphere. Sure, people might be differently colored or have exotic accents, but everyone's there for the same purpose, is the same age, and has more or less the same mindset, or at the most one of a select few mindsets. Real diversity is living in a strange juxtaposition of homeless crackheads and billionaire tech entrepreneurs (woohoo San Francisco!), or seeing firsthand definitive proof that polio has in fact not been eradicated and is still alive and well in the marginalized corners of the world.

Even if we see these things in college, chances are likely our mindsets have been so tunnel-visioned that their full impact doesn't register on us. The insular bubble of college is pretty hard to penetrate.

Challenge-wise, being an entrepreneur is far harder than being a college student. And thanks to the cost of college, so many of us might never have the opportunity to take the entrepreneurial path (or any of a number of other paths) unless we take it in lieu of the college path.

And yes - college might very well be a mold that shapes you into the person you'll be, but it's a cookie-cutter mold, and it's not unique to you. Life is a variable endeavor, and the experiences we use as a mold with which to shape ourselves should similarly be variable. College is probably a wonderful mold for some. For others like myself, there are almost certainly better molds out there waiting for us to find them.

I sympathize with the author's experience, but all programmers are absolutely not self-taught. There are all sorts of ways to learn programming that don't involve homework assignments or even college classes; pair programming and mentorship with a skilled craftsperson comes to mind as one perfectly nice alternative.

Besides, even after college I learned a tremendous amount about programming from my colleagues and peers over the years; programming isn't one of those things you learn, and then you're done learning it. It sounds like in this case, college didn't adequately cover the basics, and the author decided (to their credit!) to drive their own learning; but I promise there's a great big crowd of helpful peers and teachers out there when you're ready for them.

There are two classes of programmers: the taught and the self-propelled. You can certainly teach someone to program--what they do after that defines the rest of their career. No CS curriculum will give all the information one needs to be a great programmer, but it's certainly possible to have a long and mediocre career as a taught programmer.

I would wager a majority of the best programmers are also self-taught, though. Not because College is a bad experience or sets you up for failure, but because it's really internal motivation and curiosity that makes a programmer grow, not something they learned in a CS course once upon a time. And you've got to be pretty damn curious to make a career of programming without any formal introduction or education.

I would argue that a good CS curriculum makes you a good Computer Scientist. I started really programming my senior year of high school. My code has been steadily improving since then. However if it was not for my CS courses I would't be able to tell the difference between a binary tree and a stack.

Programmers are artists. You can't teach art. Computer scientists are mathematics. Math must be learned.

The two together are Engineers.

I'm a self-taught programmer who went to art school and I love this thought-provoking comment.

There's one thing I'd like to point out. You can teach the techniques of art, which are used for creating art. You can teach the techniques of programming, which are used for creating software. You can't teach how to create something that's never been created before.

That goes for creating ground-breaking art, as well as ground-breaking software.

Often, it's a set of disparate and interdisciplinary techniques, seemingly unrelated, that are used together to create the cutting-edge.

You can teach the techniques of programming, which are used for creating software.

I completely agree. The article might be right that it doesn't usually happen. But we should ask what the causes are, not simply accepting the "it can't be taught".

> You can't teach art.

Art (like programming) is the creative application of technique, and you can teach technique.