Hacker News new | ask | show | jobs
by anon1253 2953 days ago
I would sort of do a hobby project in the following languages (in addition to Java for Object Oriented Programming, although something obscure like Smalltalk can be fun for an evening):

- Haskell, functional programming with static types

- Clojure (or Common Lisp), functional programming in a dynamic language (and understanding the AST-as-syntax-homoiconicity)

- C/C++, "low-level" programming (e.g. pointers, memory management, registers, the basics of compilers)

- Prolog, Logic Programming as a completely different paradigm

Then after you've "grokked" the pros and cons of these languages, pick one language to become good at. It doesn't matter if that is Java, Java is a fine language; but being exposed to different paradigms broadens your horizon in my experience, and sometimes the idioms and ideas are portable. Personally I've done a lot of back and forth between Java, Python, Clojure and R . If the choice is mine I usually pick Clojure, but not always. Statistics and datascience I still do in R or Python just because the sheer amount of documentation and libraries available. I guess I've been influenced too much by Rich Hickey but he asks "would you rather become good at programming or at problem solving?", and for me it's the latter. Language paradigms help you to recast problems onto a different frame of mind, but at the end of the day it's your ability to help further a cause/business/idea that counts. Just my 2 cents!

1 comments

Could you give some examples of projects for which each of those language (types) are useful. Because I think it is important to choose a language fitting with the problem (or the other way around if it's exercise)
I'm going to respond even though not OP, because I had this same mindset for a long time.

A while ago I was posting on one of the "how do I learn math as an adult" threads that inevitably pop up here, and I got an absolutely wonderful response full of details and resources, but I asked basically the same followup question: "Thanks so much, this is great, but by the way, how can I use these things?"

The hard part about answering that question is that these are fairly abstract mental tools that affect your very perception of problems. I don't ever bust out Prolog or Haskell while in my day-to-day work, or even directly and consciously apply Prolog or Haskell-style constructs, but I 100% approach problems differently as a result of knowing them. How can I demonstrate that? It's difficult. When I think about real work problems, I don't spend a lot of time doing some kind of meta-thought where I try to identify how I know to think that way. But I do know for example that my Java code ends up looking and feeling more Haskell-y when I'm done. And I know that my coworkers look at my JavaScript code for example and wonder how the hell I came up with a particular solution, and it's for the same reason: I just see it differently, because I've built up a more varied mental toolbox.

That may seem like a wishy-washy answer, but hopefully it has some use. Think of it like learning Latin or how to play an obscure instrument: they're not necessarily tools for application, they're for changing how you see language or music, or in our case, how you see problems.

EDIT: All of this isn't to say that discussions of languages in the context of a specific problem area can't be useful. Sasa Juric has a wonderful section on which problem domain Elixir excels at in "Elixir on Action," for example. I just think in many cases, as with Prolog and Haskell, the primary benefits appear at higher levels of abstraction.