How Do You Store Your Previously-Written Code?
Asmor asks: "I'm a novice programmer who is largely self-taught. It's never been too much trouble for me to reinvent the wheel constantly before, but now as my ambitions get loftier I'm finding that I could really benefit from maintaining some oft-used code that can easily be reused. The problem is, I really don't have any experience with this and I'm not really sure how I should organize things, how the code should be stored, how it should be implemented, etc. I think this is what people mean when they talk about libraries and/or APIs, but not really sure. I'm specifically curious about PHP and JavaScript, but advice for other programming languages is also helpful! How do you store and maintain your most frequently used code?"
Usualy something like ":wq" "^s" "^x^s" "alt-F,a"
Store you code on a disk or a tape. If you store it on a printout, you'll just have to type it in again.
Fascism trolls keeping me up every night. When I starts a preachin', he HITS ME WITH HIS REICH!
I usually print it out and staple it to a squirrel. Then I set the squirrel free, because information wants to be free, and so do squirrels with paper stapled to them.
to retrieve that information
intellectual property law is philosophically incoherent. it is your moral duty to ignore it or sabotage it
Except for Charleton Heston. He'll get mad and smash them on his way down.
Only two things are infinite, the universe and human stupidity, and I'm not entirely sure about the universe - Einstein
You do what i do, you put everything in one file and call it "misc" and then link it to every program you make. problem solved.
Reminds me of university, where I once saw a fellow student copy a listing out by hand, then actually sit down and type it all in again to one of these old DEC lineprinters (probably old in 1984)!! Just to get a listing. :-)
-- "It's not stalking if you're married!" My Wife.
... to erase it.
To Chuck Norris. He's got infinite storage space, but recovering the files will almost certainly involve a roundhouse kick.
May I suggest interns?
Easier to transport than an elephant, so you can have more on hand at any given time.
They're almost as smart as elephants, too; but I hear they don't last as long. It's a tradeoff, I guess.
WhiteWolf666 an exBush supporter. All you new-school,compassionate,save the children Republicans can rot in hell
There's nothing worse than coming back to your code a year later and asking, "What the *&$#^& was I thinking here?"
Not true.
You could come back to your code a year later and think: "What the...? What kind of "Teach yourself C in 24 hours" mental midget committed THIS? This idiot should be fired... into space! He's...uh... oh, damn..."
This is one of the most complex problems in the realm of computer science, and the answers to this question are less than obvious.
.. I find that a typical Euler-lagrange transformation works a treat, especially when numerising C code.
.. you now have a basis for a firm statistical analysis, and you are now on the road to the enjoying the luscious fruits of code-reuse.
.. and that these structures are also .. you guessed it ... a six sized pyramid with a structural ratio of 2/pi. One more peice of evidence which confirms the widely held (but seldom admitted) secret knowledge that the ancient Sumerians were masters at the art of computer science.
.. ah .. yeah, there you go. You should reduce your code to numbers, store it in a hexa-pyramidical structure, and continue to statistically analyse the usage of these functions until such times as your hexapyramidical representation of those functions reaches an ideal ratio of 2/pi. At that time, you know that you will have reached a higher plane of computing expertise. Take pleasure in this moment and revell in it - but be aware that such knowledge only opens the doors to longer and steeper pathways, beyond which lay more secrets yet to be uncovered.
What you need to do is reduce your code samples to a numerical matrix, assigning weights to various functions co-dependant upon the language that is being used in each case.
These matrices can then be overlayed in an N-dimensional space, and the resulting eigenvalues plotted
For C-like languages (such as PHP), then a modified transform, such as the "saddlepoint" method used by Ridderinkhof and Loder is often more appropriate.
Once these transforms have been completed, computed, stored and plotted
Now you need to apply that numerisation of the coded functions across an (N+1) dimensional space, which is in fact - the source code to which the said functions have recently been applied. Time scale here is critically important - as the most recently used invocation of a function must by the merits of its use, hold a higher weight than one which has not suffered invocation for some considerable period. This is the much-discussed 'Wolverton-Hasselby functional relevance decay factor' which is often the subject of many a debate in computer science circles.
Having thus reduced the chaotic collection of functions to an orderly numeric topology (the graph of who's actual usage forms an ever-revolving surface spread across a time-dependant dimensional plane), we soon find by observation that the collection of functions now forms a pyramid.
Further quantum statistical analysis of this ever growing and ever evolving collection of co-dependant functions will reveal that the structure of this grouping forms not just a pyramid (no surprises there), but a SIX SIZED pyramid !! A pyramid with the base of a perfect hexagon is formed when this numerical matrix is rendered as a 3D image.
The ratio of the height of the pyramid to the size of the base is the value of 2/pi.
There are writings in Babylonian that hint at the architecture of the inner structures concealed within the Ziggurat of Ur
So
Best wishes on your journey
Interesting site you have there, btw. Is that really you? You're so dreamy!
"Our interests are to see if we can't scale it up to something more exciting," he said.
Actually I usually go with...
File>>Save As..
You'll have that sometimes...
In my dictionary "verb" is a noun, so I guess you're a project manager too.