Live data from Hacker News

Ask HN: You can only be fluent in 3 programming languages. Which ones?

news.ycombinator.com

51–60 of 75 posts

Re: Ask HN: You can only be fluent in 3 programming languages. Which ones?

#51
Python, Java, and SQL

Python: gluing things together, prototyping, data munging/analysis, web development, ad-hoc non-relational data manipulation.

Java: Rock solid, widely used, maniacally backwards compatible, and easy to find work.

SQL: Imo the best way to handle relational data (and in my experience, almost all data I've seen has been relational).

Re: Ask HN: You can only be fluent in 3 programming languages. Which ones?

#53
This is an interesting question and depends on your domain. However if we want to optimize "get stuff done across the most domains", I would go with:

Python: proof-of-concept, web-dev backend, scientific exploration

C: performance (low-latency), system (interface to most kernels), game-dev

JavaScript: UIs

Remark that I would not consider these languages my personal favourites, but in fact, you do not have much choice. C is enforced as it is tight to *nix which is the most spread OS, JavaScript as it allows you to build cross-platform UI's (that do not require user-installation) and Python because of its huge library diversity (in particular in the applied sciences).

If you speak them sufficient you can tackle most problems. If you then want to go further I suggest

Haskell: expressive, performance (through-put), reliability

Scheme (e.g. Chicken): expressive, simplicity, explorative computing

Additionally one might consider Java (and later Clojure, which should be easier if you already know Scheme and Java) to interface with the JVM world.

Re: Ask HN: You can only be fluent in 3 programming languages. Which ones?

#54

I'd go with practical and diverse if possible: Clojure, JavaScript, and C. With clojure/JVM, you get a Lisp as well as good knowledge of java interop / apis, so you'll be able to work in Java if you have to, plus you get all the java libs, and there's basically a java lib for anything you could ever want to do. Then I'd make sure you know JavaScript, its gotten to be a good enough general purpose scripting language,…

sounds good to me without giving much thought

or c++ instead of c since c is subset of c++

Re: Ask HN: You can only be fluent in 3 programming languages. Which ones?

#55
Java, for choosing an object-oriented, static typed language. Ruby, a dynamic scripting language that I love its syntax, but maybe python would be a better choice for general dynamic scripting language, not because I like it, more because of its ubiquitousness. And finally Clojure, because it's a member of Lisp family and I always wanted to try one of them, and by running on the JVM it inherits great amount of Java libraries.

Re: Ask HN: You can only be fluent in 3 programming languages. Which ones?

#57
It makes me sad almost nobody mentions Perl and/or Perl6 (they are essentially entirely different languages, but designed by the same guy, so I'd say they follow similar design methodology). Although it is not as popular as it used to be, Perl is still extremely useful, and I found that the community around the language is by far the best and most welcoming to newcomers. Also a lot of people will say that Python is superior due to its readability, concise formatting etc., and indeed there are areas in which Python would be the better choice (machine learning and statistics to name a few) but for a quick file processing, OS admin tasks, or a simple multi-threaded web scraper, Perl would be my first choice. And I find that due to the flexibility and TMTOWTDI motto, I find the language much more expressive and I feel more creative writing Perl code. But I wouldn't dwell too much on picking the right scripting language, Python, Ruby, or Lua are all fine choices.

For lower level stuff and performance, definitely C++ and then eventually if you need it C as well, but I think it doesn't make much sense the other way round.

And as already said in this thread, it's good to pick up a functional language, just to broaden your horizon if nothing else.

Re: Ask HN: You can only be fluent in 3 programming languages. Which ones?

#58
post #20

Kernel - The most abstractly powerful langauge I know (ie, Blub). It's trivial to implement the behavior and semantics of other languages in, and very few restrictions on how to do it. C - For interfacing with existing systems (POSIX, OpenCL, OpenGL etc) which would be too much effort to reproduce. I struggle to think of a third which I'd absolutely need (other than assembly), so I'll opt for VHDL - for when we need…

Thank you for pointing Kernel. I never heard about it but it looks powerful. Have you built something with it?

Re: Ask HN: You can only be fluent in 3 programming languages. Which ones?

#59
Fortran, Matlab, C++

I'm almost kind of serious. I had Ada in there, but C++ is building okay concurrency support, and is otherwise better at interfacing to other things. Maybe pull Fortran in favor of Ada? That's a thought. Not sure there are enough libraries in Ada.

Why these? Because you can build serious stuff. After awhile it gets boring writing yet another regular expression to parse yet another 'text file as database' blob thingy. I don't want to glue, I want to make what others glue together.

I can simulate rocket flight, planet formation, ocean temperatures, and predict the weather. I can write neural networks, do computer vision, deep learning. I can implement any type of database, implement Google search. I can write my own OS. I can hack a lot of this stuff together with Matlab, and then make it scream in C++ or Fortran.

Yes, C++, not C. I can write faster code in C++ (e.g. qsort vs std::sort), I can interface with both C and C++ libraries, and if I know C++ a pretty much know C by default. You can get to bare metal, or be more abstract. Why limit myself to learning C? Makes no sense. A lot of my C++ code looks like C, other times I use a lot of template magic. Depends on the needs.

I actually do most of my numerical stuff in the Python/NumPy/SciPy stack, and perhaps that is a better choice than Matlab. I'm being a bit contrarian to give contrast to the endless C/Python/JS answers, but Matlab does have a lot of libraries that aren't yet in the NumPy/SciPy stack. On the other hand, you can just write them in C and add them to Python if you need them. Trends are changing, but everyone I know that is into heavy math/algorithmic work is pretty handy at Matlab. I'm solely getting work to switch over to Python. Even then, down in the guts NumPy and SciPy are Fortran - you kind of need to know that stuff if you want to be a wizard and not a glue sticker.

Yes, I recognize this is a deeply individual answer that won't resonate with many. Variety is good, I think.

*edit: okay, Python/NumPy/SciPy stack wins over Matlab, even though STEM schools are still churning out Matlab jockeys. Like it or not, we do need to glue a lot of stuff together, and Python is fantastic at it. I'll leave my original answer here, as I assume the point of the thread is 'food for thought'.

Re: Ask HN: You can only be fluent in 3 programming languages. Which ones?

#60
Every reply have interesting points...

I don't know if one can be fluent only in 3 languages, but I'm in the rank of those who say that learn more will not harm you.

You can reason a lot about, but when you've to learn a new language, just for the pleasure of learning and because it will make you a better programmer, one thing counts: instinct.

I'm often inspired by a blog post, a snippet of code or simply a tweet that sings the praises of something! I don't make forecasts for the future of a language, if it looks cool to me, I try play with it and see what's going on. (I think you can found practically any REPL on my laptop...)

Anyway I'll give my list of 3:

C# - Because I work with it from beta. F# - Because I can use .NET knowledge with a functional-first language (and it helps me open the path to other functional langs). Ruby - Because I'm still a fan of RoR and I love its KISS approach (and a smart dynamic language is useful for various tasks, e.g.: related to DBMS).

Others:

Erlang - It makes distributed computing "easy". I love vanilla Erlang, but other langs of its ecosystem are promising: LFE and Elixir, for example. Haskell - Knowing it will make you better in every language. Go - Because it's fun to work with it. OCaml - Because I love ML syntax and I'm interested in all ML-family langs. ELM - Because I prefer delegate to a transpiler the duty to write javascript. PureScript - Same as ELM.

Post reply on HN