SunQuest
           Dev Shed Lounge
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsOtherDev Shed Lounge

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Get inside! Sample the range of functionality easily built with JMSL Library for Time Series Data Analysis, Heat Maps, Portfolio Optimization, Monte Carlo Simulation, Stock Price Charting and more. Download Now!
  #1  
Old December 11th, 2001, 03:13 PM
SilkySmooth's Avatar
SilkySmooth SilkySmooth is offline
Newbie :P
Dev Shed Frequenter (2500 - 2999 posts)
 
Join Date: Jan 2001
Location: In the PHP Engine :-)
Posts: 2,880 SilkySmooth User rank is Sergeant (500 - 2000 Reputation Level)SilkySmooth User rank is Sergeant (500 - 2000 Reputation Level)SilkySmooth User rank is Sergeant (500 - 2000 Reputation Level)SilkySmooth User rank is Sergeant (500 - 2000 Reputation Level)SilkySmooth User rank is Sergeant (500 - 2000 Reputation Level) 
Time spent in forums: 11 h 32 m 23 sec
Reputation Power: 15
Code Bank

Hi,

I'm getting to the stage here where I have so much code that I could re-use if only I had a decent system in place to keep track of it all. I have thought of one method of doing it and that would be to store it in a dir and the filename would be the ref for it, just curious how others go about storing their code for future programming??
__________________
---------------------
-- SilkySmooth --
---------------------
Proxy | Little Directory

Reply With Quote
  #2  
Old December 11th, 2001, 03:39 PM
-=-steve-=- -=-steve-=- is offline
Devshed Gringo
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2000
Location: Toronto, Ontario
Posts: 414 -=-steve-=- User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 4 h 12 m 20 sec
Reputation Power: 8
That's a great idea! I'd use mysql with codes, descriptions and names columns... searching would be easy to do this way I guess.
__________________
echo $lol;

Reply With Quote
  #3  
Old December 11th, 2001, 04:17 PM
SilkySmooth's Avatar
SilkySmooth SilkySmooth is offline
Newbie :P
Dev Shed Frequenter (2500 - 2999 posts)
 
Join Date: Jan 2001
Location: In the PHP Engine :-)
Posts: 2,880 SilkySmooth User rank is Sergeant (500 - 2000 Reputation Level)SilkySmooth User rank is Sergeant (500 - 2000 Reputation Level)SilkySmooth User rank is Sergeant (500 - 2000 Reputation Level)SilkySmooth User rank is Sergeant (500 - 2000 Reputation Level)SilkySmooth User rank is Sergeant (500 - 2000 Reputation Level) 
Time spent in forums: 11 h 32 m 23 sec
Reputation Power: 15
Hmmm yeah, just sounds like to much work to set it all up and maintain it all.

Reply With Quote
  #4  
Old December 11th, 2001, 04:34 PM
AlCapone's Avatar
AlCapone AlCapone is offline
Mobbing Gangster
Dev Shed Demi-God (4500 - 4999 posts)
 
Join Date: Sep 2001
Location: "Best City" 2002 and 2003- Melbourne, Australia
Posts: 4,913 AlCapone User rank is Sergeant (500 - 2000 Reputation Level)AlCapone User rank is Sergeant (500 - 2000 Reputation Level)AlCapone User rank is Sergeant (500 - 2000 Reputation Level)AlCapone User rank is Sergeant (500 - 2000 Reputation Level)AlCapone User rank is Sergeant (500 - 2000 Reputation Level) 
Time spent in forums: 5 h 36 m 31 sec
Reputation Power: 17
Send a message via ICQ to AlCapone Send a message via AIM to AlCapone Send a message via Yahoo to AlCapone
Yeah, just stick it to some remote db and forget about it. Or you can always tar it and upload to farthest coner on your site...
__________________
And you know I mean that.

Reply With Quote
  #5  
Old December 11th, 2001, 04:43 PM
NoXcuz's Avatar
NoXcuz NoXcuz is offline
Wiking
Dev Shed Expert (3500 - 3999 posts)
 
