Results 1 to 4 of 4
  1. #1
    SnakeDoc is offline Senior Member
    Join Date
    Apr 2012
    Posts
    129
    Rep Power
    0

    Thumbs up Timeless Java Code Examples

    Perhaps the "New to Java" topic isn't the best spot to post such a question, feel free to move it please!

    If you learn C, there are tons of timeless source code examples from which you can read and learn a great deal from. I'm talking about programs such as "ls", "cat", "wget" etc, all written by the old-school developers back in the 70's, 80's and 90's. But somehow these programs still live and thrive today, still being very relevant. The same can't be said about most software out there.

    Lets compile a list of Timeless Java Source Code Examples right here so that we can learn from them. Please post a link to the source code, or post it directly if it's small enough and copyright permits. The types of code we're looking for are programs that either have universal appeal, or serve a purpose that most people can relate to. A bad example would be "Some dude's applet that is awesome" or some very environment specific program that is unlikely to be understood by most. A good example would be something similar to the mentioned C programs above.

    The goal is to be able to have a collection of well written Java software source that anyone can read and learn from.

    PS: These are to be "real world" examples, the javadocs and accompanying examples from Oracle usually aren't well written (stand alone examples instead of nested into a project structure) or don't show ways of "getting work done" using the standard library.

  2. #2
    kjkrum's Avatar
    kjkrum is offline Senior Member
    Join Date
    Apr 2011
    Location
    Tucson, AZ
    Posts
    1,060
    Rep Power
    6

    Default Re: Timeless Java Code Examples

    The reason such a collection doesn't already exist is likely because it wouldn't actually be useful. The javadoc is generally very well written. It tells a skilled and experienced programmer exactly what they need to know in a very accessible way. Extensive examples would only get in the way of the information.
    Get in the habit of using standard Java naming conventions!

  3. #3
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,453
    Blog Entries
    7
    Rep Power
    20

    Default Re: Timeless Java Code Examples

    In the old days when the world was dominated by dinosaurs and other IBM mainframes (360, 370 etc), there were also excellent programmers but us plebeians didn't understand their assembly language; the C programming language changed all that: those few excellent programmers could program in a transparent, clear langage. All that has changed: script kiddies saw the light and creatures who don't know Java from JavaScript and folks who can't program themselves out of a wet paper bag saw the light; because the threshold of programming languages as well as computer hardware was so low, everybody could publish their bag of bugs; that's why you don't see those little programming gems so easily anymore: they're covered in and hidden by messy, buggy, slime; but they still exist.

    kind regards,

    Jos
    cenosillicaphobia: the fear for an empty beer glass

  4. #4
    SnakeDoc is offline Senior Member
    Join Date
    Apr 2012
    Posts
    129
    Rep Power
    0

    Default Re: Timeless Java Code Examples

    @kjkrum - I couldn't disagree more. The javadoc and standard library are just that, a library. A library is written in a completely different fashion than a production program, with different priorities in design, etc. I do agree the javadoc and standard library are very well written, for a library, and are great examples of how libraries can be constructed. But my question is looking for programs, not libraries. Reading code that others have written, especially well formed and written code, can be very educational. This is how you gain perspective from other more-advanced developers as well as learn new ways of doing things; essentially helping you think outside the box your mind has formed around your personal knowledge of Java. IMHO, all developers should spend at least some time reading other's code.

    @JosAH I had figured it may be a challenge to compile such a list as a significant amount of Java code is probably locked away in corporate basements and will never see the light of day. Even so, do you have any gems you have run across in your time (even if they are buried they are still educational)?
    Last edited by SnakeDoc; 06-04-2013 at 10:14 PM.

Similar Threads

  1. Seeking examples of text processing code
    By theordore in forum New To Java
    Replies: 13
    Last Post: 05-24-2011, 11:45 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •