5 ms·
Advantages Of Being A Polyglot Programmer
- 5hoom 15y agoI think being too strongly tied to any one language/platform is really limiting your horizons. Staying in your comfort zone (while obviously comfortable) can make programming seem very tedious as you kind of end up banging out the same old code over & over. Try a totally different language for a while & when you come back to your particular Blub you might find your style has changed for the better.
- exDM69 15y agoI think that a serious programmer should know at least 10 different programming languages, including but not limited to (don't learn them in this order): 1) Assembler - preferably more than 1 CPU architecture. You _must_ know assembler in order to be able to reason about performance and computer architectures. 2) C - It's the most used systems programming language and will stay relevant for at least the next 10 years. Knowing what kind of assembler is emitted from C is also useful. 3) Java/C# or another flavor of Blub that works with a virtual machine, garbage collector and so on. Not really a family of languages with the most educational value but widely used 4) Lisp. Any Lisp. And some theory in lambda calculus. 5) Brainfuck. I'm not kidding. Brainfuck is to Turing machines as Lisp is to lambda calculus. Knowing how to program Turing machines with pen and paper is also useful. 6) Prolog or another logic programming language, like the one used in SICP. A whole new and different model of programming. Will blow your mind, guaranteed. 7) Ruby, Python or Javascript. A dynamic interpreted language. 8) Haskell or another functional programming language. ML dialects or Erlang might do, but I recommend Haskell for it's lazy evaluation semantics. 9) (edit) A stack based language like Forth or some of it's descendants. 10) Pick any language that will introduce a previously unfamiliar concept to you 11) Optional: Perl. I don't know anything about Perl but some people swear by it. That's a reason good enough. Before you ask: yes, I do know every language in this list and many more. No matter what language you use to earn your livelihood, learning a language or two more will make you better at it.
- 5hoom 15y agoI've never heard that perspective on Brainfuck before and have thusly avoided it as it seems, well, really hard & impractical. Thinking of it as an abstracted turing machine is intriguing though. Do you know any resources on tackling the subject?
- samdk 15y agoThere's really not a whole lot abstracted about it. It is really hard and impractical for actually accomplishing anything, but it's also pretty easy to see how it maps to a Turing machine if you know what the actual definition of a Turing machine is. That kind of thing I learned in a class: a textbook on computational theory is probably what you want, and as far as I know there are only a couple of those. I used this one: http://www.amazon.com/Introduction-Theory-Computation-Michael-Sipser/dp/0534950973/ref=sr_1_1?ie=UTF8&qid=1314209866&sr=8-1 http://www.amazon.com/Introduction-Theory-Computation-Michae...
- exDM69 15y agoThe Wikipedia page on Brainfuck has some common Brainfuck idioms that will help you get a grasp of the language: http://en.wikipedia.org/wiki/Brainfuck http://en.wikipedia.org/wiki/Brainfuck
- T-R 15y agoYou don't mention any stack/concatenative languages explicitly - is that just an oversight, do you feel there's less to gain from them than the others explicitly listed, or did you leave them out for some other reason?
- exDM69 15y agoGood point, I missed this entirely. A Forth-derivative of some sort would be useful.
- andylei 15y ago> Brainfuck. I'm not kidding. Brainfuck is to Turing machines as Lisp is to lambda calculus. Knowing how to program Turing machines with pen and paper is also useful. ... why? when was the last time that turing machines were useful to you?
- michaelochurch 15y agoHere is, in my mind, the #1 benefit of polyglot programming: it refines your aesthetic sense, and it also gives you a sense of intrinsic vs. accidental complexity, the former being the innate complexity associated with the problem being solved, and the latter being complexity imposed by implementation details. It's crucial to know the difference, because good software engineering is about exposing people who have to use your code only to intrinsic complexity. Ideal engineering practice: write the "beautiful" program first that only presents the intrinsic complexity (logic of the problem being solved). If performance is an issue, then optimize, a practice that often imposes accidental complexity on the code. Put said accidental complexity behind an interface as much as possible. C++ and Java force a lot of the accidental complexity into source code and in these languages, it's hard to pick up the difference between intrinsic vs. accidental complexities.
- bsb 15y agoPolyglot should not be confused with generalists. There are many generalist programmers who drift through their careers, never becoming an expert in a field so they're easily swapped in and out, easily outsourced, and easily forgotten. Some of the specialists out there, can make some serious salary (e.g. 200-250k/year for those that can build high speed trading platforms, or 150k+ for the architects of the biggest enterprise software). That being said, limiting yourself to one language will be equally as hurtful, as you are wearing blinders. Even if you don't know all the languages, learning why they did things (DRY, functional programming, etc) can make you a better programmer in Java or whatever language you are in. As you supplement that, you'll find overall skill increases across the board. My personal opinion is about 1 a year will do just fine, give you enough room to learn more than a book/sample project worth, see where the language goes in a market, and give you enough time to use it for something meaingful.
- tomh- 15y agoIts good to hear about the advantages of being a polyglot programmer, but how about the disadvantages? I think the number of recruiters requiring X years of experience in Y still outnumber the ones who can recognize the value of a polyglot programmer. Career wise, is it smart to go this route?