Join Date: Sep 2000
Location: Sweden
Posts: 3,608 NoXcuz User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 7 h 49 m 27 sec
Reputation Power: 11
I've tried using some 'skeletons' for site building, with some dummy pages, including database setup etc. Basically an index file that includes appropriate files depending on which variables you call it with. Most of the contents are stored in the db. Then I have set up sections (dirs) for the most common stuff, like a members section, file uploading, GD/images-stuff etc. With lots and lots of functions that does most of the work behind the scenes. And some classes used sparsingly... These functions are separated into categories, ie one for PDF stuff, one for session handling etc. Seems to work out so far...
Oh, and I try to comment as much as possible, so that I know how and why I do things in these files...
And whenever I think I've created something useful (?) or find some code snippet that I can use in the future somewhere, I add it to this skeleton...

But I also have some test section, which is a total disaster. Files everywhere, with lots of database tables that I use for testing purposes. I can spend hours trying to find stuff here, or figuring out what this file/table should be used for...
Sure, I tried naming the files/tables logically, but when you return to this area after two months of absence, it seems as that logic doesn't apply anymore...

So some other ideas would be appreciated!

//NoXcuz
__________________
UN*X is sexy!
who | grep -i blonde | date; cd ~; unzip; touch; strip; finger; mount; gasp; yes; uptime; umount; sleep

Reply With Quote
  #6  
Old December 11th, 2001, 05:11 PM
SilkySmooth's Avatar
SilkySmooth SilkySmooth is offline
Newbie :P
Dev Shed Frequenter (2500 - 2999 posts)
 
Join Date: Jan 2001
Location: In the PHP Engine :-)
Posts: 2,880 SilkySmooth User rank is Sergeant (500 - 2000 Reputation Level)SilkySmooth User rank is Sergeant (500 - 2000 Reputation Level)SilkySmooth User rank is Sergeant (500 - 2000 Reputation Level)SilkySmooth User rank is Sergeant (500 - 2000 Reputation Level)SilkySmooth User rank is Sergeant (500 - 2000 Reputation Level) 
Time spent in forums: 11 h 32 m 23 sec
Reputation Power: 15
Quote:
Originally posted by NoXcuz

But I also have some test section, which is a total disaster. Files everywhere, with lots of database tables that I use for testing purposes. I can spend hours trying to find stuff here, or figuring out what this file/table should be used for...
Sure, I tried naming the files/tables logically, but when you return to this area after two months of absence, it seems as that logic doesn't apply anymore...

So some other ideas would be appreciated!

//NoXcuz


This is the problem I am having although mine isn't with test stuff.

Reply With Quote
  #7  
Old December 11th, 2001, 07:24 PM
Onslaught's Avatar
Onslaught Onslaught is offline
/(bb|[^b]{2})/
Dev Shed Demi-God (4500 - 4999 posts)
 
Join Date: Nov 2001
Location: Somewhere in the great unknown
Posts: 4,834 Onslaught User rank is Second Lieutenant (5000 - 10000 Reputation Level)Onslaught User rank is Second Lieutenant (5000 - 10000 Reputation Level)Onslaught User rank is Second Lieutenant (5000 - 10000 Reputation Level)Onslaught User rank is Second Lieutenant (5000 - 10000 Reputation Level)Onslaught User rank is Second Lieutenant (5000 - 10000 Reputation Level)Onslaught User rank is Second Lieutenant (5000 - 10000 Reputation Level)Onslaught User rank is Second Lieutenant (5000 - 10000 Reputation Level) 
Time spent in forums: 1 Day 23 h 30 m 30 sec
Reputation Power: 88
Send a message via ICQ to Onslaught
I have two seperate areas that I keep up with. The first is my testing section. This includes a test database, which is actually a second backup of my database so that I can test with real data, but I don't kill anything if I screw up. I also have a test dir which all of my untested/unpolished scripts and files go into. Once they are fully tested and polished up they go into my library file. This is organized into specifics by what the basic of the script is. e.g. phplib is the base, then html_controls, classes, database, etc... and this one of my include paths so once it goes in here I can always get to it. I also use a cvs repository.

Reply With Quote
  #8  
Old December 11th, 2001, 10:07 PM
SilkySmooth's Avatar
SilkySmooth SilkySmooth is offline
Newbie :P
Dev Shed Frequenter (2500 - 2999 posts)
 
