DEV Community

Cover image for What Happened When I Learned Java and Python at the Same Time

What Happened When I Learned Java and Python at the Same Time

Alli Teration on August 13, 2019

This is a story of how I learned Python and Java at the same time, and while doing that, learned a few things about myself in the process. ...
Collapse
 
silentsudo profile image
Ashish Agre • Edited

similary what happens when i learn Java & Angular at the same time

  • java = String name & angular =name: string
  • java =() -> {} & angular =() => {}
Collapse
 
nezam05 profile image
Nezam uddin

You probably meant Typescript instead of Angular

Collapse
 
dmahely profile image
Doaa Mahely

Thanks for sharing Alli!

I tried to learn Python and JavaScript at around the same time until I spent 30 minutes wondering why list.push(i) didn't work in Python! 😆
Java was my first language so it will always have a special place in my heart, but now my go-to is definitely Python.

Collapse
 
javaarchive profile image
Raymond

I had a similar experience where the interperter complained about me using list.add(item). To be honest, I think it's good not to stay with one language too long because you'll forget the rest

Collapse
 
ivej profile image
IveJ

Let try list.append(i)

Collapse
 
scottshipp profile image
scottshipp

The Java tutorials are pretty good for learning Java, actually, and it's nice that they're free!

If you learn better out of a book, Cay Horstmann's Core Java is considered the benchmark and takes a very different approach than Head First Java.

Collapse
 
alli profile image
Alli Teration

Many thanks! I’ll check those out.

Collapse
 
andevr profile image
drew

I might be in the minority here, but I love Java, partly because of the static nature, and partly because I've now seen what can be done with it. (I'm still learning, so take what I say with a grain of salt lol.) I struggled on and off for years with JavaScript trying to learn it. I ran into Tim Buchalca's Java masterclass on Udemy and that has been the catalyst for getting me unstuck. It has so many exercises in it, and a lot of them (I think) are useful. It can be had for maybe 10/12 dollars is typical if it's on sale.

Zed is opinionated, but he is a decent guy and wants the best for people who use his books etc. He'sanswered every question I've ever asked (I'm beta testing his javascript book) and for the most part seems pretty mellow and genuine.

Great post, thank you for sharing :)

Collapse
 
wrldwzrd89 profile image
Eric Ahnell

As someone who regularly uses Java, JavaScript and Python, electing to self-teach all three... I can confidently say I've been there! More importantly, I've emerged from it a better programmer. Best of luck on your own efforts!

Collapse
 
rhymes profile image
rhymes

Great post Alli!

First of all, the Python developers I knew loved their Python

Ahaha this is so true. If you like Python, it's hard to let it go. It also changed career course, for me personally.

BTW having a Java codebase at your disposal at work should help learning Java with a combination of formal reading and tinkering :D

Zed has you type out a lot of code from the book, which seems silly but it helped me get used to the syntax.

Yeah, even if it's just a tutorial, typing code can help. After all the reason why they used to make you transcribe things at school was also to learn new words, not just practice calligraphy and concentration :D

The tone of Learn Python the Hard Way is much harsher than Head First Java and Zed Shaw can be quite opinionated about things.

Ahaha Zed Shaw is famous for being opinionated. He used to be a Rubyist that exited the community with a famous article: Rails is a ghetto. He then landed in the Python community with strong opinions as well.

I like Python more than Java.

Thank the heavens :P

At first I was turned off by Python's specific rules about spacing, but now I'm completely on board.

I remember that, it lasted only a very short time because I was coming from languages that didn't have spacing as part of the syntax. I was sold on the simplicity of it all, there are ways to complicate it though

I particularly don't like having to decide which number type I want to use

Another thing I don't like about Java is all the recompiling.

I feel you, I think you'll find yourself at home with Python. And if you really want to, you can play with optional type annotations.

Learning two languages at once definitely tripped me up.

Yeah, definitely do not recommend it, but it's doable as you just demonstrated.

Have fun!

Collapse
 
zenulabidin profile image
Ali Sherief

If you don't mind, I'm trying to do something crazier and learn 8 (!!) languages all at once. As you can see from my posts I know Python more than the rest, but that's because I started writing with it a few years ago but I haven't kept up with the momentum at programming anything. So my mind could use some oiling for that PyPI library knowledge.

The only resource I'm using to learn all these things is HackerRank, especially their "30 days of code" tutorial, which I almost want to call a bootcamp. It feels rewarding and all but I only have time for one lesson a day for all the languages. Sometimes on particularly unhappy busy days I can only complete one for some languages. And then there's C++, Java, JS, PHP, Ruby, Go, Scala, Rust (yes, I'm weird).

Having said all that, this is a long term action and I expect to finish the tutorial in 6 months, not 30 days. Sometime I don't feel like learning and take a break like I'm doing now.

Now let me tell you about one language that gives me the jeebies: Go. It's not the C-like syntax I've come to be familiar with, all type names go after the variable, and my least favorite pet peeve, there is no implicit type conversion allowed. Don't get me wrong, I have no problem with data types like the ones in Java, it's just that I dislike converting from int32 to int just to use a numeric function or using a counter that I created for a for loop.

But I still like Go, because there is tremendous opportunity in being able to use trending libraries written in the language.

Collapse
 
vedgar profile image
Vedran Čačić

you want to pick the type that uses the least amount of memory possible

Not really. Since you're using Java the Behemoth anyway, shaving a few bytes shouldn't be a priority. Much more important is the speed (not to mention correctness;), and on most modern architectures the native 64bit (or 32, sometimes) integer is faster than all the size-restricted ones.

Collapse
 
galgreenfield profile image
Gal

Great article - thank you for sharing your experience! :)
It was an interesting read.

Collapse
 
iamsivav profile image
Sivaraj Velayutham

Thanks for sharing your experience. I am a java developer ( 11+ ) and started learning python in 2016. I agree Python is easy to learn compared to Java. Java may take some more months to learn and acquire proficiency. To master any language is to practice them. The more-hard you practice, the more-easy they become. As you started learning both languages, Keep practicing them. It's one more weapon in your arsenal.

Collapse
 
stephvan profile image
Stephvan

Wow... This is incredible. I tried this once and gave up. Cos there wasn't a goal attached to it

Collapse
 
alli profile image
Alli Teration

Having a goal in mind really helped motivate me!

Collapse
 
rohitshetty profile image
Rohit Shetty

"What Happened When I Learned Java and Python at the Same Time" ?
You took a screenshot.

Collapse
 
safisec profile image
HUNTER

Cool