Ideas for automation

Started by
6 comments, last by jeeky 21 years, 10 months ago
Hi all. Background: Sometimes there are things we do repeatedly in programming that are just plain tedious and repetitive after a while. It would be nice if some of those things were automated (Similar to macros or the way DevStudio does some things). I am thinking of writing a DevStudio add-in that does some of these things. I was wondering if anybody had any ideas of things they would like to see automated a bit more so I can get a few ideas for things to implement. A couple of examples-- Most of my classes have the same basic structure and some of the same functions. Each time I make a new class, I code in the same initialization, open, simulate, and render functions. I would like to have a class wizard that prompts for the class name, produces the files (like DevStudio), AND provides the basic functions (empty, of course) that are common in multimedia development (NOT in DevStudio). Sometimes I want to rename a class and its implementation files. I would like to be able to pop up a dialog and rename the class and its files. Automatically placing GPL, LGPL, or other (depending on user preference) copyright data at the top of newly created files. Multifile find and replace (I know, this one is probably a bit too dangerous, but it is just an idea). None of these things are particularly difficult, but it would be nice if they could be done "automagically" instead of being done manually. Please let me know what some of your ideas/requests are for things that would be cool or nice to automate. In the event that I get the add-in created and it doesn''t suck, I will let everyone know.
Advertisement
I like the multi-file replace, as long as you can step through and replace only the ones you want. Perhaps have somethign so you can specify only certain files (i.e. a cpp/h set).

Those who dance are considered insane by those who cannot hear the music.
Thanks for the feedback. Anybody else have any feedback?

I am particularly interested in ideas you all may have regarding tasks that would be good for automation.
bump
you probably cant implement what I want easily but here goes.

my wish list:

auto-indent templating - ie having a list of #defines and having all their values tabbed out to the #th tab.
ex.
#define VALUE5
intvalue =5;
voidmyFunction() {...}

error and syntax highlighting - think of when you misspell a word in msword, it underlines it(different colors for different errors) and you can click on it to see the problem and possibly fix it. possible errors: type doesnt exsist in includes, type misused, name conflict

better autocomplete features - something that recognizes custom classes/functions instead of std and windows

multi-file or project find&replace

automatic comment generation for javadocish docmentmentation

forced coding styles - auto formats ugly code to office/user standard, see indent templates

automatic member function creation from derived abstract data type ( virtual abc() = 0; )

global defines - define swap(a,b) never redefine it for new projects
I will look into those things. There is already an add-in which does some of those things (Visual Assist by Whole Tomato Software -- $80 US). I don''t think I will try to add features that already exist in that, but I will look into all new ideas that sound good.

I think the idea of adding virtual functions to a child class for all pure virtuals in a base class is a good idea. I don''t think that would be too difficult either. It is exactly the kind of thing I am thinking about.

I am thinking I will have a variety of function comment blocks so that the user can stick them in automatically.

Useful, can you elaborate on this one--
>>auto-indent templating - ie having a list of #defines and having all their values tabbed out to the #th tab.
>>ex.
>>#define VALUE5
>>intvalue =5;
>>voidmyFunction() {...}

I am afraid I don''t understand what is to be tabbed.

I could add the capability for a menu of common functions and code, such as a swap, safe memory allocation, etc.

BTW, the above safe memory allocation macros could be done in such a way that memory leaks are auto-detected in debug mode.

Thanks for the *Useful* feedback.

Anyone else have any comments, suggestions, or requests?
jeeky ...

"Most of my classes have the same basic structure and some of the same functions. Each time I make a new class, I code in the same initialization, open, simulate, and render functions. I would like to have a class wizard that prompts for the class name, produces the files (like DevStudio), AND provides the basic functions (empty, of course) that are common in multimedia development (NOT in DevStudio)."

VS.NET makes it easier to override functions of base classes, just right-click the function name shown under the base class in the class view.


"Sometimes I want to rename a class and its implementation files. I would like to be able to pop up a dialog and rename the class and its files."

F2 in VS.NET does this for files or classes


"Automatically placing GPL, LGPL, or other (depending on user preference) copyright data at the top of newly created files."

VS.NET templates


"Multifile find and replace (I know, this one is probably a bit too dangerous, but it is just an idea)."

VS.NET Replace in files



Useful ...

"auto-indent templating - ie having a list of #defines and having all their values tabbed out to the #th tab."

VS.NET Ctrl-K, Ctrl-F


"error and syntax highlighting - think of when you misspell a word in msword, it underlines it(different colors for different errors) and you can click on it to see the problem and possibly fix it. possible errors: type doesnt exsist in includes, type misused, name conflict"

VS.NET has something close, red underlining on unresolved names


"better autocomplete features - something that recognizes custom classes/functions instead of std and windows"

VS.NET


"automatic comment generation for javadocish docmentmentation"

See above...


"forced coding styles - auto formats ugly code to office/user standard, see indent templates"

VS.NET Ctrl-K, Ctrl-F does this too


"automatic member function creation from derived abstract data type ( virtual abc() = 0; )"

Only problem I see is that sometimes you''d want to leave a function abstract in a derived class.



In short, VS.NET does a lot of the things you guys are looking for. I''m not trying to sell anything here, just pointing you two in a possible direction.
dont have vs.net =/ I think I can get it for free at the engineering dept when I go back to school, not sure. Or I can buy it for 99 from the bookstore, bleh.

[edited by - useful on June 9, 2002 8:17:17 PM]

This topic is closed to new replies.

Advertisement