|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
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
|
||||
|
||||
|
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 |
|
#2
|
|||
|
|||
|
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; |
|
#3
|
||||
|
||||
|
Hmmm yeah, just sounds like to much work to set it all up and maintain it all.
|
|
#4
|
||||
|
||||
|
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. |
|
#5
|
||||
|
||||
|
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 |
|
#6
|
||||
|
||||
|
Quote:
This is the problem I am having although mine isn't with test stuff. |
|
#7
|
||||
|
||||
|
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.
|
|
#8
|
||||
|
||||
|
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.
|
|
#9
|
|||
|
|||
|
This is an obvious reply but worth mention. Remember to back up all your work! It would suck monkey butt to loose everything!
|
|
#10
|
|||
|
|||
|
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. |
|
#11
|
||||
|
||||
|
Lol russgri, you brought this thread out of the graveyard.....
I can acutally add to this thing...... ![]() Quote:
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 |
![]() |
| Viewing: Dev Shed Forums > Other > Dev Shed Lounge > Code Bank |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|