你需要掌握的三种编程语言
每个编程人员都需要至少掌握三种编程语言。当然,这只是我的一家之言。
这是我经过多年养成的观点,也许是偏见,但我能够根据一个人所喜欢的编程语言来快速的了解一个程序员。当我读简历时,我会尝试使用我的这套观念按照“这个程序员为什么要使用这种编程语言”进行分类,我通过我的这些偏见从一堆简历中选出我想要的。
一.快乐的语言
这是一种你用来思考的语言。这是一种你希望无时无刻不在使用的语言。这是一种用来编写自己的项目的语言。对于我来说,它是OCaml (现在还有JavaScript,尽管我正在把CoffeeScript吸收进我的世界里)。对于很多人来说,它可能是LISP 或 Haskell。当一个人告诉我他的快乐的语言后,我能根据这个看出这个人的身上的很多特点。
如果这种语言是一种很深奥的或新的语言,这说明他对编程有热情。
如果这种语言是一种主流语言,这说明他很明智或实用主义。
二.高产的 / 强大的语言
这种语言里应有经验,包罗万象。它很成熟,有大量的基础库。使用这种语言,它可以在紧要关头快速的帮助你开发出各种服务或命令行工具。你的指尖敲动几下,一切事情都搞定。
如果一个程序员列出很多这样的语言,这也许能说明他可以使用所以的这些语言来开发RESTful服务。
如果我没发现他有高产的语言,或者很少,那么我就会怀疑他要么缺乏经验,要么不够专业。
三.黄油 + 面包
这种语言是当生活拮据的时候它能让你赖以生活的语言。这是一种只有当你自己或家人需要你去挣扎奋斗时才需要的语言。
如果一个人没有掌握一种能够换取黄油面包的语言,那他很可能需要接受一些”如何在一个团队里有效率的工作“这方面的教育。
[英文出处]:The 3 Programming Languages you need to Know
[译文来源]:外刊IT评论
The 3 Programming Languages you need to Know
I can quickly understand a programmer using the biases and stereotypes that I've built up over the years by knowing their favorite programming languages. When I read a resume, I try to classify the "why the programmer used the programming language" with these arch types and how I stereotype and use my biases to find what I want from a stack of resumes.
Happiness Language
This language is what you think in. This is the language that you wish you could use all the time. This is the language that you write your projects in. For me, this is OCaml (and now JavaScript although I'm integrating CoffeeScript into my universe). For many, this is LISP or Haskell. When I find out someone's happiness language, it tells me a lot about them.
If the language is esoteric or new, then they are passionate about computing.
If the language is mainstream, then they may be more sensible or practical about computing.
Hack-it-out / GTD Language
This is the language that contains everything including a kitchen sink. It is very mature and has a massive library base. With this language, you enable yourself to build quick services and command line utilities to help you out in a pinch. Anything that has already been done is at your finger tips.
If the programmer lists many languages, then they may be able to utilize all of them by building RESTful services.
If I don't detect a hack-it-out language or too few languages, then I suspect they are either inexperienced or too specialized.
Bread and Butter
This is the language that you can use to keep yourself alive when life hands you lemons. This is the language that you know just in case you need to hustle yourself to provide for yourself and your family.
If they don't have a bread and butter language, then they probably need some education on how to work in a team effectively.
-----------------------------------部分回复
60 comments:
Interesting ideas. But I am not sure about how my language choices fit here. When I think, I guess I do it in Lisp (or at least, I recurse a lot mentally), it is probably my happiness language most of the time (if the problem suits, I'm more than happy to be able to write it in Lisp). But then the two following categories probably don't apply, as I am no programmer (mathematician). When I have to code something "for a living", I do it in C... and when I have to code something quickly to get it working, I do likewise (unless Lisp is better suited). Maybe when I know more Forth (or Factor) it will slip in here somehow.
Cheers,
Ruben
Latest in my blog: Mathematics Poster: Dropbox, Scribus and LaTeX for the Win
PHP is bread and butter for most.
I can't agree that if "the language you think in" is esoteric or new, that's a sign you're passionate about programming. I think it's an indicator that a person is not as good a programmer as they think they are.
To really understand a language thoroughly enough to think in it requires a LOT of practice (a great essay on this: http://norvig.com/21-days.html). I can't see how this is achieved for a new language or a language so esoteric that you don't have much opportunity to use it.
Python. All of the above.
JavaScript is your happiness language? Are you a serial killer?
I second mutiny, Python it is.
I wish it could be Python for all three, but sadly at work I usually code in Java/C#.
Another python for all three vote :)
Nice post, definitely worth some thinking :)
I personally use two: ruby and java. Expect java for happiness, both can play all roles. For me at least :)
Hm... In the past year alone I've worked in about half a dozen languages; and none of them is a clear winner in any of those categories. Maybe its easier to categorise if you don't know that many languages. But I'm not convinced your categories are information bearing.
I think in some unholy mix of ruby and javascript, with haskell's map, fold, filter and generator functions. And Go's streams.
I get things done in whatever, usually ruby or maybe JS if I need to make a web service.
And my bread and butter? Well, the things that have paid the bills in the last year have been objective-c, java, python and ruby. And C#. And some CSS.
So, what does that say about me? That I'm a big language slut? ... And?
I guess I prefer to make the computer wrap around how I think rather than the other way around (= prefer imperative languages). And I prefer to make code work than make code tidy (= prefer scripting languages than java, c).
1. I think in natural language. Since Perl imitates natural language...
2. C
3. Java | JavaScript
Mine are: Ruby, Ruby and C#
I use other languages to mix things up every now and again, mostly to keep things interesting but also to work on new platforms. I have lots of 'occasional' languages (C, ObjC, Java, Python, Erlan, Lisp, PHP etc)
1. Lisp
Currently coding my chess engine in Clojure.
2. Perl
Quickly get things done and it's usually installed.
3. Java
Almost all school courses were in Java, currently using it a bit on work besides PHP.
re: If the language is esoteric // If the language is mainstream.
Can't say I'm convinced. People who love to ship like things with complete ecosystems. I write scripts in python and larger pieces in C# -- both have enough popularity and libraries that I can write working, maintainable, dependable code more quickly.
Having tried to write in lisp, I found the terrible libraries and documentation made writing shippable software significantly harder.
Esoteric languages may indicate a love of theory, not practice, and all of the value of computing is in the practice.
I second mutiny as well. Python it is for all three.
Maybe C(++) for 3, as I need to use that as well in the few cases high performance or low-level access is needed.
1. Erlang (Great for prototyping and robust stand alone servers)
2. Python (Excellent combination of OO and functional programming. I use it to extend Erlang and for Google App Engine)
3. C# (This paid rent for 8 years, but personally I think they made a hash of it with the release of VS 2008)
First two are Python.
My bread and butter is Java
Perl, Perl, Perl :)
Ruby, Ruby, JS
1. Ocaml
2. Python
3. C#
1. Javascript (Node.js)
2. Python
3. Python (PHP as backup but i hope i'll never have to use it for the bills)
Programming languages can be very fascinating indeed, but for me, they're just tools. Seeing as how easy most languages are to learn, I think the one I use at the moment tells more about my current situation than it does about my personality.
This kind of association leads to stereotypes and we all know what good those are.
1) Object Pascal (FreePascal, Delphi)
2) C
3) C++
1) JavaScript
2) Python / Ruby
3) Java
Ramasse-miette et buffer !
(yeah, it somehow wouldn't work well as a pun in english)
I'm coming round to Python's versatility. It hits all of them for me. It's gone from being a fun scripting language all the way to allowing me to perform some quite complex calculations.
Python, Python and Python. Although, I might try to look for a different happiness language in the near future.
I think we all go through faces...
"right now" for me is
Ruby, ruby, PHP
9 years ago
C#, perl, Tea (yeah I had to code that sh$#)
And a few years ago
Python, perl, C#
I'm all over the place
what is the difference between the first 2? Most of the ppl write their 'little helpers' in their happiness language or their happiness language is crap...
sorry mate but your article sounds bollocks.
the idea of 3 languages seems wrong. the categories you created have nothing to do with much in the real world. and the ifs at each category, full of shit. just so you know, not everything revolves around programming languages
Ruby
Ruby
PHP (le sigh...)
My happiness language only exists in my head.
Sometimes I think I understand it,
and could reify my thoughts as a new language.
So I sit down to write the spec,
and set to work with a parser generator,
but realize it needs more self-examination.
Then I hack some other personal project,
or churn out production stuff for the day job,
and dream of happiness once more.
I strain to glimpse the higher-order pinnacles,
shrouded in clouds, beautiful and succinct.
I pledge to start my ascent,
but know that it is unattainable.
It will always be something I know deeply,
but cannot describe.
Mik
happiness -> clojure
hackitup -> ruby
bread+butter -> java/javascript
C#, C#, C#
C#
Python
C++ / C#
Are you people serious? Defining a coder by the language he uses is like defining a painter by the brand of paint he choses to use for a single painting.
Drew Stoddard
Python (and recently Clojure)
Python
Java
Java * 3. There is a point where esoterica is not innovation it's just distraction.
Haskell, shell script or Haskell, C++
Perl...
Perl...
and oh, Perl.
Clojure
Groovy
Java
C#. C#. C#. Can't bear to program in anything else anymore.
1. Ruby
2. PHP/Java
3. PHP/Obj-C
1.) JavaScript
2.) PHP/Python
3.) C/C++
1) ASM
2) C/C++
3) C#
1- X86 assembly
2- X86 assembly
3- X86 assembly
kidding..
C#, C# ,C#!
Maximum satisfaction = ARM assembly
2. C
3. SmallTalk
Least satisfaction Microsoft's (frameworks/macros for) in C++ (aaaaargh! - no thanks)
Q. Why does this website still not behave correctly with Chrome? [sort it out]
C++,C#,C.
Know what you do, and why. Basically if you know little, don't bite off 2 much. Everyone should list java perl pascal bash COBOL etc, as relevant.
I think this should be extended to more than basic programming languages. Isn't the purpose of programming to solve a problem? My happy language is scripting - I can work with dozens of powerful cool and productivity tools with knowledge of scripting. I can solve a complex problem in Excel (not one of the cool tools) in minutes that would take hours to program from scratch. My hack-it-out is MATLAB/SIMULINK I build the problem as a simulation, matrix function, or other model and then generate C code. Here I can solve problems in hours that would take days or months to program. Bread and Butter? SQL. 95% of programs store and retrieve data. Almost every programming language above will use a database at some point. With SQL I can essentially work with all of them.
Java
C#
php
java
C++
python
C#, C#, C#
I don't think in any programming languages but I can talk in bash/shell. Additionally, I agree with those who disagree with the premise of this post. Programming languages are tools. Use what best fits the need. However, upon saying that, I can state the languages that fit the emotions implied by this post.
Makes Me Happy: COBOL II || OO COBOL
Get It Done: bash && awk
Bring Home the Bacon: Whatever the job needs
While there are some languages that I like more than others, there aren't any that I would not use if the situation called for them. Heck, I am in the process of getting a degree based on C++ and DirectX.
Footnote: Do not start with me about my Happy choice. Five minutes of research will show you that
Wow, great post. My last career is going to be sociology with a focus on technologist.
happiness = C#
bread butter = MS web stack (html, asp.net, javascript, jquery, ajax....) with emphasis on C# business libs
gtd = usually c# because I know it, but use perl when it is just for me (log scrapping, etc) and have a lot of fun doing it
No dogma on my part, my choice is mostly due to inertia and advancing my salary. That said, I still care about my bread and butter language and like a previous post, I find it complex and interesting enough to keep me more than busy. As a LOB developer for a number of years and more recently developing near real time trading apps, my experience is the language is in the end a tool that you need to know the details of such that the business problems can be solved - period. The marketechture for a given language rarely (never) superceeds a quality programmer designing, coding, and testing a solution - in any language.
1) PHP (since I was a teen)
2) C# .NET (when I need to through something together)
3) T-SQL (actually a db architect as my bread and butter)
1: I am designing this one: it will make // programming much easier to program than sequential programming. Meanwhile, I'd say Ruby or Perl.
2: It is absolutely impossible to use just one given any non-trivial project: Perl or Ruby / JavaScript / C / bash / SQL / sed / awk / lex / ...
3: Don't tell: I'm a whore, I've made money with Java / C++ / C# and even ColdFusion (script-based only though) and, I had forgotten this one: in Z80 assembly (Oops, I just disclosed my age).
C++, Python, C++ for me