5 ms·
This isn't true, in my experience. I'm production-comfortable in at least half a dozen languages and yet I've never used any of them for more than maybe a few c
This isn't true, in my experience. I'm production-comfortable in at least half a dozen languages and yet I've never used any of them for more than maybe a few consecutive months at a time. I can go as deep on the JVM or the CLR as you'd want to go, I won't embarrass myself writing C++ in anger, and in the last year I've gotten quite comfortable with the idea of writing production code in Ruby (which, for me, means diving in and figuring out how MRI ticks).
My travels indicate to me that "proficiency" grows from understanding the mental models that go into programming. Within a linguistic family (and most of the languages in heavy use are either dynamically-typed OO or statically-typed OO), the differences are marginal and mostly unimportant. If I had to go write Node ("like Play but without a working type system!") tomorrow--well, I'd quit, but before I did I'd be proficient in a week.
Your experience is very narrow it would seem, and not an example worth generalizing from. So you know Java, C++, C#, and Ruby. That is _not_ a diverse set of languages.
Man, you just read my post and went "I am driven to just be a jerk about this," huh?
I'd really like you to tell me how "at least half a dozen languages" translates in your head to "four", because--and I'm not a linguist here, I'm not a dictionary, so maybe I'm wrong but I don't think so--"at least six" and "four" are not equivalent. But since you so nicely invited a brag, I've written code for production use cases in Java, Scala, Groovy, C#, Guile, PHP, JavaScript, Ruby, Python, Perl, VBA, and C. And shell scripting languages, but I don't think--going back to my point--the differences between zsh and bash and csh are really worth getting into. I have not written production code in C++ (aside from the game I'm writing, which isn't yet done), F#, or Erlang, but I know each well enough to look forward to doing so. (I'd need to practice Haskell before getting into it, but I've fooled around with it.)
What I did was pick the four closest to the top of my head, folding Scala in with Java because I didn't want to dilute it further. And what I said isn't changed by your desired genital-measuring contest, though I do so hope I measure up; the basic outlines of everything the overwhelming majority of programmers are likely to see in most of their careers are close enough to share a huge amount of proficiency from ecosystem to ecosystem. The principles are so similar as to make the switch from striped to paisley wallpaper just a context switch.
EDIT: Oh. I forgot Objective-C. Sorry.
I have to disagree with you, but remember this is my own milage. :)
C++/C#/Java, less so Ruby, are really all kind of the same, OO languages, 3 statically typed and one not. But basically, they use similar ideas with different syntactical sugar.
I've recently moved to using Clojure/Lisp and I kid you not when not just the language but the tooling allows me to be an order of magnitude more effective when shipping production code.
I'm basically ruined, and now find it hard to get a job because I refuse to code in any other language. Because I want to be able to: spend time with the family, walk the dog, go surfing at 6am every morning, go to live jazz....._and_ still make sure I ship quality stuff on time. Clojure/Lips lets me do this :)
I loved the article because it was basically everything I've realised in the last decade; I am way more effective in one particular set of tools than another, and I don't want to have to learn python or Go or whatever, and all their associated libraries, community and quirks. I just want to use the shit I know and go do something else with my life :)
This is MHO and like I said milage will vary.
Oh about the job thing, I decided to start my own company so I could build it how I know I will be best able to do it.
Disagreeing is how we learn, yeah? Almost as if relating different points of view is a good way to expand one's horizons. Thanks for being cool about it!
I'm not unfamiliar with Clojure or Lisps in general; personally, I can't think as well in that mode and it doesn't map well to what I do (either in terms of work or personal projects), but I get it. They're nice, for a certain kind of thinking that I don't find myself needing that often.
I didn't mean to imply that there aren't tools where I'm more effective, because they're better tools, to be sure, (by my lights, Ruby is a better tool than Python and carving bits into a spinning disk with my teeth is a superior option to Go) but I find that after a certain point within an environment I've put together in my head a sufficient playbook where missing certain things here or there doesn't diminish my enjoyment of the process of building something. Libraries, quirks...meh. I went back to PHP a few weeks ago after not touching it for years and it all came back in fifteen minutes or so. Maybe I'm just wired for it? I dunno.
Hello - I also worked with Java, Scala, Clojure, Groovy, C#, PHP, Ruby, Perl, Python, Javascript, PHP and C and have been playing with Rust, Haskell, F#, Erlang and Scheme as well.
In my opinion it isn't just an easy context switch and the principles aren't necessarily similar between OOP languages and functional languages, or between dynamic or static languages.
Some things remain the same, but some things are different, like the design patterns used, the techniques, the libraries and tools available, the mentality as a whole. When picking a language, you're not picking just a bunch of syntax and type system rules, but the ecosystem around it as well. It takes me one or two weeks to learn the basics of a programming language (i.e. the point at which I'm actually able to start coding and solve problems), but it takes me a year or more to learn the ecosystem around it.
For example doing functional programming doesn't fly in a language like Java, even if you can (as painful as that may be), because then you're the odd duckling swimming against the tide and you can't do that if your peers aren't doing it as well or if the libraries you're using are working against you. LISPs are very FP, but the abstractions used in comparison to what people do in a static language like Haskell are very different - for example LISP people don't think in terms of monads or applicative functors and they do like wacky things like rules engines. Erlang's or Akka's actor model is also very different than any other model for dealing with concurrency, because even though the rules look simple at first, that "let it crash" mentality and the ability of actors to communicate across address spaces changes everything. Ruby's meta-programming is also very foreign to people accustomed to Java or Haskell. Scala looks familiar to Java developers starting out, but beginners shouldn't be fooled, because Scala in common use is actually closer to Haskell and combined with OOP it sort of makes it unique in the approaches used. FP developers in general tend to prefer doing things with FRP, rather than MVC. Etc, etc...
Of course, you also have families. Python and Ruby are very similar, in spite of the seemingly different mentalities of their communities and after learning one, then learning the other is barely worth it. Ditto for Java and C#, many people would argue that C# is the nicer language, but Java has the nicer ecosystem of libraries and on the whole developers barely have a reason to jump from one to the other.
I'm not sure if I have a point - I guess what I'm trying to say is that developers should expose themselves to different ways of approaching problems. And when you're learning a language, one should go past the superficial syntax differences to discover the goodies and that takes time.
The other day at work I was asked to describe what I look for when I look at a resume or screen a candidate. I said that one of the most important things to me was a demonstration of a breadth of knowledge and experience and that was more important to me than a depth of experience. The example I gave was along the lines of IMO it's better to have spent 10 years working with a variety of languages from a variety of paradigms on a variety of types of projects than to have spent 10 years becoming the super deep expert in a single thing.
Why?
Largely the reasons you cite. As trends change and technology changes, often times the person in the latter camp will struggle much more than the person in the former camp. Sure, the people in the latter camp are much more impressive in their little slice of the world but the person who has seen the proverbial world will often be able to adapt more quickly.
I've also found that the person with a breadth of knowledge which spans these sorts of concepts can often use that experience to form outside the box solutions (in a good way) to sticky problems.
Honestly? Part of why I sort of shrug and don't find any of these languages terribly different is that, most of the lessons that are surfaced in one language are applicable elsewhere.
I strongly disagree with regards to the notion that Scala is closer to Haskell, I think the scalaz folks want it to be and I think not many people listen to them. Instead I think Scala is what Java should become and I find a lot of valuable lessons come from it when I'm writing Java, functionally and immutably. It's harder than in Scala, hard enough that I default to Scala when I have the choice, though with IDEA it's not that hard. (My C++ looks pretty functional and immutable too, and because everything lives on the stack or in unique_ptrs I find that it makes memory management a heck of a lot easier, too!)
Or I write metaprogramming-heavy C# and Java, automating annoying or hard problems (and I do have reasons to use C#, because Java doesn't run in half the places I want it to!) with a lot of reflection because it makes sense to me. A lot of that comes from JavaScript and Ruby; the expression of it is different in a statically typed language, but to me it's the same kind of thinking.
They're all programming languages. They emphasize different things. That doesn't mean that all those things can't be happily incorporated into whatever you're doing in whatever language if you're willing to put in the effort. I am, and I think it makes me write much better code because of it. Small sample size and all, but I've never had anybody complain that "your code isn't idiomatic", though I have had people say "I like that, I've never seen it before."
> I've written code for production use cases in Java, Scala, Groovy, C#, Guile, PHP, JavaScript, Ruby, Python, Perl, VBA, and C
Whenever I see a list of high use languages with 1 or 2 obscure ones like Guile or even Groovy stuck in the middle, I wonder if the real intention of the list is to promote the obscure one by associating it with more respectable ones.
Not trying to make a point or anything, but from my own experiences, people definitely seem to align differently to different languages and paradigms.
I know for myself, when I got a chance to code professionally in Erlang, I was hooked, and could not see myself going back to Java or a mainstream scripting language. Having to think and model problems concurrently, think about failure, etc, is so natural a fit for my brain that trying to fit a language that doesn't have those as first class constructs feels stifling, and having to eschew those concerns to write something that ignores the considerations Erlang prioritizes breaks my brain; I've tried it for timed coding events and it just did not work (i.e., realizing after the fact "Oh, yeah, I totally didn't need to spend time making sure that my supervisor tree made sense, that state was persisted properly, and resumable in the event of restart"). And yet it's not totally ideal, either; I care deeply about typing, and wanting to squeeze the most 'correctness' as I can from static analysis, and Dialyzer just isn't quite sufficient to fully scratch that itch.
Meanwhile I've seen some teammates who, while having the same diligence in thought, tend to be far more sequential, far more inclined toward single threaded models, reserving concurrency for the truly necessary cases, and more concerned with try/catch style error handling, than ensuring proper typing (Dialyzer) and otherwise letting it fail (at least until we know what we -really- need to handle).
Both I and my teammates have very similar backgrounds, coming from a predominantly Java background, some with a bit of .Net, Javascript, etc, with a smattering of mainstream scripting languages thrown in, and of course, we're all working on the same project. Yet our 'taking' to the language and its paradigms varies pretty drastically.
I think people, especially the HN crowd, miss that. PG's "Blub" paradox is viewed as the rule, and obviously everyone thinks they're at the top (or at least, as high up as is pragmatic for their domain), and while it's certainly true that you can't appreciate what you're missing if you don't at least understand it, people's brains work in very different ways. Languages certainly vary, and some are definitely better than others along a given axis, but I think it's unfair to take one's own experiences as objective truth. Even apart from domain differences, "This language made me 10x more effective"; yes, but is that due to the language, or due to your thought processes naturally fitting it? Will someone else who thinks differently find the methods of expressing problems in that language so naturally efficient that they'll see the same gains, or will it actually slow them down, even after learning it, because it isn't as good a fit for them?
I'm curious as to your background before moving to Lisp?
There's a huge gap in productivity - at least for small, exploratory, green-field projects - between C++/C#/Java and Lisp. There's a much smaller gap between Python/Ruby and Lisp, enough that a couple prominent Lispers [1][2] think that they are perfectly acceptable Lisps.
I like Lisp. I was pretty obsessed with it in college, and have gone so far as to implement a couple of them [3][4]. But my experience is that I'm perfectly fine with Python. Sure, I miss macros and conditions and CLOS. But that's all made up for by the awesome libraries available in Python, the ease with which I can express my algorithms, and the syntactic prettiness. I'm using it for my startup; I was just thinking this morning (while poking at a unit test in the REPL) that it's just as good or better than my Lisp experience ever was.
[1] http://norvig.com/python-lisp.html http://norvig.com/python-lisp.html
[2] http://www.randomhacks.net/2005/12/03/why-ruby-is-an-acceptable-lisp/ http://www.randomhacks.net/2005/12/03/why-ruby-is-an-accepta...
[3] http://en.wikibooks.org/wiki/Write_Yourself_a_Scheme_in_48_Hours http://en.wikibooks.org/wiki/Write_Yourself_a_Scheme_in_48_H...
[4] https://github.com/nostrademons/arclite https://github.com/nostrademons/arclite
Background has been mostly in C/Java and Scala. Scala for the past 3 years. It's a fantastically complicated language with even its creator Martin Odersky looking to do a major rethink and turn it into something simpler [1]. I never could finish reading the language standard. There was a lot of effort put into a lot of libraries that just made it harder to use Scala, like Scalaz which pimped almost every standard scala library class. Almost every time I went to use an external library I had to also learn the DSL that came along with it (the popular dispatch library for HTTP requests, "dispatch", needs a periodic table to decipher how to use it [2]). Then usually after that cognitive load I would encounter the inevitable limitations of the DSL and find no-way out of DSL hell; I went through 4 different DB libraries, trending down from ORM-high, ORM-ligher, ORM-almost nothing to "just some string interpolation around SQL". Some people find a lot of pleasure in debating language feature X and Y, and at first I cared about that, I really tried, but I was just fooling myself, I didn't really.
I like Lisp and specifically Clojure, for a number of reasons, with a lot of those reasons being because it's the _same_ .....everywhere. I read Clojure code like I read English, I can glance at a piece of Clojure and not wonder why there is an implicit argument that needs to passed and where the compiler might be finding it; the rules for Scala static implicit resolution go in and out even after reading them a few times for me.
Clojure has a lot of improvements on CLOS, I'm not sure how much Clojure experience you've had? There's enough differences that some of the arguments I noticed in the paper (which seem to be really just syntactical) on why ruby is an acceptable Lisp don't really apply to Clojure. For example, in Clojure you don't use lambda, you use "fn" to do the same thing. One of the things I really like about Clojure is that I get to run it on the JVM, which still beats hands down the Ruby VM, AFAIK, I did check a little while ago.
I'm not that familiar with the Python REPL, but Clojure's is pretty good and I love being able to jack into production when I have to and modify executing code to do tracing or debugging without having to restart it :) I know, it should never get to that point, but testing only covers so much.
Ok, I think I'll leave it at that.
Another poster on this thread made a comment around, people think in different ways, some people love thinking C++ and classes for everything....I'm not one of those people, I want to just say exactly what I want to say and nothing else; if I want a class I'll make one, else get it out of my way. I think LISP so when I type it's an almost 1-1 correspondence.
Cheers!
p.s. nice work on the Javascript port of arc, I didn't know that had been done.
[1] http://www.infoworld.com/article/2609013/java/scala-founder--language-due-for--fundamental-rethink-.html http://www.infoworld.com/article/2609013/java/scala-founder-...
[2] http://www.flotsam.nl/dispatch-periodic-table.html http://www.flotsam.nl/dispatch-periodic-table.html