Hacker News new | past | comments | ask | show | jobs | submit login
Pain. Or, Why Learning to Code is like Learning Chinese. (savemefrombschool.com)
65 points by inmygarage on Feb 10, 2010 | hide | past | favorite | 45 comments



The other comments here confirm what I suspected was true about most hackers - we never learned the "basics", or at least not at first (at least not the "basics" that this blog post seems to take as fundamental to our trade). We just became obsessed with the idea of making things, and did so without doing anything right. After enough screwing up and causing yourself headaches, you revisit the basics, not because it's something you feel like you "have to do" to learn to program "properly" (whatever that might mean), but because it makes doing what you wanted to do in the first place easier.

I don't think I know of a single good programmer that learned to code in such a horrible grueling manner. If you're not making shit from the very beginning, then you're never going to learn to love it, and if you don't love it, then you're not going to be very good at it.

One of the most important traits of a good programmer is that while they work hard, they barely consider it work. Especially at the beginning, where the work:play ratio is practically zero. The boring programming grind should only start when you're doing work for other people that you don't care very much about; if it feels like that before you reach that stage, you're doing something wrong. Find a nice easy graphical language to play around with while you learn about functions, classes, I/O, and algorithms; you can start worrying about mastering the LAMP stack once you've realized that the programming part of it is easy and fun, and the LAMP part of it is just another set of technologies whose quirks we learn and put up with in the name of getting things done a bit more easily.

I think the real problem is that the blog post might be right: you do need to know the basics to get very far in programming. But the basics of programming have nothing to do with hard library-specific study and grueling memorization; they involve loving to build things and make them work, thinking logically and experimenting with all sorts of code just to see what happens. The rest comes pretty naturally once you have that down.


Actually I agree with you. I think what I did not communicate well in the post is exactly what you said - I have more ideas than I know what to do with and the rate that I think of things to build is exponentially greater than the rate at which I can build them.

I am not someone who will learn something conceptually just for the sake of knowing it.

The point is that, what I learned from Chinese was that if you just suck it up and force yourself to learn the basics for a while (no matter how much you wish you could just get back to building things) that you can actually become better faster. That is the part that's painful - the actual making-of-things part is way fun.


The boring programming grind should only start when you're doing work for other people that you don't care very much about

Hm, this doesn't sound right. My programming education only began in earnest once I started writing programs for other people, for money. Every new project stretched my abilities.


That's true for me too. I enrolled in computer engineering in university without any interest or experience whatsoever. Then I wrote a horrible mIRC script and boom, suddenly I was interested in algorithms.


Being a programmer who's into 4th month of learning Mandarin I didn't really get the analogy. You need persistence and practice, yes, but it applies to any non-trivial undertaking.

I think the conclusion is, hard stuff is hard, and you have to try hard.


I think it's more that there can be some complete reorganizations that go on.

For example, if you know Italian and you want to learn Spanish you can translate a lot of your prior learning. The sounds are the same, the sentence structure, and many of the words even. Even English to Spanish isn't that different.

When you know English and you want to learn Chinese you have to learn a completely different way of pronouncing and listening to language.

I think her point is that non-technical people don't realize that there are a lot of fundamentals and basic principles that you need to learn to code well that you can't just pick up in your non-technical life.


