IE, spawn of Satan

From: CHYRON (DSMITHHFX)28 Aug 2013 11:02
To: af (CAER) 37 of 58
Depends what you mean by "source control". I do daily code backups and sometimes more frequently for extensive modifications. I also add comments in situ which I find more helpful than sifting through a separate document. For large and complex projects where I'm breaking new ground (to me) I will keep dev notes too, mainly for my own use. The way the business works here is that nobody does formal source control for web sites (that I've ever seen, but who knows what crazy new fad might catch on), these aren't team coding efforts, you can very quickly find all the documentation you want on google, and if you need to work on someone else's code, you just wade in and figure out how to get the job done with the least amount of work, knowing full well nobody in their right mind is ever going to look at the code unless something breaks, and it's all going to be junked (your code, and quite possibly even the markup/scripting languages/versions themselves) in a few short years anyway.
From: Kenny J (WINGNUTKJ)28 Aug 2013 17:02
To: CHYRON (DSMITHHFX) 38 of 58
That's nuts! It's good that you take backups and notes, but these days there are a lot of good ways to do source control with not much overhead.

We use Mercurial in my place, with TortoiseHg as a GUI for it. We used to use Microsoft Team Foundation Server and Visual SourceSafe, but for the way we develop and deploy, those weren't really suitable. I'm a big fan - using it has a low overhead, and you can either use it as a personal thing to track revisions only for your self, or create a repository allowing collaboration between the team.
From: Ken (SHIELDSIT)28 Aug 2013 17:16
To: ALL39 of 58
That's something I need to check into.  I don't do much coding but when I do I have shit scattered everywhere.  What would you recommend for someone like me who only codes a little?  Something very easy to use please!
From: CHYRON (DSMITHHFX)28 Aug 2013 17:23
To: Kenny J (WINGNUTKJ) 40 of 58
I've used version control before in a couple of different shops, and it makes sense where teams are concerned. No benefit to me in my present situation though. I went as far as installing and starting to use git here a few years ago, and then I thought, wtf am I doing this? It's just adding needless complexity, which I generally avoid like the plague unless really, really bored.
From: Kenny J (WINGNUTKJ)28 Aug 2013 17:29
To: Ken (SHIELDSIT) 41 of 58
I'd recommend Git or Mercurial. I've found these links to be useful when explaining the concepts to people:

http://en.wikipedia.org/wiki/Revision_control
http://www.joelonsoftware.com/items/2010/03/17.html
From: Matt28 Aug 2013 18:33
To: CHYRON (DSMITHHFX) 42 of 58
Source control is very useful for sole development. If only as a huge persistent undo buffer. Want to make a breaking change and don't want to backup files? Commit them to source control. What to test something that might not work out? Commit them to source control.

Next you're going to tell us you use notepad to code in.
From: CHYRON (DSMITHHFX)28 Aug 2013 19:30
To: Matt 43 of 58

Quote:
Want to make a breaking change and don't want to backup files?
What to test something that might not work out?

It's hilarious that you depend on a thing called "source control" to perform idiot-simple functions like "undo". 

As it happens, I code with textwrangler/mac, geany/linux, and (rarely) textpad/windows. Textpad is a really nice editor, I wish it was ported to linux.
EDITED: 28 Aug 2013 19:33 by DSMITHHFX
From: Matt28 Aug 2013 19:46
To: CHYRON (DSMITHHFX) 44 of 58
Where did I say I depend on it?

Undo buffer was an over-simplification.

If you have a project that you need to make huge sweeping changes to, do you copy it somewhere so you can undo your changes? If you use source control you don't have to bother doing that, because you would have already submitted code that you can easily revert to. It also means you can freely close files in your editor without loosing the undo buffer.

You can also create branches to test things and merge or delete those branches back into your main/trunk when you've completed them. Branching is in incredibly useful for having multiple working copies of the code, but without the ball-ache of not having duplicates of everything floating around. For example, you might have one tagged as "release" where you can provide quick fixes to otherwise know stable code and many others for continuous (often called "trunk" or "main") development. With version control software like Git and Mercurial you can cherry-pick changes between branches too, so you can keep your "trunk" up to date with fixes from "release".

I used to use Textpad, but gave up after the author abandoned it (7.x is functional no different to 6.x) and never got around to adding auto-complete / function argument hinting. If you don't want to pay for an Editor, Netbeans (IDE) and Notepad++ (Editor) are about the best you can get.
EDITED: 28 Aug 2013 19:52 by MATT
From: Matt28 Aug 2013 19:49
To: Ken (SHIELDSIT) 45 of 58
I heartily recommend Mercurial, but only because it has better tools than Git does. Git and Mercurial are very similar in functionality, but Git lacks good desktop GUI tools, where as TortoiseHG is just about the best source-control client ever.
From: Ken (SHIELDSIT)28 Aug 2013 19:58
To: Matt Kenny J (WINGNUTKJ) 46 of 58
Can you point me to the correct thing I'd need to install it on Windows? And will I need Python?
From: CHYRON (DSMITHHFX)28 Aug 2013 20:01
To: Matt 47 of 58
We used tortoise on one of my prior engagements. It is good.
From: Kenny J (WINGNUTKJ)28 Aug 2013 20:10
To: Ken (SHIELDSIT) 48 of 58
Jeez Ken, let me fucking Duck Duck Go that for you...
http://tortoisehg.bitbucket.org/download/

