Java-Gaming.org Hi !
Featured games (83)
games approved by the League of Dukes
Games in Showcase (523)
Games in Android Showcase (127)
games submitted by our members
Games in WIP (592)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: 1 [2]
  ignore  |  Print  
  Shortcuts in OOP  (Read 6135 times)
0 Members and 1 Guest are viewing this topic.
Offline Breakfast

Senior Devvie




for great justice!


« Reply #30 - Posted 2005-02-28 10:11:16 »

Is that the class that begins "/*" and ends with "*/" ?
Offline erikd

JGO Ninja


Medals: 16
Projects: 4
Exp: 14 years


Maximumisness


« Reply #31 - Posted 2005-02-28 14:49:39 »

LOL Grin
No, it's a generated one. It emulates all possible MOVE commands in an 68k cpu, and there's LOTS of them.

Offline Raghar

Junior Devvie




Ue ni taete 'ru hitomi ni kono mi wa dou utsuru


« Reply #32 - Posted 2005-02-28 20:52:21 »

Quote
But if your javadocs were in external files and for whatever reason you just had the source code files, no matter how well written the code was it would be a good deal harder to interact with it.

I believe there should be two types of comments, one for programmers that would like to do something weird these shouldn't be in JavaDocs, and the other type for general use.
to erikd. Hand generated are better.  ~_^
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline tom
« Reply #33 - Posted 2005-02-28 22:45:49 »

Quote

I believe there should be two types of comments, one for programmers that would like to do something weird these shouldn't be in JavaDocs, and the other type for general use.

I believe there is such a convention. The comments describing the inner workings of the functions is positioned right after the function declaration:
1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
/**
* Gets the x component.
* @return the x component.
*/

public float getX() {
   /*
   Describes what the weird code does.
   */

   return (somethingWeird);
}

Offline Breakfast

Senior Devvie




for great justice!


« Reply #34 - Posted 2005-03-01 16:46:32 »

Quite. An extra layer for documentation sounds like more complication for no perceptible gain. Kind of a backward's occam's razor, if that makes sense.
Offline K.I.L.E.R

Senior Devvie




Java games rock!


« Reply #35 - Posted 2005-03-09 05:11:31 »

I've asked a teacher during my labs if this is acceptable:

a.getA().getB().getC().

She said 'yes'.

Of course I worded the question as:
"Does it break any OOP or UML 2 rules if I get a reference object in another class with a getter and get another object from that class?"

Vorax:
Is there a name for a "redneck" programmer?

Jeff:
Unemployed. Wink
Offline Orangy Tang

JGO Kernel


Medals: 56
Projects: 11


Monkey for a head


« Reply #36 - Posted 2005-03-09 06:27:26 »

It would be classed as breaking the law of demeter ( http://c2.com/cgi/wiki?LawOfDemeter ) but frankly I always thought that rule was junk anyway, you can always work around it but you end up with some hideous code.

Personally I like the XP style method of code the simplest thing possible and refactoring it when I need to, instead of the whole "big design upfront" method where things tend to get overcomplicated.

[ TriangularPixels.com - Play Growth Spurt, Rescue Squad and Snowman Village ] [ Rebirth - game resource library ]
Offline Raghar

Junior Devvie




Ue ni taete 'ru hitomi ni kono mi wa dou utsuru


« Reply #37 - Posted 2005-03-10 17:03:31 »

jf1.getContentPane().add(something);
is a simpliest exameple of such usage.

Of course if it would go to extremes programmers could use
Something s = .......getSomething(Object);
s.doWork();
s.check();
or
private Something getSomething(Object something1, Object somethingElse)
Offline blahblahblahh

JGO Coder


Medals: 1


http://t-machine.org


« Reply #38 - Posted 2005-03-10 18:32:46 »

Quote
I've asked a teacher during my labs if this is acceptable:


The answer is really "only if your IDE has a one-click function to unroll it for you" because in real development you very often have to unroll those things later on when you're maintaining / updating / adding new features. Tongue

Most IDE's do this these days (yes?) so it's not a problem.

malloc will be first against the wall when the revolution comes...
Offline blahblahblahh

JGO Coder


Medals: 1


http://t-machine.org


« Reply #39 - Posted 2005-03-10 18:34:21 »

Quote


Just few words. Image processing library.


So ... what?

Quote

It looks more like Java.math than normal class. If I'd add spiders inside (they are better in different class) it might be over 3800 lines.


I have no idea what spiders are, and I've no idea what you're saying here. Are you trying to defend a 4k line class?

malloc will be first against the wall when the revolution comes...
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline blahblahblahh

JGO Coder


Medals: 1


http://t-machine.org


« Reply #40 - Posted 2005-03-10 18:35:57 »

Quote

I believe there should be two types of comments, one for programmers that would like to do something weird these shouldn't be in JavaDocs, and the other type for general use.
to erikd. Hand generated are better.  ~_^


Right. It's called a "manual" and open source might actually be mostly usable (rahter than mostly unusable, with a few gems) if more open source "programmers" knew about these amazing artifacts and how to write them.

/me ducks and runs for cover

malloc will be first against the wall when the revolution comes...
Offline K.I.L.E.R

Senior Devvie




Java games rock!


« Reply #41 - Posted 2005-03-10 19:37:18 »

How would I unroll that in Eclipse?

Quote


The answer is really "only if your IDE has a one-click function to unroll it for you" because in real development you very often have to unroll those things later on when you're maintaining / updating / adding new features. Tongue

Most IDE's do this these days (yes?) so it's not a problem.


Vorax:
Is there a name for a "redneck" programmer?

Jeff:
Unemployed. Wink
Offline Raghar

Junior Devvie




Ue ni taete 'ru hitomi ni kono mi wa dou utsuru


« Reply #42 - Posted 2005-03-11 15:40:34 »

Quote

So ... what?
I have no idea what spiders are, and I've no idea what you're saying here. Are you trying to defend a 4k line class?

There are several areas that requires a nasty large code, and complex one on top of that. These are some algorithms from image processing, handling interactions between 1 mill+ entities,  handling and analysis of a geographic data, and sometimes also the smart AI.

For example:
I seen a 1000 line implementation of DCT. (My implementation of DCT isn't as large, but it needs 2000 operations per load.) There are much more code intensive algorithms however.



Spiders is name for... Let's suppose you'd have these data: "1324", and you need to convert that into this "1234". You'd select one of methods that is called spider.


Offline swpalmer

JGO Coder


Exp: 12 years


Where's the Kaboom?


« Reply #43 - Posted 2005-03-12 00:25:20 »

Quote
Spiders is name for... Let's suppose you'd have these data: "1324", and you need to convert that into this "1234". You'd select one of methods that is called spider.

That almost entirely fails to explain in the slightest way what you mean by a 'spider'.  Smiley

All I got out of it was a spider is a method that manipulates data.  Hmm.. I think all of my methods are spiders.

8: Undefined index: online
File: /home/jgo/public_html/Themes/default/Display.template.php (main sub template - eval?)
Line: 161