DEV Community

Discussion on: What is your "Coder/Language Fit"

Collapse
 
rpalo profile image
Ryan Palo

Python and Ruby are my two favorites. Honorable mention to Bash because it's fun. :)

I've tried to learn more strict static, compiled languages (and I will keep trying, because I think it's an important skill to have), but I can't be nearly as productive or creative as I can in Python and Ruby. I love that you can just throw some code into a file and run it right away. I love that they're forgiving of little things.

I love that they don't have semicolons, and minimal code braces. #spacesbeforebraces #butalsoendkeywords

They don't have huge, giant, opaque, intimidating build toolchains, and they've got a robust standard library that cuts down on how frequently you have to install a dependency, which means that when you do install a dependency, it doesn't install the entire whole world of other people's dependencies.

It's funny that they're so different in their philosophies:

  • Python: There should be one way — and preferably only one way to do any given thing right.
  • Ruby: There are many good ways to do things (method aliasing, anyone?), and whichever way makes you happy is what you should do.

And both of those things resonate with me, but in different ways and situations.

If Python had blocks and the focus on method chaining that Ruby does:

numbers.filter(&:even?).map(&:to_s).join   # happy sigh

I would be very happy.

The only thing that I really feel myself missing is an easy way to deploy my code repeatably to someone else without having them go through a bunch of steps that make no sense because they don't do Python.

But no matter how often I go off to learn another language, I always find myself coming back to Python and Ruby. They're really the only languages that I've ever written something and then sat back and smiled because the code was so slick and pretty.

So anyways... I ❤️ Python and Ruby.

Collapse
 
mindplay profile image
Rasmus Schultz

I love that you can just throw some code into a file and run it right away.

Some compiled languages can do that, for example Go and Nim.

I love that they're forgiving of little things.

This is a great example of where I think we deviate in terms of personality - the fact that the language forgives something that could be an error (or might become a problem at a later time) is what drives me crazy.

I dislike languages such as PHP, Ruby, Python and JavaScript because they're too forgiving.

I enjoy languages such as TypeScript, C#, Go and Nim because they knock you over the head when you're doing something that might not be safe.

What's annoying and restrictive to you, to me is a helpful, guiding language that teaches and drives me towards correctness.

I also love the fact that strict languages, in addition to the syntax and idioms, don't have a bunch of rules and what-ifs I have to memorize - when types can be automatically cast, all the rules about casting, and so on. I like the fact that a string is a string, a number is a number, and you can't write code that implicitly converts things without any visible artifacts of my decision-making.

Do you have a great memory?

I have no capacity for rote memorization, and I've always suspected that's one of the main characteristics that separate your kind from my kind.

I simply can't trust myself to remember on monday what I wrote on friday, and so, for me, it's crucial that everything is formally defined and decisions written down; not as a matter of discipline, but simply by letting the language guide me to it.

Working in languages like PHP or JavaScript is tiresome for me because of the discipline it requires to write good code.

I've tried to learn more strict static, compiled languages (and I will keep trying, because I think it's an important skill to have), but I can't be nearly as productive or creative as I can in Python and Ruby.

For me, it's almost the reverse - I can't be nearly as productive in languages like Python and Ruby.

As for being creative, I do enjoy messing around in PHP or JavaScript when I'm experimenting - just that most of my work is production, not experimentation or prototyping, and when it comes to preparing some JavaScript experiment for the real world, I immediately rewrite in TypeScript... and I'd be lost in my own code without it ;-)

Collapse
 
ssimontis profile image
Scott Simontis

I think you would love F# (or Haskell or any other functional programming language) for the strong type system the languages are built around. If you design your types correctly, a lot of errors will be caught at compile time. fsharpforfunandprofit.com has some really cool articles and uses of F#, but he does NOT know how to write for beginners. I had to learn functional programming by other means before his stuff clicked with me, but once it did I learned some mind-blowing things.

Thread Thread
 
mindplay profile image
Rasmus Schultz • Edited

I'm actually not fond of purely functional programming languages. While they're great in theory, I find that the barrier of entry is too high for most people, and code in functional languages tends to be more nested and harder to understand.

It's not a skill that most people acquire easily - and while you could say that it's worth the investment (and you'd probably be right) there is a shortage of talented programmers to begin with, most of them do not know functional programming.

Besides, I don't think there's really a functional programming language that is popular enough that you could describe it as "mainstream"?

I do think that programmers should know some functional programming language concepts and have an understanding of the qualities, but, from my perspective, it's better to choose mainstream languages that also allow functional programming - so we can apply the concepts when it makes sense and adds value, but, the rest of the time, we can leverage the talents of the majority of the talent pool.

Thread Thread
 
ssimontis profile image
Scott Simontis

You bring up a lot of really good points. The learning curve is pretty insane, from me hearing about functional programming and trying to learn it for the first time until I felt moderately comfortable using it, 2 years had passed. Some of that is the lack of good resources or poor community support, but it is difficult.

Scala might be the most mainstream language that you can use for FP? And of course Javascript. F# still feels like a second-class citizen in the .NET world. Getting .NET to play well with F# can be a PITA. I get away with using it for scripts and that's about it. I get confused trying to scale out a large project - OK I can write a monad and implement some cool data transformation, but how d I write an entire program functionally? I don't see any tutorials offering that.

It has changed the way I write C# and JS in a positive way. I am about to start contributing to the F# foundation I think. Making it viable...one ticket at a time!

Collapse
 
pinotattari profile image
Riccardo Bernardini

I couldn't agree more with you. If you check my reply to the same article, I program in Ada and in Ada you suppose that the programmer is just a fallible human being, so the compiler must protect the programmer from self.

With a minimal of care (e.g., defining your own types instead of always relying on the standard ones, using enumeration types instead of constants, ...) the compiler can catch many bugs that in C, PHP, Javascript, ... would sleep for years before being triggered and blowing everything up.

I often say that programming in Ada is like doing pair programming, with the compiler playing the role of your partner.