Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Jul 6th, 2005, 9:21 PM   #1
Cerulean
Professional Programmer
 
Cerulean's Avatar
 
Join Date: Apr 2005
Location: London, England
Posts: 459
Rep Power: 4 Cerulean is on a distinguished road
Code library (in working progress)

Someone brought up the idea of a code library, and it's been something i've been in desperate need of for a while. I have a large ~/Python directory with no structure, containing around a hundred cryptically named files, so i've started creating my own code library.
I think a really clean, intuitive, and efficient one is needed, so you can get to your code quickly and easily.

Here's what i've got so far.

Current features implemented are:
- Search-as-you-type filter
- Filter by category
- Source sample adding via drag-n-drop - you can drop a file, an FTP/HTTP link, or a direct snippet, and you'll be greeted with a simple dialog that allows you to select categories and set the title and description.

Future features I want in there:
- Statistics for each file: lists of classes, functions, and their parameters; creation/modification date (maybe diffs?), etc..
- Backup the library to an archive (zip, rar, tar.gz, tar.bz2, or lzw)

Any ideas on what features you think would be cool in there? Be creative
Cerulean is offline   Reply With Quote
Old Jul 6th, 2005, 10:16 PM   #2
Dietrich
Professional Programmer
 
Dietrich's Avatar
 
Join Date: Feb 2005
Posts: 434
Rep Power: 4 Dietrich is on a distinguished road
Smile

Some work I have done uses an editbox for the code and an associated editbox for notes. The search-as-you-type indexing is a good idea. Right now I have it search a listbox of keywords to speed things up. Of course you have to supply the keywords with each new entry. On the other hand, you can supply keywords that are not necessarily in the code. The keywords do crossreference the various code snippets.

I also made the topline in the code a remark containing the description. It is fished out and diplayed as you go through the title listbox. This way the description can go with the cut and paste of the code. Helpful, if you splice a larger program together from the snippets.
__________________
I looked it up on the Intergnats!
Dietrich is offline   Reply With Quote
Old Jul 7th, 2005, 5:06 AM   #3
Cerulean
Professional Programmer
 
Cerulean's Avatar
 
Join Date: Apr 2005
Location: London, England
Posts: 459
Rep Power: 4 Cerulean is on a distinguished road
Quote:
This way the description can go with the cut and paste of the code. Helpful, if you splice a larger program together from the snippets.
Hrm yeah, I was debating doing this actually. I just find that my consistency when it comes to top-line comments is pretty weak, and if I was to rely on that then I wouldn't be able to exploit the drag and drop of URLs (not all snippets I see on the web will have a top-level comment, especially if I only want a single function)
Cerulean is offline   Reply With Quote
Old Jul 7th, 2005, 8:00 AM   #4
Dietrich
Professional Programmer
 
Dietrich's Avatar
 
Join Date: Feb 2005
Posts: 434
Rep Power: 4 Dietrich is on a distinguished road
Smile

I see your point. I guess you can always copy/paste the description along with the code copy/paste then.
__________________
I looked it up on the Intergnats!
Dietrich is offline   Reply With Quote
Old Jul 7th, 2005, 8:58 AM   #5
Infinite Recursion
Programming Guru
 
Infinite Recursion's Avatar
 
Join Date: Jul 2004
Location: United States
Posts: 3,467
Rep Power: 8 Infinite Recursion is on a distinguished road
Send a message via MSN to Infinite Recursion Send a message via Yahoo to Infinite Recursion
looks very good. one of these days I will get around to writing one in C# ...
__________________
http://jasonpowers.net

"There are a thousand hacking at the branches of evil to one who is striking at the root."
Infinite Recursion is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 9:34 PM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC