Source code documentation

Have you created a useful tool? or Do you want to get help building one? This is the right place!
Forum rules
READ NOW: L2j Forums Rules of Conduct
Post Reply
TomDavidson
Posts: 15
Joined: Tue Jul 28, 2009 1:33 pm

Source code documentation

Post by TomDavidson »

I have generated the L2JServer class documentation from the source code so I thought I'd share it all with you. I have it automatically updating when I do a rebuild form the source so it should stay relatively up to date.

API docs

If we were to follow some coding standards and include mandatory doc-block style comments at the top of each class and method it would make this much more useful. They don't take much time to write when you create or change a method so it's well worth it for the time you save trying to figure out how a functions works.
User avatar
Flashy
Posts: 310
Joined: Mon Sep 29, 2008 11:49 am
Location: Germany

Re: Source code documentation

Post by Flashy »

great Job!

tihis helps many new "coder", to learn something about the l2j sturcture..
User avatar
JIV
L2j Veteran
L2j Veteran
Posts: 1882
Joined: Sun Jan 06, 2008 8:17 pm
Location: Slovakia
Contact:

Re: Source code documentation

Post by JIV »

amazing work, THX! :mrgreen:
User avatar
shinomidefuego
Posts: 122
Joined: Thu Jun 28, 2007 5:37 pm
Location: Venezuela
Contact:

Re: Source code documentation

Post by shinomidefuego »

thnk!!! great job
Image
MMMMMmmmmmMMMMM
User avatar
ThePhoenixBird
L2j Inner Circle
L2j Inner Circle
Posts: 1857
Joined: Fri May 27, 2005 5:11 pm

Re: Source code documentation

Post by ThePhoenixBird »

Excellent work!

This thread deserve a sticky!
User avatar
jurchiks
Posts: 6769
Joined: Sat Sep 19, 2009 4:16 pm
Location: Eastern Europe

Re: Source code documentation

Post by jurchiks »

Generating with javadoc doesn't really require much of anything...
It is nice of course, but the problem is that l2j code documentation is terrible. There are only few classes that have complete and proper javadoc-style comments, most either have no documentation at all, except @author and, possibly, @version, or have very poor documentation.
Also it would be very hard to write the proper docs for all of them as reading through all those classes/methods just makes you see how badly written l2j actually is. I tried once, and I couldn't stop myself from rewriting most of what I read (I didn't read much though, it's just that much of a thorn in the eye).
If you have problems, FIRST TRY SOLVING THEM YOURSELF, and if you get errors, TRY TO ANALYZE THEM, and ONLY if you can't help it, THEN ask here.
Otherwise you will never learn anything if all you do is copy-paste!
Discussion breeds innovation.
TomDavidson
Posts: 15
Joined: Tue Jul 28, 2009 1:33 pm

Re: Source code documentation

Post by TomDavidson »

No, it wasn't that tricky to get javadoc working on th source, it's now part of my build script. In fact I posted it here because I was so surprised that nobody had done it before. It's quite sparse in some places about what a function actually does though it's much easier to skim to find the function you want than the source.

My suggestion of adopting some commenting standards was to help improve this automatically generated docs to the point where it can be really useful to newcomers as well as people more familiar with the source.

I'll try and keep it up to date by rebuilding fairly frequently.
Forsaiken
L2j Veteran
L2j Veteran
Posts: 99
Joined: Sun Mar 11, 2007 6:23 pm

Re: Source code documentation

Post by Forsaiken »

i could never really do smth with this docs in l2j since eclipse is showing the comments atomatically.
Also i belive that code that was hard to write should be hard to read :D
http://code.google.com/p/g3d-editor/
Experienced in the following languages/apis/ides: Java using Eclipse/AWT/Swing/NIO/JNI/Jogl, C/C++11/c++14 using QT/MFC/BOOST/STL/VS2012/VS2013/OpenGL/DirectX, Delphi using Borland, .NET/C# using VS2012/VS2013
User avatar
jurchiks
Posts: 6769
Joined: Sat Sep 19, 2009 4:16 pm
Location: Eastern Europe

Re: Source code documentation

Post by jurchiks »

Surely it wasn't THAT hard to write...
If you have problems, FIRST TRY SOLVING THEM YOURSELF, and if you get errors, TRY TO ANALYZE THEM, and ONLY if you can't help it, THEN ask here.
Otherwise you will never learn anything if all you do is copy-paste!
Discussion breeds innovation.
siulx
Posts: 70
Joined: Mon Jul 20, 2009 4:36 pm

Re: Source code documentation

Post by siulx »

any advice from where should I start to understand how the server works ?

My goal its to make a console application, and put it to talk with the server.
User avatar
delix
Posts: 11
Joined: Sun Feb 06, 2011 9:52 pm
Location: Ukraine, Crimea, Eastern Еurope baby;)

Re: Source code documentation

Post by delix »

TomDavidson wrote:I have generated the L2JServer class documentation from the source code so I thought I'd share it all with you. I have it automatically updating when I do a rebuild form the source so it should stay relatively up to date.

API docs

If we were to follow some coding standards and include mandatory doc-block style comments at the top of each class and method it would make this much more useful. They don't take much time to write when you create or change a method so it's well worth it for the time you save trying to figure out how a functions works.
This is really Great job TomDavidson !!!
Especially for novices like me :D
Just keep doing in this way!
siulx wrote: any advice from where should I start to understand how the server works ?
My goal its to make a console application, and put it to talk with the server.
I'm interesting in this too. Let us know where and what we need to start with?
Thx.
"Life is what happens to you while you're busy making other plans"
Aardvaark
Posts: 22
Joined: Sat Mar 04, 2006 12:11 pm

Re: Source code documentation

Post by Aardvaark »

Link Broken
User avatar
Sirpaypi
Posts: 108
Joined: Mon May 18, 2009 11:51 pm
Location: Moяocco.

Re: Source code documentation

Post by Sirpaypi »

Please re-upload. :roll:
Saying that Java is nice because it works on all OSes is like saying that anal sex is nice because it works on all genders.
TomDavidson
Posts: 15
Joined: Tue Jul 28, 2009 1:33 pm

Re: Source code documentation

Post by TomDavidson »

Apologies for the broken link, my L2 server died and it was hosted there.

I've rebuild them to pre-Hi5 and talking to people to get them up on here with the rest of the documentation. In the mean time I've uploaded them here: http://www.davidson.me.uk/dev/l2jserver/ and changed the link in my sig.
Post Reply