02-10-2002, 10:10 PM
actually copy that?
Ok, I'll get to the point...I have found that there are a lot of different programs out there that allow you to "copy" your code and save it to basically a database type file. ie vb code explorer (http://www.littleguru.com) , code keeper (http://www.icynorth.com/codekeeper/) etc.
How many of you use something like that and what specifically do you use?
At first I thought it was a daunting task to learn/memorize each and every line of code in order to be a 'programmer' per say but after looking at some of these programs (another good mention would be api-guide (http://www.allapi.net/agnet/apiguide.php)) I am beginning to think (hopefully I'm right?) that these tools are a neccessity (or darn near that) in order to really write good quality programs (not to say it's possible to do without them but it would take a lot more time).
Anyway, I just wanted to know what all of you think about this. Please post your comments, idea's, etc. c_c
02-10-2002, 11:08 PM
You could add a new catagory to the survey....Never heard of it .
But sometimes when I come across a good piece of code, trick or
method, I test it out in a clean (new) project, then I save it for
As far as finding the code within my own projects, I know exctly
where to find it, even after a few years. But I always manage to
find a way to improve it.
02-10-2002, 11:48 PM
erm, yes I do use a program to keep snippets of code that are generic/might come in handy later. It's called Notepad! :D
Not very 'hip' but the small files are easily transferrable and don't require specialised software to retrieve at client sites.
I can't see anyone being critical if you diligently archive code that can be easily moulded to any number of requirements. All tradesmen keep boxes/garages full of spare parts that might or might not come in handy :-\ - why shouldn't we?...
02-10-2002, 11:56 PM
Great analogy Timbo...
02-11-2002, 12:59 AM
The program I'm working (working?? LOL right!) on at the moment has alot of code in it that was "groundbreaking" for me, that is stuff that was totally new to me, and before putting it in my program, I would start a blank project and "prototype" my ideas.
Then I just go through and merge the blank project into my program if it works, and keep the blank project for future reference.
Thats just this one program though, usually I use notepad, or if its in C++, just add my ideas to the end of the relevant C++ file in a block comment.
02-11-2002, 02:15 AM
I have a handful of useful procedures written in code modules which I can then just add to any project and then use. These include a module which contains emulated functions which are native to VB6 but not VB5. Another contains a collection of useful string functions. I also have a debugging module which can output information and errors to file and a very accurate benchmarking and timing module.
Usually I use them by simply adding the module to the project and then using it as-is. On a few occasions I have simply taken individual snippets of code from these modules. Whenever I am coding, I take time to look for bits of code that appear in multiple projects, and then add them to one of these generic code modules.
I use this method because it is fast, very fast, simply add the module and run with it. This gives me more time to spend on the meat of the program. Secondly it requires you to remember very little of what the actual code within the function does, all I need to recall is exactly which module contains what I am looking for. Lastly, if I want to update a function for speed reasons or through a bug, the change is immediately effected in all projects which utilise the module.
I doubt this is the kind of reusing code you were thinking of, but I thought I would add it anyway. :-\
02-11-2002, 02:31 AM
Hey Squirm, The part where you said "Lastly, if I want to update
a function for speed reasons or through a bug, the change is
immediately effected in all projects which utilise the module. "
Does this mean you'll point your new project to that same module?
If so, that really cool, I'de be too worried that I may change
something that may effect the previous project. (I can be absent
minded sometimes, hehe). I still think it's cool though.
02-11-2002, 02:34 AM
if asking someone for help and using their code for reference is called cheating than iam a major culprit :o coz most of my games are made using ref from others, my previous game, the whole game was based on the help from everyone in this forum, well i think once in a while using someones code is no offence (well thats my opinion :-\ )
02-11-2002, 05:55 AM
Like Timbo, i use notepad, for the same reasons even, its a "free" database thats easily transportable to other computers. If I have some free time, or if the stuff is something i might use again, I put it in a module for ease of use.
02-11-2002, 06:14 AM
I just use .bas files stright off. No one who would use the code doesn't have VB so there's no point in using .txt files.
02-11-2002, 06:26 AM
I have a special directory "snippets" it contains all kind of code snippets and sample projects.
Functions I use often are grouped together in module files in my "lib" directory. So I can use them in whatever project I want.
02-11-2002, 08:38 AM
I don't really keep code snipits separate. If I need something, i find the project i used it in, and take it from that.
02-11-2002, 08:39 AM
But I also store things which might be usefull in the feature ;)
02-11-2002, 01:47 PM
Code_Clown, I think that the basic answer to your question is something that I pray every new programmer learns in school...we, most all of us, have our own code library. In my case, I have a folder on my C: titled Code under which every new project I have saved is in its own folder titled whatever it is (i.e. FTP, CashRegister, Connect4, etc.) Thus, anytime I need to go back and look at something, I know where to find an example of it. 99% of what I have is stuff I have done myself, though at least half of that I got the basic idea from another source. Playing off of what someone else said, I too do not find a problem with someone else helping. After all, not one person using any programming language can say that they have "never" used someone elseís code. If nothing else...MsgBox ("Hello World") came from somewhere, and we prob *all* started with that lil ditty.
Also, adding to what someone else said about being able to find the part of code they are looking for...Now this is just me, but when I make a program, if it has a function in it I create, I place that at the very top of the program. Then, I place things in the order that I feel that I will use them.
The best example I have is this FTP program that I am trying to find the time to finish. Basically, here is the layout:
On the main form: (from top to bottom)
Dims and declarations for the Explorer half
Dims and declarations for the FTP half
Functions like FolderCount, ChangeFolder, etc.
(in this case since I will have a lot of clicking on the list boxes)
Drive, Dir, and File List Box codes
Buttons such as New Folder, Delete File, etc.
A 5 line commented separator telling me I am fixing to start the FTP section
Functions such as GetFTPData, ConnectToFTP, etc.
List box code
Buttons such as New Folder, Delete File, etc.
As you can see, I purposefully place at the very top of my code Functions, then work my way down in the order that I think I will use the code, most to least. Thus, when I want to find something, I already know about how far down the code window I need to search for it. If not, my 17 pages of code for my FTP program would all be placed in alphabetical order making it extremely hard to find what I want.
Anyway, hope that helps and that I didnít rattle on too much,
If I'm coding then I can usually do what I want with my current knowledge but if I'm venturing into new areas I'll look up someone else's project, see what they did, and try to do my own version by myself. If all else fails, I come here!!