Alright, so here is a breakdown of my situation.
I just finished my first year of 'computer science' in Highschool, learning the fabulous language, Vb.net (get your laughter out now)
I am going into AP computer science next year. We will be working with Java.
I have tons of free time this summer and I would like to improve my programming skills and become a more efficient programmer.
I will be using the BlueJ IDE for Java
Do you think I could learn to program in Java before September?
What exercises would you recommend for a novice programmer to get rid of the bad habits that I may or may not have acquired while programming in vb.net?
How hard is the transition of VB.net to Java?
Would it be easy to work with different IDEs or should I just stick to a single IDE?
The Java Tutorials would be a good place to start learning Java.
If the idea is to start out fresh and try to get rid of the "bad habits" (of course, using Visual Basic .NET doesn't necessarily mean that you may have picked up bad habits), it wouldn't hurt to take a look at the tutorial from the beginning.
As for the single or multiple IDE situation, at the beginning, I would say starting with one and getting somewhat comfortable wouldn't hurt.
Actually, it might not be such a bad idea to skip the IDE at the beginning and use a text editor and the command line to compile and run programs.
Why? I've noticed that many people who rely only on IDEs don't know the basics of how to compile and run programs, and as a result, have less of an understanding how to actually get things running at the basic level, because the IDE takes care of it for them.
I haven't used VB .NET myself, but I would suspect that if you've programmed in an object-oriented manner, the transition from VB .NET to Java probably isn't going to be a big leap. However, if object-oriented programming seems difficult, then starting out with an IDE like BlueJ (which I've only used a couple times, a few years back) at the beginning might be easier.
Learning Java before September is totally doable, but there is a lot of upfront learning especially with IDEs that could create motivation issues. Java is much stricter than VB, so the transition might seem pretty odd.
Personally, just coming from my interests, I would take a gradual approach by starting with Processing (http://processing.org/). Processing is Java, but designed for making digital art. It also defers the need for a lot of the boilerplate stuff until you have a need for it. I've found that the learning curve is pretty gentle and the skills translate well. Also, coding up pretty pictures or simple pong implementations is a lot more fun (at least for me) than writing "Hello World".
I transitioned from QBASIC to C++ and then Java and other languages. It's really not too bad.
Good Luck
Well, syntax-wise VB.NET and Java aren't very much alike but in my experience syntax is the least of the problems in learning a new language.
You certainly have to come to grips with the standard class library of Java which is a little differently organized than .NET, although it contains essentially almost the same stuff.
What's more is that Java has very little syntactic sugar to make tasks easy for you. Writing larger programs alsmost invariably need design patterns and Java is a language which is pretty heavy on those. Learning them and knowing when to use them (or at least spot them in the class library) might take some time, unless you already have knowledge in that area.
For example while in VB.NET you have events for propagating messages between objects such a concept does not exist directly in the Java world. There's the observer pattern for that kind of thing. Depending on how you look at it, .NET events are just syntax sugar for the observer pattern, going on below the hood unbeknownst to the beginning programmer, or .NET simply doesn't have the need to approximate a solution with classes and interfaces where a proper one is already in place.
Actually, my biggest gripe with Java is verbosity and the fact that nearly everything has to be a class.
But for learning, I'd suggest you try just diving right in. There are a whole lot of tutorials out there to help you get started (Sun has many good ones covering key aspects of the Java platform). You can redo a project you already done in VB or come up with a task you want to solve yourself (although I'm not very good at such things, ymmv :-)).
But the easiest way to learn a language is to actually program in it. You'll certainly be no expert until September but solving some problems should be entirely doable. Also, I doubt they'll expecting you to have already mastered the language by then.
As for IDEs we use Eclipse a lot around here and just grazed BlueJ during a single lecture. I'd say you should use what works best for you, although I remember BlueJ not so much as an IDE but rather an interactive Java playground or so. I may be mistaken though as I regularly didn't pay attention to the lectures at that time :-).
Related
I am going to begin my Computer Science & Information Systems degree in April. My first class is an introduction to Java programming.
Lately I have had an interest in Objective-C, but slowly declined due to lack of persistence and comprehension difficulties, (mostly some OOP). Obviously I would like to do well in my classes, so I am asking what is the best way for me to prepare?
Should I complete the Alice training and then start learning some Java on my own? Continue to work through Objective-C religiously until I see results? What do you think a newby should do?
edit: I have been reading reviews for a lot of Java books, just curious, are there any other well written beginner books? Thanks!
Objective-C probably has some barriers that will be problematic if you're learning.
I would suggest picking up a copy of either Thinking in Java or Head First Java and reading through that to get started.
When you're learning it can be useful to not be distracted by too many details. Master the basics. Learn about basic OO design. Frustration is the biggest enemy. If what you're doing seems daunting, the greater the chance you'll just give up. So keep it simple so each time you do something it feels like you're making progress.
Firstly pick one of the two languages, either Objective-C or Java, as learning both at once might not give you encouraging results and you're gonna have a lot on your hands than you can handle at one time. So, I'd suggest you go ahead with Java as Java is also going to be your first class. Java is huge, so keep it simple in the beginning and concentrate more on the fundamentals and you can build on top of that as you progress. And you can always ask questions here on SO. Also you probably might find the java classes easy as you've already been doing your homework.
In addition to the java books already mentioned, I'd suggest you go ahead with the Sun's java tutorials.
As a java beginner, you might also find this free book helpful:
http://www.greenteapress.com/thinkapjava/
I think one of the best ways of learning the basics of programming these days is by playing with Ruby. You will have to spend something close to 0% of your time worrying about infrastructure issues (compilers, header search paths, etc), and you can experiment with the interactive mode (irb) to rapidly learn how to use various features.
You can start out with Ruby without having any concept of what objects or functions are, yet you will gradually learn about quite advanced object oriented topics, and even functional programming-style patterns.
Chris Pine's "Learn to Program" teaches the basics of programming using Ruby. I haven't read it, but had a look and it made a good impression.
(There are also many other books teaching Ruby.)
There is nothing inherently bad about learning programming through Java, and it gives you a general understanding of OO design, but it is a pretty limited language. Ruby is just much more fun and you get to learn a lot of advanced techniques that aren't even possible to use in Java by just experimenting with it––many of which will be useful when you're learning Objective-C later.
I've done a little research, and am interested in developing for Android. I've never programmed before, and have no idea how to go from zero experience to developing for a mobile device. My interest is in eventually making some sort of 2d game.
Is there a lesson plan for starting from the ground up? I would think one would need to learn the Java language to start. Looking at the Sun website, it's a bit daunting. Is there a book, specifically, that would wrap up this knowledge in a bit of a directed lesson plan?
I'm not sure if opengl-es is what would be required for 2d games. I've done a little research on this, and it's even far more daunting than Java itself. I can't even begin to figure out where to start with even just opengl, sans -es. My best guess would be that I need further knowledge in Java to continue with this, but even still, is it possible to learn concurrently with Java?
The typical answer from experienced programmers is that one should start with Java before moving on to Android-specific code, but I disagree. I think the most important thing for a new programmer is to be able to see the fruits of their work quickly and in a context that feels useful to them. In other words, you need to have some sort of personal project that you're trying to complete. This gives you more motivation than working on some random program in a textbook, and you learn by overcoming the specific obstacles en-route.
Now I must add that I am not an experienced programmer, and I have never tried to teach anyone to program. In that sense, CommonsWare's comment should hold more weight as he has written multiple books on the issue and thus has experience as an instructor. However, I speak as someone who has taught himself to program in Android-Java essentially from scratch. I had dabbled in a few languages like VB (for Excel macros) and C, but I never wrote anything more than about a hundred lines of code long and didn't know anything about object oriented programming.
Of course, doing things this way will be messy. You'll often read tutorials and be confused by why they are doing things the way they are, or for example, what they mean by a "private static" integer or class inheritance. You'll also program with poor style, solving problems with a clumsy or inefficient manner. However, I think these problems are outweighed by the benefits of personal motivation. It's much easier to study something if you know why it matters to you.
The trick however is to make sure you choose easy projects to start with. You must realise that programming anything useful will appear complicated and difficult. Trying to start with a 2d game will not work; there is just too much to learn first. The best place to start is the tutorials on the Android Developer's website. Work with those and see if you can modify them a bit to do different things.
After that, see if you can find some simple things that irritate you with your phone (note: I'm assuming you actually have an Android phone), or things that would make life easier. In my case, I wrote a few very basic programs to do things like change the volume of my ringtone at one press, to go from silent to mid-volume and vice-versa.
Once you've done that, you can tackle bigger projects. Of course, eventually you're going to have to knuckle down and read the 'proper' Java tutorials as you can't bumble along half-blind forever. But to reiterate the point, I think it's much easier to learn if you know why it matters.
Above all, be patient and persevere! It's fun once you're past the initial bewilderment!
For learning Java I would recommend a book like Big Java or Core Java. Only once you are comfortable with the language would I recommend moving on to mobile development. I have never done any Android development myself, but recently worked on a J2ME project and I found that books weren't much help. Instead it was best to just start working on tutorials you can find online then gradually work your way into developing small simple apps for yourself. Build your app bit by bit learning as you go.
Probably the most confusing part of it all is learning how the langauge all ports to the new platform and getting your head around building and deployment. But if you start off with small samples you will come across these hurdles early on while it is still easy enough to work out what you need to know, and then you can come back here with specific questions and no doubt there will be a number of people who can help.
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
I've been doing web application development for the last 3 years in PHP. I'm now on the verge to give Java a go. My last use of the language was nearly 8 years ago and was mostly academic.
I'm reasonably well acquainted with PHP's object model (version 5) and I have almost exclusively been coding in OO. I would now like to transport that experience and use it to develop in Java.
Where I'm coming from:
linux as a desktop and server
Vim/gVim + plugins as an editor
MySql for db
apache httpd
experience with a bunch of PHP frameworks, Zend+Doctrine being the ones I use most
What I've garnered so far about a move to Java:
I need an IDE: IntellijIDEA, NetBeans or Eclipse
I need to pick a development framework. Some recurrent names: Spring MVC, stripes, wicket.
Now I need some insight that could help make this transition smoother. But from the way people talk about it, Java seems to be an entirely new beast with its own ecosystem. It sounds as though moving to Ruby or Python would actually be easier, which is curious since, when I look at it, Java conceptually seems the closest to PHP, albeit stricter and precompiled.
As weird as this may sound, very few people have publicly documented their experience of such moves. I have searched google, amazon and stackoverflow for similar questions and the results leave to desire. I just can't believe that I would need to start the same as a newbie if I wanted to be productive as a web developer in Java fast.
Anybody is welcome to respond, but I somewhat think that people with some valuable experience in both languages would enrich this discussion the most.
What helped you get going quickly in Java?
What concepts are omnipresent in Java and absent from PHP and vice versa?
Some gotchas for PHP developers going Java.
How long before you felt the transition was complete?
I wouldn't try to learn an IDE at the same time as learning a language. An easier transition would be to stick to your shell and habitual text editor, and use the following shell-friendly tools:
ant, for organising your project, running automated test suites, incremental compiles
BeanShell for interactive testing, trying things out quickly
A quick trick: javap from the commandline will give method signatures for any class in the standard library. Similar to php -r but gives more information since Java is typed.
The online documentation for Java is precise, professional, and consistent in tone and format. Unlike in PHP where all of the functions are in one flat namespace, the standard libraries in Java are class hierarchies. You've got to know your way around that standard library, which means knowing hierarchies + responsibilities: for example you've got to know that java.util.List is a subinterface of java.util.Collection with the addition of a concept of ordered entries. With that information in your head, a google search for java.util.List will take you to the Javadoc for the class, and the Javadoc will tell you exact method signatures and link you to a selection of concrete implementations.
Some miscellaneous distinctions:
Strings are sequences of characters rather than sequences of bytes. Absolutely the right way of doing it.
Systems produce and consume streams (of bytes or characters) rather than byte buffers. For example, if you wanted to filter the output in PHP, a standard practice is to ask ob_get_contents for a byte buffer then to transform the whole buffer. In Java, you add a filter to your servlet that transforms the output a byte or a character at a time. It's a bit imposing to work with initially but it's simpler and more Lego-like when you get used to it - your stream processor doesn't have to know where things come from and where they go.
Almost everything useful is an interface, and creating an instance of an interface can be tricky, non-standardised, and not always well-documented. In PHP, you can get up and running with XML with new DOMDocument(). In Java, org.w3c.dom.Document is an interface, so new() won't work. Javadoc is very precise about how interface instances behave once they come into existence, but it can be quite coy and prudish when you're trying to find out how an object is actually born. Very often, you'll have to look for tutorials and code examples and copy-paste a piece of boilerplate that gives you an instance of DOMDocument or java.sql.Connection or whatever. One reason frameworks like Spring are popular is that they separate out the ugly object-creation code and present you with a world where interface implementations are just magically there.
I actually switched in the opposite direction. I found that Java works very well in a large company where you might be working on a single component, handing it off to someone else who integrates that component into a larger system, which is then packaged and handed off to a separate operations team - that's where all this indirection and configurability (FactoryBuilderFactory type abstractions, web.xml files, etc) makes sense and does something useful. In a small company where the programmers are the ops personnel, Java is a lot more work. With Java, you'll have to get used to concepts like starting up the Java process, monitoring the Java process to make sure it stays up, monitoring the Java process to make sure that it doesn't go into a coma where it's alive but not responding, shutting down and restarting the Java process with minimal disruption when you're updating code, etc, etc. If you have separate ops personnel, that's fine, it's their job, they're very good at it. If you're a programmer, babysitting a Java process can be distracting and difficult to do well.
Start with the Java Tutorial
http://java.sun.com/docs/books/tutorial/getStarted/index.html
Then go buy Head First Java
http://oreilly.com/catalog/9780596004651
It will get you going pretty quickly in the language which is essential regardless of what you want to do.
Strictly speaking, you don't need an IDE to work in Java. I've been coding heavily in Java for well over a decade (and heavily on other stuff for over 25 years), and I don't much like IDEs. Perhaps that implicit indicator of my age is part of the issue :-) It's a trade-off, like anything else.
I'll plug Stripes as a nice simple framework, but mostly that's because it's relatively small and limited in scope. The large frameworks like Spring are "kitchen sink" ecosystems, and learning Java with one of those frameworks may smooth some of the difficult parts but leave other basic aspects mysterious. Again, it's a matter of personal preference.
It's good to have somebody around who knows the language. Oh, and to that point, make a friend of the Java API documentation. As platforms go, the Java API has its ups and downs but for the most part the documentation is at least pretty thorough and pretty accurate.
You'll also want to get really familiar with JSP and its relationship to Java and Java web service architectures, because that'll be what you'll relate to your PHP experience most directly (I'd think).
The best move I made was from Java to PHP.
Beware of complexity. Primarily, the key to great software is simplicity, and that is why PHP combined with a good framework kills Java.
With Java, you risk becoming a slave to your servlet container and framework. Choose the simplest most flexible framework. Controls and custom tags are the devil. You'll waste days learning things that were designed to make development quicker, but are ultimately too complex and inflexible. Java will slow development due to: complexity, compilation, and static types. You'll come to loathe null pointer exceptions.
Edit: Tools aside, Java and PHP are very similarly structured "C" style languages. Much more so than Python or Ruby. It is the static typing and complex tools that make Java so foreign.
I recommend hitting up JavaBat at here
It will give you some good ideas. It took me 1 solid year in a professional setting to get a very firm grasp on Java and I have been able to move into other OO languages quite easily once I had the thoughts beaten into me.
This appears to be a bit of an old post, but hey...
I moved from C# to Java and I've just started a role and am moving from Java to PHP...
First off: Java is awesome :)
for your IDE get Eclipse, once you get used to it, you never have to leave the IDE (apart from SQL bits). It manages projects really well, you can download alsorts of plugins, such as SVN plugins. It allows you to run a Tomcat server within Eclipse and it will output errors straight to the Eclipse console.
for the framework, I used Struts and Tiles and Torque for the ORM, took me a while to get my head around them, but once we made friends, I can't imagine any other way of developing. Although I imagine for a small project it would be a lot of overhead!
agreed with an above post - get HEADFIRST JAVA, thats how I learnt and I used it for lots of other languages, they have a visual method of learning thats alot easier than pure textbooks - well for me anyway. I was up and running with in a day and confident within a couple of weeks I guess - but always learning :)
yip Java is strict, but you come to love it, for me moving to loose 'ol PHP is a bit wierd.
you will also need to download Tomcat to run your Java bits, its easy as to get running.
Java organises all your classes very nicely, none of this 'require_once(some_text_file.php)' rubbish, just 'import myClass' and off you go.
one of the things that annoys me is, there is no way of telling which JAR libraries you are NOT using, so after a couple of years working on a site, your lib folder can get a bit messy - specially if mulitple people are removing and adding functionality.
I could go on.
Paul
For my case, I only dealt with lot of procedural coding on the php, so jumping to Java, not only did I find everything to be more verbose and less forgiving than php (but now I know why it must be this way, and I love Java a lot) but learning to organizing my code in classes and also learning the eclipse IDE took about 1.5 years of just tinkering, trial & error, making stuff on my own (mainly swing applications).
I guess just creating stuff on your own, utilizing the vast amount of Java libraries out there to build your own stuff is fun is the fastest way. Also I think I could've saved more time by reading the java sun tutorials thoroughly. Even more time saving is making sure you've done a thorough search for libraries that prevent "reinventing the wheel".
Good luck!
My question is broader than merely expanding language specific skills. I'm wondering what sort of advice anyone might offer to someone with a desire for knowledge, but a lack of direction. Feel free to skip down to the question.
Background: I've taken a single computer science course in java at my University, but i'm planning on majoring in Computer Science and Electrical Computer Engineering (ECE). My java class was quite rudimentary. We were provided with a framework and merely edited/created a few methods and classes to perform a simple task. We made a version of Breakout, and created an AI for a simple connect-four game. Although I'm somewhat familiar with big O notation, I haven't actually studied it in class (My next CS class covers this). In my introductory ECE course we also programmed BOE-Bots in PBASIC to compete in an obstacle course of sorts. As an engineering student, I was also introduced to matlab, although I've only used it for linear algebra homework. In summary, I don't have much programming background, but I've loved pretty much everything I've done so far, and I'm looking for ways to build a more valuable skill set.
Steps Taken: After paying more attention to the programming section of reddit, I found a link to Project Euler. This summer I've been hacking away at those problems (finished my 42nd solution yesterday), but I'm looking for some more direction. I've been reading blog entries and SO heavily. I'd like to learn something about php, and perhaps create a dynamic webpage, but fundamentally I want to do anything in my power do to improve myself and prepare for the working world.
Question: What would direction would you recommend for me? Should I learn a new language? Keep attacking Project Euler? Read some books on programming? Start a coding project(I wouldn't even know where to begin)? Wait until school? Learn about more fundamental programming principles?
I guess with all the paths available, I'm just a little overwhelmed, and I don't want to fall into a path that might be detrimental to my career opportunities. I'm also really bad at making decisions. Your advice would be greatly appreciated!
The word quickly worries me... I suggest you read Teach Yourself Programming in Ten Years - Why is everyone in such a rush?
~~ Peter Norvig
Forgive yourself if you're not setting the world on fire three weeks after sitting down at the keyboard... maybe you're destined to be a late bloomer?
;-)
Most everyone is suggesting doing more programming. Whilst that's obviously important, I think it's important to understand the environments that your programs work in.
I would investigate how operating system work (how they allocate resources for you, how they schedule programs and threads), how networks work (routing, TCP/UDP behaviours and limitations etc.), and some database theory.
I see a lot of junior programmers with great language knowledge, but beyond the sandbox of their program they don't have a clue how the computer/network enables their stuff to run.
Knowing something of the above will make you a better programmer in terms of how you write your programs, and how you understand how they'll work (and indeed, how to debug them or analyse their failures)
There is only one thing that can improve your skills as a programmer: Program.
Reading books about programming is akin to reading books about cycling. It's not going to turn you into a cyclist.
Program something that you'll use and have a vested interest in. Then just put your head down and do it - reading any supporting information as you go.
Programming skills are just a small part of what makes a successful programmer, IMHO. Being able to read specifications, ask questions and interact with other people to extract the information you need to program are very important too. Pay attention to your 'soft' skills, they will help you a lot in being a successful programmer in a commercial setting.
I'd reccomend you take a multi-pronged approach. Reading books can only take you so far, since they don't provide you with practical experience in developing an application from scratch. Programming is much more now about writing code; you have to be able to design applications, read documentation, and know how to solve the needs of a customer who doesn't know how to tell you what to write.
If you're still in college, try to find an internship with a development firm. You'll get access to people and resources who already have this experience. If you for some reason can't do an internship, find and make a friend who is a developer. The impact of having someone who knows what they're doing to bounce ideas off of is immeasurable.
In addition to surrounding yourself with people with knowledge, you should also take on writing an application all your own. Pick something that interests you, but at the same time try not to make it too complicated, you don't want to frustrate yourself by writing a boring application, or choosing something that has too steep of a learning curve. Remember that the application is at it's core, a tool to assist you in learning, so it's OK if it turns out to be less complex then you imagined, or if the code you're practicing doesn't apply within the scope of what you're trying to write.
You definitely need to write code in order to become a better programmer. If you don't have a particular idea for a program to write, pick an open-source program (ideally one that you use), contact them and find out what they need done; contribute something. Fix a bug, implement a feature... start small and work your way up. This will help you learn about working on a team, writing maintainable code, preventing problems, and working on useful tasks. Much of what people write while learning to program is just exercise code, and not actually useful or representative of anything realistic. That is why a real, useful program is the best thing to do.
I saw an interesting link for a site called CodeKata that might help you. The important thing to get your skills going quickly is to actually code for practical problems that you will be likely to encounter in any real job.
Besides picking an interesting project and implementing it from scratch, reading others' code can also be valuable in improving your skills. Scott Hanselman has a good series on reading code: Weekly Source Code
Since you already know the fundamentals of programming, and obviously have the desire to learn I would start a pet project.
Nothing has forced me to learn great deals about a technology, language or idea more than having a fairly challenging pet project to throw my self into.
I would recommend, like rein mentioned, picking a project you really have a true interest in. Other wise it will get boring pretty fast and you'll have no idea why you are working on it. I think it would be wise to make the project fairly non-trivial. I always found the less trivial a project I was working on, the more I learned and took away from it.
Also If you live near a college/university research labs on campus are pretty much always looking for summer interns to work on code in one shape or form. Some will even pay you. I did this for 4-5 years through high school and some university and it was a great learning experience.
Obviously participating in an open source project is a great way to gain experience at working with other developers. Check out stuff on github, sourceforge, bitbucket.
I'd only caution you to ask for help and bother the core developers of a project you are very interested in and you are going to stick with. Generally open source developers dedicated to there project are few and far between. Their time is really valuable to the community and to waste it on someone who is just going to fly by night and never be seen again is kind of a shame.
It sounds like you are writing programs happily, and are a decent java programmer. So writing more might not be your most productive way of learning new things.
As a result, I'd say learn a new language - knowing more than 1 always exposes you to new concepts. As a java programmer I'd suggest C/C++ as they've immensely popular but they fill areas that the 'managed high level' languages don't go, the low-level high-performance, to-the-metal applications. If you learn C# (for example) you'll find you're just doing a different dialect of java (roughly) and you won't learn too much.
If you don't like the idea of C/C++, get into a scripting language instead - bash, VBScript/WMI, or perl or python. they'll be sufficiently different to teach you some good stuff.
Or do both!
You already know how to program; in order to prepare yourself for a real life job, the most important thing is probably not how to program better, but to learn the things you'll have to do that aren't programming.
In your workplace, you most likely won't be asked to write line "fire and forget" programs, but work in a team on large applications. In order to do that effectively, you need to learn:
How to communicate effectively with analysts, customers, managers and your fellow programmers
How to plan and coordinate work: using source control systems and bug tracking systems, working with written specifications, following a development process - "software engineering"
Perhaps most importantly: get used to working with other people's code - third party libraries, frameworks, and of course colleagues' code.
This, too, can most effectively be learned through hands-on experience in a real project. For me, the big eye-opener was working in a group of about 10 students in an experimental project organized by university with some industry support. Perhaps you can find or organize something similar at your university? If it has a chair dealing with software engineering, they should be happy to do something like that if they aren't already. Failing that, joining an open source project is good too.
Write programs to automate things that you do manually on a daily basis.
Like, todo lists, keeping accounts, checking RSS feeds.. the list could be endless. If you do some business on the side, write some simple code to assist you in that.
The essence is: to improve your programming, do programing! :D
Contributing to open source projects has a surprisingly high impact on your ability to develop software, as opposed to the ability of writing code:
you get to work on code written by others, which is sometimes brilliant and sometimes abysmal;
collaborate within a geographically distributed team;
get introduced to team politics ( yay! );
understand what it means to have actual users.
to quote just a few. Some good places to look:
Codehaus
Sourceforge
Google code
Find out about best practices (for example training videos on windowsclient.net). Get any problem and solve it using database as input and database as output. Start over several times. That's as close as you can get to the real world scenario. Read books recommended by Joel.
Here's my multi-prong suggestion:
1) Big picture work - Look at various Software Development methodologies and see how when you program you follow one of these approaches. You did some Java work, was that web, windows application, console application, or something else? Learning a little about the other types may also prove useful
2) Medium picture work - Have you looked at Refactoring and Design Patterns? These can be very useful but may require a bit more coding experience to see how they can be useful.
3) Small picture work - Study various algorithms and understand various trade offs one can make in choosing various implementations of a data structure, e.g. linked lists vs. arrays. There is a big white book about Algorithms that some use when studying them.
My multi-advise:
Keep training, and write code. Participate in small open source project.
Read standard book (here is the Jeff's list)
Learn from your mistakes, or better from the mistakes of others by reading site like www.badprogramming.com
From 99 ways to become a better developer:
Program! and try to diversify your work as much as possible
Find a mentor
Be a mentor
Learn about the different aspect of software development other than code (business of software etc.)
I've been using C++ for about 6 or 7 years now, and I consider myself fluent in it. I've never bothered with Java until now, but I find myself out of the job (company went under) and I need to expand my skill set. Someone recommended Java, so I am wondering if there is any advice for where somebody like me might start. I am also interested to know what the key aspects of Java are that are most likely to come up in an interview.
There are some popular areas that I think of when we talk about Java
Concepts of OOP: I'm sure this will not be much different from C++:
Class, Abstract Class, Interface,
Polymorphism, Overriding,
Overloading, Inheritance, Static
member, ... Interface will likely be
area that you might want to focus.
Since this is not directly available
in C++, I don't know.
Core Java: Such as the basic syntax and the common classes such
as Math, String, System.out,
Scanner, Basic file I/O, Stream.
Know the concept of Garbage
Collection, Reference Type (since
pointers are not available here.)
Know the Java platform/technologies,
J2SE, J2EE. Basic GUI with Swing and
its layout managers. Web
Applications with Servlet/JSP.
Popular tools, frameworks, and libraries: This may not as
important as above bullets. But
maybe you should know what Eclipse,
Netbeans, Spring, Struts, Hibernate,
EJB, Ant, JUnit, JavaDoc, are for.
You can always search for "C++ to Java" in Google. I'm sure there will plenty of good start points. Don't forget not to put * in front of var name next time you code Java :)
I recommend you read the book Effective Java cover to cover. Not only will you learn lots of good programming practices, but you will also learn more about Java than you otherwise would. Highly recommended. :-)
As a simple example, in Java, rather than rolling bitfields by hand (which is rather painful to do in Java, and for good reason), you use an EnumSet instead. This is documented in Item 32.
BTW, if you don't mind reading a PDF (no DRM) version, it's cheaper than hardcopy too: http://www.informit.com/title/0132345285
There are a number of great "in depth" Java books that will teach you not only Java, but also best programming practices.
If you're just interested in syntax and an introduction to the Class Hierarchy, Java in 24 hours is pretty good. From there, you will know enough to go and explore more on your own.
I highly recommend thinking of a small project to help you learn. In fact, think of a teeny tiny project -- it will turn out much bigger than you think! ;) Maybe a simple shoot-em-up or a Daleks- or Asteroids-alike, or some such.
The main thing being: for an expert-level programmer, don't try to learn Java from a book. You can get introduced to Java via a book, but then you have to go learn on your own (or from another.) It's like learning to drive a car -- you can get the basics from a book, but you need to explore & try stuff, and someone who knows how can be very helpful.
Some things that will help:
Download and bookmark the HTML Java docs. You will reference them often.
Have a small project, a simple game or utility app that you estimate will take a couple of days to write. Spend a couple of weeks writing it ;)
Note that "Java" is 3 things:
Java the programming language. Like C++ or Lisp or Perl.
Java the Class Hierarchy. Like STL or Cocoa.
Java the run-time virtual machine, the JVM.
People use the word "Java" to mean all 3 things, and slip between them without much notice, so pay attention to that, when you start talking Java to people.
Good luck!
(And let us know when your game is available :)
The biggest issue with the C++ to Java conversion is that they're so similar -- you'll find yourself doing C++-isms for a while. But it's no big deal: as suggested, read Josh Bloch's book, and run through the tutorials on java.sun.com and you'll do fine.
In my opinion, Java sets itself apart from C++ in three ways:
Automated memory management
Simplified syntax (and no preprocessor)
The Java standard libraries
As a former C++ guy, the first two shouldn't be a problem. (In fact, I would wager they will strike you as rather refreshing.) To get used to the libraries, I recommend Bruce Eckel's Thinking in Java - the 3rd edition is free to download. Though the beginning chapters will probably be a little too basic, the sections about GUI programming, concurrency, and the various container classes will be very helpful.
Beyond that, the best way to learn any language is to read good code.
I started by reading the Java Language Specification, version 2 at the time (2001).
In my view it is quite readable as specifications go.
Effective Java is good advice.
Java Puzzlers is good to learn corner cases and possible pitfalls.
The Peter Norton's Guide to Java Programming, "Making the Transition from C/C++ to Java".