TheSwamp

Code Red => .NET => Topic started by: mcarson on September 01, 2008, 03:02:31 PM

Title: Anybody use an application to store/organise their code snippets?
Post by: mcarson on September 01, 2008, 03:02:31 PM
I used to code using VBA in Microsoft Office applications. The main issue I had was remembering what document I created that 'wonder' function! Or what Access database contained that useful class.
At the time I googl'd 'code library' and after filtering the results found:

http://s630417.myweb.hinet.net/ (http://s630417.myweb.hinet.net/)

Been using it ever since!

Just my 2 cents!
Title: Re: Anybody use an application to store/organise their code snippets?
Post by: Glenn R on September 01, 2008, 03:41:11 PM
Pass.
Title: Re: Anybody use an application to store/organise their code snippets?
Post by: vegbruiser on September 02, 2008, 04:56:49 AM
I would only use an app like that if it were free. That one is not. (once the evaluation period has ended)
Title: Re: Anybody use an application to store/organise their code snippets?
Post by: Kerry on September 02, 2008, 06:31:08 AM
http://www.imetasoft.com/iCodeLibrary/
Title: Re: Anybody use an application to store/organise their code snippets?
Post by: Mark on September 02, 2008, 08:34:15 AM
I like subversion myself.

http://www.theswamp.org/index.php?topic=6290.0

Title: Re: Anybody use an application to store/organise their code snippets?
Post by: Glenn R on September 02, 2008, 08:50:33 AM
Mark,

From one of your posts in that thread, you mention a USB stick. I'm assuming, that you have a 'repository' (shed-load of folders and files) on the USB and let's say, the tortoise client running on Work box.

You then check out file/project to work on on work box and the work box client sucks the relevant files over to work box folder. You then do the mojo that you do, then 'commit' these back to your USB sticky...correct?

I've got code all over the place and need to start using something like this, between a work box and home laptop...so I might be pestering you with a few questions if you don't mind...

Cheers,
Glenn.
Title: Re: Anybody use an application to store/organise their code snippets?
Post by: Glenn R on September 02, 2008, 08:54:58 AM
...or is there a svn server involved somewhere and not what I first though, which was it just managed file metadata...?
Title: Re: Anybody use an application to store/organise their code snippets?
Post by: Mark on September 02, 2008, 09:05:13 AM
Mark,

From one of your posts in that thread, you mention a USB stick. I'm assuming, that you have a 'repository' (shed-load of folders and files) on the USB and let's say, the tortoise client running on Work box.

You then check out file/project to work on on work box and the work box client sucks the relevant files over to work box folder. You then do the mojo that you do, then 'commit' these back to your USB sticky...correct?
Correct. Although I use the this server as a repository not a USB stick.

Quote
I've got code all over the place and need to start using something like this, between a work box and home laptop...so I might be pestering you with a few questions if you don't mind...

Bring 'em on! If you want your very own repository on this server just give me a shout. You can set them as private if you like so know one can read or write to it. We can also back it up on a daily basis and send it to you as a single file.
Title: Re: Anybody use an application to store/organise their code snippets?
Post by: Mark on September 02, 2008, 09:07:15 AM
...or is there a svn server involved somewhere and not what I first though, which was it just managed file metadata...?

Not sure I understand the question Glenn.
Title: Re: Anybody use an application to store/organise their code snippets?
Post by: Glenn R on September 02, 2008, 09:09:38 AM
So, do you need to set up an SVN server for this all to automagically work, or is a master fodler structure and the client software enough?
Title: Re: Anybody use an application to store/organise their code snippets?
Post by: Glenn R on September 02, 2008, 09:10:55 AM
So you had a repository on a usb stick that you stored documents on, but then went to full server installation...is that right Mark?
Title: Re: Anybody use an application to store/organise their code snippets?
Post by: Glenn R on September 02, 2008, 09:11:15 AM
Still reading....
Title: Re: Anybody use an application to store/organise their code snippets?
Post by: Mark on September 02, 2008, 09:16:32 AM
So, do you need to set up an SVN server for this all to automagically work, or is a master fodler structure and the client software enough?

You have to have the server.
Title: Re: Anybody use an application to store/organise their code snippets?
Post by: Mark on September 02, 2008, 09:17:32 AM
So you had a repository on a usb stick that you stored documents on, but then went to full server installation...is that right Mark?

Correct.
Title: Re: Anybody use an application to store/organise their code snippets?
Post by: Chuck Gabriel on September 02, 2008, 09:28:23 AM
So, do you need to set up an SVN server for this all to automagically work, or is a master fodler structure and the client software enough?

You have to have the server.

I don't have a server running anywhere.  I just installed TortoiseSVN and created a repository on my USB stick like what Glenn is describing.  I think maybe it was Tim Riley or Troy who pointed out that it could be done that way.  It works fine for me.
Title: Re: Anybody use an application to store/organise their code snippets?
Post by: It's Alive! on September 02, 2008, 09:33:31 AM
Is something you would do with individual .cs files or with a project?
Title: Re: Anybody use an application to store/organise their code snippets?
Post by: Glenn R on September 02, 2008, 09:58:42 AM
Hmmm....

