views:

897

answers:

15

To start with, a little anecdote. I had my question written down in this form and suddenly, I really do have no idea why, I've closed "google chrome".. and now I need to start writing it again from scratch :)

In those last years, I've come to know many languages. However, I think it's important to really master one or a few. I'll give you an example: Suppose I ask you to write a program that open a file, read every line, sort them with say, the second word, and output everything to the screen. Easy you say. However, in many language could you write it WITHOUT documentations. Not even intellisense/google. I think I can do that only in C++.. it's really easy to do this in all language, but without google or intellisense, I wouldn't know sometime how to sort.. what's the proper way of opening the file, etc..

So my question, asked from a junior software engineer is: If you could master a language, really master it such as reading lots of book on it, reading each days the news, answering question, etc.., what language would it be?

Thank you

edit note: I don't want this to be a wiki so please don't close the thread. Secondly, as I said, I know it is important to learn many languages and be comfortable with many of them. However, there's actually always one or really few language that you really master.. Are you saying that, those days with google and new easy high level language, that instead of mastering one language, I could just take this time and learn yet another language? I know it's important to learn design and paradigm - I never said the opposite.

+1  A: 

Scheme (or Clojure or another LISP) and C.

Joshua Fox
+2  A: 

According to the TIOBE index are the highest ranked languages are Java and C.
Learn java or C into the details. ;))

Kb
Who the hell recognizes TIOBE other than Walter Bright? (with all due respect to him and his awesome D language)
hasen j
@hasen j: Interested in a better index. Which one would you recommend? ;))
Kb
TIOBE is more than a little flawed in its methodology. Even if it were flawless in implementation, its intent is to identify the most *popular* languages, not the most *useful* or most *important*, which would be more relevant to this question.
Dave Sherohman
@Dave Sherohman: I agree about popularity. Still it is useful to learn popular languages. ;)
Kb
Kb I don't recommend any but that doesn't mean that I can't point to TIOBE and say "so so flawed"
hasen j
+4  A: 

First of all, there is really no need to write that program as sort will do just that.

I my experience there's no one tool that fits all purposes, so I see no reason to focus all your effort on a single language.

I have however spend most of my time with just a few languages: Pascal (way back when), C++, Perl and now C#, but I have also worked with Java, Basic, APL, Prolog, LISP, PHP, AWK, TCL and assembler. Each have their strengths and weaknesses and thus better suited for different tasks.

From a practical point of view it makes sense to spend a great deal of time with one (or just a few) language / set of libraries in order to get to know them well, but as I said I don't see any reason to limit yourself to just one language.

There's no silver bullet, so extend your toolbox instead of trying to find the holy grail.

Brian Rasmussen
+3  A: 

Python. easy to master and very useful.

Matt
+4  A: 

As stated above, there is no silver bullet. TO be honest, the best 'language' that you should master is probably pseudo code. Why? Because you should be able to show a piece of pseudo code to ANY developer, regardless of the language and they should understand it.

You're better off learning patterns and practices as opposed to a specific language. Languages have a life cycle -- they all eventually die.

MunkiPhD
+1  A: 

For career($$), it's probably java or c# For love of languages ( lol (-: ) it's every langauge out there, espicially whitespace.

Vardhan Varma
+2  A: 

I think I wuold go with C. It is the high level language that is closest to assembler/machine code, so if you master C, you'll have a deep understanding of many other concepts you'll find extremely useful in any other programming languages or Computer Science career such as: memory management (stack vs. heap), pointers, and more.

Pablo Santa Cruz
A: 

I can do what you are asking in Python and Java.

But I'm far from a master with both.

Vasil
+3  A: 

Do you ever "master" a language?

I think the best programmers are the ones that find their way in every language, as long as they are familiar with the paradigms of similar languages. So it's better to understand functional programming, OOP, etc.. instead of just a language.

The mastering is in the programming, not in the language.

Ward Werbrouck
+2  A: 

print ''.join(sorted(file('FILENAME'), key=lambda row: row.split()[1:]))

just 45 seconds and nano...

ZeD
I bet it takes more than 45 seconds of thinking .. at least if it's the first time you encounter it.
hasen j
trust me, and I count also "fire konsole" in the 45 seconds :)
ZeD
+3  A: 

If you could master a language, really master it such as reading lots of book on it, reading each days the news, answering question, etc.., what language would it be?

This is a bit like asking, "if you could only use one tool from your toolbox to build your house, what would it be?" A house built only using a hacksaw will not be as effective as one built using the right tools for the job. People can do some great things with hacksaws, and the most talented hacksaw users can create things out of wood that would rival the Renaissance sculptors of old. But they don't understand how to use screwdrivers, and their houses will only have electricity or running water with the greatest difficulty.

On the other hand, if your general skill level in carpentry, electrical installation, and contracting improves, you'll start to see everything get easier. You'll see that, in fact, hacksaws aren't that much different from band saws, and suddenly much of your experience in hacksaws will become relevant to other tools. You'll start noticing that your houses hold up a little better over time, and you'll wonder why you didn't pick up a screwdriver before. And you'll certainly have electricity and running water.

If this tortured analogy wasn't obvious, the same is true of programming. If you devote yourself to mastering the crafts related to programming, and you balance this with practicing how to use a particular language, you will be a much more effective developer on the whole.

But don't take my word for it! Check out Peter Norvig's Teach Yourself Programming in Ten Years, where he advises:

Learn at least a half dozen programming languages. Include one language that supports class abstractions (like Java or C++), one that supports functional abstraction (like Lisp or ML), one that supports syntactic abstraction (like Lisp), one that supports declarative specifications (like Prolog or C++ templates), one that supports coroutines (like Icon or Scheme), and one that supports parallelism (like Sisal).

John Feminella
A: 

Programming is so much more than knowing a language inside and out. I can reference documentation for framework or even language details that I don't use frequently. If you want to be a better developer, stop thinking of it as just being more knowledgeable about the language and move on to being able to understand the problem domain and design a solution that meets your customer's needs. Writing code is still a huge part of a developer's life but the difference between a junior and a senior developer isn't really mastery of the language, but mastery of the art of solving the right problem with the right solution.

tvanfosson
A: 

There are so many things wrong in this question.

First of all, there's no single language that's "the best", every respectable programmer recognizes that. If anyone tells you "screw this dude, my language X is teh best!", then he doesn't know what he's talking about.

Secondly, this will quickly degenerate into a "what's your favorite language" thread! Very subjective, not much will come out of it.

Thirdly, you never ever "master" a language or technology.

A language is just syntax, really. What's more important is the libraries and tools, and these things are open to change, so by definition you cannot master them.

Fourth, what you should master is not a specific language, but a mindset that understands what programming is: it's not about the language.

hasen j
+1  A: 

Pascal is one language that has direct support for manipulating a file. In many development enviroments these days, you would be referring to the library documentation, not the language specification.

The point is that mastering the .NET library (however you want to define that) is a larger task than becoming profficient at C#.

Dan
+1  A: 

I think your question is ...

"Given a programming problem I want to solve it without using stackoverflow,google or docs(in that order:)). Then I have to have very good command over some language.

Which one should be the language?"

Properties of such language are

  1. Simple syntax(you need not refer docs for syntax).
  2. Applicable in wide range of problem domains(so that you can solve most of the problems).

My choice is Python.

TheMachineCharmer