Source code reading

Discussion in 'Java' started by Einar Buffer, Nov 4, 2005.

  1. Einar Buffer

    Einar Buffer Guest

    Hi,

    My apologies if this isn't the wrong place to ask this question. If so,
    could someone please advise me to where I should be asking it? Thank you!

    The question is: what open source Java project would you recommend for
    reading some Java source code, as a learning experience? I don't have much
    experience in reading other people's code, so the project should be of
    limited size and complexity. Any and all suggestions are welcome!

    Kind regards,
    Einar

    --
    "If it was so, it might be; and if it were so, it would be; but as it isn't,
    it ain't. That's logic" -- Lewis Carroll
    Einar Buffer, Nov 4, 2005
    #1
    1. Advertising

  2. Einar Buffer

    Einar Buffer Guest

    "Einar Buffer" <> wrote in message
    news:dkfh5n$3r7$...
    > Hi,
    >
    > My apologies if this isn't the wrong place to ask this question. If so,
    > could someone please advise me to where I should be asking it? Thank you!
    >


    Uhm, correct that to 1) if this _is_ the wrong place or 2) if this isn't the
    _right_ place. I ain't got no talent for doing no writing, it seems...
    Einar Buffer, Nov 4, 2005
    #2
    1. Advertising

  3. Einar Buffer

    Roedy Green Guest

    On Fri, 4 Nov 2005 12:37:26 +0100, "Einar Buffer"
    <> wrote, quoted or indirectly quoted someone who
    said :

    >The question is: what open source Java project would you recommend for
    >reading some Java source code, as a learning experience? I don't have much
    >experience in reading other people's code, so the project should be of
    >limited size and complexity. Any and all suggestions are welcome!


    Presumably you have some experience in another language. If for
    example you had written an SQL engine before in C, you might look for
    an SQL implementation in Java since you already know roughly what the
    code SHOULD be doing.

    I think the trick is to find something where you already have a pretty
    good idea of how the project works.

    You are going to have to learn Ant anyway, so you might start there.

    see http://mindprod.com/jgloss/ant.html
    --
    Canadian Mind Products, Roedy Green.
    http://mindprod.com Java custom programming, consulting and coaching.
    Roedy Green, Nov 4, 2005
    #3
  4. Einar Buffer

    ChrisWSU Guest

  5. Einar Buffer

    Roedy Green Guest

    On Fri, 4 Nov 2005 12:37:26 +0100, "Einar Buffer"
    <> wrote, quoted or indirectly quoted someone who
    said :

    >The question is: what open source Java project would you recommend for
    >reading some Java source code, as a learning experience?


    there is the JDK. It would be very instructive to figure out how
    Swing works for example, or ANY of the classes you are using.

    I had a some poking around in the serialisation classes to satisfy a
    curiosity itch the other day.
    --
    Canadian Mind Products, Roedy Green.
    http://mindprod.com Java custom programming, consulting and coaching.
    Roedy Green, Nov 4, 2005
    #5
  6. Einar Buffer

    Chris Uppal Guest

    Einar Buffer wrote:

    > The question is: what open source Java project would you recommend for
    > reading some Java source code, as a learning experience? I don't have much
    > experience in reading other people's code, so the project should be of
    > limited size and complexity. Any and all suggestions are welcome!


    XOM might be suitable, especially if you already know a bit about XML (so you
    know the problem domain).

    http://www.cafeconleche.org/XOM/

    It might be too big for you at your current stage (although, since it uses lots
    of small classes and lots of comments, it looks bigger and more complicated
    than it really is). As far as I can see, it's well designed and cleanly
    implemented.

    -- chris
    Chris Uppal, Nov 4, 2005
    #6
  7. Roedy Green wrote:
    > On Fri, 4 Nov 2005 12:37:26 +0100, "Einar Buffer"
    > <> wrote, quoted or indirectly quoted someone who
    > said :
    >
    >
    >>The question is: what open source Java project would you recommend for
    >>reading some Java source code, as a learning experience?

    >
    >
    > there is the JDK. It would be very instructive to figure out how
    > Swing works for example, or ANY of the classes you are using.
    >
    > I had a some poking around in the serialisation classes to satisfy a
    > curiosity itch the other day.


    This is probably unlikely to be very important for most people, however:

    You want to be careful looking at the Sun code if might ever be
    interested in helping out with "Free Java" projects like Apache's
    Harmony, GNU Classpath, GCJ, Kaffe, etc. because you will be "tainted".

    You can, OTOH, look at GNU Classpath all you want, and even use the code
    in many cases. And they've arrived at 95% coverage of J2SE, last I
    heard, so they're more than likely to have what you're interested in
    looking at.

    --
    David N. Welton
    - http://www.dedasys.com/davidw/

    Linux, Open Source Consulting
    - http://www.dedasys.com/
    David N. Welton, Nov 5, 2005
    #7
  8. David N. Welton wrote:
    >
    > You can, OTOH, look at GNU Classpath all you want, and even use the code
    > in many cases. And they've arrived at 95% coverage of J2SE, last I
    > heard, so they're more than likely to have what you're interested in
    > looking at.


    Why would looking at LGPL code taint you any less than looking at Sun's
    disclosed source?

    Tom Hawtin
    --
    Unemployed English Java programmer
    http://jroller.com/page/tackline/
    Thomas Hawtin, Nov 5, 2005
    #8
  9. Einar Buffer

    Einar Buffer Guest

    I appreciate the interesting suggestions made so far. I will certainly take
    a look at them all, and hopefully find something that I am able to
    understand and learn from.

    A bit more background on myself, just in case I'm lucky enough to receive
    even more suggestions: I am a CS major, with three years experience coding
    C# (business + data layer) after that. I have some knowledge of design
    patterns, and would like to learn more.

    Thanks,
    Einar
    Einar Buffer, Nov 7, 2005
    #9
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Author Tarun Tyagi
    Replies:
    0
    Views:
    712
    Author Tarun Tyagi
    Dec 29, 2004
  2. David Delony

    Source code reading list

    David Delony, Jul 21, 2007, in forum: C Programming
    Replies:
    9
    Views:
    356
    Ben Pfaff
    Jul 22, 2007
  3. Egor Zindy
    Replies:
    0
    Views:
    774
    Egor Zindy
    Jul 19, 2008
  4. Jens-Oliver Murer
    Replies:
    1
    Views:
    457
    Jens-Oliver Murer
    Oct 17, 2008
  5. Jenny
    Replies:
    3
    Views:
    257
    Dag Sunde
    Dec 17, 2004
Loading...

Share This Page