To challenge your brain. Do not lock yourself into the paradigm of your chosen language.
Choose a completely different language
Don’t choose between languages that have similar philosophies. Choose a completely different one. Why? To move out of your comfort zone. From my experience, with each new language I learned, my creativity improved. I learned that problems can be solved in a zillion of different ways. And it’s good when you need to solve a problem, that you have a set of possible solutions. Choose a solution that fits your needs the most.
That reminds me of the talk Bret Victor gave on the Future of programming:
The most dangerous thought you can have as a creative person is to think you know what you’re doing.”Bret Victor, The Future of Programming
There are no stupid or ugly languages
There’s only dirty and unreadable code.
For years I thought Php was the worst and ugliest language. Problem was that I only saw code that was not readable, not well written… I judged the entire language from examples I saw.
That’s the language that would definitely fit well if you were running a CMS website. Wouldn’t you like to choose something like WordPress, that has a large community and every plugin you can think of is probably out there?
Or you could try writing a new CMS from scratch, because it will be faster, better, and you have all the time of the world.
Whatever you’d like.
If you want to understand a way of writing things in a particular language, I suggest that you choose a popular framework, and start inspecting it’s codebase.
In Php I chose WordPress, in Python Django, in Scala it was Akka, in Rust it was Actix…
Switching paradigms is hard
Coming from Scala, everything is preferred to be done in an immutable and functional way. In Java inheritance is your friend. From Scala I learned that it’s better to write immutable code and pure functions. You can then control data flow in a predictable way.
Next time I worked on Java codebase, I refactored most of my methods to be pure.
And then came Rust. But I don’t remember why I got interested in it. Maybe because I heard it was cool, or I liked that memory safety is guaranteed by the language itself. It’s called ownership. That was a new term for me. I got to know how ownerships and lifetimes work.
My inner object-oriented person wanted inheritance and other cool stuff I used before. But Rust compiler said nope! Composition over inheritance is your friend. It wasn’t hard to switch to Composition over inheritance, because Scala already does it with mix-ins and traits.
What I wanted to say…Languages you already know help you in jumping the learning curve.
First language is hardest to learn
My first language ever was Logo. Remember that little turtle on the screen? I learned it in elementary school. Not sure if it’s still in use? If yes, then cool! I had fun drawing various shapes with logo turtle.
My first language that’s in actual business use was Java. As I was reading through Head First Java, my head was like it would explode. What was that strange polymorphism term??? What is abstract class, why it’s abstract??? Why would I want to write in interfaces?
And then one day, I woke up and that little light bulb moment in my head…That Aha! moment…I understood it all. I asked myself why was it so hard in the first place?
Then the next language came. A job position for Scala junior opened. No experience was needed for Scala, just a basic knowledge of Java and a will to learn. I got a mentor there. He tells me I can’t bring my Java skills into it. Yeah, I could write Scala as Java, but that wasn’t the point. A way of writing in Scala was to enforce immutability and write pure functions. He “tortures” me to solve a dozen of assignments on the Euler project. And as I got sick of solving tens of different tasks with prime numbers, I started changing my mindset from OO to functional way.
It Gets Easier
I’m not sure why, but with each new language it gets easier to learn another one. I can even understand a code written in languages I didn’t learn.
To draw a parallel here, maybe it’s similar with speaking languages. If you learn Latin, you’ll understand a little bit of French, Italian, Spanish and others from the same group of “romance languages”. But you won’t understand Slavic. You’d need to learn some language from that group. If you learn a language from each group, could you understand a little bit of all languages?