Well, in fact learning Chinese pronunciation for English (and Western in general) speakers is much easier than for Chinese learning English. Most of the sounds already can be found in English, the tones are perhaps the only hard part. The structure and grammar are incredibly simple (albeit the writing system isn't).

I agree to your point about programming for non-techies though. And unlike with natural languages, you can't hand-wave your way out when you stuck..


Are you sure you're not confusing the phonology of Chinese with that of Japanese? Because I have studied both, and what you say is true of Japanese, but most English-speaking people seem to find the Chinese consonants represented in pinyin by zh, ch, q, x and r quite challenging. In addition, the tones have no English equivalent, and are a bit of a bear for an English speaker to keep straight.


Well, see e.g. http://en.wikibooks.org/wiki/Chinese_(Mandarin)/Pinyin_Pronu... - under 'Pronounciation Basics'. I'm not a native English speaker, but speaking Russian, English and Norwegian I find it generally true.

(And yes as remarked below my first exposure to the language was in Taiwan, but the courses I follow are not Taiwan specific)


I think it depends on the accent. Many speakers of non-Beijing dialects carry a regional accent that are usually flatter on the consonants.

For example, if he learned Mandarin in Taiwan he could've picked up a southern accent.


Re: Most of the sounds can already be found in English

8 years into the language, I still have real difficulties with some of the r's at the end of words, "有空儿吗?" (you kongr ma?)


I always wondered how well speakers of other tonal languages manage Mandarin, such as Swedish speakers.


Yes, but I think the total-wiring you describe is how language is DIFFERENT from programming.

This might be a bit of extrapolation but while all human languages are very different, they all have recursion and learning to program is more or less harnessing the mastery of recursion that we language speaking humans already have. I've been terrible at learning learning but I can pick a programming language reasonably quickly, I don't need to rewire to anywhere the same degree.


yeah I remember when taking my intro programming class that the instructor said something like 2/3rds of people can't get over the basic hurdle of how variable assignment works. I think that's because its a concept that has essentially nothing in common with an average person's every-day life, so they can't relate. Programming has a lot of hurdles like that when just learning the basics. God forbid she actually get into the "fundamentals" and learn assembly.


Three years into studying Chinese and noting her non-technical background, I think I disagree. I think it's a great metaphor.

The strength of the comparison doesn't come from the need for persistence, which is truly critical to either undertaking, but instead the kind of mental reformatting that needs to go on before either mode of expression is going to make sense.

I liked her bopomofo example because it highlights the fact that there is a level below programming can even begin --- it's the level that "your grandmother" can't even see --- and if you think you can just dive into an intro to Python (sorry Mark Pilgrim) and hope you'll be sadly, sadly mistaken.

Both endeavors require a great deal of tedious study of minor detail. You need to unlearn a lot and relearn it more generally. You can't program if the idea that computers run instructions isn't implicit; you can't speak Mandarin if you don't speak and hear tones without thinking twice.


I know Chinese as a second language. (For many years my occupation was Chinese-English interpreting.) I am still learning programming, even though my first exposure to programming (BASIC on time-sharing terminals) came much earlier in my education than my first exposure to Chinese. Good teachers can make a huge difference.

Any subject is hard as you get deeper into it. Chinese pronunciation is hard from the beginning for a native speaker of English because of the need to attend to phonemic tone. Chinese grammar eventually gets to be plenty hard, although I find it congenial compared to Russian grammar because it is mostly based on word order and function words rather than on inflection.

As for what is hard about programming, I HEAR (but don't know from personal experience) that learning to think recursively is hard. Pointers are hard, I am told, for many people who learn C. Thinking about programming from a functional rather than imperative perspective is hard until one studies a functional language thoroughly (usually).

Whether it's learning a computer language, or learning a natural human language, one has to get out of the world of instructional materials and into the world of actually communicating with them machine or the foreign person. It's the live situations in writing new code or conversing about new topics that really test a programmer or a language learner.


I agree with your overall point. I run a Chinese teaching business though (http://popupchinese.com) and think the analogy is a bit misleading. Unlike English with all of its irregularities, Chinese definitely gets easier and easier as people learn.

There's a failure of pedagogy in teaching the language. Chinese grammar is trivial if taught properly (we teach "prepositions" and "adjectives" before introducing "coverbs" and "stative verbs" and that seems to work). And while the tones can be tricky, most people don't get nearly enough listening and speaking practice.

As you said though, practice makes perfect. For me recursion was fun but memory management with vectors of pointers was a bitch. Easy to have a conceptual understanding, but the sort of thing you only master when you need to trace stuff through source to figure out where an error is. Then it clicks for good. :)


Learning Chinese involves a lot of rote learning and memorisation (at least the writing does). Programming is a flowful activity that I enjoy doing. So I don't really see them as a same.

One similarity: actually using the skills practically is incredibly vital for learning. For Mandarin, this is conversations; for programming, projects. Another: there's a few interesting isomorphisms between linguistics (Chinese is the first foreign language I've seriously tried to learn) and computer science. But overall, learning them has been a very different experience.


I think maybe you forget a time when programming was hard for you.

She's comparing learning Chinese as someone that knows English to learning programing as someone that is non-technical.

Both require people to learn fundamentals before they can go on to do "the fun stuff" (for Chinese, ordering food and for Programming, your own twitter client). This is because what you're learning is so alien to what you know, both as an english speaker and as a non-technical person. A lot of people stop learning at this point, at the fundamentals. She's saying don't stop there--power through it. There's light on the other side.


> For Mandarin, this is conversations; for programming, projects

Computer languages are how you translate your project ideas to what a computer/platform can understand, literally it's still a language


Your computer doesn't subtly dislike you for using the wrong word, however.


Persistence is probably one of the most important trait of a programmer, if not a great hacker.

Just today, I cracked my recursion homework assignment, which I assume to be uncrackable for mere mortals and after my CS teacher just told me to do it.(I wrote code since middle school!)


1. learn by doing, not by memorizing theory. 2. find a good teacher. these two things impact how effectively you'll learn hard stuff by orders of magnitude more than anything else.


I don't remember going through this phase when I was learning to program! I got started with C many years ago and I remember savoring every moment. :) I think what may account for the difference is that in my case the interest in programming stemmed from wanting to learn how the computer worked and C's low level nature facilitated this very well. With regard to the author it seems she's more anxious to start creating real useful applications. I get the impression she's more interested in the end product of the programming than the actual programming process.

Currently I do most of my development for the linux platform but I was considering moving to windows to take advantage of some opportunities in that area but I am facing some of the same challenges as the author of the article. The C# language and .NET platform are a whole new world and it feels like I am starting from scratch. It's hard to justify as I can do everything I need to do on the linux platform.


I know I went through this phase. It was that point where I had my old 286 and BASIC. I learned how strings are just arrays of characters, how there are different types of numbers, how file handles work, how algorithms work, functions, looping, recursion, etc. It was like being a baby making random sounds to find out what works.

If I had just been tossed into a "Programming in Java" one-week course I probably would have been totally lost because they would gloss over a lot of the basics in an attempt to teach the specifics.


I was stuck in this phase for 12-13 years, partly because I really just wanted to be able to do stuff, and wasn't all that interested in how the computer worked or how to do low level bit-twiddling. Then I learned Python, which pretty much allowed me to get stuff done immediately (executable pseudocode and all that). This provided enough of a bridge that other languages and an interest in how things were constructed could develop, but I didn't start out that way.


If I understand correctly, that's probably the stupidest way of learning a language I've ever seen. Even the classic "learn like a kid would" methodology wouldn't suggest that you learn by mastering pronunciation months before even learning how to say a single useful sentence. Mastering pronunciation is very important, especially if you don't want to talk with a thick accent, but it doesn't mean you've got to do it before saying a complete sentence.

I don't entirely get the analogy... is she learning assembly and CPU design before learning 'print "Hello world"'? That's great... unless you want to actually write anything remotely practical.

It is, however, entirely true that learning Chinese is goddamned hard. There's a saying: "After studying Chinese for 5 years, you learn humility."


There's also a quote, about that quote, by David Moser:

>> 'Someone once said that learning Chinese is "a five-year lesson in humility". I used to think this meant that at the end of five years you will have mastered Chinese and learned humility along the way. However, now having studied Chinese for over six years, I have concluded that actually the phrase means that after five years your Chinese will still be abysmal, but at least you will have thoroughly learned humility.'


I have a little trouble understanding this. First off I've never learned a foreign language. Second, I learned programming early.

For me, programming was never a really difficult problem. I suppose this is because I learned to use DOS and BASIC at an early age. I some basic (pun not intended) programming before I learned algebra. I learned html and javascript when I was 12 and didn't really get the point. Nobody had told me that html was generated.

I didn't use any of my programming skills until I went to college and starting playing around with linux. It wasn't difficult for me to pick back up.

I suppose fluency with programming could be similar to fluency with language. If you start early, it's a lot easier.


There have been a bunch of studies indicating that learning languages (and this applies to music as well, I believe) at a young age gives you immense advantages over those who start later. Tons of theories for why this is (but that's going down a brain development/neuroscience rat hole that's a whole other thread).


There's a saying that if you start learning a musical instrument when you're an adult, "you'll always play with an accent."

I suppose you could also program or seen code programmed with an accent.


http://news.ycombinator.com/item?id=1070545

I should add that learning to code != learning the LAMP stack. Hopefully she'll take her own advice and learn the fundamentals first.


Well, the P in LAMP suggests that learning to code is a part of learning the LAMP stack.


yeah, i am starting with python. the whole stack is my 5 year plan. i am ambitious like that.

but on a different note, as far I can tell (and granted I am brand new to this) does "coding" as a general term necessarily imply a scripting language? can you not "code" a database or is there a different verb for that ("implement")?


We're pretty open-minded with regard to what coding is.

If you use something like Django, you won't even interact with the database directly. I don't know if there is a coding-ish word for "writing SQL queries," but there's certainly more than SQL in database land.

Honestly, my number one tip for learning this stuff is just to read constantly and write code whenever you can. Also, sometimes you need to do projects that don't end in a product you can sell in order to learn new things, so get used to throwing stuff away (not literally, of course, but certainly from a revenue standpoint).

Overall though, knowing how to code (and having learned for the "right reasons") is hugely helpful in dealing with Software people in the future. I suspect you knew that already :)


