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

0 Members and 1 Guest are viewing this topic.

Glenn R

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

tjr

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

Mark

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

Mark

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

Glenn R

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

Glenn R

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

Glenn R

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

Glenn R

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

tjr

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

JohnK

  • Administrator
  • Seagull
  • Posts: 10638
Re: Anybody use an application to store/organise their code snippets?
« Reply #99 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.
TheSwamp.org (serving the CAD community since 2003)
Member location map - Add yourself

Donate to TheSwamp.org

JohnK

  • Administrator
  • Seagull
  • Posts: 10638
Re: Anybody use an application to store/organise their code snippets?
« Reply #100 on: September 07, 2008, 09:40:07 AM »
tjr, Oh, never mind. I got it. Sorry.
TheSwamp.org (serving the CAD community since 2003)
Member location map - Add yourself

Donate to TheSwamp.org

JohnK

  • Administrator
  • Seagull
  • Posts: 10638
Re: Anybody use an application to store/organise their code snippets?
« Reply #101 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.
TheSwamp.org (serving the CAD community since 2003)
Member location map - Add yourself

Donate to TheSwamp.org

tjr

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

JohnK

  • Administrator
  • Seagull
  • Posts: 10638
Re: Anybody use an application to store/organise their code snippets?
« Reply #103 on: September 07, 2008, 11:58:07 AM »
I'll read it tonight.

Thanx
TheSwamp.org (serving the CAD community since 2003)
Member location map - Add yourself

Donate to TheSwamp.org

mcarson

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

« Last Edit: September 07, 2008, 04:39:05 PM by mcarson »