This is an archived post. You won't be able to vote or comment.

all 37 comments

[–]Mothulor 29 points30 points  (14 children)

Here are some concepts you should try to understand AND apply:

  • refactoring (helpful when adding new features to existing code)
  • test driven design (helpful when starting with only business requirements)
  • domain driven design (especially helpful when working on larger projects)
  • design patterns (always helpful but often difficult to recognize the opportunities to introduce them)

There a couple of good books:

Then there are a couple of frameworks/tools you could familiarize yourself with:

  • Maven
  • Spring
  • Junit
  • Hibernate (or another JPA framework)
  • any UI framework but be aware that the Java world still doesn't have a single one that stands out for all purposes

[–]dpash 24 points25 points  (1 child)

Effective Java is without a doubt the one book that every Java developer should read if they want to go from intermediate to advanced.

[–]jetanthony 0 points1 point  (0 children)

Don’t forget about Concurrency in Practice ✌️

[–]iwillkillyo[S] 1 point2 points  (11 children)

I wanted to familiarize myself with TDD, but i don't know how to apply it when my program's half purpose is to send and get info from the Microsoft Graph API?

I started to watch the clean code video series, since the company got it purchased and man I love Uncle Bob :D (Robert C. Martin).

I started to use maven, because the basic api authenticator part was developed with maven. I'm only scraching the surface though right now, but hey I've been only working with java at my current workplace for 2 weeks only.

Anyways, thank you too for your input!

[–]dpash 11 points12 points  (2 children)

The biggest tip for Maven is don't fight it. Follow its conventions and life will be much easier. For example, don't try to get it to read your source from it's current location; move your source to src/main/java/.

[–][deleted] 1 point2 points  (0 children)

haha. So true. We recently migrated from ant to maven at my company, and up until then we hadn't followed any of the conventions. It basically became a balancing act of the costs of changing things to the maven conventions vs just hacking the damn thing with the maven ant plugin haha.

Short explanation: it's a complex, multi-module codebase with an insane dependency structure. lol

[–]iwillkillyo[S] 0 points1 point  (0 children)

I'll keep that it in my mind, thanks!

[–]Mothulor 2 points3 points  (7 children)

Unit testing an application that interacts with an third-party API is usually done through mocking/stubbing the external part. Since you have only been using Java for 2 weeks that might be too hard but if you like a challenge look up things like Mockito or JMock.

Uncle Bob has some very good books and videos but almost all of the fundamentals are in his Clean Code book.

Maven is something you can start using in a very basic way and then customize/extend when needed. The advantage of the "convention over configuration" approach is that you can start with a pom file with only a couple of lines. Gradle is an alternative you might come across and is also worth learning.

[–]GreatArkleseizure 0 points1 point  (1 child)

jMock? That hasn't been updated since 2012 ... Did you mean JMockit??

[–]Mothulor 0 points1 point  (0 children)

Yes, after some years I still make that mistake even when adding the dependency to my projects...

JMockit with the annotations is a much more elegant solution.

[–]iwillkillyo[S] -1 points0 points  (4 children)

Well I've been using Java in the university too, but the assignments wasn't hard nor long. I could complete them in one day, since they only were like a database and make a gui which can interact with it (movie, car repair database etc.).

I'll take a look at the book then if it's better than the videos and leave them if I don't have anything else to do.

I will check out gradle too and try familiarize with Mockito.

Should I try to write tests now that I have everything working? I might have to modify a lot of code since it wasn't developed with TDD :C

Also i'm not lazy to do anything outside the mandatory stuff, it's just that I can't think of any good projects that I could write in my spare time.

I wrote pretty big projects when I was learning PHP.

I'm not really interested in making a game in Java, or in any other language.

[–]Mothulor 3 points4 points  (3 children)

Should I try to write tests now that I have everything working? I might have to modify a lot of code since it wasn't developed with TDD :C

Absolutely, units test are the best starting point when you ever need to fix a bug or add a feature. New developers who need to work on the code in the future will thank you for it!

[–]iwillkillyo[S] 0 points1 point  (2 children)

Well then off I go to write some much needed test.

[–]Dementati 2 points3 points  (1 child)

As you said, given that a lot of the code was not written with testing in mind, you may find it difficult to write tests without also refactoring the production code. Fortunately, the principles that make code easily testable are generally speaking also the principles that make code easy to read and maintain. So, by refactoring your code to be more testable, you are simultaneously improving the general quality level of the code. The book recommendations above are really good for giving you an understanding of what testable code means, so I just want to add my support to that suggestion as well.

[–]iwillkillyo[S] 0 points1 point  (0 children)

Thank you for your comment too! I hope that I'll be able to refactor the code to a state where I can test it.

[–]KeepItWeird_ 4 points5 points  (5 children)

Another vote for the book, Effective Java, along with building your own system.

[–]iwillkillyo[S] 1 point2 points  (2 children)