It installs everything you need, and if I remember correctly it has the version of Python it needs as a dll.

Setting up a repository is as simple as right-clicking a folder and using the relevant entry in the TortoiseHG menu.
From: Matt28 Aug 2013 20:11
To: Ken (SHIELDSIT) 49 of 58
TortoiseHG.

Install it, it adds shell extension to Windows. Create a folder in Windows Explorer where you want to keep your repository and right click in it and choose TortoiseHG > Create Repository Here. It will create a .hg folder and a .hgignore file for you. On Linux these would be hidden, on Windows you should just ignore them, even .hgignore, as you can manage everything with TortoiseHG.

Once you've created the repository, you can open the main TortoiseHG window by selecting the "Hg Workbench" option on the right click menu. From here you can submit, create branches, switch branch, roll back, etc. etc.

If you want to push and pull to a "remote" repository, you can set that up in the repository settings.

By "remote", Mercurial (and Git) essentially mean somewhere else. That somewhere else doesn't have to be another machine it can be another folder on the same machine if you wish. Mercurial and Git are both distributed version control systems, meaning there is no server, so although services like bitbucket and github exist, you shouldn't think of them as servers, but another client that you push to and pull changes from to keep up to date.
From: Kenny J (WINGNUTKJ)28 Aug 2013 20:12
To: Matt 50 of 58
You didn't even swear at him!
From: Ken (SHIELDSIT)28 Aug 2013 20:13
To: Matt 51 of 58
You rock!  That was a great post!  Thanks for the info, I will see what I can do with it!



*Knowing that I am going to come back to that post later from home and try to set this up, would it be useful if beehive had a way to make a post as a favorite and put it in a place for you to easily come back to and find?  You may already have this feature, if so I don't know how to use it and would like to learn how!

EDITED: 28 Aug 2013 20:15 by SHIELDSIT
From: Matt28 Aug 2013 20:13
To: Kenny J (WINGNUTKJ) 52 of 58
I even took a screenshot of the menu, but forgot to attach it. So I'll do that here.
EDITED: 4 Mar 2023 13:35 by MATT
From: Ken (SHIELDSIT)28 Aug 2013 20:15
To: Matt 53 of 58
 (dance)

I edited my reply, can you make sure you read the edit please!

From: CHYRON (DSMITHHFX)28 Aug 2013 20:17
To: Matt 54 of 58
Yeah, you can use source control to do those things. But you don't always need to. I suppose it depends on the scale and complexity of your project, how many people are involved. My projects are structurally simple by design, even if they sometimes have a lot of content. I make instant backups of individual files in the file browser before applying extensive edits, or I just comment out successive revisions right in the file. Maybe the day will come when I need version control here. So far, not.
From: Kenny J (WINGNUTKJ)28 Aug 2013 20:34
To: CHYRON (DSMITHHFX) 55 of 58
It's like you've gone into the chip-shop with your wife, started flirting with her a bit, right in front of the girl from the chip shop, the pulled out a camping stove, some spuds and a pan of oil, and peeled the spuds and cut them up, and heated the oil over the stove, and made chips in the hot oil, and all the while, the girl in the chip shop's wondering why you didn't just ask for some chips.
From: CHYRON (DSMITHHFX)28 Aug 2013 23:05
To: Kenny J (WINGNUTKJ) 56 of 58
It's like you go to the store and buy a bag of crisps. But before you open them, you realize they could spoil. So you stuff them into your bag as a backup, and buy another, identical bag of crisps. But before you open them, you realize they could spoil. So you stuff them into your bag as a backup, and buy another, identical bag of crisps. But before you open them, you realize they could spoil. So you stuff them into your bag as a backup, and buy another, identical bag of crisps. But before you open them, you realize they could spoil. So you stuff them into your bag as a backup, and buy another, identical bag of crisps. But before you open them, you realize they could spoil. So you stuff them into your bag as a backup, and buy another, identical bag of crisps. But before you open them, you realize they could spoil. So you stuff them into your bag as a backup, and buy another, identical bag of crisps. And finally your bag is completely full of crisps, and the ones at the bottom have been crushed. Despondent, you ask the girl behind the counter if you may return the crisps for a refund. She shakes her head 'no', and asks you to take your bag of backup crisps outside to the dumpster, for the same homeless person you gave your crisps to yesterday.