Ask YC : What determines command of a programming language?

6 points by seren6ipity ↗ HN
Most of you are great hackers. How do you determine that you have command of a particular language?

What kind of problems/ projects you take up while learning a language. I have read on yc that a lot of people start with a project after a quick refresher and learn the language on the go. Are there any standard problems that you attempt to solve?

I've been trying to learn Python but feel a lack of direction and an inability to assess my progress.

Please share your views.

29 comments

[ 159 ms ] story [ 1207 ms ] thread
I find that you really just need to find a problem that I myself am interested in solving.

As part of the process of completing the project all kinds of problems will come up simply due to the fact that you don't know the language; and you know what? You just solve them and carry on and before you know it, suddenly you're just writing in the language without thinking.

The idea of solving standard problems to me does not appeal, but only because they sound like textbook exercises, but really whatever does it for you.

output.

If you can solve your problems with the language, you command it.

I am not sure I agree with that. It's entirely possible to make a Rails app that solves your problems without having a command of Ruby.

I guess you could consider "Rails" a separate language from Ruby...

My point is to diminish the elitism around languages. It is completely irrelevant if you didn't need to use a component of a language to solve your problem. If you aren't using a particular component that would make your product better to the point of viability, then you aren't really solving your problem.
I guess we should add a time factor to output?
If you're late, you didn't solve the problem. I guess I really failed in attempting a very general statement.
When you can start thinking the problem through in the syntax of the language before you sit at the computer, odds are you've got a pretty good grasp of it.

You usually can't think the language if you're still referring to manuals/internet over 50% of the time for syntax/understanding.

(comment deleted)
I think I have command of a language when I can write something from scratch without spending much (if any) time in the docs looking up things.

How many languages have you learned before Python? The first is always hard, and the second is always the worst, because it's the first time you have to think above the level of syntax, but after that it's much easier. By the time you get around to learning number nine, all you have to conceptualize are the diffs with what you already know, which is a much smaller learning curve. So, to summarize, it gets easier with each one you add to your repertoire.

As for problems, I just start with the current one. I usually learn new languages because it seems well suited to a problem I have for some reason. Right now I'm really interested in parallelism, so I'm learning Erlang. I'm working on writing some kind of REST ROA stuff with it (and Yaws), for fun.

Thanks for your response. I had learnt C and Cobol before and those were driven by the projects I was assigned to. I am confident with the algorithm but I should reduce the frequency of looking up the manuals.
With all the batteries-included languages running around I think reliance on documentation is an irrelevant (obsolete?) measure.

I for one am constantly apropos-ing in CL even though it is my primary language.

Well, what about not being reliant on docs for syntax, but only for library functions? I can never remember what each language calls "length" (length? size? Is it the same for strings and arrays? What about number of keys in a map?) but I don't feel too bad about that, even in languages I use every day.

On the other hand, if I have to look up the syntax for a loop, then I can't say I know the language yet.

If you can handle multi-threaded server code as well as client UI code, you are very much good in that language. but the important measure is not a particular language, rather your knowledge of algorithm, oo concepts, design pattern, etc. And some languages are a must. i.e sql
I'm practicing Python while solving problems from Project Euler. I think it is a really efficient way to strengthen your LANGUAGE skills. Try very hard to re-write your solutions in an elegant and clean way.
That is some thing I'm doing too. But I'll try the re-writing part. Thanks.
a possible answer would be "when I've code that someone outside my team is using." Deliver a web app, a library, an interpreter, a game, and it's reasonable to say you're over the hump.
Ask the poor sucker who has to maintain your code if he thinks you have command of that language. If he says yes, then good for you. If he doesn't, then find out why not.
Might be because he doesn't have command of the language, and doesn't feel like learning templates. Or macros. Or reflection. Or whatever.
"Most of you are great hackers."

Are you sure you want to make that assumption?

That is why I did not say "All of you ...". The point of reference is of course me.
I think this is related closely to another popular question: how do you determine that someone else has command of a particular language?

I think the point that I would pick is when you start feeling constrained by it. If you start wanting to do things the language can't do, or can't do well, and you can explain why it can't do it well, then you have explored pretty much all of it.

That's why my favorite interview question is "So you're applying to program in FOO. What's something you hate about FOO?"

Speaking of python, have you tried applying your skills using a framework like django? That might be a good way of understanding how much comes naturally, and how much doesn't.
Thanks. I haven't. I'll explore that option.
I think it's about the flow e.g. you're in the flow if you can arrange the whole thing in your head(i.e. developing a habit of thinking in a language), you don't have to look to manuals and most importantly if you can reflect upon the language (at least I've observed this pattern among great hackers I admire). You can do amazing things if you achieve the experiential-mode but as I've observed people that I admire it's the reflective-mode that takes you to the next level.
I really need to write several small or one moderately sized project in a new language to get the feel of it.

I've been trying to learn Python and Lisp without any real project to hone my skillz on, whereas with other languages I actually had projects that sort of guided me.

So I suggest finding a project that can be written in the language you want to learn, and start writing it.

"How do you determine that you have command of a particular language?"

When you're answering more [newsgroup|mailing list|forum] questions than you are asking.

(And both are good ways to attain command of a language.)

When you're first leaning languages, "command" of a language probably ends up being defined as a solid working knowledge of the syntax.

However, the real deal is when you understand the solution pattern suggested by the language. When you start to break down problems into objects, functions, or types before you even touch a keyboard, then you've really gotten somewhere.

Reading other people's code can be a good way to assess command of a language. I've needed to dig into a number of Python packages over time, and have found it quite noticable how much more quickly and completely I'm able to grok such code as my command of the language increases.
Skip the learning phase, go straight to useful work. Sometime ago I had to render some maps with Mapnik (http://mapnik.org) which is driven by Python scripts. I didn't know any Python, so I just pasted an example from the 'net and started reworking it to suit my needs, experimenting and reading docs whenever I got stumped. Quickly picked up enough Python to write my own scripts, solve other tasks. For me it's the only way to learn.