tags:

views:

1170

answers:

18

Hi everyone! Here's the situation: I want to master Java and I'm thinking what do I need to do everyday to increase my chances of standing out and being hired if let's say I came from another field? If I have 1-2 hours a day of free time, what do you guys think I should do? Thanks in advance!

+1  A: 

Read JDK code! Lots of good programming ideas and practises are in there!

Learning
Lots of bad ones too, admittedly. Avoid the date/time APIs, for example - the collections are well designed though.
Jon Skeet
+3  A: 

Write software - write it for yourself, write it freelance for some clients, write it at your current job, you'll find lots of places to do so.

For a more paper-based approach, there are numerous questions about good programming books on SO to get you started.

DavGarcia
+7  A: 

Ask Why. Don't be satisfied with standards and patterns until you understand why they are what they are. Then program intentionally, with a clear idea of why you have chosen how you are doing it.

le dorfier
+1  A: 

Get some good books first Java Programming language and then start reading some open source project code and in the process writing lot of snippets (which will be your learning). Maintain a journal/blog of your learnings.

kal
Great idea man! I've created a blog and I'm going to write what I'm learning. Thanks!
ajushi
+1  A: 

Find a personnal project a try to build it from 'A' to 'Z'. Buildling a game or the interface to a database will help you to explore a lot of API. Share your code and your progress threw a blog to get some useful criticisms .

Pierre
+3  A: 

If you want to get better at Java, you might want to take a look at Effective Java by Joshua Bloch. It's more or less a "best practice" book which will show you with plenty of sample code of what to do and what not to do when designing and writing Java programs.

Aside from that, there are going to be the standard list of things to do:

  • Write code. Lots of it. ("Practice makes perfect.")
  • Work on projects that interest you.
  • Read. Keep studying the language.
  • Make an effort to write good clean code.

One of the things with Java is that the Java API itself is huge. That said, I feel that the Java API Specifications are very well-written. For Java, learning to read the Java API Specification and Javadoc-style documentation is going to be key.

As the Java API is huge, try to learn bits at a time, and work on projects you're interested in. If you're starting out, perhaps making small tools which you might want to use may be a good start. Perhaps, write a little calculator application. Then, maybe adapt the calculate application into an applet. Maybe write a text editor.

Probably the biggest thing is keep working at it everyday. If you have 2 hours per day, you would have been doing something programing-related for 60 hours per month. By the end of the year, that's 720 hours. What's going to make a difference is that you keep at working at it.

And most of all, have fun! The best way to learn something is having fun while you're learning it. Good luck!

coobird
+1  A: 

get certified -- this will force you to get to know the language as well as make a good impression on your cv. while IMHO the programmer certification is a bit of a waste (just forces you to know the SDK, but doesn't really test whether you are a good programmer), the developer certification is a great assignment which covers a lot of "real world" aspects. it made me read a lot about patterns and think about clean & scaling solutions.

netzwerg
+1  A: 

Write code in your spare time by using some of the most hot technologies in Java, doing a quick job search can point you to those.

Konstantinos
+3  A: 

Make things, even if they have already been done. I remember when I was first learning data structures and algorithms, I remade a lot of Java classes, like ArrayList and the like. It was a great way to practice what I had learned in class.

Also, realize that you don't know everything. And even though you never will, you must never stop learning something new. I am almost done with one book now, and I already have another lined up.

Finally, don't go crazy trying to learn things. Every so often in those few free hours, try tossing a disc or whatever else you find fun. Sometimes the best things we can do are to stop looking at the technical side of life to stop ourselves from going crazy.

geowa4
+27  A: 

This is largely summarising what others have written (hence wiki) but:

  • Write code - Write lots of code. Don't be afraid to make mistakes - that's how we learn. Do think before you code, but don't worry too much whether you're doing exactly the right thing: try it and see how it pans out. This is particularly useful for small projects.

  • Read good code - The Java collections API is a good start, and the Google Java Collections are great too. Download heavily developed open source projects because you'll get to see lots of different ways to do things.

  • Read good books, blogs and articles - and don't believe anything they say without thinking about it further. All authors are wrong about at least something :) (I'd also second the recommendation to read Effective Java (2nd edition). It's probably the best book on Java development I've ever read.)

  • Try to diversify - learn different programming styles and approaches. Try a functional language. Try test-driven development. Try some scripting. Try a dynamic language. You don't need to become an expert in these things to gain significant benefit when using your main language/style.

For blog recommendations, there are at least three SO questions with plenty of answers:

Jon Skeet
Hi Jon! What blog and sites would you recommend? (Anyone can suggest too :))
ajushi
There are various SO questions about blogs - I don't have time to list them right now, as I have kids to feed. Feel free to find the SO questions and add links in the answer.
Jon Skeet
I second the recommendation to learn another language, especially a functional language (e.g. Haskell, Erlang). Every language embodies an approach to problem solving. Other languages have different approaches, and you can add them to your mental toolbox even when programming in Java.
Paul Johnson
+3  A: 
  1. Read good books for java
  2. Read Sun Tutorials
  3. Read java API
  4. Read codes from JDK and good Open source projects.
  5. IMPORTANT: Practice, Practice, Practice. make project that you need it; Requirement, Design, Then write Code.
ecleel
+2  A: 

just start writing code: think of tools you'd need, which could be simple or more complex tools and start designing them, e.g. think through what you'd need to write to get the job done and then write the code to realize the tool. This won't teach you everything a good computer science course would but it would make you become a developer who can write some code.

To become really really good, you have to develop software for a looooong time and think outside the box: challenge yourself when looking for answers for a problem you encounter while writing code: when you find an algorithm to get it solved, try to find an algorithm at wikipedia.org to see if your algorithm indeed is optimal, and if not, try to implement the documented algorithm.

Software engineering is a process where you recognize functionality to make executable, then you try to recognize algorithms in this functionality to build the software with, and then finally you translate the algorithms into executable form, i.e. sourcecode.

As you're a beginner, don't get demotivated by the obvious naive decisions you'll make and the utterly ugly code you'll likely write in the beginning. We've all been there. Looking back at my own career, I'm now developing software for over 23 years and still find I learn something every day and discover I made mistakes a couple of days ago. Though what you should never forget: no-one who you think is a great developer has become a great developer overnight. Most of them, if not all, have invested the majority of their awake time of their life in writing software, being a software engineer, how to get better, try this, try that.

It's similar to playing guitar: everyone can pick up a guitar and after a few weeks, you can play some chords. However to become Malmsteen-good, you have to invest a lot of time which will literally takes many many years of study and hard work. Don't let that convince you to do something else, the end result is very rewarding :)

Frans Bouma
That's very inspiring man. As a guitar player myself I could relate. Thanks! :)
ajushi
A: 

In addition to all the above, Work your way through the CodeKata exercises.

Paul Johnson
+1  A: 

Just. Write. A Lot. Of Code.

Also, you should learn more then just java. Particularly you should learn assembler and low level filesystem and socket programming. Knowing how things work at the low levels, being aware of what's going on is actually pretty helpful.

Also, keep in mind that being a great programmer and having really marketable resume are not the same thing.

Chad Okere
+1  A: 

Code and read. Once that gets boring, read and code...

I also suggest picking a fun project. Something you will use and be interested in. Also the project should be something harder than you think you can do.

BankZ
+4  A: 

I don't mean to brag, but personally, I've always been very successful wherever I work, and always recognized and praised by my peers and managers. I am usually the one that every project manager wants working on their project, and always get "thrown into the fire" to fix the emergency difficult problems.

So how do I do it? What sets me apart? A few things:

  • Question everything. Not necessarily in a condescending way, but understand why an answer is a good one. Don't just accept that because other people do it, its correct.

  • Try to understand and consider how everything works internally. A few examples: at my last job, we were having a lot of Java memory problems. After a lot of digging through Hibernate and Apache Commons source code, I realized that Hibernate duplicates all mutable objects in memory, effectively doubling the memory requirement. Pulling a 30 MB blob out of a DB meant we needed 60 MB of heap to store it. I also found a (sort of) bug in Apache Commons, where a cache for prepared db statements never expires. Ever. The constructor to set the timeout on the cache isn't even externally exposed. Our app would cache a copy of every prepared statement ever run permanently, eventually filling up the heap after a week or so. I took it upon myself to find these things out to save our company from disaster, as customers were getting int he habit or rebooting their servers every week. The outsourcing company that wrote a bunch of the system spend days setting every variable to "null" before exiting methods, trying to fix a memory leak... as if that would do much in Java.

  • Take on every challenge, no matter how hard. Jump at every opportunity to learn something new, even if its outside your comfort zone. Be vocal about what you've found and what you've learned.

  • Help everyone with anything and everything. Never be too busy to help a peer. If they ask you a question and you don't know the answer, then its your question now too. Go find an answer. Note that this may keep you too busy to complete your own work, but at least spend 10 minutes trying to find an answer. Follow up with that person later to see if they found an answer. Be a source of information for everyone.

  • Read as much as possible. I find this site to be a great source of info.

  • Code like there's no tomorrow. Make little utility libraries or work on someone else's open source project.

  • Consider performance and memory management with every line of code you write. If you write something that could probably be written better later, drop a "//TODO:" tag next to it and come back to it later. Anyone can write code that works, but the people who are really good write nice sleek fast code.

  • Take the time to understand the design behind other systems and libraries, learn whats good and bad about them, and take the time to design good systems for yourself.

  • Learn to love documentation, in the form of code comments and external documentation. Peers will love you for comments that help them maintain code, and managers will love you for clear and well written functional spec and design docs.

  • Find and get to know the developers that are better than you. Try to get yourself in a position to work with and learn from them.

  • And probably the #1 thing: strive to make a difference every day! That goes for any career path.

rally25rs
A: 

Work on problems from the uVA and SPOJ online judge sites.

unclerojelio
A: 

Find small but interesting problems you want to solve, and write the code for them. Google for what you're wondering about, and write code different ways to get to your result. Post the code online and ask for comments. Find an interesting, small open-source project and see if you can contribute through writing code. Test-code. Code to interface other systems. Small plug-ins. Nothing major, just define small projects, and write code. A book is great, but you should stop reading every 15 pages and write code.

niklassaers-vc