Author Topic: Anybody use an application to store/organise their code snippets?  (Read 18509 times)

0 Members and 1 Guest are viewing this topic.

It's Alive!

  • BricsCAD
  • Needs a day job
  • Posts: 7047
  • AKA Daniel
Re: Anybody use an application to store/organise their code snippets?
« Reply #15 on: September 02, 2008, 09:33:31 AM »
Is something you would do with individual .cs files or with a project?

Glenn R

  • Water Moccasin
  • Posts: 1932
  • What idiot child of married cousins wrote this?!
Re: Anybody use an application to store/organise their code snippets?
« Reply #16 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...
Me

tjr

  • Guest
Re: Anybody use an application to store/organise their code snippets?
« Reply #17 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. 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/

John Kaul (Se7en)

  • Administrator
  • Needs a day job
  • Posts: 9523
Re: Anybody use an application to store/organise their code snippets?
« Reply #18 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).
TheSwamp.org (serving the CAD community since 2003)

Donate to TheSwamp.org

Chuck Gabriel

  • Guest
Re: Anybody use an application to store/organise their code snippets?
« Reply #19 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.

John Kaul (Se7en)

  • Administrator
  • Needs a day job
  • Posts: 9523
Re: Anybody use an application to store/organise their code snippets?
« Reply #20 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?
« Last Edit: September 02, 2008, 02:04:01 PM by Se7en »
TheSwamp.org (serving the CAD community since 2003)

Donate to TheSwamp.org

Glenn R

  • Water Moccasin
  • Posts: 1932
  • What idiot child of married cousins wrote this?!
Re: Anybody use an application to store/organise their code snippets?
« Reply #21 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?
Me

tjr

  • Guest
Re: Anybody use an application to store/organise their code snippets?
« Reply #22 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.

Mark

  • Custom Title
  • Seagull
  • Posts: 28683
Re: Anybody use an application to store/organise their code snippets?
« Reply #23 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

TheSwamp.org  (serving the CAD community since 2003)

Glenn R

  • Water Moccasin
  • Posts: 1932
  • What idiot child of married cousins wrote this?!
Re: Anybody use an application to store/organise their code snippets?
« Reply #24 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?
Me

tjr

  • Guest
Re: Anybody use an application to store/organise their code snippets?
« Reply #25 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.

Glenn R

  • Water Moccasin
  • Posts: 1932
  • What idiot child of married cousins wrote this?!
Re: Anybody use an application to store/organise their code snippets?
« Reply #26 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...
Me

John Kaul (Se7en)

  • Administrator
  • Needs a day job
  • Posts: 9523
Re: Anybody use an application to store/organise their code snippets?
« Reply #27 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.
TheSwamp.org (serving the CAD community since 2003)

Donate to TheSwamp.org

Glenn R

  • Water Moccasin
  • Posts: 1932
  • What idiot child of married cousins wrote this?!
Re: Anybody use an application to store/organise their code snippets?
« Reply #28 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 it is...
Me

John Kaul (Se7en)

  • Administrator
  • Needs a day job
  • Posts: 9523
Re: Anybody use an application to store/organise their code snippets?
« Reply #29 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 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
« Last Edit: September 02, 2008, 04:54:14 PM by Se7en »
TheSwamp.org (serving the CAD community since 2003)

Donate to TheSwamp.org