After Learning Java Syntax, What Next?
Niris writes "I'm currently taking a course called Advanced Java Programming, which is using the text book Absolute Java, 4th edition, by Walter Savitch. As I work at night as a security guard in the middle of nowhere, I've had enough time to read through the entire course part of the book, finish all eleven chapter quizzes, and do all of the assignments within a month, so all that's left is a group assignment that won't be ready until late April. I'm trying to figure out what else to read that's Java related aside from the usual 'This is how to create a tree. This is recursion. This is how to implement an interface and make an anonymous object,' and wanted to see what Slashdotters have to suggest. So far I'm looking at reading Beginning Algorithms, by Simon Harris and James Ross."
How about writing code????
Learning the theory is good, but writing code is very important..
"You can't make a race horse of a pig"
"No," said Samuel, "but you can make very fast pig"
Program something for real. Be goal-oriented. No amount of working through exercises teaches you programming for real.
While I do regularly program in languages like Java that have automatic garbage collection, but in my experience you need to actually do some time in a language(C being the most common) that does not do this for you. While this is anecdotal, I've found that people who have never actually programmed in a low level language tend to regard object allocation and deallocation as "magic" and thus write poorly performing code.
By implementing a lot of the same things in C you can get a much better feel for what is actually happening underneath the covers.
Monstar L
being a night security guard, you should start looking around for all those anonymous objects skulking around the building.
Pick something simple to build (i.e an application) and build it. You'll learn huge amounts just from filling the gaps in your knowledge in order to achieve what you want.
Write a program that tries to help to solve one of your everyday problems. It mustn't be the best in general, but it should be as good and as well suited for your own needs as possible. It could be something for you personal finance tracking, something for entertainment, a better interface for data that you can download from the web (dictionary? thesaurus?). The most important thing is that the problem must be interesting enough for you to finish the task so you should be able to at least get the software to a certain level of usability. Then write documentation for it.
Effective Java by Joshua Bloch. Will give you some deep insights into the workings of the language.
I see a lot of posts suggesting that he start writing real programs. That's good advice, but it might not answer the question. The submitter says he works as a security guard. As such, sitting focused at a laptop writing code might not be an option. He seems to just want suggestions for books to read. As such, I reckon a book on algorithms wouldn't be a bad direction to head (provided he's got enough math to follow along).
The only problem I see is that if he's taking these classes for college credit or working toward completing a certificate, he's going to be really bored with the later classes when he actually has to take them if he reads all the books beforehand. Either that, or he'll know enough to be dangerous and he won't pay sufficient attention to the guidance from his instructor.
Breakfast served all day!
Read more if you want, MIT's open courseware is great, donate if you can, i do. they are good refreshers.
There are pretty standard student projects, (like game of life, notepad, msg servers,)
You might want to move into more advanced topics, like javax or concurrent stuff like RMI
Algorithms are great to learn but sadly Ive had little chance to use em in real work, would'nt put too much stock in them for returns.
In any case, any algos you need most likely you will learn on the job, if something slows too much.
They are however fundamental if you want to be a proper engineer.(In my opinion anyway)
If you want real world experience, go look at the freelance websites and just copy down the specs and attempt yourself.
Dont need to bid, but these provide a snapshot of EASY projects in real jobs.
I also have some 100% real world work projects assigned to me if you want to do for free........ just kidding
Good luck, and godspeed.
Dislike the Electoral College? Lobby your state to join the National Popular Vote Interstate Compact.
There are several very important books: 1. Effective Java - Joshua Bloch. This is by far the most important one. 2. Java, Concurrency in practice - Goetz 3. The art of multiprocessor programming - Herlihy and Shavit. This is much more theory oriented, but essential to become an excellent multithreaded programmer. 4. Java Puzzlers - Joshua Bloch and Neal Gafter. This is quite a fun book - lots of Java Conundrums Enjoy!
My assumption is that at some point you'd like to try to make a living as a Java developer. If that's not the case, please disregard this post.
How much do you know about databases? If the answer is nothing, you'll want to get up to speed on at least basic SQL. Pretty much every Java project you ever work on in the business world will make use of a database. 80-90% of the syntax is pretty standard from database to database, although nearly every professional Java project I've worked on used Oracle.
While not every Java project is a web project, it wouldn't hurt to have a basic understanding of HTML, CSS, and at least one web server commonly used to host JSP such as Tomcat or WebSphere. Even if these pieces don't end up being your job, the basics are helpful.
There are all kinds of popular Java frameworks meant to solve different problems. Try to get a basic sense of what's out there and what each of the leading options is good for, e.g. that something like Hibernate is used for data persistence and something like Java Server Faces is more of a presentation technology. (Or whatever's popular now; I haven't worked a Java project in a few years and I'm starting to get out of date.)
Probably you also should start to learn one or more of the common Java IDEs. Eclipse is near ubiquitous, but you may prefer one of the other options.
Good luck!
The best stuff to read after you think you've got the basics are anti-patterns which show you what not to do. A lot of that stuff can be quite eye opening to read. One of the best books on that topic is Effective Java by Joshua Bloch. Also, search the web for sites like this one: http://www.odi.ch/prog/design/newbies.php
Also, not a book per se, but if you do write some code it's possible to learn more by analyzing the code with tools like findbugs which will show you a list of things wrong with your code. Even professional programmers can learn something from these kinds of tools.
This might be a bit heavy for somebody as new to programming as you, but Java Puzzlers is a great book for Java devs of all skill levels to read. It's a series of small programs that screw up in ways you wouldn't expect, often related to bizarre gotchas in the design of Java itself. Newbies might not understand every puzzle, but generally it'll give you an appreciation for the fact that no tool is perfect, and insight into what sort of bugs you might find yourself writing in the real world.
I agree with you about the shitty code out there. I simply can't agree with anything else you've wrote.
Why do you assume that only people with Computer Science background should be writing code? Your post also just assume that because he is a security guard, that he just should write code that would never see the light of the day. That's plain stupid you know.
The submitter already told me two thing with his article. First is that he truly loves programming, and second is that he is able to self study any language without the need of a course where he could ask many questions about issues he didn't understood.
That's more than I find in many people with a computer related education. Your computer science background can teatch you important concepts, and the right way to do things. It can be a valuable and important background. It can't teach you how to be creative with your algorithms, and how to be smart enough to write complex programs.
Although I get what you're saying, I think it's a bit harsh too. Everyone starts somewhere. Everyone writes crap code when they start. The key thing is, the more you do it, the more you learn, the better you get.
I don't know whether there are any other self-taught coders such as myself who can back this up, but personally I've found that half my learning was done before I even reached university - learning that code isn't about cool routines. It's an operation of keeping things simple, making it so you need to think the smallest amount to understand what's happening. That design is paramount. CS has so far been (a still enlightening) mathematical cherry - but on a cake of practical experience I had prior to university.
So I suppose what I'm saying is that, given enough time and experience I would not say CS is strictly necessary. And at the same time, in some cases, CS as a course actually does a whole lot less than what people think it does. You need to expand beyond the academic experience to be useful, even if you do have CS
What a load of tosh. So you need a CompSci degree to be a professional coder ?
I've just finished a 9 year employment with a company that was based not on degrees, CVs or other paperworks, but on the basis of a successful 6 week freelance project back in 2000. I should point out I'm completely self taught, no formal training whatsoever.
Coding has nothing to do with language or syntax, but upon having an analytical mind. Breaking down a problem into it's bare elements, and knowing how to make those elements work together is everything. There's plenty of CompSci grads who can parrot off the functions and procedures available in NET or JAVA, but haven't got the first clue how to apply those to the problem at hand.
After that, find an open source project that interests you and try to participate. The comments and help you get from more experienced members of the team (code reviews, really) will greatly improve the quality of your code. It's one thing to write code that works, and another thing altogether to write code that is maintainable and efficient. I'm making an assumption here that you can find a project willing to take the time to help you as you help them.
It may be too early in your education to know what you want to do in your career, but I would start looking in to areas where you can specialize. Client/server architecture will always be a skill that looks good. If you want to go this route, look into learning Java Enterprise Edition. UI design is good to know, but with abundance of WYSIWYG editors that are available now, writing UIs is becoming less of a skill. UI design theory is still pertinent even if the coding skills are going the way of the dodo. Some other skills that will come in handy are writing web services, database interaction (with JDBC and JPA, both good to know), and multi-threading. I would also recommend the book Head First Design Patterns to get started on learning how to design software (as opposed to just writing software).
I would agree with what a lot of people have been saying, though. The best thing that you can do is put what you know in to practice. Start out writing a small application for yourself. Write unit tests.Do some code coverage analysis on the code and make sure you are completely covered. You can start with Cobertura. Get to know what APIs are available in JSE. I'm assuming that in an academic environment you are using the latest JSE (6), so I would also look into familiarizing yourself with JSE 1.4. There are some major differences between 1.4 and 5 (and not a whole lot of major differences between 5 and 6), and if you are working on legacy code in the future, it helps to know what differences there are. Write an app in whatever you are used to using, write it again with JSE 1.4. Check out an open source project and debug it. Get code coverage on the project and write tests to cover more lines of code. Most OSS projects would be happy to integrate tests that increase their code coverage. Look through the bugs that have been logged against the project. Pick something small, fix the bug, and submit patches. Get familiar with build systems like Maven 2 or ANT. That should keep you busy until next semester.
I would say that he is dong his best to rectify exactly the problem you raise. He seems to be well aware that simple knowledge of the language syntax is not enough to qualify to use the language, and is asking how he can rectify his lack of experience. I give kudos to him for being as aware of the problem as this, and more kudos for seeking out a place like /. to learn and to ask the question he has done.
I would say that I am more self taught than academically taught - nearly forty years ago. And I have shipped a lot of systems used by a lot of users by choice, so my code cannot be that shitty.
Consciousness is an illusion caused by an excess of self consciousness.
So yeah, go forth and write code wherever you think it will be cool. Work on an open source project or two that you can point me at, or find a company with an entry level programming position -- there are plenty of them around! Do it because you like it and you'll do all right.
I'm trying to teach myself to set people on fire with my mind... Is it hot in here?
If you want to work in the real world, writing software, you're going to have to speak to other engineers about what you are doing at a level of abstraction higher than "for loop" or "switch statement". You'll want to talk about algorithms and even more commonly, patterns. You may already be familiar with "tree" and "linked list" so you're off to a good start. But, in the future, you'll find yourself saying: "This is a visitor", "this is a controller", "this is a command pattern", etc. The current "bible" of these patterns is known as the Gang of Four book:
http://www.amazon.com/Design-Patterns/dp/0201633612
That one is a hard read. I understand that a more digestible book is this one:
http://www.amazon.com/Holub/dp/159059388X/
Two other routes you will want to go down is that of algorithms, like you already mentioned, and refactoring. Algorithms are the most common next step in College, so it might be wise to do that before patterns and refactoring, but I don't think either is a prerequisite for the other. But, knowing what "Big O notation" is, and understanding why a divide and conquer sort is so fast is helpful in your career.
Finally, refactoring seems to be the hidden art of writing good code. So few programmers really understand how to refactor bad into good. This advanced topic will be what sets you apart from the other engineers you compete with for a job. This one is a good "bible"
http://www.amazon.com/refactoring/dp/0201485672
I'm not trying to be mean or disrespectful to AC, but there a re a lot of pompous assholes which, when asked 'I've learned such-and-such, what next', ramble on about how how totally useless you still are, which is both uninteresting, mean, unhelpful, stupid, and not the question.
I've spent more times listening to castrative bullshit spewed out by people with an ego and idiocy like his than I have having constructive, interesting conversations.
The Cloud - because you don't care if your apps and data are up in the air.
When the number of items is small; when insertions and deletions are common and/or time-critical; when ordering is important...
Any of the above could alone be good enough reasons to use a linked list vs. a hash table, and obviously more than one criterion would make a stronger argument. But this is a very one dimensional discussion; in any of those cases, perhaps an array or an ordered tree would prove more appropriate... each case must be matched to a particular data structure on its own merits.
Job security my man. Job security.
Have some shop hire in a newb that can't write because they're cheap. Six months later they'll need me. And I'll be able to bill whatever I want.
And on the other side of the coin - maybe he's an ace, a diamond in the rough. A colleague just waiting to be discovered. Not everyone I know who writes great code has a degree. I can think of three people that absolutely blow me out of the water - none with formal degrees.
Weaselmancer
rediculous.
Learn to use Apache Ant. When I was in school they didn't cover Ant at all, it wasn't until I got in to the "real world" that I encountered Ant.