It means writing code, period.

On your original note, "learn the LAMP stack" is, IMO, not especially ambitious for 5 years. Get a good CS degree (3-4 years) and actually try to learn the material instead of just passing, and learning the specific technologies is just a matter of skimming the manual as appropriate. Yes, it is entirely possible to get such a degree and have no practical clue, but that's a symptom of never doing anything outside of class.


yeah that makes sense. I have several projects I am working on in tandem which have been insanely frustrating, but once you can actually make something work it's easier to stop doubting yourself. i guess the eventual goal is a complete end-to-end implementation of a large web project. if 5 years is too much time, that is great news.


Contributing a good part to a whole might be better and easier. Teamwork FTW.


Why the whole stack?

There is some perl adage about a good programmer being a lazy programmer. Learn the shortcuts. I think python is a pretty good one, so might be emacs.

I think you generate code. Programming and implementing are probably better verbs, in my opinion.

I have worked with a CS graduate that struggled with practical application. And programmers that can't write from scratch.

Rudiments such as coding paradigms get you a long way, so does cut and paste and a bit of glue code. Reuse where possible.

You can get lost in theory, you can learn and learn more and more; but you can also thrive on a minimal subset of something larger - like a programming language. You can't learn everything!

You can understand a language without speaking it - and possibly get by with grunts, nods and hand gestures.



Why down vote this! Great point. It's a fine balance!


That's what's nice about functional programming. Write the equations, and let the computer deal with the computer stuff.


that was, in essence, what i was trying to convey.


"In order to truly understand macro trends, it seems like one needs to be familiar with the most granular aspects of the trade."


remembered me of Bloodnet. one of the characters used to say "I had to learn Chinese to debug this. I'm not giving it to you for free"




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: