Live data from Hacker News

Ask HN: How do you keep track of small pieces of useful code?

news.ycombinator.com

1–10 of 30 posts

Re: Ask HN: How do you keep track of small pieces of useful code?

#2
very often a "remark" or a non compiling comment is included in the source code snippet. e.g.

rem "this code does nothing"

    let i=1

    for i=0

       beep

    else end
alternate functionalities may written as a "remark" and copypasted or edited to make it a compiling line of code so that you can quickly edit the source code and not have to type so much, or go looking through a codesnippit database to find the tool you need... the actual source code script , depends of course on what language you are using, i chose a pseudo BASIC bcz , well its basic...

Re: Ask HN: How do you keep track of small pieces of useful code?

#5
Start a folder (or even a single file) for code snippets. If you want it accessible on many machines, put it in Dropbox, or a Github repo, or whatever you like. A separate "Evernote for code" is the last thing you need.

Personally, I have "snippets.org" file in my "wiki/" subfolder on Dropbox.

Post reply on HN