10 ms·
Being confidently programming language agnostic
- Koshkin 10y agoAn excellent article, well worth reading. As it points out, implementing the idea of learning a programming language for the sake of learning requires being highly selective in deciding which languages to learn. One language I would advise against learning is C++ - because, first, it may take too much time to learn to be worth the effort, and, second, the language itself is not all that interesting, and its standard library (especially STL), while does bring some novel ideas to the table, is so heavily affected by the particulars of the language itself, that maybe the D language would serve the same purpose better. Also, please do yourself a service and learn C# instead of Java. (This is not to create any doubt in the extreme usefulness of learning both C++ and/or Java for practical purposes.)
- voltagex_ 10y ago> Also, please do yourself a service and learn C# instead of Java. Nah. Learn whatever takes your fancy. Or whatever you think will get you a job. Or learn whatever you can get tutored in because it's almost always easier to learn when you have someone you can ask questions to in person. Learn structure and logic, but don't tell anyone they're less of a programmer because they use X instead of Y.
- chrisfosterelli 10y agoI know formal education often gets a lot of criticism around HN, but I think the approach the article is talking about is heavily mirrored in most university computer science curriculums. Universities tend to focus on paradigms and patterns, and typically force a student to learn at least 3 languages throughout their education (much more if they want to). Just in my undergrad I learned C, C++, C#, Objective C, Swift, assembler, Java, Go, Javascript, Python, and Haskell. My personal experience is that university grads are much better at adapting to new languages than someone with 4 years experience in only a single language. That's of course not to say you can't do the exact same sort of education without going to school (and probably in less time).
- sambe 10y agoAgree so much. I had a very theoretical course and am often shocked at how reluctant my peers are to investigate a problem in a language they don't already know (normally just one or max two). Also, if they need to quickly munge some text they'll have a dozen Java classes and several poms. I think this has real practical consequences for decision making (not knowing alternatives etc).
- dargueta 10y agoAlso agree. My programming languages course had me writing code in Racket, Julia, Erlang, Prolog, and Haskell, in addition to the languages that all students had to use for certain classes (C, C++, Java, Python, JavaScript, Assembly, and C#)
- no_wizard 10y agoThis reminds me of something my CS professor/mentor told me once. 'Teach how to program C, you will give them a job. Teach someone how to LISP, and they will keep learning forever' We learned a lot of LISP and Functional based programming from this guy. I mean a lot. Fun times I do miss!
- closeparen 10y agoYes! My university CS program focused on teaching you to think about computation, with the particular language you'd express your thoughts in as an interchangeable detail. Scheme for beginners, Python for web scraping and data munging, C for concurrent network and systems programming, and some small exposure to Java, Haskell, Standard ML, awk, yacc/lex, C++, and your mobile environment of choice depending on which classes you took. Many were upset by this "very theoretical" approach, as they'd prefer to have immediately employable skills in JS-framework-of-the-week. Instead they were taught how to think independently of a particular language, and to get comfortable with learning new ones. From a programming craft perspective, it was a little disappointing that we were never focused on advanced language features or idiomatic code, but I felt I had a solid enough base to self-teach that sort of thing.
- cryptoz 10y agoDiscussion a few weeks ago: https://news.ycombinator.com/item?id=13291593 https://news.ycombinator.com/item?id=13291593
- salex89 10y agoI have a sort of an issue with learning a lot of new languages. As much as I like to try them out, I like (and have) to learn things like big data processing or devops stuff and distributed systems and so on. And to be honest, when I get into the theory of those fields, the language does not mean so much. At the end I end up using what the targeted industry is searching for, and they do not need languages, they need solutions. And the language is rarely a solution. In that set of things, a new language is somewhere lower in the priority list for learning new things. Sry.
- deavmi 10y agoGood stuff.
- achikin 10y agoI think nowadays people spend too much time learning new tools and too less time doing something really valuable using that tools. I wish I had only one language, so I can concentrate on more interesting things rather than learning yet another random set of operators and library function's names.
- paulddraper 10y agoWhile using fewer, better languages for more is fantastic, I doubt you really want a single language. Try replacing shell, Structured Query Language, and C with the same language. I won't say that it can't be done, but I think you'll lose a lot if you succeed.
- ktRolster 10y agoC# really tries hard at that fwiw
- voltagex_ 10y agoIt's interesting, but you can get caught out easily - especially when using LINQ to SQL without knowledge of what's happening on the database side. I also don't think anyone's programming "just" C# - I'm a web dev, so I'll do Javascript, Razor, HTML, C# and SQL as the situation requires. There's also a huge difference between programming ASP.NET Web Forms and the latest version of WebAPI.
- jononor 10y agoI'd hope that with embedded DSLs we can get closer. People are already doing lots of it in Haskell, including domains you listed. Of course there is always the risk that one invents an "inner language" with poorer semantics and tools.
- eru 10y agoHaskell is a pretty good host for DSLs. But if you want to go lower level than Haskell, you have to essentially write compilers for your embedded DSL rather than the usual interpreters. And of course, Haskell's type system is not endlessly flexible (yet..). Eg Haskell still struggles expressing relational programming or linear types / uniqueness.
- SimonPStevens 10y agoI used to arrogantly think I could be productive in any language given a week or so to adapt. I often used the phrase "a good dev is a good dev in any language." That belief was rather abruptly broken when I joined a project using C++/CX it was so far outside of my previous experience that I had a really bad time of it. I happily picked up the actual language very quickly. It was the surrounding ecosystem of compilers, build tools, debugging tools, libraries, standard patterns and best practises that was too deep for me to become proficient in. That said. Learning every language you can is definitely beneficial. Just don't expect to hit the same level of productivity in all of them.
- imdsm 10y agoI agree. It's not always the language which makes it tough to integrate yourself into a project, sometimes it's all the frameworks, libraries, build tools, and general makeup of the project itself. I worked for a company a few years back doing ASP.NET (my experience is mostly Linux based tech, but you can pick up a language, right?). The language was fine, the design patterns used all quite standard, but the project had an array of frameworks and libraries which made maintaining it painstaking. In fact, I think you worked on it too.
- jghn 10y agoI still find the "frameworks and libraries" argument to be false, but enough people say it that I believe it must be at least partially true. I'll settle for a belief that the argument is overstated. IMO the largest issue is the breadth of one's experience, or lack thereof. And by that I don't mean simply the number of languages but how well versed one is in different languages and their surrounding ecosystems. For instance having good knowledge of both C# and Java isn't what I'm describing here.
- SimonPStevens 10y agoI think it's about how much newness you have to handle at the same time. I can happily take a project using a framework or two I've never touched before. Or something in a new language but similar domain. But when you have the perfect storm of new language, tools and framework (and maybe OS) that's when it hurts. I'm not saying I totally couldn't switch, but it made me change me attitude a bit from '2 weeks and I'll be back at full productivity' to something more like '2 to the power of number of new things'. The more newness that has to be handled at the same time, the longer it takes to pick up all the interconnections.
- zzzcpan 10y agoI think Norvig and the author are wrong about "parallelism" requirement. I mean it's good to know what's out there, but you can't really understand it if you try to learn it from a multithreading point of view. Fundamentals for it are part of distributed systems and this is where people should get into and learn things about ordering, consensus, asynchronous and synchronous systems, etc.
- eru 10y agoThere's of course also the distinction between parallel and concurrent.
- zzzcpan 10y agoYeah, they are mixing all kinds of things together, Go with Erlang and even throwing a GPU in there. These are all very different worlds and none of them teach you fundamentals. I remember how useless the parallel programming class was, I only started to understand the underlying ideas behind semaphores, mutexes and memory barriers long after I got into distributed systems.
- ww520 10y agoYes, their language parallelism recommendation is bit off. Parallelism is more about organizing data and algorithm than what a language can offer.
- lucidguppy 10y agoI think that learning C before C++ might hurt you. https://www.youtube.com/watch?v=YnWhqhNdYyk https://www.youtube.com/watch?v=YnWhqhNdYyk
- SlySherZ 10y agoNote: I didn't watch the video yet and my opinion might change by then. C teaches you something very useful, which is how the computer works under the hood. Most things you do in C loosely match to what the computer does, and learning C helps you understanding the computer. I'm not saying that it's a good language to start with, but it's okay. Unlike C++. IMO, C++ is the worst possible language to start with. The reason for this is that C++ tries to support everything, often using handy but cryptic syntax. C++ doesn't guide you to program one way or another, it simply adapts to every possible way to solve the problem. This might be good on the hands of someone that already knows how to solve the problem, but it's completly overwhelming for a begginer. It feels like you're taking the wrong turn at every step. A much better alternative would be JavaScript. Yes, it does have flaws, but it's much simpler and has personality.
- lucidguppy 10y agoThe argument is that learning C before C++ teaches you how to program C++ wrong. Nothing more, nothing less. I wasn't judging C++ as a beginner language. I wasn't judging C either.
- SlySherZ 10y agoI disagree with this part: "learning C before C++ teaches you how to program C++ wrong". IMO the problem isn't so much about learning C or not. It's about which other languages do you learn alongside it. You need to practice in a language that encourages OOP and a little bit of functional programming, like JS or Ruby. If you know Ruby and C already, using C++ well will be much easier :)
- userbinator 10y agoIMHO "wrong" being mostly the opinion of the evangelists who think C++ is a completely different language, and have been trying to push it in that direction, but it's still mostly C at the core with a thick layer of abstraction/indirection on top. Don't believe all the hype. "Climbing the ladder of abstraction" is the best way to learn how everything works.
- RivieraKid 10y agoAfter you have some experience with, say, 3 to 5 different languages, you can learn new ones very quickly (hours, days) with little effort because you know almost all of the core concepts (OOP, FP, mutability, generics, ...). There's no point in learning "all of the languages" for its own sake. Just learn a bunch of different ones to learn different ideas and programming styles. What takes more time is the standard library, common libraries, tools. A good example of that is iOS development in Swift. Learning the language is almost negligible compared to learning all of the technologies and tools. But coming from Android, I think I'm close to about 50 % of full productivity after two weeks. I never understood why there's so much focus on the "x years experience in y" in the industry. A solid developer should be able to become fluent in any language and technology within a month or two.
- eru 10y ago> I never understood why there's so much focus on the "x years experience in y" in the industry. It's because grading CVs is hard.
- MattRix 10y agoYeah this is the thing, learning languages isn't nearly as important as learning frameworks, idioms, etc.
- protomok 10y ago"I never understood why there's so much focus on the "x years experience in y" in the industry. A solid developer should be able to become fluent in any language and technology within a month or two." I don't think any developer can become fluent at a new language in 1-2 months. I have seen so much terrible code over the years the compiles and appears to run just fine but with massive performance issues, poor design, unreadable, security issues, memory leaks, etc. etc. I see learning the syntax of a language to be something like 0-5% of the effort of mastering a language, knowing how to properly use a language really does take years. Although I agree that # of years of experience is not a perfect metric.
- pfarnsworth 10y agoI've been programming for 20+ years, and recently moved over to Python. Sure, I could code on day one and figure out how to get programs working pretty easily. But the nuances with it are still things I need to work on a lot. I still don't program Pythonicly, I program like a C programmer writing Python. In fact, I probably program in all languages like I would a C programmer, and that's not good enough, in my opinion. I have fallen in love with Python because it's so damn easy to get productive, and I really want to be a great Python programmer. That takes a lot more time than the OP suggests, and requires you to immerse yourself in the patterns of the language and in the community, in my opinion. Not just dabble a bit and then check a box saying "I'm a polyglot!"
- no_wizard 10y agoMay I suggest this book specifically tailored for python best practices? https://jeffknupp.com/writing-idiomatic-python-ebook/ https://jeffknupp.com/writing-idiomatic-python-ebook/ Its a wonderful read. Will really unleash the pythonista inside of all us! If you really want to go deeper, I suggest these as well: https://goo.gl/CY6zPu https://goo.gl/CY6zPu https://goo.gl/UbMrTb https://goo.gl/UbMrTb Those shortened links take you to amazon (not affiliated in any way, FYI, just though the length of the URLs was obnoxious) Those are the definitive python programming books I came up with anyway. While we are at, I have to say once I learned to really code Pythonically I find that I can apply the PEP8 standards to almost any language. Admittedly, I, like John Siracusa, am a top level language debutante and don't live in C or C++ production code (I sometimes use objc but swift is...easier :). I remember learning C, and thanks to arduino I certainly using some varient of C/c++ there more heavily, but my coding style follows more or less the pythonic standard (with PEP8 being the backbone of that). food for thought, people of hacker news!
- iak8god 10y agoThanks for sharing these. I've been writing a lot of python code solo lately and have started to worry about how to make it more pythonic so it's maintainable and comprehensible to any future collaborators.
- 10y ago
- general_ai 10y agoLanguages are easy, libraries are hard.
- jedimastert 10y agoThis seems to be the message fron most of the comments
- general_ai 10y agoI'd be surprised if it wasn't. This is immediately obvious to anyone who's tried to solve practical problems in languages, rather than just learned them for resume embellishment purposes. That's also why sane companies limit the languages that can be used for development: if you let your "theoreticians" run wild, you will soon end up with code written in Brainfuck and Malbolge using libraries no one understands. I'm exaggerating, obviously, but only slightly.
- protomok 10y agoInteresting article, love the emphasis on continual learning. But I actually think we (software devs) need to focus more on mastering languages as opposed to learning many languages at a surface level. Books like "Effective C++" (https://www.amazon.ca/Effective-Specific-Improve-Programs-Designs/dp/0321334876 https://www.amazon.ca/Effective-Specific-Improve-Programs-De...) really showed me the huge divide between knowing a language and mastering a language.
- ar15saveslives 10y agoIt's far from enough to know a programming language. If someone knows how to write binary search on C++, he can rewrite it on Python, JS or C# pretty easily. But software development is not about writing pure functions, it's about writing applications, so frameworks and good practices is more important than the language.
- known 10y agoCPU is managed by the Kernel, and Memory is managed by You in C/C++; CPU is managed by the Kernel, and Memory is managed by Perl/PHP/Python/Java;
- aryehof 10y agoI feel we are starting to lose the plot. The problem isn't about learning another language or which to use next. Instead it is about how to solve and represent complex problems and systems in code. Any language is a means to an end, not the end itself. Focusing on languages and language constructs is of value to those in academia and those working solely in the domains of computing and computer science. For the rest, it is the equivalent of navel gazing, the equivalent of focusing on grammar, when the task is authoring a novel.
- dwaltrip 10y agoI agree whole-heartedly. However, as we take on projects of larger scope and complexity, reflecting on the craft in a measured and skeptical way can be powerful and productive. It's a tricky line to walk.
- didibus 10y agoWhat you should really do is learn the concepts of structured programming. Every language is just a notation on top of a fundamental programming construct. If you learn those instead, you'll know every language. I recommend reading Exercises in Programming Style by Cristina Lopes as a good starting point.
- sriku 10y agoA few recommendations on this, since at where I work a talk is organized on this very topic today. 1. A great book that covers multiple paradigms of programming is Roy and Haridi's "Concepts, Techniques and Models of Computer Programming" https://mitpress.mit.edu/books/concepts-techniques-and-models-computer-programming https://mitpress.mit.edu/books/concepts-techniques-and-model... . This stands hand in hand with the better known SICP. 2. Folks in the CS and programming world seem to ignore bleeding edge work being done in the arts space. To get a broader view of languages than "characters that go into a plain text file", expose yourself to the live-ness of the following - 2.ø Smalltalk - one of the first fully available language and runtime that is still usable today. 2.a Max/MSP/Jitter - by David Zicrelli and Millet Pickette's - Visual data flow programming language with decades of dominance in the Computer Music scene. 2.b SuperCollider - for architecture lessons as well as another multi-paradigm language. 2.c Impromptu - a Scheme based live coding environment for music and visuals by Andrew Sorenson. Normal REPLs will bow in front of most "live coding" languages used for music. 2.d Ixilang by Thor Magnusson - another live coding language, where the language is in a sense inseparable from its run time environment. The current running behaviour of a textual program could also depend on how the program evolved. In short, break out of normal modes of thinking and attain Turing nature, at which point you can proclaim that all languages have Turing nature and yet retain your discriminating view.
- tjl 10y agoA few other data flow programming languages, LabView (which has been around for a very long time) and is extremely popular for data acquisition (it's basically the goto choice most of the time) and the Houdini computer graphics software (there's other examples in CG as well). I pick Houdini because there's a version people can download and try. It actually works pretty well for most things.
- dvcrn 10y agoI'm glad that the trend is slowly going towards hiring generally smart people instead of a "PHP/Rails/Python programmer". I'd say, better hire people that can easily adapt something new if needed rather than saying "I am a PHP programmer, I don't want to do this new project in Ruby." (I met my good share of people in previous companies thinking in that way to the extend that they would quit if asked to write in something else than what they were hired for) In my current company they were looking for a Go programmer. I never wrote a single line Go before, yet they hired me and now I am writing Go. Then we had a deficit in the iOS team, so I learned Swift and now work on our app.