123
-=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- (c) WidthPadding Industries 1987 0|606|0 -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=-
Socoder -> Off Topic -> Monkey Wrangling

Wed, 07 May 2014, 10:35
spinal
If only Monkey-X had a ’remove all functions and variables that are completely unused’ feature. I’ve god so much unused, half written crap in this thing I can hardly find the code I’m editing!

-=-=-
Check out my excellent homepage!
Wed, 07 May 2014, 10:35
steve_ancell
The only thing I can think of to achieve this. Type each function into the search box, if it's only encountered once then it's probably not being used.
Wed, 07 May 2014, 15:29
steve_ancell
Maybe Mark would put DCR into the next update, if enough of us put in a feature request.
Wed, 07 May 2014, 15:38
steve_ancell
I just put up a feature request on the monkey site, the worst that could happen is being told to bugger off.

Wed, 07 May 2014, 16:10
steve_ancell
Here's the thread that I started.

www.monkey-x.com/Community/posts.php?topic=8461#86687
Thu, 08 May 2014, 03:46
therevillsgames
I've never seen an IDE which has un-used code deletion feature, I work in Eclipse at work and it highlights unused variables...

But I would have thought it was pretty dangerous to delete them, you might be planning to use unused ones in the future.
Thu, 08 May 2014, 04:35
Jayenkai
Over the years, I've generally found that each and every time I've deleted something, it's exactly the one bloody thing I need the very next day!
The number of times I've rewritten things, for that reason, is ludicrous.

As a result, I tend to leave everything in, nowadays, and use #rem #end blocks, or even just a bunch of '-down-home,'-down-home to blank out the chunk of code.
My code is far from pretty....but you already knew that!!

-=-=-
''Load, Next List!''
Fri, 09 May 2014, 03:46
therevillsgames
@Kuron - well in that case Monkey has it defaulted to on anyway. To compile all the code you need to enable reflection.

I read it wrong, I thought Spinal wanted unused code to be removed from the source.


Fri, 09 May 2014, 06:56
spinal
Indeed, I'm tired of wading through pages of unused crap. Surely though if it's a compiler option to remove unused code it wouldn't be much of a leap to delete it also?

-=-=-
Check out my excellent homepage!
Fri, 09 May 2014, 12:32
rockford
Is your coding really that messy that you leave in lots of unused variables, functions etc?
Fri, 09 May 2014, 15:09
steve_ancell
It would also be good to have an IDE feature that can just comment-out unused code, that way it is still there if the coder needs to revert back.

Fri, 09 May 2014, 19:22
therevillsgames
In a professional environment we have code reviews on all source files, if there is any unused code or commented out code it does not pass the review and therefore does not get promoted. So you have a nice "clean" code base.