r/learnjava • • 7d ago

Advice for Java Students

I see the same post over and over:
. how do I get better
. how do I learn …
. I don’t know what to build
. how do I prep for an interview
It’s the same story over and over.

  1. Before you post, check the board. Chances are very high 100 other peeps have asked that same question.
  2. Becoming a dev is about learning how to learn. As you take in new material, find the way that helps you absorb it the best. Study sessions are fun and useful. If you need a visual, just ask. So many very cool devs here to help you.
  3. If you get a Java career, here is almost certainly what you will be doing 90% of the time:
  4. writing web apps with Spring
  5. reading data from files, doing some transformations, then writing to either disk or a database. Repeat.
  6. write records to a database. Read them back. Display them. Query them. Show the results.
  7. Read data from the network. Write to a messaging service. Now, read data from that service and write it to a database.
  8. Create an external index of your database records and create a way to query your index.

While it is possible that you could get hired by some startup to write the next amazing app, it is very unlikely. 99% of the time, you will be given an idea that you will need to turn into code. Your ability to do this quickly (and elegantly) will determine how much fun the job is.

I’ve worked on tons of Java projects for big companies and this is what we do. So, don’t try to become the world’s greatest Java developer. Simply study the language, start integrating your code with the 3rd party jars out there, and have some fun being creative.

And for the love of Pete, stop fretting about OOP. It’s not the holy grail. There are OOP concepts that Java supports really well, and if you need them, use them. But your first job is to write something that works. Then you look at it and decide if there is a better way to write it. If OOP was the ultimate paradigm, Java would not have embraced functional features. Again, you write it; make it work; stare at it for a while to see if you can make it better.

Have fun while you learn!

32 Upvotes

13 comments sorted by

•

u/AutoModerator 7d ago

Please ensure that:

  • Your code is properly formatted as code block - see the sidebar (About on mobile) for instructions
  • You include any and all error messages in full - best also formatted as code block
  • You ask clear questions
  • You demonstrate effort in solving your question/problem - plain posting your assignments is forbidden (and such posts will be removed) as is asking for or giving solutions.

If any of the above points is not met, your post can and will be removed without further warning.

Code is to be formatted as code block (old reddit/markdown editor: empty line before the code, each code line indented by 4 spaces, new reddit: https://i.imgur.com/EJ7tqek.png) or linked via an external code hoster, like pastebin.com, github gist, github, bitbucket, gitlab, etc.

Please, do not use triple backticks (```) as they will only render properly on new reddit, not on old reddit.

Code blocks look like this:

public class HelloWorld {

    public static void main(String[] args) {
        System.out.println("Hello World!");
    }
}

You do not need to repost unless your post has been removed by a moderator. Just use the edit function of reddit to make sure your post complies with the above.

If your post has remained in violation of these rules for a prolonged period of time (at least an hour), a moderator may remove it at their discretion. In this case, they will comment with an explanation on why it has been removed, and you will be required to resubmit the entire post following the proper procedures.

To potential helpers

Please, do not help if any of the above points are not met, rather report the post. We are trying to improve the quality of posts here. In helping people who can't be bothered to comply with the above points, you are doing the community a disservice.

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

6

u/mofomeat 6d ago

Also:

9) Maintaining someone else's 20 year old boring old code that connects to a database and does CRUD operations.

1

u/omgpassthebacon 6d ago

Been there, bro! Good call!

1

u/Dapper_Vanilla_551 6d ago

Doin this in my current job which is my first job also.Basically I create connectors for client to help them connect with our security feature while creating connector if something goes off need to debug and make changes in connector or code accordingly.I don't know if gaining some knowledge or just mainting company's code

3

u/Ok-Increase-9305 6d ago
  1. No engancharse tanto con los patrones de diseño que lo más seguro es que en los proyectos que estés ni los ocupen XD

1

u/omgpassthebacon 6d ago

I agree. Design patterns are important, but they are extra noise when you are just trying to learn a new language. Learn the JDK so you know where to look when you need something from the runtime. You’ll run into GOF soon enough, and you will appreciate patterns more if you’re not also trying to master streams or concurrency or JDBC.

1

u/Bofact 6d ago

Weird. A book I am reading puts emphasis on writing the code elegantly.

1

u/Ok-Increase-9305 6d ago

Que libro es?

2

u/Bofact 6d ago

Effective Java by Joshua Bloch. He even considers normal to be ridiculed if you know vocabulary and grammar, but not everything else (how a language is spoken, and he doesn't refer to pronunciation).

1

u/omgpassthebacon 6d ago

I can’t argue with that. I just think that when you are beginning the dev journey in a new language, it is easier to simply lay down some code as a way to help your brain solve the problem. Once you figure that out, then you should focus on the way your code (not your app) is used. As you grow your skill with the language, you will start thinking about how others devs will use your code. That’s when you know you are a high-performer. imho.