55

By now I work with asp.net and C#. I have done a decent work in Java as well. I am planning my career in such a way I should be language-agnostic someday. What are the things that I need to learn?

First would OOP paradigms as its speaks about the Class design. Are there any others?

yannis
  • 39,547
  • 40
  • 183
  • 216
Gopi
  • 3,113
  • 1
  • 24
  • 30

4 Answers4

70

To be language agnostic you need to have experience in all of the common styles and types of languages.

  • An imperative language (You tell it what to do, step by step. Eg - C)
  • A declarative language (You tell it your goal, it figures out what to do. Eg - SQL/HTML/Prolog)

Also:

  • A functional language (Functions are key, avoiding state and side effects are the goals. Eg - Haskell/OCaml/Lisp/F#)
  • An object oriented language (Architecture where objects encapsulate related data and the methods that act on them). Eg - Java/C#)

Some typing styles:

  • A statically typed language (Data types are defined and checked at compile time. Eg - C#)
  • A dynamically typed language (Data types are checked at runtime. Eg - Python/Javascript)
    Experience of strong vs. weak typing is also useful.

Some different runtime styles:

Lower level stuff:

  • Something fairly low level (Eg - C)
  • Some dialect of assembly (Eg - NASM)

On top of that I would say you need experience of some concurrent programming and something event driven. You should probably also make sure you know something about the various domains such as web programming (client & server), rich client development/desktop, games. You might also want to learn about embedded programming, or dedicated hardware (like games consoles), and mobile development is becoming an increasingly relevant domain.

Others have also mentioned that it's worth getting some experience of Generic programming and Meta programming approaches.

When you learn these paradigms avoid just learning the syntax and writing in your old style. I've seen many C# devs write JavaScript as if it's statically typed. Don't do this, try to learn the language paradigms and embrace them.

If you've done all of this, the differences between languages will become largely syntactical so switching will become a fairly simple exercise of learning some new syntax.

Don't forget though that modern programming is almost always dependant on a framework, so familiarising yourself with the common and popular frameworks for each language you learn is also critical. Knowing C# is irrelevant without .net.

Simon P Stevens
  • 1,906
  • 14
  • 20
  • 9
    How is HTML declarative in the given sense? "Goal -> Action"? It doesn't *do* anything really. – Felix Dombek Dec 23 '10 at 14:42
  • 3
    A great declarative language that I can only recommend looking into is Prolog. It's different from anything else -- no functions (but relations that work either way around), no explicit control flow (the interpreter solves everything for you), just one great data structure (terms, nothing else is needed.) It's incredibly fast in what it does, doing millions of unifications and inferences per second -- and the time needed to develop something is about as short as in Python compared to C/C++. – Felix Dombek Dec 23 '10 at 14:50
  • 3
    @Felix: HTML, goal = "I want a label and a text box". Action = The layout & graphics engines figures out how to draw them. The details are down to the individual browsers. You only define what you want not how to do it. [See here](http://en.wikipedia.org/wiki/Declarative_programming#Domain-specific_languages). I agree though, It's not really a "language" as such. Prolog is a better example, I'll update. – Simon P Stevens Dec 23 '10 at 15:17
  • 1
    +1 For a good list of types, language choices are a little away from the paradigm in places, but overall excellent. – Orbling Dec 23 '10 at 15:38
  • @Orbling: Any specific comments and I'm happy to tweak it. – Simon P Stevens Dec 23 '10 at 15:43
  • "An object oriented language (Most stuff is an object. Eg - C++)" Errr... that's a bad example, C++ encourage mix of paradigms and objects are often (or should often be) only a part of systems. I would have said something like Ruby or Java/C# for exploring fully object point of view... – Klaim Dec 23 '10 at 15:47
  • 2
    By the way, you should add "Different domains/levels of abstraction" : web, interactive web, desktop tools, desktop games, persistant games are not built the same way as constraints and distance to the hardware is different, making the languages choice (or even existence) more obvious to the one wanting to understand what is it to be agnostic. – Klaim Dec 23 '10 at 15:49
  • And you forgot about Generic Programming and Meta Programming (C++ is a good example for that). – Klaim Dec 23 '10 at 15:51
  • @Simon P Stevens: No strong criticisms. Just some of the choices of example are a little vague. Lisp/F# for functional, they are both non-standard for functional, F# is very multi-paradigm and Lisp is well, itself, lol. Haskell/OCaml would be better there. C# for imperative whilst correct, is very OOP like for showing off imperative code, I know OOP is made up of imperative code in most languages, but something like regular C or another 3GL might be better there. C++ has the same multi-paradigm nature for OOP, but I have less issue with that as it shows off other OOP features well enough. – Orbling Dec 23 '10 at 16:22
  • @Klaim @Orblig: This is where you can see it's coloured by the bits missing from my own language-agnosticism. I've added Haskell/OCaml to the functional examples, I've changed the OOP example to Java/C#, I've added generic/meta programming links and I've extended the other domains section to include games, mobile and embedded (something I've been trying myself recently and it's a different thought process entirely) – Simon P Stevens Dec 23 '10 at 17:13
  • Nice. =) How exactly does one learn game console programming? Even if I buy one, well, they come without editor and compiler, don't they? – Felix Dombek Dec 23 '10 at 18:02
  • It's also worth mentioning that in addition to learning many languages, one should have a solid foundation in algorithms, complexity theory, etc. Start with The Art of Computer Programming by Donald Knuth. That's pretty much *the* work on algorithms. – HedgeMage Dec 23 '10 at 20:04
  • Felix> You'll have to get in a game dev company OR make one yourself OR use an illegal API. Some are available for NDS for example... Now the best way is still to get in a game company. – Klaim Dec 24 '10 at 11:41
  • Your answer makes it look as if language agnosticism equals knowing every paradigm on earth. I'd call it polytheism. – Tulains Córdova Nov 20 '12 at 18:47
  • To add, there's also the *Functional Programming* paradigm (JavaScript, Smalltalk, Python) which provides another perspective of looking at code. I don't fully understand it yet myself, but it is something I'm striving to become better-informed about. – Andrew Gray Mar 01 '13 at 22:22
4

I don't think you can become truly language agnostic. I find that I "think" in my current language (at the moment C#).

However, having said that, I think you might be able to separate the design from the code by trying to think in pseudo code rather than a specific language, and actually write it down in this format. This could help you concentrate on the design and architecture decisions rather than the implementation in your current language. The drawback with that - as Simon points out - is that the language and framework you ultimately use will inevitably influence the design. So as your design develops it will become increasingly tied to the language & framework.

ChrisF
  • 38,878
  • 11
  • 125
  • 168
  • +1 for "You can't be truly language agnostic". But I don't quite agree with your second paragraph. I do think it's important to design for the language & framework you are going to use. – Simon P Stevens Sep 07 '10 at 11:32
  • @Simon - you've got a good point about designing for the framework. I'll update the answer. – ChrisF Sep 07 '10 at 11:36
3

Reading your question and some of the answers one can have the impression that you equal "language agnosticism" with "knowing every paradigm on earth".

I'm not sure whether knowing every paradigm that exists or knowing an assorted range of languages, spanning several paradigms and types of languages makes you "language agnostic".

It's like saying that having practiced all religions makes yourself religiously agnostic.

I think a language agnostic person regarding programming languages should be someone that doesn't know how to program in any language at all or doesn't care what language he/she is asked to programm with.

That said, some people say a true programmer can program in any language given access to that language's documentation.

If that is what you mean by "language agnostic" then almost any experienced programmer can program in any language he/she gets forced to work with, given access to the language documentation.

Maybe you want to be "language polytheist".

I myself am competent in several language paradigms but I'd prefer OOP when it aplies. So I guess I'm not agnostic.

You will hardly find anyone who doesn't prefer a certain paradigm or language given the liberty to choose.

Tulains Córdova
  • 39,201
  • 12
  • 97
  • 154
0

It's not just the languages, Java itself has so many different modes that you could spend years just learning them all. You could learn:

  • J2EE features like Messaging and Persistence and the various servers
  • jsp and Apache-oriented toolkits
  • ant, maven and other build systems (Languages themselves).
  • The whole Groovy/Grails world
  • all the apache commons APIs
  • testing systems (Mocking, JUnit)
  • GUI builders like Swing, GWT...

And a hundred things I'm missing--JUST within java.

If you spend years covering the breadth (learning every language) you'll have trouble gaining the depth to work effectively in any one of them.

I'm not saying that learning a new language is EVER a problem, you shouold be actively doing so! I try to pick my next job based on what I can learn (what I haven't done yet), but I don't often pick a random language and learn it any more--Last time I tried that was with Scala and I left somewhat humbled...

Bill K
  • 2,699
  • 18
  • 18
  • To _"the whole Groovy/Grails world"_ you could add ", the whole Scala/Play!2 world, the whole JRuby/Rails world, and the whole Clojure/Noir world". – Vorg van Geir Apr 03 '13 at 14:37
  • 1
    I agree, wrote that a while ago and was just pulling things off the top of my head--although I'd probably just pick one of the web frameworks and go with it. – Bill K Apr 03 '13 at 15:36