Chuck, after browsing the docs a bit, it seems to be able to use different protocols (http(s) etc and file://) with a service....maybe this is what's happening on your end?

Ideally, what you've described would be perfect. Torotoise client on home and work box, both working off a repository on a protable USB stick...
Title: Re: Anybody use an application to store/organise their code snippets?
Post by: tjr on September 02, 2008, 10:14:11 AM
Subversion has it's purposes but for developers without the need of a central server you need to look into Mercurial (http://www.selenic.com/mercurial/wiki/). I use it for all my development and I don't have an apache instance running anywhere. I can commit thousands of times to my local drive (like svn co does to a remote server) so all my revision history is right there on my computer. If I want to backup to my usb disk or to a fileserver all I need to do is hg push to the remote server or hg pull from the remote location. It has a built in web server for these tasks.

Also has Windows integration for those that want it. http://tortoisehg.sourceforge.net/
Title: Re: Anybody use an application to store/organise their code snippets?
Post by: JohnK on September 02, 2008, 12:40:12 PM
I think [your] missing the point of that thread mark posted; At the time Mark and I were thinking of making a public SVN repro we could all upload to adding to, fixing, and using public code. You'll notice that the url for that thread is ".../svn/public".

I dont remember what became of the personal SVN repros but im sure that topic will spring anew now. The whole idea of a usb svn in lieu of the possibilities of theswamp is absurd in my opinion (theswamp is a Unix server so speed, privacy, etc is not a consideration).
Title: Re: Anybody use an application to store/organise their code snippets?
Post by: Chuck Gabriel on September 02, 2008, 12:56:57 PM
... The whole idea of a usb svn in lieu of the possibilities of theswamp is absurd in my opinion (theswamp is a Unix server so speed, privacy, etc is not a consideration).

I like Mark, and I trust Mark to keep my data secure and confidential.  However, circumstances beyond Mark's control could lead to my data no longer being available to me, so I prefer to keep my data under my personal, physical control.  That isn't absurd.  It's just practical.

The idea of having a public repository filled with snippets of reusable code is great, though.
Title: Re: Anybody use an application to store/organise their code snippets?
Post by: JohnK on September 02, 2008, 01:51:50 PM
... The whole idea of a usb svn in lieu of the possibilities of theswamp is absurd in my opinion (theswamp is a Unix server so speed, privacy, etc is not a consideration).

I like Mark, and I trust Mark to keep my data secure and confidential.  However, circumstances beyond Mark's control could lead to my data no longer being available to me, so I prefer to keep my data under my personal, physical control.  That isn't absurd.  It's just practical.

The idea of having a public repository filled with snippets of reusable code is great, though.
Oh i couldnt agree more that a central repository would be great!

The server that theswamp is on access' one of my servers to make an off-site backup (not all, just ``pieces'' -- Not a mirror) every night to combat that very topic; I cant tell you how many conversations, time, ideas Mark and i have spent/had over the years wanting to make theswamp the best there ever was.

However, using SVN, you can have `local' branches stored on a USB with no trouble at all in addition to using the greater repro on a daily basis.

I want (read: wanted) to have this so bad but the idea kinda flopped.



EDIT:
BTW, would this thread be better off in the general forum?
Title: Re: Anybody use an application to store/organise their code snippets?
Post by: Glenn R on September 02, 2008, 02:55:23 PM
... The whole idea of a usb svn in lieu of the possibilities of theswamp is absurd in my opinion (theswamp is a Unix server so speed, privacy, etc is not a consideration).

I like Mark, and I trust Mark to keep my data secure and confidential.  However, circumstances beyond Mark's control could lead to my data no longer being available to me, so I prefer to keep my data under my personal, physical control.  That isn't absurd.  It's just practical.

The idea of having a public repository filled with snippets of reusable code is great, though.
My thoughts exactly Chuck.

After more reading of the Tortoise kind, it looks like the USB drive thingy falls under the 'FSFS' (fast secure file format) format for single user developers (ie me). I will try it on a USB drive for a bit I think, to get comfortable with it, but then I am liking the idea of a 'central' private repository for my code for me, if that makes.

I need to do more reading and try setting up a 'local' thing to try...thoughts anyone?
Title: Re: Anybody use an application to store/organise their code snippets?
Post by: tjr on September 02, 2008, 03:14:59 PM
You guys are making this way harder than it is. As I mentioned before use a distributed version control system like mercurial, not a centralized one like SVN.

Quote
C:\>e:
E:\>cd MyProject
E:\MyProject>hg init
E:\MyProject>hg add
adding lib.cs
adding main.cs
E:\MyProject>hg status
A lib.cs
A main.cs
E:\MyProject>hg commit
E:\MyProject>hg log
changeset:   0:14ccdf3cf449
tag:         tip
user:        riltim
date:        Tue Sep 02 15:07:42 2008 -0400
summary:     Initial version of MyProject
E:\MyProject>
Note: when I issued "hg commit" I was prompted to enter the commit summary via notepad.exe.

And there you go. You have a project under source control on your usb disk. From here you can work on it from as many computers as you want. Also if you want to keep a master copy on a server some where you can and use "hg push" and "hg pull" to work with it.
Title: Re: Anybody use an application to store/organise their code snippets?
Post by: Mark on September 02, 2008, 03:40:02 PM
You guys are making this way harder than it is. As I mentioned before use a distributed version control system like mercurial, not a centralized one like SVN.
Not sure I understand the difference Tim.

The same but different?
Code: [Select]
#svn add random_ints.py
A         random_ints.py

#svn ci -m"added random_ints.py"
Sending        random_gener.py
Adding         random_ints.py
Transmitting file data ..
Committed revision 188.

#svn info
Path: .
URL: https://www.theswamp.org/svn/<removed>
Repository Root: https://www.theswamp.org/svn/<removed>
Repository UUID: 75b5c751-32fd-0310-b533-b475f03acb80
Revision: 163
Node Kind: directory
Schedule: normal
Last Changed Author: mark
Last Changed Rev: 160
Last Changed Date: 2007-07-26 15:18:59 -0400 (Thu, 26 Jul 2007)

#svn stat -v
              163      160 mark         .
              163       34 mark         dms2deg.pyc
              163      107 mark         daily.txt
              163      107 mark         dailybackup.pyc
              163       62 mark         dmsCalc.pyc
              163      124 mark         kcp2dxf
              187      187 mark         ls.py
              163       25 mark         buildtree.py
              163      137 mark         hilow.py
              163       25 mark         new.db
              163      107 mark         dailybackup.py
              163       35 mark         dirRenamer.py
              163      159 mark         date_input.py
              163       93 mark         wipeout.py

Title: Re: Anybody use an application to store/organise their code snippets?
Post by: Glenn R on September 02, 2008, 03:44:04 PM
You guys are making this way harder than it is.

I think it's the other way around:

Quote
C:\>e:
E:\>cd MyProject
E:\MyProject>hg init
E:\MyProject>hg add
adding lib.cs
adding main.cs
E:\MyProject>hg status
A lib.cs
A main.cs
E:\MyProject>hg commit
E:\MyProject>hg log
changeset:   0:14ccdf3cf449
tag:         tip
user:        riltim
date:        Tue Sep 02 15:07:42 2008 -0400
summary:     Initial version of MyProject
E:\MyProject>

Right-click in explorer with TortoiseSVN anyone???

Note: when I issued "hg commit" I was prompted to enter the commit summary via notepad.exe.

Notepad!?! You've got to be kidding right?
Title: Re: Anybody use an application to store/organise their code snippets?
Post by: tjr on September 02, 2008, 03:49:29 PM
You guys are making this way harder than it is.

I think it's the other way around:

Quote
C:\>e:
E:\>cd MyProject
E:\MyProject>hg init
E:\MyProject>hg add
adding lib.cs
adding main.cs
E:\MyProject>hg status
A lib.cs
A main.cs
E:\MyProject>hg commit
E:\MyProject>hg log
changeset:   0:14ccdf3cf449
tag:         tip
user:        riltim
date:        Tue Sep 02 15:07:42 2008 -0400
summary:     Initial version of MyProject
E:\MyProject>

Right-click in explorer with TortoiseSVN anyone???

Note: when I issued "hg commit" I was prompted to enter the commit summary via notepad.exe.

Notepad!?! You've got to be kidding right?
If you had bothered to read the previous post I made in this thread you would see that there is a TortoiseHG client which is the same concept. Heck I even linked to it.

Also it pops up notepad because that's the default text editor I have it configured for, I could use any text editor I want. I could have added my commit message in line if I wanted with a command line switch too, but I left it off so it prompted me for a message.
Title: Re: Anybody use an application to store/organise their code snippets?
Post by: Glenn R on September 02, 2008, 03:57:17 PM
If you had bothered to keep your posts in-line and consistent, then maybe that message would have come across, but as you didn't, it doesn't. Why go from expostulating the virtues of a 'visual' equivalent of tortoiseSVN, then drop to posting something about command-line syntax and using NotePad...
Title: Re: Anybody use an application to store/organise their code snippets?
Post by: JohnK on September 02, 2008, 04:03:38 PM
I for one will start assembling my code lib (read: clean, and commenting) for addition to a member accessible SVN repro. Anyone else interested in joining me? I already have quite a bit of code myself, if i get one more person i practically double my code lib so im excited.
Title: Re: Anybody use an application to store/organise their code snippets?
Post by: Glenn R on September 02, 2008, 04:14:16 PM
I for one will start assembling my code lib (read: clean, and commenting) for addition to a member accessible SVN repro. Anyone else interested in joining me? I already have quite a bit of code myself, if i get one more person i practically double my code lib so im excited.

7,

WRT this thread and source code versioning, are we talking Lisp, VBA, C++, C# or some other code? I just can't picture yet, how this would work with differing languages involved.

Also, this reminds me a recent thread started by Duh (I think)and creating a community project...would this be a good idea for a backend to get these sorts of things off the ground so to speak?

Ah...here (http://www.theswamp.org/index.php?topic=24074.0) it is...
Title: Re: Anybody use an application to store/organise their code snippets?
Post by: JohnK on September 02, 2008, 04:33:18 PM
I for one will start assembling my code lib (read: clean, and commenting) for addition to a member accessible SVN repro. Anyone else interested in joining me? I already have quite a bit of code myself, if i get one more person i practically double my code lib so im excited.

7,

WRT this thread and source code versioning, are we talking Lisp, VBA, C++, C# or some other code? I just can't picture yet, how this would work with differing languages involved.

Also, this reminds me a recent thread started by Duh (I think)and creating a community project...would this be a good idea for a backend to get these sorts of things off the ground so to speak?

Ah...here (http://www.theswamp.org/index.php?topic=24074.0) it is...

> ... are we talking Lisp, VBA, C++, C# or some other code?
Sure. Yes. All of the above. We can add in whatever (DWGs, code, umbrellas etc).

> I just can't picture yet, how this would work with differing languages involved.
I was thinking either sub directories like:
 ..svn/pub/
lisp
C++
C#
VBA
VB
PY

Or all together separate repo's.

What do you think? -e.g. Dowloading one repository could be cumbersome at first but easier in the long run.

> Also, this reminds me a recent thread started by Duh (I think)and creating a community project...
Let me read, but sounds like it. (I'll get right back to ya on that).
EDIT:
See here: http://www.theswamp.org/index.php?topic=24740.msg298340#msg298340
Title: Re: Anybody use an application to store/organise their code snippets?
Post by: tjr on September 02, 2008, 04:34:58 PM
If you had bothered to keep your posts in-line and consistent, then maybe that message would have come across, but as you didn't, it doesn't. Why go from expostulating the virtues of a 'visual' equivalent of tortoiseSVN, then drop to posting something about command-line syntax and using NotePad...
I feel my posts were consistent. If you couldn't follow them then I'm sorry. I clearly stated that Mercurial is a better alternative for a usb code repository than SVN. At the end of that post I threw in a link to the TortoiseHG client which is a windows explorer extension. I then threw out a quick example to show how easy it is to create a repository on a USB disk using the hg command, and yes I used the command line. I don't even have the Tortoise client installed nor do I have a good way of showing how one would create a repository with that other than like 10 screenshots. I don't have the desire to install the GUI frontend, create a bunch of screenshots and post them here.

Regardless, it's quite clear now. I would recommend checking it out as an alternative to a local subversion repository.
Title: Re: Anybody use an application to store/organise their code snippets?
Post by: tjr on September 02, 2008, 04:42:35 PM
You guys are making this way harder than it is. As I mentioned before use a distributed version control system like mercurial, not a centralized one like SVN.
Not sure I understand the difference Tim.

The same but different?
Code: [Select]
#svn add random_ints.py
A         random_ints.py

#svn ci -m"added random_ints.py"
Sending        random_gener.py
Adding         random_ints.py
Transmitting file data ..
Committed revision 188.

#svn info
Path: .
URL: https://www.theswamp.org/svn/<removed>
Repository Root: https://www.theswamp.org/svn/<removed>
Repository UUID: 75b5c751-32fd-0310-b533-b475f03acb80
Revision: 163
Node Kind: directory
Schedule: normal
Last Changed Author: mark
Last Changed Rev: 160
Last Changed Date: 2007-07-26 15:18:59 -0400 (Thu, 26 Jul 2007)

#svn stat -v
              163      160 mark         .
              163       34 mark         dms2deg.pyc
              163      107 mark         daily.txt
              163      107 mark         dailybackup.pyc
              163       62 mark         dmsCalc.pyc
              163      124 mark         kcp2dxf
              187      187 mark         ls.py
              163       25 mark         buildtree.py
              163      137 mark         hilow.py
              163       25 mark         new.db
              163      107 mark         dailybackup.py
              163       35 mark         dirRenamer.py
              163      159 mark         date_input.py
              163       93 mark         wipeout.py
Mark:

If you look towards the beginning of the commands I entered you will see I entered "hg init", which create a repository right then and there. And that is where my repository lives. No need for a central server somewhere, although you can have one if you want one.

For more info than my feeble mind can provide check out: http://en.wikipedia.org/wiki/Distributed_revision_control
Title: Re: Anybody use an application to store/organise their code snippets?
Post by: JohnK on September 02, 2008, 04:53:00 PM
...
Also, this reminds me a recent thread started by Duh (I think)and creating a community project...would this be a good idea for a backend to get these sorts of things off the ground so to speak?

Ah...here (http://www.theswamp.org/index.php?topic=24074.0) it is...

That proj Duh started should (maybe?) get its own project repistory --Like source forge-? We could really use some input on that though. Maybe if we can get a brain storming session with you, Chuck, CB, Mick, and a bunch of other smart people we can hash up some standard directories, files, etc.

Ultimatly, I was thinking something alog the lines of what Kerry wanted to start --Like a standard library of sorts for all the code we wanted/needed-?

[ http://www.theswamp.org/index.php?topic=24700.0 ]


But code from projects just like that could be added to a central swamp of code.

Title: Re: Anybody use an application to store/organise their code snippets?
Post by: Glenn R on September 03, 2008, 10:21:42 AM
If you had bothered to keep your posts in-line and consistent, then maybe that message would have come across, but as you didn't, it doesn't. Why go from expostulating the virtues of a 'visual' equivalent of tortoiseSVN, then drop to posting something about command-line syntax and using NotePad...
I feel my posts were consistent. If you couldn't follow them then I'm sorry. I clearly stated that Mercurial is a better alternative for a usb code repository than SVN. At the end of that post I threw in a link to the TortoiseHG client which is a windows explorer extension. I then threw out a quick example to show how easy it is to create a repository on a USB disk using the hg command, and yes I used the command line. I don't even have the Tortoise client installed nor do I have a good way of showing how one would create a repository with that other than like 10 screenshots. I don't have the desire to install the GUI frontend, create a bunch of screenshots and post them here.

Regardless, it's quite clear now. I would recommend checking it out as an alternative to a local subversion repository.


Thanks Tim. It was probably my bad for the misread as it was late. I am checking out TortoiseSVN first, seeing as this is my first foray into the land of SCM's.

I have set one up on a drive on my work box, made initial folders, imported some existing projects, checked out some projects, made changes and committed back to the repository.

I will move this to a USB stick and see how that goes for a week or 2 and see what happens. One thing I just thought of is, what happens if you have AutoCAD VBA .DVB files, check out, modify, then try to commit back...is it able to give a diff between the 2 versions of will it just use a binary comparison...??????
Title: Re: Anybody use an application to store/organise their code snippets?
Post by: tjr on September 03, 2008, 10:35:30 AM
If you had bothered to keep your posts in-line and consistent, then maybe that message would have come across, but as you didn't, it doesn't. Why go from expostulating the virtues of a 'visual' equivalent of tortoiseSVN, then drop to posting something about command-line syntax and using NotePad...
I feel my posts were consistent. If you couldn't follow them then I'm sorry. I clearly stated that Mercurial is a better alternative for a usb code repository than SVN. At the end of that post I threw in a link to the TortoiseHG client which is a windows explorer extension. I then threw out a quick example to show how easy it is to create a repository on a USB disk using the hg command, and yes I used the command line. I don't even have the Tortoise client installed nor do I have a good way of showing how one would create a repository with that other than like 10 screenshots. I don't have the desire to install the GUI frontend, create a bunch of screenshots and post them here.

Regardless, it's quite clear now. I would recommend checking it out as an alternative to a local subversion repository.


Thanks Tim. It was probably my bad for the misread as it was late. I am checking out TortoiseSVN first, seeing as this is my first foray into the land of SCM's.

I have set one up on a drive on my work box, made initial folders, imported some existing projects, checked out some projects, made changes and committed back to the repository.

I will move this to a USB stick and see how that goes for a week or 2 and see what happens. One thing I just thought of is, what happens if you have AutoCAD VBA .DVB files, check out, modify, then try to commit back...is it able to give a diff between the 2 versions of will it just use a binary comparison...??????

Did you set up HG or SVN? EDIT: Never mind. I can't read.

Also binary files can't be diffed like text files. You are kind of SOL with DVB files :(
Title: Re: Anybody use an application to store/organise their code snippets?
Post by: Glenn R on September 03, 2008, 10:38:02 AM
TortoiseSVN. I suspected the DVB files couldn't be diff'ed like text files...oh well. Would have been nice.
I'll keep playing...more later.
Title: Re: Anybody use an application to store/organise their code snippets?
Post by: Chuck Gabriel on September 03, 2008, 11:24:23 AM
...oh well. Would have been nice.
I'll keep playing...more later.

I export all the components of my DVB files into individual source files so that I can diff them.
Title: Re: Anybody use an application to store/organise their code snippets?
Post by: Glenn R on September 03, 2008, 11:32:07 AM
Hmmm...that seems like a lot of hassle Chuck, but it was the thought I had too if I want to start sticking VBA in my repository...might just stick to good old text files (lisp, C++, C#).

How's your USB repository going?
Title: Re: Anybody use an application to store/organise their code snippets?
Post by: David Hall on September 03, 2008, 11:57:12 AM
I have a bunch of collected snippets to contribute if we set up a repository.  Some of them are from you guys, stuff you have helped me with over the years, so it would look familiar.  Other stuff is just what I have collected and meant to get back to and never did.

As for the community project I was starting, I have been so busy at work lately, I barely have time to check in here, let alone program.  I still intend to work on that tough, should anyone care to help.  Just be forewarned I dont have alot of time to put into it right now.
Title: Re: Anybody use an application to store/organise their code snippets?
Post by: Glenn R on September 03, 2008, 12:03:06 PM
When setting up your repository, would you:

A. Create one repository that contained many projects, or...
B. Create many repositories, each containing a single project (and possibly any referenced projects)?
Title: Re: Anybody use an application to store/organise their code snippets?
Post by: JohnK on September 03, 2008, 12:11:39 PM
When setting up your repository, would you:

A. Create one repository that contained many projects, or...
B. Create many repositories, each containing a single project (and possibly any referenced projects)?
b
Title: Re: Anybody use an application to store/organise their code snippets?
Post by: Glenn R on September 03, 2008, 12:13:54 PM
7,

Y?

Also, did you get my PM late last night...can't remember if I sent it or not.....:D
Title: Re: Anybody use an application to store/organise their code snippets?
Post by: Chuck Gabriel on September 03, 2008, 12:17:47 PM
Hmmm...that seems like a lot of hassle Chuck, but it was the thought I had too if I want to start sticking VBA in my repository...might just stick to good old text files (lisp, C++, C#).

I wrote a program to automate the process way back.  I started doing it, as a little insurance, after hearing about DVB files becoming corrupted, but it has the side benefit of making source code easy to compare.  I'd be happy to give you the code, but you have to promise not to laugh.

Quote
How's your USB repository going?

I've been using it for about a year now, and I'm quite happy with it.

Quote
When setting up your repository, would you:

A. Create one repository that contained many projects, or...
B. Create many repositories, each containing a single project (and possibly any referenced projects)?

I set up several repositories, one for each programming language I use, but that's just because I didn't want to let indecision about how to organize things to keep me from moving forward.  There are plenty of perfectly valid ways to partition things.  For instance, a large project with multiple constituent parts should probably have its own repository, even if different parts are written if different languages.
Title: Re: Anybody use an application to store/organise their code snippets?
Post by: Mark on September 03, 2008, 12:20:53 PM
When setting up your repository, would you:

A. Create one repository that contained many projects, or...
B. Create many repositories, each containing a single project (and possibly any referenced projects)?

Both! :-)

Most of the stuff I have is just me trying to program so I keep it all in one directory. If I start a _real_ project I like to have it in it's own directory, that way I can keep track of it. Plus it get's it own revision numbering.
Title: Re: Anybody use an application to store/organise their code snippets?
Post by: JohnK on September 03, 2008, 12:49:39 PM
7,

Y?

Also, did you get my PM late last night...can't remember if I sent it or not.....:D

yep i got it just havent had time to respond or look into what you said; got home, kicked the wife, hugged the dog, diner, tasks for my grandma, gym, sleep, work. *lol*

for projects i would use a new ...*blink* wait a min. you said `repository'?! Oh in that case i change my answer to `A'. I thought you meant/said folder or directory. Sorry 'bout that.

One repository with many projects.
../repo/proj1
../repo/proj2
../repo/proj3

That way you can backup or archive your entire repository and not have to worry about missing any projects.
Title: Re: Anybody use an application to store/organise their code snippets?
Post by: JohnK on September 03, 2008, 12:56:18 PM
<snip>

I set up several repositories, one for each programming language I use, but that's just because I didn't want to let indecision about how to organize things to keep me from moving forward.  There are plenty of perfectly valid ways to partition things.  For instance, a large project with multiple constituent parts should probably have its own repository, even if different parts are written if different languages.


*thinking out loud*
o  Does the language in the different projects really matter?
o  For that matter, does the types of files (being able to diff them aside) really matter?
o  Can having all your chicks in one basket (so to speak) be a bad idea (corruption/loss)?
o  Can having mulitiple versions of mulitiple repositories be a bad thing (USB version older
    then both work and home, but home is older then work version...)?
Title: Re: Anybody use an application to store/organise their code snippets?
Post by: Spike Wilbury on September 03, 2008, 01:13:27 PM
I use the one available from the objectarx wiz, and find from files at specific folders from visual studio, all my code is in a simple folder directory

Programming
C++
ARX
C#

From the most languages I work lately

AutoLisp it is in another of my drives, and if I need to find or use something, I use the vlide and find.

I know, I only do code at home, do not carry out nothing....
Title: Re: Anybody use an application to store/organise their code snippets?
Post by: Chuck Gabriel on September 03, 2008, 01:15:23 PM
o  Does the language in the different projects really matter?

Not really.  Like I said, it was just a decision I made to keep moving forward.  I couldn't really make up my mind what would be *best* so I did  something that would be good enough.

Quote
o  For that matter, does the types of files (being able to diff them aside) really matter?

Absolutely.  I have a terrible memory, and it is very useful to me to be able to *see* what I changed in the last revision, and what it looked like before.  You know, so I can figure out why the old version worked, and the new one doesn't.  Strike that.  I misunderstood your question.  See answer above.

Quote
o  Can having all your chicks in one basket (so to speak) be a bad idea (corruption/loss)?

Perhaps.  I do back up my repositories regularly, and *all* my chicks aren't in a single basket.  All my C++ chicks are in one basket, and so on.  Still, I would be very upset if any one of my repositories got corrupted, especially if all my backups got overwritten with the corrupt repo.

Quote
o  Can having mulitiple versions of mulitiple repositories be a bad thing (USB version older
    then both work and home, but home is older then work version...)?

I'm not sure what you mean here.  Are you talking about multiple working copies or maybe multiple backups of the repositories?
Title: Re: Anybody use an application to store/organise their code snippets?
Post by: Glenn R on September 03, 2008, 05:10:02 PM
After searching the net and amazon for good, fast and relatively inexpensive USB flash drives (which I've given up on unless somebody can recommend a good one), I suddenly had a thought.

I regularly use either the windows index or google desktop search to find a particular word or phrase in a code file (ie Layout, DBDictionary, EntityJig etc.)...do you have the ability to search one repository or multiple repositories...?????
Title: Re: Anybody use an application to store/organise their code snippets?
Post by: tjr on September 03, 2008, 05:16:08 PM
After searching the net and amazon for good, fast and relatively inexpensive USB flash drives (which I've given up on unless somebody can recommend a good one), I suddenly had a thought.

I regularly use either the windows index or google desktop search to find a particular word or phrase in a code file (ie Layout, DBDictionary, EntityJig etc.)...do you have the ability to search one repository or multiple repositories...?????
You should still be able to use windows index or google desktop to search your code. Unless you're talking about old revisions, which isn't likely.
Title: Re: Anybody use an application to store/organise their code snippets?
Post by: JohnK on September 03, 2008, 05:21:39 PM
After searching the net and amazon for good, fast and relatively inexpensive USB flash drives (which I've given up on unless somebody can recommend a good one), I suddenly had a thought.

I regularly use either the windows index or google desktop search to find a particular word or phrase in a code file (ie Layout, DBDictionary, EntityJig etc.)...do you have the ability to search one repository or multiple repositories...?????

http://tools.tortoisesvn.net/grepWin
Title: Re: Anybody use an application to store/organise their code snippets?
Post by: Spike Wilbury on September 03, 2008, 05:24:23 PM
After searching the net and amazon for good, fast and relatively inexpensive USB flash drives (which I've given up on unless somebody can recommend a good one), I suddenly had a thought.

I regularly use either the windows index or google desktop search to find a particular word or phrase in a code file (ie Layout, DBDictionary, EntityJig etc.)...do you have the ability to search one repository or multiple repositories...?????


Have you seen/used this?

http://www.zero-one-zero.com/vs/
Title: Re: Anybody use an application to store/organise their code snippets?
Post by: Spike Wilbury on September 03, 2008, 05:27:50 PM
After searching the net and amazon for good, fast and relatively inexpensive USB flash drives (which I've given up on unless somebody can recommend a good one), I suddenly had a thought.

I regularly use either the windows index or google desktop search to find a particular word or phrase in a code file (ie Layout, DBDictionary, EntityJig etc.)...do you have the ability to search one repository or multiple repositories...?????


Have you seen/used this?

http://www.zero-one-zero.com/vs/

and this:

http://www.usysware.com/dpack/Default.aspx
Title: Re: Anybody use an application to store/organise their code snippets?
Post by: JohnK on September 03, 2008, 05:28:00 PM
o  Does the language in the different projects really matter?

Not really.  Like I said, it was just a decision I made to keep moving forward.  I couldn't really make up my mind what would be *best* so I did  something that would be good enough.

Quote
o  For that matter, does the types of files (being able to diff them aside) really matter?

Absolutely.  I have a terrible memory, and it is very useful to me to be able to *see* what I changed in the last revision, and what it looked like before.  You know, so I can figure out why the old version worked, and the new one doesn't.  Strike that.  I misunderstood your question.  See answer above.

Quote
o  Can having all your chicks in one basket (so to speak) be a bad idea (corruption/loss)?

Perhaps.  I do back up my repositories regularly, and *all* my chicks aren't in a single basket.  All my C++ chicks are in one basket, and so on.  Still, I would be very upset if any one of my repositories got corrupted, especially if all my backups got overwritten with the corrupt repo.

Quote
o  Can having multiple versions of multiple repositories be a bad thing (USB version older
    then both work and home, but home is older then work version...)?

I'm not sure what you mean here.  Are you talking about multiple working copies or maybe multiple backups of the repositories?

Im gonna put my thinking cap on durring the drive home and keep on this topic (best overall solution/method/process/etc.)

> chicks in a basket
So do you just remember what project was written in what language. -i.e. You just remember that F00 was written in C++ and F00BAR was written in C#

> multiple versions of multiple repositories
Multiple repositories in multiple locations.
Title: Re: Anybody use an application to store/organise their code snippets?
Post by: Glenn R on September 03, 2008, 05:30:39 PM
That's the ideas/thoughts I'm having at the moment 7....
Title: Re: Anybody use an application to store/organise their code snippets?
Post by: Glenn R on September 03, 2008, 05:33:12 PM
After searching the net and amazon for good, fast and relatively inexpensive USB flash drives (which I've given up on unless somebody can recommend a good one), I suddenly had a thought.

I regularly use either the windows index or google desktop search to find a particular word or phrase in a code file (ie Layout, DBDictionary, EntityJig etc.)...do you have the ability to search one repository or multiple repositories...?????
You should still be able to use windows index or google desktop to search your code. Unless you're talking about old revisions, which isn't likely.

Tim, that might work, however, looking at the repository in windows explorer, I couldn't find any file with any name I recognise in the repository, which is what I expected as it's using FSFS to store the data in the repos in it's own format, which is the kicker - will the search/indexers be able to recurse into the repos and find what you're looking for...?
Title: Re: Anybody use an application to store/organise their code snippets?
Post by: Chuck Gabriel on September 03, 2008, 07:10:44 PM
> chicks in a basket
So do you just remember what project was written in what language. -i.e. You just remember that F00 was written in C++ and F00BAR was written in C#

There are a few minor and rarely-used projects that I can't even remember the name of (much less what language I wrote them in), but I'm still able to remember where to find most of what I've written.

Quote
> multiple versions of multiple repositories
Multiple repositories in multiple locations.

I only work from the repositories on my usb drive, so getting out of sync isn't an issue for me.  All other copies are just backups in case something catastrophic happens.
Title: Re: Anybody use an application to store/organise their code snippets?
Post by: Mark on September 03, 2008, 10:24:20 PM
After searching the net and amazon for good, fast and relatively inexpensive USB flash drives (which I've given up on unless somebody can recommend a good one), I suddenly had a thought.

I regularly use either the windows index or google desktop search to find a particular word or phrase in a code file (ie Layout, DBDictionary, EntityJig etc.)...do you have the ability to search one repository or multiple repositories...?????
You should still be able to use windows index or google desktop to search your code. Unless you're talking about old revisions, which isn't likely.

Tim, that might work, however, looking at the repository in windows explorer, I couldn't find any file with any name I recognise in the repository, which is what I expected as it's using FSFS to store the data in the repos in it's own format, which is the kicker - will the search/indexers be able to recurse into the repos and find what you're looking for...?

But the repos isn't really meant to be searched, is it? On my netbsd server the data is stored in BerkleyBD and not so readable.
Title: Re: Anybody use an application to store/organise their code snippets?
Post by: Glenn R on September 04, 2008, 04:24:48 AM
BDB....Thought they dropped that - only supporting for legacy. As far as I'm aware, the default is FSFS isn't it?

If you can't search into a repository, then that's a serious downside...maybe the previous tool posted by 7 is the answer - grepWin....
Title: Re: Anybody use an application to store/organise their code snippets?
Post by: tjr on September 04, 2008, 07:49:40 AM
BDB....Thought they dropped that - only supporting for legacy. As far as I'm aware, the default is FSFS isn't it?

If you can't search into a repository, then that's a serious downside...maybe the previous tool posted by 7 is the answer - grepWin....
Wait, SVN repositories are stored on a special filesystem?  :ugly:
Title: Re: Anybody use an application to store/organise their code snippets?
Post by: Chuck Gabriel on September 04, 2008, 08:23:27 AM
Wait, SVN repositories are stored on a special filesystem?  :ugly:

Not exactly.  They're stored in a database.

Hmm.  I guess technically FSFS isn't a database. (http://svnbook.red-bean.com/en/1.4/svn.reposadmin.planning.html#svn.reposadmin.basics.backends.tbl-1)

Title: Re: Anybody use an application to store/organise their code snippets?
Post by: tjr on September 04, 2008, 09:58:38 AM
Wait, SVN repositories are stored on a special filesystem?  :ugly:

Not exactly.  They're stored in a database.

Hmm.  I guess technically FSFS isn't a database. (http://svnbook.red-bean.com/en/1.4/svn.reposadmin.planning.html#svn.reposadmin.basics.backends.tbl-1)
I can understand putting older deltas into a database or special system but the current revision shouldn't be. Yet another reason people should check out mercurial.
Title: Re: Anybody use an application to store/organise their code snippets?
Post by: Chuck Gabriel on September 04, 2008, 10:11:24 AM
I can understand putting older deltas into a database or special system but the current revision shouldn't be. Yet another reason people should check out mercurial.

The current version is your working copy, which is stored in the raw, just like any other text file in the file system.

You seem to be pretty gung-ho for mercurial, or is it just distributed version control in general?  Have you played with git yet?
Title: Re: Anybody use an application to store/organise their code snippets?
Post by: Glenn R on September 04, 2008, 10:35:08 AM
Tim's probably pretty gunh-ho for Mercurial because it's written in python if I remember correctly after looking at the wiki.

FSFS stands for Fast Secure File System and I think is a journalling type system.........
Title: Re: Anybody use an application to store/organise their code snippets?
Post by: tjr on September 04, 2008, 12:15:35 PM
I chose mercurial because it plays nice with win32 while git's support for win32 isn't there yet, well it wasn't the last time I checked. I am for mercurial because of the distributed version control system aspect of it, not something silly like being written in python. I have tried git, hg and bzr but settled on hg due to the aforementioned win32 support.
Title: Re: Anybody use an application to store/organise their code snippets?
Post by: tjr on September 04, 2008, 12:18:41 PM
I can understand putting older deltas into a database or special system but the current revision shouldn't be. Yet another reason people should check out mercurial.
The current version is your working copy, which is stored in the raw, just like any other text file in the file system.
So it's stored in raw format in what file system? The native OS file system or FSFS? If it's stored on FSFS and can't be read by native OS processes then it's a pretty lousy setup.
Title: Re: Anybody use an application to store/organise their code snippets?
Post by: Chuck Gabriel on September 04, 2008, 12:19:56 PM
So it's stored in raw format in what file system? The native OS file system or FSFS? If it's stored on FSFS and can't be read by native OS processes then that's pretty dumb.

Your working copy is stored in the native OS file system.  I should have made that clearer.
Title: Re: Anybody use an application to store/organise their code snippets?
Post by: Glenn R on September 04, 2008, 12:54:18 PM
Tim, what do you mean by 'win32' support?
Title: Re: Anybody use an application to store/organise their code snippets?
Post by: tjr on September 04, 2008, 01:11:48 PM
Tim, what do you mean by 'win32' support?
Meaning it runs on windows. Git is a collection of tools which were designed to run on *nix systems. They had to be ported to windows using mingw or cygwin I believe. HG is pure python with some small C code for speed which runs fine on windows.
Title: Re: Anybody use an application to store/organise their code snippets?
Post by: Glenn R on September 04, 2008, 01:47:31 PM
HG is pure python with some small C code for speed which runs fine on windows.

Tim,

If I understand what you're saying, being Python, it needs the Python interpreter installed to understand the Python parts, and delegates the heavy lifting parts to C libraries...is that correct?
Title: Re: Anybody use an application to store/organise their code snippets?
Post by: tjr on September 04, 2008, 01:58:43 PM
HG is pure python with some small C code for speed which runs fine on windows.

Tim,

If I understand what you're saying, being Python, it needs the Python interpreter installed to understand the Python parts, and delegates the heavy lifting parts to C libraries...is that correct?
No. It's compiled to native binaries so you don't need the python interpreter installed.
Title: Re: Anybody use an application to store/organise their code snippets?
Post by: Glenn R on September 04, 2008, 02:01:02 PM
Thanks for clarifying Tim.
Title: Re: Anybody use an application to store/organise their code snippets?
Post by: Glenn R on September 05, 2008, 06:30:50 AM
A short, interesting article on TortoiseSVN and Visual Studio.
Linkage (http://www.west-wind.com/presentations/subversion/).
Title: Re: Anybody use an application to store/organise their code snippets?
Post by: Glenn R on September 05, 2008, 06:33:18 AM
Free subversion add-in for Visual Studio - ankhsvn. Linkage (http://ankhsvn.open.collab.net/)

Heard of it a few years ago and it's certainly changed alot since then... <wanders off to read more and download it>
Title: Re: Anybody use an application to store/organise their code snippets?
Post by: Glenn R on September 05, 2008, 08:01:48 AM
Been playing with it and I likey :)

Docs are located here - Linkage (http://help.collab.net/).
Title: Re: Anybody use an application to store/organise their code snippets?
Post by: It's Alive! on September 05, 2008, 09:26:43 AM
Are you storing projects,  individual files , code snippets or D?
Title: Re: Anybody use an application to store/organise their code snippets?
Post by: Glenn R on September 05, 2008, 09:34:32 AM
D?

Projects. Basically I am planning on taking all my projects and importing them to the repos - didn't realise how many I actually had...damn...

At this point in time, I've installed tortoisesvn and created a repos to which I've added a half dozen or so projects to test and play about with. This has been working fine for the last day or 2 with the tortoise.

I now have additionally installed AnkhSVN for Visual Studio 2008 and was able to 'check out' to a working folder the projects I had imported using the tortoise.

I will keep playing...
Title: Re: Anybody use an application to store/organise their code snippets?
Post by: It's Alive! on September 05, 2008, 11:25:42 AM
D?
D = all of the above   :laugh:
I’ll need to tryout this AnkhSVN
Title: Re: Anybody use an application to store/organise their code snippets?
Post by: Glenn R on September 05, 2008, 11:29:59 AM
D...should've guessed.

I'm liking it...I'm liking it a lot.
Title: Re: Anybody use an application to store/organise their code snippets?
Post by: tjr on September 05, 2008, 07:39:10 PM
For reference:

http://svnbook.red-bean.com/

and *cough*aMercurialBook*cough*
http://hgbook.red-bean.com/

Also: HG has an add-in for visual studio 2008
http://sharesource.org/project/visualhg/
Title: Re: Anybody use an application to store/organise their code snippets?
Post by: Glenn R on September 06, 2008, 04:39:37 AM
Think I will be sticking with TortoiseSVN and Ankh, especially as Microsoft is helping Ankh along a bit, to create a tighly integrated SCC for Visual Studio.
Title: Re: Anybody use an application to store/organise their code snippets?
Post by: Glenn R on September 06, 2008, 07:00:19 AM
I am reading that book link now though, for a better understanding of the 'distributed' model.
Title: Re: Anybody use an application to store/organise their code snippets?
Post by: Glenn R on September 06, 2008, 07:33:36 AM
Just hit the page in the Mercurial book where it started talking linux command line, so I've given up reading :)
Title: Re: Anybody use an application to store/organise their code snippets?
Post by: tjr on September 06, 2008, 02:13:22 PM
I have yet to understand why so many people are turned off by the command line. GUI tools are nice sometimes but the command line is so much more powerful. I like knowing I can commit to my source control software without my hands leaving the keyboard. It's even easier when I use vim :!hg commit -m "whatever"
Title: Re: Anybody use an application to store/organise their code snippets?
Post by: Glenn R on September 06, 2008, 02:26:03 PM
I'm a big fan of the command line and can mix it up with the best on the OS shell. However, having said that, I've never understood why so many people, on Windows, would even choose to use the command line.

If you're into linux and whatever, good for you. I however, am not. I prefer the GUI interface hands down as do most.
Title: Re: Anybody use an application to store/organise their code snippets?
Post by: Glenn R on September 06, 2008, 02:35:50 PM
Seriously, I, like most, have enough to keep up with and learn, without having to learn another arcane command line syntax. If I can right-click in a GUI and have that done for me, all the better in my opinion.
Title: Re: Anybody use an application to store/organise their code snippets?
Post by: tjr on September 06, 2008, 02:51:57 PM
I'm most productive when I have both hands on the keyboard, regardless of operating system. I know exactly what I want to do and where I want to be so why hunt around through menus with a mouse when I can type it a heck of a lot faster, especially using tab completion. Couple that with the added ability to pipe command line tool output to files and you have a win in my book.

To each his own though. I guess it's kind of like people with AutoCAD. Some enter 95% of their commands via the command console and do everything via menus.
Title: Re: Anybody use an application to store/organise their code snippets?
Post by: Glenn R on September 06, 2008, 03:08:29 PM
For the record, I'm an AutoCAD command line junkie from way back - still the fastest way to drive it.
Title: Re: Anybody use an application to store/organise their code snippets?
Post by: tjr on September 06, 2008, 03:13:38 PM
Seriously, I, like most, have enough to keep up with and learn, without having to learn another arcane command line syntax. If I can right-click in a GUI and have that done for me, all the better in my opinion.
I hope you're not taking any of this as an attempt by me to bust your balls as that isn't the case. I'm just trying to get an understanding as to why people are turned off by the command line. The reason you gave above is a good one and I can certainly accept that reasoning.

I just know, for me, that the command line is far more productive as already know what I want to do so to type it is faster then hunting around for "commit" in a menu. Like you, and most, I have a lot to keep up with and learn and to be honest with you I have a terrible memory. I always rely on the verbiage provided by entering the command with no arguments to guide me along. (See attached screenshot).

Title: Re: Anybody use an application to store/organise their code snippets?
Post by: Glenn R on September 06, 2008, 03:50:46 PM
I hope you're not taking any of this as an attempt by me to bust your balls as that isn't the case.

Relax mate - not at all...I'm Australian, so that probably helps, to some degree ;)...it's all water off a black duck's back.

Seriously though, we've had our differnces in the past and will continue to do so in the future I'm sure - but that's what these forums are for at the end of day, in my opinion. BTW, I'm with you on the terrible memory bit...'know I've done that before, but where did I stuff it'...

Which, to me, is the crux of this thread. I've 'been aware' of version control systems for quite a few years, however, until recently, I haven't reached that 'critical mass', which makes you take a serious look at the systems/offerings. Having said that, I have looked at these in the past, but they seemed 'too difficult', especially for a lone developer like myself, to set up and get comfortable with.

With the passage of time though, we're now starting to see some REALLY good tools in this space and for me, this thread is very timely (I missed Mark's thread in '05).
Title: Re: Anybody use an application to store/organise their code snippets?
Post by: Glenn R on September 06, 2008, 03:54:19 PM
I backed up all my code and related data today...2GB dating back to the mid 90's...yikes! And it was all over the place...used a few DVD's today ;)

I am now 'rationalising'...which means being ruthless and deleting with extreme prejudice...hopefully I will end up with a useable directory structure...
Title: Re: Anybody use an application to store/organise their code snippets?
Post by: tjr on September 06, 2008, 04:08:55 PM
Your mention of the tools being 'too difficult' for a lone developer is the exact reason I suggested mercurial. With SVN you are essentially setting up a faux server on your USB stick (or where ever), configuring it for the project, checking it out and working on it from there. With mercurial you just enter a directory of existing code, initiate your repository right there, add your files and BAM your code and version control are all in the same directory, no other server needed. Having the ability to essentially place any directory under version control in place with no external server configuration makes it cheap to do so.

Heck, I've never tried it, but with mercurial you could take each job directory that contains all your binary files (AutoCAD drawings, word documents, excel documents, etc.) and place it under version control as mercurial can certainly do binary files. This would allow you at minimum get a snapshot of states as files were transmitted to customers, etc. Kind of a poor mans document management system.
Title: Re: Anybody use an application to store/organise their code snippets?
Post by: Mark on September 06, 2008, 05:05:24 PM
Your mention of the tools being 'too difficult' for a lone developer is the exact reason I suggested mercurial. With SVN you are essentially setting up a faux server on your USB stick (or where ever), configuring it for the project, checking it out and working on it from there. With mercurial you just enter a directory of existing code, initiate your repository right there, add your files and BAM your code and version control are all in the same directory, no other server needed. Having the ability to essentially place any directory under version control in place with no external server configuration makes it cheap to do so.

I'm sure I'm not reading it right but, you don't work _from_ the repository you simply let it do the version control and store a copy of your code. I still like the centralized server model, for my situation.

That's pretty cool but were is your backup? Mercurial is peer-peer based (that's what I read anyway) which is fine, but for a single developer were is the benefit? Why would it be faster, more productive then Subversion in this case?
Title: Re: Anybody use an application to store/organise their code snippets?
Post by: Mark on September 06, 2008, 05:12:20 PM
I'm a big fan of the command line and can mix it up with the best on the OS shell. However, having said that, I've never understood why so many people, on Windows, would even choose to use the command line.
Granted the Windows shell is lacking but I still use it a lot. Mainly because I can get many of the Unix tools built for win32. For the record I use subversion from the CLI. *grin*
Title: Re: Anybody use an application to store/organise their code snippets?
Post by: Glenn R on September 06, 2008, 05:18:29 PM
Your mention of the tools being 'too difficult' for a lone developer is the exact reason I suggested mercurial.

Sorry, maybe I wasn't clear enough - the previous tools, Mercurial included (with the exception of TortoiseHG, from what I can see of it in my 5 min glance at it), were too command-line intensive and not worth the bother IMO.

With SVN you are essentially setting up a faux server on your USB stick (or where ever), configuring it for the project, checking it out and working on it from there.

No. You 'check out' a working copy to your store of choice (local HDD for instance) and work on the 'copy' from the local store.

...no other server needed.

You don't need a 'server' with SVN...it can be a local 'file system'.
Title: Re: Anybody use an application to store/organise their code snippets?
Post by: Glenn R on September 06, 2008, 05:20:26 PM
For the record I use subversion from the CLI. *grin*

By all means, please continue to wear your fingertips to the bone ;)
Title: Re: Anybody use an application to store/organise their code snippets?
Post by: Glenn R on September 06, 2008, 05:22:20 PM
Having the ability to essentially place any directory under version control in place with no external server configuration makes it cheap to do so.

This is what SVN on a USB stick in this case is.
Title: Re: Anybody use an application to store/organise their code snippets?
Post by: Glenn R on September 07, 2008, 06:19:48 AM
Good article at CodeProject on Version Control and the Tortoise:

Version Control for the Standalone Programmer - Part 1 (http://www.codeproject.com/KB/work/XTortoiseSVN.aspx)
Title: Re: Anybody use an application to store/organise their code snippets?
Post by: tjr on September 07, 2008, 09:21:52 AM
That codeproject article made it quite clear how you are using SVN from the local HD or USB disk, thanks.

I'm assuming people like this method as they have a "master" copy and a "working" copy to use. So if they have a major screw up in their working copy they always have the safety net of the "master" copy. This isn't a bad way to think about it but it's becomes pointless when you use a distributed tool like mercurial or git. With these tools your working copy is your master copy, if you screw something up just revert to an old revision. If you want a backup of your code off of your harddrive just push your repository to it. That's what I do on my server (http://www.riltim.org/hg/).
Title: Re: Anybody use an application to store/organise their code snippets?
Post by: JohnK on September 07, 2008, 09:37:36 AM
Ive been doing some reading, video watching, and stuff on SVN & Git (Centralized and Distributed) and i must say that Git makes a very good pitch. I would like to try it but i think im going with SVN. I'm going with SVN because i know im going to use theswamp and it uses SVN. If i get 'nuff time (yeah, right!? Im going to stop calling it my `TODO' list, im going to start calling it my `item get done in two years' list.) i want to try out a distributed version control.

EDIT: (You guys are talking in the middle of my post *lol*)

tjr, Can you explain that last part? (backup) I dont quite follow.
Title: Re: Anybody use an application to store/organise their code snippets?
Post by: JohnK on September 07, 2008, 09:40:07 AM
tjr, Oh, never mind. I got it. Sorry.
Title: Re: Anybody use an application to store/organise their code snippets?
Post by: JohnK on September 07, 2008, 09:48:25 AM
*thinking out loud*
I guess it all amounts down to if we were to have more then one person involved; if you me and i were sharing code i would say centralized for sure, but maybe if it were just I then maybe distributed would be kinda cool to try.
Title: Re: Anybody use an application to store/organise their code snippets?
Post by: tjr on September 07, 2008, 10:08:59 AM
*thinking out loud*
I guess it all amounts down to if we were to have more then one person involved; if you me and i were sharing code i would say centralized for sure, but maybe if it were just I then maybe distributed would be kinda cool to try.
You can still have a "master" repository of sorts with distributed version control. See the little write up I made the other day: http://www.theswamp.org/index.php?topic=24760.0.
Title: Re: Anybody use an application to store/organise their code snippets?
Post by: JohnK on September 07, 2008, 11:58:07 AM
I'll read it tonight.

Thanx
Title: Re: Anybody use an application to store/organise their code snippets?
Post by: mcarson on September 07, 2008, 04:29:30 PM
sorry guys - this turned out to be some thread! I have been feeling quite unwell over the last few days.
 :-(
Only read a few of the posts; still reading. One of the earlier posts from Glenn "this one's not free" is not exactly true. Let me explain...
I have been using this for years, so back when it started there was no evaluation period. I've found this free version (not a crack) back in my archives; if anyone wants it, let me know. I was so impressed I have bought every upgrade since.
The Visual Studio add-in is brilliant!

Still reading... quite like the idea of my original post (not a plug for the developer, just a great tool)

Title: Re: Anybody use an application to store/organise their code snippets?
Post by: Glenn R on September 08, 2008, 02:47:36 AM
One of the earlier posts from Glenn "this one's not free"

Not I...

I would only use an app like that if it were free. That one is not. (once the evaluation period has ended)
Title: Re: Anybody use an application to store/organise their code snippets?
Post by: mcarson on September 08, 2008, 04:04:41 AM
Sorry Glenn. :oops:
Title: Re: Anybody use an application to store/organise their code snippets?
Post by: Glenn R on September 08, 2008, 09:07:02 AM
No worries mate.
Title: Re: Anybody use an application to store/organise their code snippets?
Post by: Glenn R on September 08, 2008, 09:08:21 AM
Good article on setting up an SVN server:

Hack Attack: How to set up a personal home Subversion server (http://lifehacker.com/software/top/hack-attack-how-to-set-up-a-personal-home-subversion-server-188582.php)
Title: Re: Anybody use an application to store/organise their code snippets?
Post by: Glenn R on September 08, 2008, 09:09:43 AM
...followed by another good article, from the same author, on using TSVN:

Hack Attack: Using Subversion with TortoiseSVN (http://lifehacker.com/software/subversion/hack-attack-using-subversion-with-tortoisesvn-192367.php)
Title: Re: Anybody use an application to store/organise their code snippets?
Post by: Glenn R on September 08, 2008, 09:34:20 AM
*thinking out loud*
o  Does the language in the different projects really matter?

I wouldn't have thought so...

o  For that matter, does the types of files (being able to diff them aside) really matter?

Again, I would think not. I have seen in my searches some Word Doc Diff scripts...

o  Can having all your chicks in one basket (so to speak) be a bad idea (corruption/loss)?

Hmmm...maybe, but with good backups, who knows...

o  Can having mulitiple versions of mulitiple repositories be a bad thing (USB version older
    then both work and home, but home is older then work version...)?

In the USB scenario, this wouldn't happen, as your only repository (or set of repositories), would be on the USB stick, with 'Working Copies' only on the work and home boxes, with these being checked into and out of the USB stick...at least this is how I would do it.
Title: Re: Anybody use an application to store/organise their code snippets?
Post by: Glenn R on September 09, 2008, 06:30:31 AM
A couple of tweaks for TortoiseSVN (http://jopinblog.wordpress.com/2008/06/19/tortoisesvn-tweaking-the-context-menu-global-ignore/) - the global ignore pattern is very handy so unwanted files do not make it into your repository.

Title: Re: Anybody use an application to store/organise their code snippets?
Post by: Glenn R on September 11, 2008, 04:15:40 PM
Oi! Chuck!

I would like to look over that DVB exporterator...send me a PM.

Also, in the year of use with your USB repos, any hangups/disasters? Have you branched and then merged etc? If so, how did it go blah blah...

Cheers,
Glenn.
Title: Re: Anybody use an application to store/organise their code snippets?
Post by: Chuck Gabriel on September 11, 2008, 04:36:13 PM
Haven't had any trouble that I can recall, but then my use has been very simplistic.  For instance, to answer your question, I have not ever branched and then merged.

I'll get that PM to you momentarily.


Hmm.  I must be a little thick.  I couldn't figure out how to add an attachment to a PM.

Anyway here is the dvb.
Title: Re: Anybody use an application to store/organise their code snippets?
Post by: Glenn R on September 11, 2008, 04:41:07 PM
Thanks Chuck.
Title: Re: Anybody use an application to store/organise their code snippets?
Post by: tjr on September 11, 2008, 07:36:50 PM
Oi! Chuck!

I would like to look over that DVB exporterator...send me a PM.

Also, in the year of use with your USB repos, any hangups/disasters? Have you branched and then merged etc? If so, how did it go blah blah...

Cheers,
Glenn.
I've never attempted it but from what I understand branching and merging in subversion is painful, well merging a branch is at least. If you have time peruse these google results (http://www.google.com/search?hl=en&client=firefox-a&rls=com.ubuntu%3Aen-US%3Aunofficial&hs=h9a&q=subversion+merge+sucks&btnG=Search).

For the record branching and merging in HG is painless since every copy is essentially a branch. Just thought I'd throw that in there. :)
Title: Re: Anybody use an application to store/organise their code snippets?
Post by: Glenn R on September 12, 2008, 05:16:35 PM
<Tips the hat to Bob Wahr, as I don his used, but obviously effective fire retardant suit> ;)

I've never attempted it but from what I understand branching and merging in subversion is painful, well merging a branch is at least. If you have time peruse these google results (http://www.google.com/search?hl=en&client=firefox-a&rls=com.ubuntu%3Aen-US%3Aunofficial&hs=h9a&q=subversion+merge+sucks&btnG=Search).

Your Google search keywords show your bias there. From my searching, this was certainly the case in SVN versions prior to 1.5.X (which added merge history), but most of those articles in your Google search are either 2 or more years old, or referring to versions prior to SVN 1.5.X.

For the record branching and merging in HG is painless since every copy is essentially a branch. Just thought I'd throw that in there. :)

I did read this from the link you posted earlier to the Mercurial Docs. It mentioned that EVERYTHING in Mercurial is essentially a 'fork'. It also goes on to say, that Mercurial is VERY good at merging, so this shouldn't be a problem.

I then took a leaf out of your book and punched into Google 'Mercurial merge sucks' and hit some interesting articles. Some comments I found, were saying that as recently as early 2007, Mercurial's 'merge', which it relies upon, was 100% wrong...go figure. I will keep searching for more opinions.

There's probably a very good reason why SourceForge and a little company called Google uses SVN, but I will find that out for myself.

Bring it.  :evil:
Title: Re: Anybody use an application to store/organise their code snippets?
Post by: tjr on September 12, 2008, 10:39:41 PM
Touché. I didn't know that the latest version of subversion had improved merging support in it's latest version. I submit defeat (on the condition that it's actually good (which I won't know until I actually test it)). I don't use subversion for anything anymore other than downloading code and interacting with Google code.

For the record the Google search results link I posted was a poor example, and I apologize, it was done in haste. Those links aren't were I had read that subversion merging sucks. Most likely I had read about it in my visits to reddit's programming section (http://www.reddit.com/r/programming) which is a good daily visit for those just interesting in programming. It's not language specific but it's clear there are some favorites. Either way it's a good daily read to keep up with the cool stuff people are doing. Bah, I'm getting off topic.

I think sourceforge and Google code (not Google, they use perforce) chose svn because at the time it was the most popular thing out there. It seems like a lot of open source projects I'm coming across now are either putting out mercurial or git repositories.

I stick by my guns with the choice of the distributed model and my choice of mercurial. It has all the features of subversion plus some, so it's like a better subversion.

If you're ever bored take a look at Linus Torvalds' tech talk at Google (http://www.youtube.com/watch?v=4XpnKHJAok8). It gives a good background of the benefits of the distributed model. Edit: Not really relevant to a single developer but it's still a good watch.
Title: Re: Anybody use an application to store/organise their code snippets?
Post by: vegbruiser on December 01, 2009, 11:06:37 AM
I would only use an app like that if it were free. That one is not. (once the evaluation period has ended)
Having been pointed back here from this (http://www.theswamp.org/index.php?topic=31106.new#new) post.

Looks like they now have a free version: -

http://fishcodelib.com/

Will it help me? I'm not entirely sure.