Old 90s websites were a bit... over designed? under designed? they look weird now.

Website and Version control

Creating a website and using version control

Website!

I haven't touched plain old html since the '90s! Back then I didn't use css or html5, and neither did the rest of the world. :) There's lots still I'd like to change, but it's been a fun experiment in hard coding things myself instead of using content management systems that do it all for me. I did use bootstrap, but then I hard coded over some of its beautiful decisions to play with them. So if this website feels weird or awful... I do appologize! It's been fun playing with the nuts and bolts, and next time I'll make some better style choices.

First I did part of the html5/css courses offered at code academy. I found their interface fun and well laid out! I didn't do all of them (I probably should have, given how my site now looks... but oh well!) but it was plenty to get started without blatently guessing what was now going on.

Mercurial!

Verison control, or how to make recovery from wrong turns pretty easy

Our instructor has been pushing our commits to the fab academy archive, and we did the first one together, but to get some more practice I set up a hosted repository and pushed updates to a project there myself from my mac. There are a lot of different ways to use Mercurial, many of them detailed very well on their site with detailed tutorials and use case scenarios.

Setup Mercurial

Download the Mercurial installer appropriate to your OS. Run it and click OK as many times as it asks. This won’t put anything in your application folder, but it’s still installed, don’t worry. You’ll have access to its commands from the command line and all its files are in the Python Libraries folder. All its commands seem to use the letters Hg, a pun on the chemical abbreviation for the element mercury. Har har.

Mercurial has great descriptions of what it is on its site. I also looked at a tutorial more specific to the fab academy archive setup.

Side note: I noticed that my first attempt failed because I have python installed already and Mercurial was looking in the wrong place for its libraries. You probably won’t have this error if you don’t already have a version of python installed messing with its paths. I just moved to my laptop, which didn't have path/version conflicts and it worked fine. Fiddling with paths can get... fiddly, and take a bit of troubleshooting, so I work around it when I can.

Setup an archive

I made and activated an account on pikacode.com which is a free host for git and mercurial repositories.

When you log in you’ll see these three screens to create your own repository. I called mine “hedge.”

Creating a repo on Pikacode
naming the repo Hedge, because... why not :) I've been reading a lot of fairy tales recently.
Success! And it handily gives you instructions on how to make your first push.

Clone, Edit, and Push

Now go back to your terminal window. On your mac you’ll find it in Applications, Utilities, Terminal. See where you are with the pwd command, and move with the cd or cd .. (go up a level) command. Go to the folder you want put your repository clone.

You'll want to clone the online repo. That will bring everthing that is online onto your computer. Next, we're going to want to make a change on our local computer. I put a new file called README in the main folder, which if you'll remember I called hedge. Finally, you'll want to push the changes (or in this case the one new file, so change!) to the online repository.

Google “unix commands” to get descriptions of common commands to help you move around inside a terminal like ls, cd .. , pwd, mkdir, mv, diff, chmod, and more. There are all sorts of shortcuts. A handy one is that if you type in part of the name of a file or folder and press tab it will fill in the rest of the name if there is only one match. If there’s more than one match it will give you a list of the things that match.

You'll want to follow Pikocode's suggestions and type in each line, ending with return. It gives an error, and tells you to edit your config file, which I did. The text editor it pulls up is really weird. Use the "help" instructions, or follow these steps:

At this point, another super helpful unix command you might like to use is the up arrow key. This will type in previously typed commands for you so, in this case, you don’t have to re-type the commit command.

This is what you'll type into the terminal.

Did it work? Check online wherever you put your repository to see if you got the new file pushed online.

Hooray! you have now pushed a commit using Mercurial.

Success, it looks like it was pushed, and the online repo has been updated with the changes I made earlier on my local computer.

Final thoughts: Version control and Github v.s. Mercurial

I really like git hub. So far, I don't like mercurial as much. I've heard git hub tends to be used by individuals and small groups and mercurial by large groups and large businesses, so that may have something to do with it.

I went through the mercurial tutorial on my own, and together as a group we went through our first push as a class to the archive. We had a lot of trouble logging in, or rather setting the credentials correctly so we ended up using an old install that we knew worked. It seems rather more abstruse than necessary in places. But working with a repo I had set up myself worked, with the exception of some conflicting python installs, so maybe it was merely an issue general to working in any group.