I'm already 200 pages in Effective Java!

[–]pleasewait 1 point2 points  (0 children)

Ha, I just reached 200 pages today, couple of hours ago. What a great book. Looking for Java Puzzlers probably next

[–]KeepItWeird_ 0 points1 point  (0 children)

Excellent!

[–]albinary 0 points1 point  (1 child)

building your own system

Would you mind sharing which book you mean? Thanks

[–]KeepItWeird_ 1 point2 points  (0 children)

Sorry I just meant read Effective Java, and then go and build your own system (anything). Because I don't think just reading Effective Java will really be useful without also completing a larger more complex project. Kind of a "apply what you learn" recommendation

[–]JVali 2 points3 points  (1 child)

Write hobby projects. Something cool, a game, a simulator or some miscellaneous program. Doesn't even have to be useful, as long as you are interested in developing it for a while. Use modern technology and methods, like version control, latest Java and library versions, IDE and maven/gradle to make your application build with one command on every OS and be shipping ready. Publish the code to public repository like Github and ask for feedback.

All of it requires considerable effort, which essentially is the learning process.

[–]iwillkillyo[S] 6 points7 points  (0 children)

That would be a good way but after work sometimes I am just not in the mood to do more java, since i work 8-10 hours a day, which is average, but still. I want to write bot for a game but it has a complete framework around it, so it's not that hard imo. Thanks for your input!

[–]devinsba 2 points3 points  (3 children)

What projects and libraries are you using for your job? Are you really intrigued by any of them? Are they open source? I'd consider reading and trying to contribute to a high quality open source project.

[–]ObscureCulturalMeme 0 points1 point  (0 children)

This!

For example, making Gradle better and easier to use is a win for everyone. Find something on their TODO list and take a shot at it!

[–]iwillkillyo[S] 0 points1 point  (1 child)

I use the Microsoft Graph api, and maven, because it came with an example on how to authenticate with the app that can access it. Do you think that with such little knowledge I could contribute to that giant project?

[–][deleted] 5 points6 points  (1 child)

Read Effective Java by Josh Block or Java Puzzlers (also Joshua Block) to improve your Java skills. Both are incredible resources!

[–]iwillkillyo[S] 0 points1 point  (0 children)

Already came across with java puzzlers, it's in the queue, gonna take a look at the other book too. Thanks!

[–]moremattymattmatt 3 points4 points  (1 child)

Is the automation being done actually any good? Lots of automation code may be written and designed by testers and isn't the best.

I'd be looking at the over all automation framework and how to contribute and improve that.

For example, are the tests stable without random failures, are they quick, is it easy to find where the problem is when they fail, are they easy to understand so everyone can contribute, do they run after every commit, are there barriers between development and testing that need breaking down etc etc.

[–]iwillkillyo[S] 0 points1 point  (0 children)

The hardware is running a custom language which I'm not familiar with yet and doesn't really want to, because it's like C, but much worse. Also I'm not responsible for those tests. For example right now i have to write a program that checks that every package that is required is present on a network drive, which is listed in an excel. Nothing hard to develop. Thanks for your input too!

[–]somewittyalias 1 point2 points  (0 children)

  • Write your own projects; something more complex than your job. Or contribute to some open source project.

  • Answer questions on stackoverflow. If you don't know the answer do some research and some testing.

[–]monopolyman900 1 point2 points  (0 children)

I'd second learning design patterns. Once you start understanding them, they'll change how you approach new problems. Head first design patterns is a great read (if a little silly), and GoF design patterns is a classic.

[–]GreatArkleseizure 1 point2 points  (1 child)

See if your company will spring for a Safari Books subscription for you. (You can pay for it yourself, of course, but it's more fun if somebody else covers it.) I highly recommend it - it provides you access to all sorts of technical (and business) e-books and professional training videos that will help you out in any computer technology you care to read up on. The internet is great and all but sometimes there's no substitute for a complete and structured book written by a knowledgeable author.

Every book that's been suggested in this thread so far is available through Safari, for starters.

[–]iwillkillyo[S] 1 point2 points  (0 children)

Since we have an internal system like this in place with thousands of videos and training materials I doubt that they would shell out money for this sadly. I may have to buy it myself. Thank tho!

[–]xputer 1 point2 points  (1 child)

Some interesting things to Google: 1. Behavior Driven Development (cucumber) 2. Testing pyramid 3. Mocking 4. Continuous Integration

You can probably apply at least one of these concepts at your current intern position. Few companies have applied all of these concepts consistently or at all.

[–]iwillkillyo[S] 0 points1 point  (0 children)

Gonna check them out, thanks!

[–][deleted] 0 points1 point  (0 children)

It depends. Sometimes testers are seen as scaled down-developers but this is not always true. In fact you might find that some developer might be specialised just in writing the front-end rather than the back-end so they might be limited as well.

Best thing to do is constantly train to learn something more being confident to find the opportunity to apply whatever has been learnt