Slashdot Mirror


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."

38 of 293 comments (clear)

  1. How about the obvious... by SerpentMage · · Score: 5, Insightful

    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"
    1. Re:How about the obvious... by weicco · · Score: 5, Funny

      Learning the theory is good, but writing code is very important

      That or you could become a project manager.

      --
      You don't know what you don't know.
    2. Re:How about the obvious... by GPSguy · · Score: 3, Funny

      FInd something that needs writing. Write it. Debug it. Test it and debug it again.

      Disclaimer: I am now a project manager. You can slow down the disease but you can't stop it.

      --
      Never ascribe to malice that which can adequately be explained by tenure.
    3. Re:How about the obvious... by twistedsymphony · · Score: 2, Insightful

      How about writing code???? Learning the theory is good, but writing code is very important..

      I agree with this... pick a project, dream up some application and build it. If you have something in mind that's great but if not just do something simple like maybe building a tick-tack-toe or checkers game, or building a database application for your DVD collection or something along those lines. It doesn't have to be an app that you'll use but getting your feet wet with a real project is invaluable to the learning experience.

    4. Re:How about the obvious... by SnapShot · · Score: 4, Informative

      If you can't decide on a project, yet. I'd recommend two books: Java After Hours (perfect for a security guard) and Wicked Cool Java. They're both the same basic format, each chapter exposes you to a new library. Wicked Cool Java covers more ground, Java After Hours is a little more detailed for each project.

      --
      Waltz, nymph, for quick jigs vex Bud.
    5. Re:How about the obvious... by sorton9999 · · Score: 2, Insightful

      I agree with writing actual applications to hone your new knowledge. My first real applications in java were a calculator and a CD collection application. I wrote these without an WYSIWYG IDE. It helps to really see how things work if you don't use a GUI "builder". If you want to get ideas for good projects you can read "Java Cookbook" published by O'Reilly. It provides some programming example projects that can be expanded upon. Finally, read a good algorithms book (can't think of any examples, sorry). Java is great for supplying many objects that hide the implementation, but it's still helpful to know the theory behind these implementations.

    6. Re:How about the obvious... by paeanblack · · Score: 5, Insightful

      That or you could become a project manager.

      The best thing he could do right now is to put Java on hold and learn to solve the same problems in a different language. Something with sufficient study material yet with a very different history than Java would be best, like Lisp or Perl.

      I don't think there is such a thing as a good monolingual programmer. The ability to compare different approaches is just too valuable, and the best time to pick up that skill is before you start seeing every problem as a nail. If the OP would rather go into project management, becoming multilingual would be less critical, but still valuable.

  2. What's next? by GrahamCox · · Score: 5, Insightful

    Program something for real. Be goal-oriented. No amount of working through exercises teaches you programming for real.

  3. Implement some of the exact same things in C by antifoidulus · · Score: 5, Interesting

    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.

    1. Re:Implement some of the exact same things in C by chthonicdaemon · · Score: 4, Insightful

      Another layer of abstraction is easy to dismiss as encouraging sloppy thinking and "magic", but C encourages this in the same way with anything allocated on the stack. Dynamically typed languages get some heat for not forcing users to decide on the type of their variables. By writing the same program in many different languages, you get a much better feel for what is part of the problem itself and what is part of the stuff you need to do for the computer. From hand-crafted machine binaries (preferably avoiding any operating system "magic") to a quick shell script, it's all a question of where your problem space is. I'm all for learning multiple languages, but abstraction is really a good thing, so I would add "implement the exact same thing in Python/Ruby/Lisp" to that as well.

      --
      Languages aren't inherently fast -- implementations are efficient
  4. Obviously... by FShort · · Score: 5, Funny

    being a night security guard, you should start looking around for all those anonymous objects skulking around the building.

    1. Re:Obviously... by TheSpoom · · Score: 3, Funny

      the wind through the trees
      like a quiet jet engine
      it says to you: whoosh

      --
      It's better to vote for what you want and not get it than to vote for what you don't want and get it.
      - E. Debs
    2. Re:Obviously... by FShort · · Score: 2

      Lighten up Francis

  5. Best way to learn: by DavidR1991 · · Score: 4, Insightful

    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.

  6. Find an itch and scratch it by ytm · · Score: 2, Interesting

    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.

  7. Effective Java by sproketboy · · Score: 5, Informative

    Effective Java by Joshua Bloch. Will give you some deep insights into the workings of the language.

    1. Re:Effective Java by pkuyken · · Score: 2, Insightful

      I'd second this. (And would have modded it up had I had some mod points.) Even a beginning developer can draw some very useful information from Bloch's Effective Java. While you probably won't understand a large part of the details, reading through it will help give an idea of things to avoid and things to use. By going through the book, even if you don't remember all the details, hopefully enough will stick so that you can reference back to the section if you ever have questions regarding a particular detail.

  8. He seems to want reading options by PCM2 · · Score: 5, Interesting

    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!
    1. Re:He seems to want reading options by TheTyrannyOfForcedRe · · Score: 2, Insightful

      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.

      Are you kidding me? It is possible to write programs without a laptop or any computer at all. I used to do it when I was bored in Middle School which was 98% of the time. All you need is your brain, some notebooks, and a bunch of pencils.

      First, think about the overall design of the program. Sketch out the general structure using pictures, flowcharts, pseudocode, English, whatever. Figure out the data structures and algorithms needed. "Code" from the top down. When you get to interesting or challenging methods write them out in detail. For the others you can write the signature and a description of what they do, just like Javadoc.

      When you're "done" analyze the design as a whole. Think about what you could do better. Maybe redesign it a different way.

      A few hundred hours of this will make you a far better designer than if you had jumped right in writing code on a computer.

      --
      "Liechtenstein is the world's largest producer of sausage casings, potassium storage units, and false teeth."
  9. Read more, code more by Dun+Kick+The+Noob · · Score: 4, Interesting

    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

  10. You've got one third of it by AdmiralXyz · · Score: 5, Informative
    In my experience, there are three things you have to do when learning a new language, after you get the syntax:
    • Learn some common algorithms, and how to implement them in that language. Sounds like you've got yourself an algorithms textbook, which is great. Just make sure you're understanding why they work, not just going through the motions.
    • Learn the standard library of the language. Obviously Java's is enormous, and there's no way a human being could possibly keep it all in their head, but you should check out the Java API and get a sense of, "what things are available to me in case I need them?" Java in particular makes it very likely that something you're trying to write already exists in some form, and there are a lot of programmers who waste valuable time reinventing the wheel every day because they don't know enough about the standard library (the flipside though, is that, just like algorithms, you need to make sure you know what you're using. Way too many programmers throw in a java.util.LinkedList without knowing what the hell it is)
    • Experience! Write real code! This is the most important thing of all. The best experience comes from working in a group on a larger project, although of course that's not always possible. Try writing some larger programs on your own, making sure you keep your good design principles (use interfaces, abstraction, modularization, etc.) from start to finish. When you feel you're ready, there are plenty of open-source projects on Google Code in Java: download one and tinker with the source until you understand it. Hell, join the project if you're ready.

    Good luck, and godspeed.

    --
    Dislike the Electoral College? Lobby your state to join the National Popular Vote Interstate Compact.
    1. Re:You've got one third of it by WankersRevenge · · Score: 2, Interesting

      The algorithm textbook that he is using is a great read provided he does the exercises at the end of each chapter. The great thing about the exercises is that they challenge the reader to tackle the algorithm from a different perspective. So, if an algorithm is demonstrated using a recursive method, the book asks the reader to rewrite it using an iterative method which is an excellent way to learn.

      I actually read halfway though the book skipping the exorcises, figuring they were too easy and I was wasting my time. When I started doing them, I realized how much I didn't know so I started back at the beginning and filled in all the gaps which really expanded my knowledge on the subject.

  11. My top 4 by Ianopolous · · Score: 5, Informative

    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!

  12. Other Things... by Mongoose+Disciple · · Score: 5, Insightful

    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!

  13. anti-patterns by Nightshade · · Score: 2, Insightful

    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.

  14. Java Puzzlers by IamTheRealMike · · Score: 5, Interesting

    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.

  15. Re:Do we really want him writing code? by ammorais · · Score: 5, Insightful

    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.

  16. Re:Do we really want him writing code? by DavidR1991 · · Score: 2, Insightful

    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

  17. Re:Do we really want him writing code? by daveime · · Score: 5, Insightful

    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.

  18. Re:How about gaining experience? by Nerdfest · · Score: 2, Interesting

    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.

  19. Think about what you want to do by evilklown · · Score: 2, Interesting

    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.

  20. Re:Do we really want him writing code? by AlecC · · Score: 2, Insightful

    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.
  21. Re:Do we really want him writing code? by Greyfox · · Score: 2, Interesting
    Right! Just because you have a degree doesn't mean you magically crap daisies and good code. I've met plenty of programmers with advanced degrees in Computer Science who couldn't tell me how to implement a linked list, or when one would be an appropriate choice over a hash table. I'd take someone with a high school diploma who enthusiastically engages me in the interview and actually thinks about my questions over some guy with a master's in CS who treats the interview like an odious chore he has to perform with me as an obstacle between him and a fat paycheck. Too many colleges have given complete jackasses a piece of paper for that paper to hold much value in my eyes.

    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?

  22. Algorithms, Patterns, Refactoring by TwinkieStix · · Score: 2, Informative

    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

  23. Re:Do we really want him writing code? by obarthelemy · · Score: 2, Insightful

    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.
  24. Re:Do we really want him writing code? by Apathist · · Score: 2, Informative

    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.

  25. Sure we do by Weaselmancer · · Score: 2, Insightful

    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.
  26. Ant by devman · · Score: 2, Interesting

    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.