SilverSurfer/Help Requests

From Robowiki
Jump to navigation Jump to search
SilverSurfer Sub-pages:
SilverSurferVersion History - Wave Suffering - Help Requests - Archived Talk 20060602

I am needing to start my rc running other (not the default) JRE installed in my machine, does anybody knows how is the sintaxe for that (let´s say for the line "java -Xmx256M -jar robocode.jar")? -- Axe

Just give the full path to the java executable. -- PEZ

  • Thnks, i record to already readed the same doubt here @wiki, but don´t remember where... U know, what would be handy here is somekind of search engine for the wiki. How difficult is that? -- Axe

There is a search field at the bottom of every page in the wiki... :) -- ABC

  • Very fast implementation that!!! :) (don´t believe that i never saw... if it was a snake i´ll be dead by now :P) -- Axe

Though the search script is very slow. A faster way might be to use Google. Try something like: "site:robowiki.net wave". -- PEZ

Help Theseus to find the Minotaurus in the maze!
Fellow robocoders, I´m trying to clean up my aMAZEing code (yes i know, moms, i should keep my desk cleaner...:))... But i have found a surprisingly stupid problem: How can i via Eclipse identify the unused public methods in a Project? This help request may sound one of the most stupid ever, but I simply haven´t found any way to do this, neither a plug-in that provide me this warning... Theseus is lost, please help him to find the string... -- Axe

Try to refactor the method name and say preview-- SSO

Actually, i was thinkin´ better about myself as Theseus (quoting PEZ)... And it just don´t fit. I am actually the Minotaurus, afterall the maze is mine right? Also i was born under the sign of taurus. So, correcting: Please help Minotaurus cleaning his maze! :) -- Axe

Why would anyone help the Minotaur? Maybe Theseus and the Minotaur is one and the same? Just a bad case of schizofrenia. =) -- PEZ

Right. The maze is my mind :) :P So, if you like better Theseus, he is also asking... :) -- Axe

@SSO: I´m talking about checking all the public methods, not one by one... -- Axe

Axe, i am using PMD. Quote:
PMD scans Java source code and looks for potential problems like:

  • Empty try/catch/finally/switch blocks
  • Unused local variables, parameters and private methods
  • Unused private methods
  • Empty if/while statements
  • Overcomplicated expressions - unnecessary if statements, for loops that could be while loops
  • Classes with high Cyclomatic Complexity measurements

PMD has plugins for JDeveloper, Eclipse, JEdit, JBuilder, Omnicore's CodeGuide, NetBeans/Sun ONE Studio, IntelliJ IDEA, TextPad, Maven, Ant, Gel, and Emacs. see http://pmd.sourceforge.net/
--Loki

p.s. don't check the JavaDoc in your code! My experience is that you will get a lot of messages...;-) --Loki

Axe: you probably won't find any program that scans for unused public methods, because there is no way for to tell if they were intended to be called by code that's not in your project. For example, you probably don't call onScannedRobot() anywhere in your code, so it would qualify as an "unused public method" :-P --David Alves

@David: No if you define the "universe" of your project. Remember that a Project at eclipse also have a classpath. In that case, i consider it part of my "universe"(Project), therefore onScannedRobot() could be considered used method. I looked around a lot searching for this... Never found anything. My real work is with desktop apps (medical ensurance transaction Servers), very huge apps actually, Tons and tons of .jar ,packages & classes. Also the team have 6 coders, a lot of hands coding and frequently running to accomplish crazy and unreal deadlines (as usual). I consider a plug-in that could give me the info of unused public methods essential to cleaning the code. But it seems that only me in the world think this (otherelse someone else would have done it)... Perhaps i´ll have to do one by myself (at least could be fun to learn how to write eclipse plug-ins). -- Axe

@Loki: Thx, Ill take a look, but does it checks the public unused methods? Didnt see it at your list... -- Axe