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

0 Members and 1 Guest are viewing this topic.

tjr

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

tjr

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

John Kaul (Se7en)

  • Administrator
  • Needs a day job
  • Posts: 9521
Re: Anybody use an application to store/organise their code snippets?
« Reply #32 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 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.

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 #33 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...??????
Me

tjr

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

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 #35 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.
Me

Chuck Gabriel

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

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 #37 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?
Me

CmdrDuh

  • Automatic Duh Generator
  • King Gator
  • Posts: 4039
Re: Anybody use an application to store/organise their code snippets?
« Reply #38 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.
Everyone has a photographic memory, Some just don't have film.
They say money can't buy happiness, but it can buy Bacon and that's a close second

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 #39 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)?
Me

John Kaul (Se7en)

  • Administrator
  • Needs a day job
  • Posts: 9521
Re: Anybody use an application to store/organise their code snippets?
« Reply #40 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
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 #41 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
Me

Chuck Gabriel

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

Mark

  • Custom Title
  • Seagull
  • Posts: 28683
Re: Anybody use an application to store/organise their code snippets?
« Reply #43 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.
TheSwamp.org  (serving the CAD community since 2003)

John Kaul (Se7en)

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

Donate to TheSwamp.org