text: How Do You Store Your Previously-Written Code? 459
  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?"
  CVS (Score:5, Informative)
  Re:CVS (Score:5, Informative)
  Re:CVS (Score:5, Informative)
  Re:CVS (Score:2)
  Re:CVS (Score:4, Funny)
  File>>Save As..
  CVS beats Subversion in my opinion (Score:4, Interesting)
  Considering all the praise we read about Subversion, and its compelling features list, we switched a medium size project (80000 loc) from CVS to SVN. All in all we are not impressed with Subversion, and are not going to use it for new projects (for the forseeable future).
  The bad things:
  svn import: oops, there is a some experiment data in the directory, or an AAP subdirectory. Shit, the repository has grown by another 100 MB. No way to get it out again, unless you convert the whole BDB database to text, find your accidental additions, cut it out, rebuild the database, do svnadmin recover, fix all the permissions.
  Really wrong error messages." unable to get lock on file blabla". You'll now have to manually do svn rm
  Big errors:.
  Adding files to a repository from multiple places around the lab has gotten us often into troubles
  The Berkeley DB format keeps changing. You can't just copy one to a server with a slightly different svn version. Worse: it will not tell you that there is a version difference, it will just try, and come up with the most irrelevant error messages.
  All in all, we find SVN not ready for prime time. Its promises are great, but at least CVS is just working reliably.
  This code is going into the Space Station (Declic [linuxjournal.com]), version control is a must for us.
  Re:CVS beats Subversion in my opinion (Score:5, Informative)
  If you use fsfs, you can just delete the last revision. 1 revision=1 file in that one. Otherwise, I'd say that you've hit upon the point of having a revision control system. From a technical standpoint, not having 1 to 1 mapping of files in the repository to files in the system allows you to make cheap copies, do directory versioning, do branching easier, and make backups easier.
  Really wrong error messages.
  svn add *
  svn rm *.log (oops added some test runs)
  svn commit
  " unable to get lock on file blabla". You'll now have to manually do svn rm
  FUD. You was probably some other error in there too. I've done exactly this and it worked. Or it could be that whole "not using Berkley DB" thing..
  In the subdirectory: svn switch --relocate [new server]
  The subdirectory will update to the new place; rest of it will update to the old place. Don't blame subversion that you can't be bothered to learn how to use basic commands in it.
  The Berkeley DB format keeps changing. You can't just copy one to a server with a slightly different svn version. Worse: it will not tell you that there is a version difference, it will just try, and come up with the most irrelevant error messages.
  I guess its just me. The solution seems obvious: don't use Berkeley DB as the backend. I don't. I wouldn't even touch a database format that only works right on ext2 partitions. That's already far too picky for me. What if my ext2 partition dies and I don't have another handy?
  And the fact that you can do incremental backups and actually get only new data is a nice plus.
  parent is page-hit whoring (Score:4, Funny)
  Interesting site you have there, btw. Is that really you? You're so dreamy!
  Re:CVS (Score:3, Informative)
  Re:CVS (Score:2, Interesting)
  A source-control-revision-system-what-huh-who? (Score:3, Interesting)
  I think if it would help if he read some background on these types of tools;
  Don't Use CVS (Score:5, Informative)
  Use SVN if you will be the only person committing stuff in to the repository. If you plan to share the code in an Open Source project with many people, and each will have their own distributed repository, then look into something like bzr from Canonical.
  Re:Don't Use CVS (Score:4, Informative)
  I analysed and deployed a SVN repository for my team two years ago and I love it more every day.
  It is stupidly easy to configure and maintain (as opposed to CVS) and very powerful. The only thing I really miss with Subversion is an obliterate command which hopefully will come around some time.
  If you have to windoze your way around, get TortoiseSVN - Once of the best Open Source Win32 projects available.
  As a side suggestion about managing your documents, it is a good idea to get anal about foldering your files and maintaining consistent naming conventions in your repositories.
  eg.
  repo/trunk/
  ~repo~/branch/dev ~~ Developmental Branches
  ~repo~/branch/rel ~~ Release Branches (Trunk branches)
  ~repo~/trunk ~~ Trunk Releases
  JsD
  Re:CVS (Score:2)
  However, for just storing snippets (like connecting to mySQL) you can use a software program that's designed for one person like. I personally used iCodeLibrary for quite a while in college and found it helped quite a bit. If I recall it allows you to add new languages as well, since it was mainly designed for Visual Studio
  It was easy to use, but now projects
  Re:CVS (Score:5, Insightful)
  For me the answer is to create individual projects or modules (using version control) that contain a logically connected set of components. Version control is really just a means to the end of actually making the library available in a convenient way.
  Re:CVS (Score:5, Informative)
  If you want to make reusable code, one thing you're going to have to do is generalize. Don't make ultra-specific functions that just do one ultra-specific thing, put in a couple of parameters to make your function more generic. That's not to say you should have one function that does everything; just don't have a CreateRadio and a CreateCheckedRadio function in your js library, have a CreateRadio that accepts a parameter for checked or unchecked.
  You may want to prefix your functions in some way so that you won't run into namespace conflicts - use your initials or something simple. The CreateRadio above would be xyz_CreateRadio.
  Group your functions logically into modules. If you have a bunch of stuff that deals with HTML form controls, make an htmlformcontrols.js library. As before, don't go overboard either way, too many functions in a library or too many libraries with just a few functions will drive you nuts.
  Use a style [wikipedia.org], and stick to it as much as possible. The most popular style I've seen is one true brace [wikipedia.org], but personally it drives me nuts to work with this kind of code. I like BSD/Allman [wikipedia.org] much better, but any style is a matter of personal preference. Use what works for you.
  Use clear, descriptive function names. Don't make function x(a,b,c) unless you have a good reason. If "nobody will ever see it and i'll never use it again," think again. Someone will see it, and you will have to use it again, and it will be a pain in your ass.
  Finally, and perhaps most importantly, comment everything. Not every line of code, but every function: what it does, what its parameters are, what its outputs are. You won't remember what $stamp is in your hash-cash implementation unless you have some kind of comment or reference you can check where you clearly stated what it is and why it's part of your function.
  Depending on the editor (Score:2, Funny)
  Reusable (Score:5, Informative)
  Inventing something once is Genius. Inventing something twice is stupidity.
  Using OOP, code should be reusable without having to have some external database. I find that the more external processes one has, the less likely one is to use it.
  Code should be self-documenting. I'm not saying you don't have external documnenation... just that well written code has good comments. A good practice is to comment function and classes before coding.
  Break things down into components. Refactor. Then your code will be very reusable.
  Re:Reusable (Score:2)
  That way I can locate the exact class, make sure that it suits my needs, and copy it over (along with any dependencies) into the project quickly and easily.
  Re:Reusable (Score:2, Insightful)
  On top of all that, source repositories (I assume that's what you mean by "external databases") aren't primarily intended to help folks oranginze and store
  Re:Reusable (Score:3, Insightful)
  All I can say is, "Wow". Code reuse has been around for 40 years.
  FORTRAN card-wallopers would keep routines as stacks of cards in their desk drawers. The C rtl is reusable code, as are libm, Turbo Pascal units (am I dating myself?), SQL stored procedures, GTK, the 10 jillion Perl modules, etc, etc.
  I don't know much (anything, really) about how PHP and JavaScript store software, but if this were a 3GL, you could group your common code into funtional units that compile into
  Re:Reusable (Score:4, Insightful)
  This seems reasonable when one don't actually write real world code, instead just playing around with "what I want to do". Often, reinventing the wheel is cheaper than trying to use an old wheel, and trying to make something that can be perfectly reused is more expensive than writing it several times.
  Writing things several times also leads to you knowing what things you did right and wrong, so the second or third time you do something similar can be much better. It's important to be careful on go #2, though - it's easy to try to solve all the things that were bad with the first system, and overengineering. That's known as "The Second Systems Effect".
  Eivind.
  Re:Reusable (Score:3, Insightful)
  When he is a program manager for a team of 20, then he will need something more robust.
  Re:Reusable (Score:4, Interesting)
  So when you find some critical bug in that code, you'll have to hunt down every copy and update them as well. And if you make some l33t optimization to the code, you need to update every copy to get any speed advantage. Yes, really smart and simple, that.
  If you don't want to use external databases, then simply break the code down to one logical unit per file, and use soft/hard links to bring them to every project that needs them. That way any bugfix/speedup affects every program immediately, and you don't get hundred-plus versions of code floating around and causing trouble.
  Giving some thought to technical details avoids giving a lot of thought to solving the problems caused by lack of attention to details.
  When he is a manager, he can get his underlings do copy-paste maintenance all day long. As long as he's working alone, he is the one who has to fix his fuckups. So he needs the robust system now, not in the future.
  Re:Reusable (Score:5, Insightful)
  For the first application, I create function foo(). Later I find I need to do something very similar to foo() for a new application that I didn't anticipate the first time around. Should I have assessed every possible use of foo() when creating it originally (most of which I will never use)? Or should I change foo() and update every application that uses it? Or should I update foo() and be hampered by my original interface to it? Or should I take my original library, modify foo() and have each application use the version specific to it? If I need to make changes to the original appication later, I can make it use the newest library to take advantage to the updated foo(), but unless there is a compelling reason to it's stupid to change working code.
  Of course, with experience, you can make foo() very robust on the first attempt, but read the OP, he's just getting warmed up and even experienced programmers can find new uses for old functions. Eventually, you get your libraries to the point where the interfaces are pretty consistent, but not off the bat and not for a novice programmer.
  Side comment to the OP: Be aware of the balance between too much abstraction (don't have one function or even library that does absolutely everything) and too much specificity (see PHP -- different functions doing extremely similar things).
  Re:Reusable (Score:3, Insightful)
  On disk or tape (Score:5, Funny)
  Re:On disk or tape (Score:2)
  As a related idea, I've often wondered if it would be possible to port Doom to a high-speed printer, where it prints each frame on a separate piece of paper. Not eco-friendly, but that's not the point.
  Re:On disk or tape (Score:2)
  I've often wondered if it would be possible to port Doom to a high-speed printer
  Already been done, mostly. There exists a vt100 doom port, which could be easily converted to a line printer and timed to a strobe.
  Re:On disk or tape (Score:2)
  SVN (Score:5, Informative)
  Of course, a root level folder on the ftp server can also work.
  Old code (Score:5, Interesting)
  Whenever I change my main machine, that dir is of course copied to the new one, and included in the backups. Organiwing the libraries by functionality and language would be a nice thing, but I never seem to find the time.
  Beware, though: Most employers specify that code written by employees belongs to the company. If you write code as a corporate employee and then leave your employer, you should really think twice before carrying that code with you. If your new boss thinks you are copying code written in a previous job, he would have to throw the book at you.
  Don't know of any software packages, but... (Score:5, Informative)
  In the real world, though, I just copy code from previous projects into the new one as needed. I'm usually careful about keeping things modularized so this hasn't been a problem so far, but I tend to forget what I was doing on my old projects and have to spend time figuring that out.
  I'm not sure if there's software for this or not. Did you try searching for 'code' on freshmeat?
  :)
  Re:Don't know of any software packages, but... (Score:2)
  Probably? Version control is great for everything, perhaps with the exception of stuff you TiVo.
  Subversion, disks, www (Score:2)
  I also press them to DVD along with other files whenever I am trying to make a "get more free space please" backup.
  Gmail. (Score:5, Interesting)
  Re:Gmail. (Score:2)
  Put it on the web (Score:4, Interesting)
  If it isn't likely to turn around and be immediately salable, turn around and put it on the web. I've found that doing the extra (minimal) effort of bundling up and organizing the pieces that is necessary for web presentation really does wonders over my previous storage scheme (put it on a cd, then lose the cd).
  I've got about a year's worth of random stuff thus rescued now, even as I kick myself over the things I know I wrote but can't find anymore. For what its worth: Here it is [elifulkerson.com]
  Subversion, apache, web-dav auto-versioning commit (Score:4, Informative)
  This way you can have full version control with a client like Tortoise SVN and read access to any file with any web browser.
  The web-Dav auto versioning will allow you to write to any of your files with any web-dav client including windows explorer, internet explorer, ms visual studio, macromedia home site, cold fusion studio, many other development environments, microsoft office and lots more.
  Subversion info:(software
  WebDAV info: [wikipedia.org]
  Subversion: [tigris.org]
  Tortoise SVN: [tigris.org]
  my system (Score:5, Funny)
  you can use cookies (Score:5, Funny)
  And Dick Cheney... (Score:4, Funny)
  Re:And Dick Cheney... (Score:4, Funny)
  Re:you can use cookies (Score:4, Funny)
  That really gives a whole new meaning to *random* access memory.
  Re:my system (Score:2)
  I ran into problems with that approach. If I stapled my code to a squirrel's tail, the squirrel would turn around and chew on it, rendering the code illegible; but if I stapled my code to the squirrel's body, I'd often end up killing the
  Re:my system (cont) (Score:2)
  Have you experimented with other animals? Elephants might work well -- they have lots of surface area for attaching code, and staples probably wouldn't hurt them much either.
  Re:my system (cont) (Score:3, Funny)
  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.
  I forgot (Score:2)
  Where to store your code (Score:3, Insightful)
  Huh? (Score:2)
  API's and Libraries (Score:5, Informative)
  Not quite. What you are talking about sounds like just a repository of random code. A library is a specifically designed set of code to perform a given task or set of tasks. There's a certain amount of order implied in the term just as is implied by that big building where they put books.
  API's are designed interfaces to a system to make coding easier to do. You don't have to understand how the underlying guts of the code works, you just program to work with interfaces. So you call the draw() method and a line appears on the screen but you don't need to know how to speak directly to the video card, etc.
  AS for the original question, I have two suggestions. The first is to use CVS as a way to version your code. It's like have CTRL+Z for your entire project. It makes it much easier when you are adding new code because you can feel comfortable breaking it completely because you know you can revert it easily.
  The second is to use a simple search engine to catalog your code. Google desktop would be up to the task. Just check out your code from CVS and put it in a directory somewhere. Then when you need code for some task you can search for it. If you're good about commenting your code, that should work like a charm.
  Re:API's and Libraries (Score:2)
  In my previously written programs (Score:2)
  Projects and Archve (Score:2)
  two issues here (Score:5, Interesting)
  Code re-use is why you write API's and create your own libraries, so that you don't have to keep re-inventing the wheel.
  The other issues are version control, code management, etc. Some ppl here are recommending cvs and other such overkill. If your a novice PHP coder, none of that matters; you probably have a handfull of scripts that weren't written with re-usability in mind, and therefore are minimally reusable (written in a language that doesn't encourage re-usability to boot) so theres no "tool" that will magically let you squeeze the juice of re-usability from stone.
  At this point, you biggest concern should be storage for sake of making frequent backups. Personally, I encrypt whatever folder I'm working in (using PGP) and email it to my gmail account every day. That way it's accessible no matter where I am, and pretty secure too.
  cards (Score:2)
  1 file (Score:3, Funny)
  Sourceforge (Score:3, Informative)
  Once in Sourceforge, you get CVS and all the goodies. Better than using GMail for it.
  In a tagged, public code snippets site (Score:4, Informative)
  The trick... (Score:2)
  In javascript or PHP, there is syntax for loading external files. Play with it, do dumb little experiments. Make up a file.js that just runs and alert(), and then call it from another, and see how it pops up a message box just as if you had called alert() directly.
  From there, it's only a matter of thinking up functi
  Some Will Be Lost (Score:2)
  Reusable code (Score:2)
  1) Use comments -- good ones! -- liberally. Check out a programming style guide. There's nothing worse than coming back to your code a year later and asking, "What the *&$#^& was I thinking here?"
  2) Learn how to make your code general enough to be reusable. Limit your imbedded constants to a minimum. Write functions to solve the general case. Your code might run slower, but unless you are doing serious number-crunching or searching, it won't matt
  Re:Reusable code (Score:5, Funny)
  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..."
  Start with a well organized directory (Score:2)
  I have to confess that since I'm not heavily involved in much hobby and open source work I still use a simple directory most of the time at home (and on my personal laptop). I'm sure some will laugh/scoff.
  As you prog
  Storing your code is just the beginning (Score:5, Informative)
  But to start, use SVN. There's not a good reason to use something else, and having the history of your changes will (in some ways) be far more important than having the code itself. If SVN is a bear to put up with, and it's just you, you might consider RCS, but RCS will eventually make you jump through so many hoops that sooner or later you'll be looking at SVN.
  After that, you'll need to recode your code to become more useful over time. At first, the solution fits the problem, and the problem fits the website, and that fits the specific task you were trying to perform. After some time, your needs will change. The second time you want to use your code, you'll notice that it doesn't really fit. This is where your challenge starts.
  Challenge yourself to NOT write the 2nd and 3rd products that use your code to make compromises for the "way this library needs to be used". Rework parts of the library to make it more useful in more situations, and rework both the old and the new projects to use the new library.
  Then try to make a third application that uses the library in a slightly different way. Once again, don't write the application to fit the library, but modify the library to fit the way the application uses it. At the same time, check that the old applications both keep working on the rewritten libarary's code, and keep them up to date with the changes in the library.
  After a few trips on this merry-go-round, you'll begin to notice a few things about code maintenance, code reusability, and code maturity. Sure, you could just read about it in a book, but that would rob you of an education. You MUST see it happen in person to understand it. If you're doing things "correctly" you'll notice a few things:
  1. Each time you write a new applicaiton, the library needs to change less and less, but it's still easy to use.
  2. Good libraries don't force different applications to be written the same way. Bad libraries require the application to be written in ways that make using the library uncomfortable.
  3. It's impossible to make code reusable without some understanding of the various ways you might be likely to use it.
  The real test is when you find yourself writing documentation for your library so you can hand it off to someone else to use without the need for them to see your source. Sure, you could give them a copy of the source code too, but if they have to read it, you've only made it reusable for you, and that's a small audience to learn from.
  Good luck, and don't worry if you fall short. Writing good, flexible, reusable libraries is often much harder than writing the applications that use them. Just remember, it's not a library if only one application uses it. It's not flexible if only one style of application uses it. It's not good if you have to read it's source code or documentation that looks like it could be source code.
  Sincerely,
  ELB
  Re:Storing your code is just the beginning (Score:3, Insightful)
  There MAY be a good reason to use CVS in that CVS is slightly more trivial to set up; this Subversion tutoral [artis.imag.fr] makes the SVN setup fairly painless, too, though.
  Subversion is likely to give you less pain in the long run than CVS, though.
  <soapbox>
  I think SVN's lack of distribution support might end up being the worst thing to happen to open source ever. Distributed development can b
  from another self-taught home user: (Score:2)
  I have a special subirectory called "code" within which I have folders for each language I've worked in for whenever I've had something I want to save. These will either be the first few tutorial-level programs I've written in that language, or complete programs where I saw some reuse in the future. I can quickly search ("grep") within the files for functions, keywords, and such, either as a memory refresher for writing a different program, or to cut and paste and modif
  This calls for quantum statistical analysis (Score:5, Funny)
  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
  Unit Tests (Score:3, Informative)
  - If you have unit tests, keep them with a copy of the program that runs them.
  - If you dont have unit tests keep a running little example of how to use it - and start looking into using test-driven development for these pieces of code you'd like to rely on.
  - have a 'code blog' in a plain txt file where you track some of your main decisions and ideas to-do. As time goes by, I have tended to idealize my past code into doing things I had only wished it did
  - If the code uses databases, external files, etc. keep those too
  - If there are interesting things that need to be done during build, make sure you keep those too
  - Choose some SCC mechanism, svn or whatever suits you, plenty of posts...and archive a plain copy of the
  - if you plan on archiving for maaany years and writing in some propietary lamguage, keep a version of the editors & compilers safe with your code. I had to rehash a lot of prolog once.
  I don't. Not in the sense you're after... (Score:5, Informative)
  Now, there's a few caveats here. Another thing that happens over time is you learn to stop re-inventing the wheel and to use pre-existing libraries. Right now, you're just unaware of their existence, but you'll learn where to look if you make a little effort. In fact, you'll find that existing libraries tends to heavily influence choice of language to use. So it turns out that most things that are really worth reusing are already available, and you should use those solutions rather than maintaining your own. Sure, write your own for fun or education, but when you get a serious project, you've got no use for it. In some cases, you'll find that there's no library available, so you write something from scratch, but 3 years later, you find that somebody else has made a nice library that's much better than what you hacked together. Several times I have ported code from my own hacked together solution to a more mature library. It's a natural progression, and there are a thousand times more libraries freely available today versus 10 years ago.
  Now, having said all that, there are still times where you want to make something that is generically reusable. The point is, though, you should really make an effort to make a library out of your code. I have done just this on a handful of occasions. Then, put it up on SourceForge or something similar dedicated to your language of choice. I have a few libraries up on SourceForge, some only a few hundred lines of code, but some other people have found them useful because I made the effort. Other people have suggested CVS or whatnot, and SourceForge will give you that.
  Maybe the real gist of your question, though, was about making your code into a library? While the technical details of making a lib, dll, so, jar, pm, etc vary from language to language (sometimes compiler to compiler), here's a few pointers:
  PHP-specific advice. (Score:3, Insightful)
  I think the number one issue for code re-use is avoiding name collisions. PHP doesn't support namespaces, so my approach has evolved to building classes, even for very procedural functionality. I have one library named after my (very unique) username that contains all the functionality that I find useful for my own projects. I usually repackage any functions I use from there in the case of outside projects that other people will be working on.
  I
  Re:Oh - My - God (Score:5, Insightful)
  He is at the beginning of the curve. Laughing at him won't help.
  Re:Oh - My - God (Score:2)
  Normally, I'd agree with this. I've even been known to flame people for being too harsh in their responses. I think the GP has a point though. I think that Ask Slashdot works best when the topics are of broad interest, have some technical merit, and the poster can evaluate the responses in some context. When I read this question, my first thought was to RTFM. After all, he states that "I think this is what people mean when they talk abou
  Re:Oh - My - God (Score:2)
  Please understand I'm not trying to flame you in particular. This is a general reply to all those who feel the question posed by the original submitter was ill-concieved. I think it *is* obvious that by the way the question was framed, this guy doesn't know much about what he is asking. But most people don't seem to realize how amazingly hard it is to get to the point where that isn't true anymore. I first started writing BASIC routines for APPLE ][e in the mid 80's as an 8 year old. A few years
  Re:Oh - My - God (Score:2)
  We definitely have all been where this guy is. And we've all needed help along the way. My concern isn't that he needs help, but how he's going about asking for it. In some ways, submitting a question like this would be like going to a convention of heart surgeons, standing in front of the group, and saying, "hey, some day I think I might have some heart problems, and rather than going to med school or even buying a couple of books on heart surgery,
  Re:Oh - My - God (Score:2)
  And you know, looking back on it all, I would rather have it this way (TRS-80/Commodore/Apple2 BASIC, MS QBasic, MS Visual C++, LINUX gcc, Lisp, Bash, sed/awk, Python, Tcl/tk, GTK/ncurses/SDL, HTML, CSS/XML, Java/Javascript, POVray, rc... who knows, I've probably forgotten five or so!), than to have gone 90 miles deep in just one language and be married to it for life. The way it is, you learn one new lan
  Re:Oh - My - God (Score:4, Insightful)
  I'm all for bashing Ask Slashdot questions that should be Googled and "Do my homework plz" type questions but he really just a kid (look at his homepage).
  Kids are suppose to be ignorant and ask advice about really basic stuff.
  Re:Oh - My - God (Score:2)
  I did, and it wasn't obvious to me that he was young. So I did some digging on his site, and found this picture [asmor.com]. I'd agree that he's young, but I think that if you're old enough to have facial hair, you're old enough to use Google.
  :-)
  Re:Oh - My - God (Score:5, Insightful)
  I think it's crazy that some poor guy manages to get his question posted on slashdot - which means he's probably going to get a wealth of information - and he ends up having the legitimacy of his question debated in terms of his age!
  It's people like this that give techies such a bad reputation. It's one thing to laugh in fun at the dumb users who try to use the CD-drives as cup holders. It's another thing to get irritated with users who expect us to fix their messes after the screw stuff up. But to smack down someone who's actually trying to learn to do it on their own because you don't like their question? That's just elitist and anti-social.
  -stormin
  Re:Oh - My - God (Score:2)
  Re:Oh - My - God (Score:2)
  What? Is this a BSD thread?
  Re:Oh - My - God (Score:3)
  Good for him for trying to better himself. Its hard enough without having people jump on him. It is very easy to call someone stupid because they don't know the correct terminology, it is much harder to find a diamond in the rough who is bright but just hasn't been exposed to the r
  Re:Oh - My - God (Score:5, Insightful)
  The smartest way to get knowledge is to ask the people that know. And by posting on Slashdot it's not like he's barging down your door or sauntering into your cubicle and demanding your attention. It's a very passive non-intrusive inquiry. You read the post, you responded, you have no reason left to complain about this.
  Plus, as a largely self-taught programmer myself I know that asking a question from someone who knows can sometimes get an answer 10 times faster (and 10 times more clearly) than reading a bunch of manuals frequently written either for dummies or for experts. That in-between period when you don't need someone explaining how an if-statement works but you don't really quite know the next step is a difficult phase. In my opinion this isn't a question of laziness - it's a question of efficiency. There seem to be plenty of people here who want to help him. Why don't you kindly get out of their way?
  -stormin
  Re:Oh - My - God (Score:2)
  -stormin
  Re:Oh - My - God (Score:2)
  When you get out of school, enter the real world, and have to work with customers and coworkers, your attitude will change or you'll have to learn the skill of saying "Do you want fries with that?"
  I suggest you practice.
  Re:Oh - My - God (Score:2)
  Re:Oh - My - God (Score:2)
  Re:Oh - My - God (Score:2)
  Re:Oh - My - God (Score:2)
  Re:Oh - My - God (Score:2)
  Re:PHP (Score:2)
  Re:PHP (Score:3, Funny)
  Re:PHP (Score:2)
  --
  Oxymoron
  Re:Why is there no mention of version control? (Score:2)
  With just one developer though, SVN's features will matter more than the performance issues.
  Re:I usually chisel them... (Score:2, Funny)
  Don't Laugh! Will there be CD/DVDs in 50 years? (Score:3, Insightful)
  Printed out, of course. File cabinets full.
  Don't laugh!
  I got my first computer (Texas Instruments TI-99/4A) in the early 1980s, back in the days when Compute! and other similar magazines were *full* of games and other programs which you'd have to type into your computer.
  I credit them with my blazing fast typing speed, my good accuracy typing code (which is a lot different from typing text, of course!) and my ability to troubleshoot.
  I'd type run, and I'd get
  * INCORRECT STATEMENT 440
  Then fix that
  Re:You need to learn the "include" statement (Score:5, Informative)
  Re:Don't bother...yet. (Score:2)
  Indeed. If he has a JavaScript library, it's probably something along the lines of the stupid "mm_OpenWindow" "API" that was so popular for a while. (Hello? window.open(), people?) Not to mention antique browser detection routines that just aren't wor
  Re:Store it? (Score:2)
  Thanks for the laugh!