Join Date: Jan 2001
Location: In the PHP Engine :-)
Posts: 2,880 SilkySmooth User rank is Sergeant (500 - 2000 Reputation Level)SilkySmooth User rank is Sergeant (500 - 2000 Reputation Level)SilkySmooth User rank is Sergeant (500 - 2000 Reputation Level)SilkySmooth User rank is Sergeant (500 - 2000 Reputation Level)SilkySmooth User rank is Sergeant (500 - 2000 Reputation Level) 
Time spent in forums: 11 h 32 m 23 sec
Reputation Power: 15
Yeah I think I'll just go with a dir and file system and use the names of them to make it clear what each is, I think thats a much more manageable way to get at the code than sticking it in a DB.

Reply With Quote
  #9  
Old December 12th, 2001, 05:55 AM
-=-steve-=- -=-steve-=- is offline
Devshed Gringo
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2000
Location: Toronto, Ontario
Posts: 414 -=-steve-=- User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 4 h 12 m 20 sec
Reputation Power: 8
This is an obvious reply but worth mention. Remember to back up all your work! It would suck monkey butt to loose everything!

Reply With Quote
  #10  
Old October 4th, 2002, 03:31 PM
russgri russgri is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2002
Location: Mississippi USA
Posts: 2 russgri User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
I have been trying to make a MySql database.
I keep my code samples on a Utility named AZZ Cardfile ...just !0 or 12 dollars.
URL
In the left pane:
mysql_date/time converters
In the right pane:

mysql date/time converters
Submitted by: Stanford Woody (woodys@northlink.com <MAILTO:woodys@northlink.com>) Submitted on: Feb 20th 2001 at 17:08:37 (Viewed 1111 times) View the example as plain text <URL>

Just some real-life functions you can call to perform common date/time conversions between
MySQL datetime format, MySQL timestamp format and UNIX timestamp (i.e. seconds after
epoch) with "human" output.


<?

//we use UNIX's time specification as the base specification

function mysql_datetime_to_human($dt)
{
$yr=strval(substr($dt,0,4));
$mo=strval(substr($dt,5,2));
$da=strval(substr($dt,8,2));
$hr=strval(substr($dt,11,2));
$mi=strval(substr($dt,14,2));
// $se=strval(substr($dt,17,2));

</snip>
If the code was found on a website you can store the link in the right pane and it acts like a bookmark and clicking on it will take you to the website or file on your hard dirive if entered as a hyperlink.
If the code was sent to you on a mailing list via email then click on reply and copy the entire message to the right pane and clicking on the mailto: opens a message to that sender.
In addition I use Clipcache Plus or Pro whatever the best version and register it to unlock some extra features and create a group called 'Mysql' and select that group as the recipient of you collection of windows clipboard entries.
I also use it for bookmarks and addressbook and passwords.
You can have different cardfiles by saving the cardfile as Mysql or Css or just Code
and prefix the left entries as js_xxx or cs_xxx
I hope this will compensate for the good help I am receiving and hope to receive.

Reply With Quote
  #11  
Old October 4th, 2002, 04:58 PM
jpenn's Avatar
jpenn jpenn is offline
Contributing User
Dev Shed Frequenter (2500 - 2999 posts)
 
Join Date: Jun 2002
Location: Washington, DC
Posts: 2,693 jpenn User rank is Sergeant (500 - 2000 Reputation Level)jpenn User rank is Sergeant (500 - 2000 Reputation Level)jpenn User rank is Sergeant (500 - 2000 Reputation Level)jpenn User rank is Sergeant (500 - 2000 Reputation Level)jpenn User rank is Sergeant (500 - 2000 Reputation Level) 
Time spent in forums: 5 h 41 m 10 sec
Reputation Power: 16
Lol russgri, you brought this thread out of the graveyard.....

I can acutally add to this thing......

Quote:
I'm getting to the stage here where I have so much code that I could re-use if only I had a decent system in place to keep track of it all.


So Silky, have you ever found that system?

I am actually like 90% done on one that I was gonna post for developers to use. This project started out as a little small PHP/MySQL code storage solution and has turned out to be a robust application complete with an installation wizard, syntax highlighting with line numbers, search features, 2 user levels (1 for admin, 1 for public for sharing), a feature to allow the testing of your code blocks and more. Maybe within the near future I can jump back on this thing......
__________________
~ Joe Penn

Reply With Quote
Reply

Viewing: Dev Shed ForumsOtherDev Shed Lounge > Code Bank


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support |