Java: What was it like to learn Java?

Created on 3 Oct 2019  Â·  2Comments  Â·  Source: exercism/java

We’ve recently started a project to find the best way to design our tracks, in order to optimize the learning experience of students.

As a first step, we’ll be examining the ways in which languages are unique and the ways in which they are similar. For this, we’d really like to use the knowledge of everyone involved in the Exercism community (students, mentors, maintainers) to answer the following questions:

  1. How was your experience learning Java? What was helpful while learning Java? What did you struggle with? How did you tackle problems?
  2. In what ways did Java differ from other languages you knew at the time? What was hard to learn? What did you have to unlearn? What syntax did you have to remap? What concepts carried over nicely?

Could you spare 5 minutes to help us by answering these questions? It would greatly help us improve the experience students have learning Java :)

_Note: this issue is not meant as a discussion, just as a place for people to post their own, personal experiences._

_Want to keep your thoughts private but still help? Feel free to email me at [email protected]_

Thank you!

Most helpful comment

How was your experience learning Java?

I learned Java while working on Robert Sedgewick's MOOC for Algorithms and Data Structures. To be honest, it was pretty rough since I had never used a typed language before and I had little to no concept of interfaces. That said, the trial by fire was useful and highly motivating - especially since they had intensive automated tests with strict requirements to ensure you were using good algorithms for huge inputs.

What was helpful while learning Java?

Resources like stack overflow and very useful Javadocs. That, and a very skilled teacher (Sedgewick's lectures were extremely valuable).

What did you struggle with?

Learning about how type systems work and understanding interfaces. And OOP in general.

How did you tackle problems?

I suppose it was loosely TDD because the courses were built around passing the automated test suites (they were very rigorous). It was designed to help check that you were making good algorithms, but it gave me a good grounding in Java.

In what ways did Java differ from other languages you knew at the time?

First time learning a language with a type system. I had prior experience with MATLAB, Python and Perl.

What was hard to learn?

Getting used to the notation and learning the difference between different numerical types. Especially integer math... Also, OOP was pretty new to me still.

What did you have to unlearn?

That runtime safety is sufficient. Learning about compile-time checks that verify your system will work was a game changer.

What syntax did you have to remap?

Concepts like hashmaps (in contrast to the much simpler idea of dictionaries in Python).

What concepts carried over nicely?

Functions and imperative programming. I was pretty comfortable with these concepts from years of hacking things together and an educational curriculum for solving one-off problems (during my Mechanical Engineering degree).

All 2 comments

I learned Java on my 1st year of university.

I could already write stuff in a number of dynamic scripting languages and Pascal, C and Standard ML. For some reason Java was a dislikable language to me, and I felt that it was a chore that I had to learn it. Actually learning Java, however, was a great joy.

Initially I started joking by handing assignments in Jython. Eventually Swing caught my interest, and I spent many days reading online tutorials on various components. Having only had GUI experience with Tcl/Tk and Perl/Tk, Swing seemed very good and I thought "Java's a great ecosystem, and I can always replace the syntax!"

What was helpful:

What differed from languages I knew:

  • Its standard library was very extensive.
  • It was hard to write Java without an IDE.
  • Exception handling was a lot more... involved.
  • You easily get thrown into the deep end. E.g. GUIs have event-handling code.
  • It had no type inference, making me repeat myself a lot... Wat wat = new Wat();
  • The courses I took that involved Java were quite focused on software architecture, which is something I have not experienced has an upper boundary for determining when one really knows. It seems that having many types in a langauge forces one to think ahead, causing all these mental structures to emerge.

What did I have to unlearn:

  • I don't remember what I had to unlearn when I started Java.
  • I can mostly think of the things I had to unlearn after having learned Java:

    • One set of things being the schism between the way Java is taught with poor metaphors (like class Bicycle extends Vehicle) as a pretense for learning how to structure real software, and the way Java is written professionally.

    • Another set of things being the bad habits one develops when allowed to nest mutable state.

    • A third set of things being all the bad ways I've learned to write Java that has now improved significantly, e.g. how streams can make your programs declarative.

How was your experience learning Java?

I learned Java while working on Robert Sedgewick's MOOC for Algorithms and Data Structures. To be honest, it was pretty rough since I had never used a typed language before and I had little to no concept of interfaces. That said, the trial by fire was useful and highly motivating - especially since they had intensive automated tests with strict requirements to ensure you were using good algorithms for huge inputs.

What was helpful while learning Java?

Resources like stack overflow and very useful Javadocs. That, and a very skilled teacher (Sedgewick's lectures were extremely valuable).

What did you struggle with?

Learning about how type systems work and understanding interfaces. And OOP in general.

How did you tackle problems?

I suppose it was loosely TDD because the courses were built around passing the automated test suites (they were very rigorous). It was designed to help check that you were making good algorithms, but it gave me a good grounding in Java.

In what ways did Java differ from other languages you knew at the time?

First time learning a language with a type system. I had prior experience with MATLAB, Python and Perl.

What was hard to learn?

Getting used to the notation and learning the difference between different numerical types. Especially integer math... Also, OOP was pretty new to me still.

What did you have to unlearn?

That runtime safety is sufficient. Learning about compile-time checks that verify your system will work was a game changer.

What syntax did you have to remap?

Concepts like hashmaps (in contrast to the much simpler idea of dictionaries in Python).

What concepts carried over nicely?

Functions and imperative programming. I was pretty comfortable with these concepts from years of hacking things together and an educational curriculum for solving one-off problems (during my Mechanical Engineering degree).

Was this page helpful?
0 / 5 - 0 ratings

Related issues

iHiD picture iHiD  Â·  3Comments

stkent picture stkent  Â·  3Comments

sjwarner-bp picture sjwarner-bp  Â·  6Comments

Smarticles101 picture Smarticles101  Â·  4Comments

stkent picture stkent  Â·  4Comments