01 Project Management


Assignment


  • Create a website to showcase your work and to say something about yourself.
  • Create a proposal for your final project

Journey

We setup a Ubuntu server to handle our websites for testing. It has been a while since I used HTML and CSS and hence the use of w3schools to assist in the coding.
I decided to look for a template that I could use, that would look simple and cool as I am not a web designer and my color coordination is nuts. Hence, I settled for SimpleStyle_8 done by html5templates.
Looked through the CSS and structure and found that it could be suitable for use with out Javascript.
It's structure is flat and simple.

After creating a few pages, I decided to create a template which I can then use to add files to the system.
Initially, I used Kompozer to edit the page and to get the first pages ready, but later I moved to my favorite text editor Sublime Text, as I only need to add content.
After watching the video from Massimo Menichinelli, I installed Brackets and that seems to be the best html editor to use when you have a big screen.

Mercurial (as a Version Managment System) looks good and easy to use, there is a great tutorial site hginit.com which puts things in graphics, and much easier to understand.
Have started commiting my work each evening before I leave office.

Project Proposal


Look at the Project Proposal on the Project page, I decided to work on something that is achievable over 3 weeks of solid work (besides, my normal job) and perhaps extend it from there.
This comes from an Engineer's viewpoint and the confidence that I can complete it, anything more would be extra.

Setting up and using Mercurial for FabAcademy

Mercurial is a Version Control System which allows you to locally archive/versionize your work and/or transfer to a group-managed repository.

Important reading:

Here are the steps to take to setup a folder, version control it and to add it to the FabAcademy site. You will need TWO folders: one to keep your working copy of your work, and the other for you when you backup your work from the FabAcademy site. The workflow would be that you work on your weekly stuff on the work-site, sync-it to the local academy backup and then sync the local academy site to the FabAcademy. In this way, should something be amiss, at least you have one working copy.

Steps and Setup

  1. Read the tutorials and setups as above.
  2. Create your work folder. In my case, I have named it localsite and have used a local installation of a web server to point to it as my local site so that I can view its contents and check my work. You can begin to populate the site.
    Make sure the localsite has the correct folder and file properties, use the following to ensure that all files are readable
    $ cd ~/localsite
    $ find . -type d -exec chmod 775 {} \;
    $ find . -type f -exec chmod 664 {} \;
    
  3. Create the mercurial configuration file in this folder so that you can keep a versioning system of the work that you have done.
    # create & edit a file .hgrc in this folder (localsite)
    $ edit ~/.hgrc
    		[ui]
    		username = Rodney Dorville
    # initialise the repository
    $ hg init
    
    # add/remove files to your local repository
    $ hg addremove
    
    # commit the changes
    $ hg commit -m "A comment to indicate what you have changed"
    
  4. We now create another folder, in which we will house the group archive. As we are part of the Barcelona node, the archive will also contain the other files from the group. This folder is named "fabacad". We will also create a .hgrc file with the above contents to indicate that we are the owners and users of this site. At present this folder will be empty
  5. copy the file academy.pub into the .ssh folder of your host (we assume you are running either Linux or Mac). This is the public key which is given by FabAcademy for the syncing of the archives. (you must, however, be familiar with SSH and some Linxu)
  6. We will now clone the FabAcademy archive into your fabacad folder. This will give you a copy of the archive as well as point to where your files will be located within the remote site.
    # clone the remote site
    #    use ssh port 846 and the academy.pub key provided
    #    remote site: hg@fabacademy.org/academy.node.barcelona
    #    local      : ~/fabacad
    $ hg clone -e "ssh -p 846 -i ~/.ssh/academy ssh://hg@fabacademy.org/academy.node.barcelona" ~/fabacad
    
    	>> output----
    	requesting all changes
    	adding changesets
    	adding manifests
    	adding file changes
    	added 149 changesets with 2286 changes to 1599 files
    	updating to branch default
    	1104 files updated, 0 files merged, 0 files removed, 0 files unresolved
    	>> ----
    
    
  7. setup the fabacad/.hgrc file for automatic updates
    # setup the hgrc file for automated updates
    #
    $ echo -en "\n\n[ui]\nusername = Rodney Dorville
    		  \nssh = ssh -i ~/.ssh/academy -C\n\n[extensions]
    		  \nconvert =\nfetch =\n\n[hooks]
    		  \n\nchangegroup = hg update >&2"
    								   >> /srv/FabLab_Archive/.hg/hgrc
    
    # must be typed in one line
    
  8. You are now ready to sync your work with the FabAcademy node. You might want to read the rsync documentation again. Each week, all you have to do is the following:
    # commit your local work first, remember to add a meaningful comment
    #
    $ cd ~/localsite
    $ hg addremove
    $ hg commit -m "Added chapter 1, corrected mistakes in intro"
    
    # sync your work to the localsite
    #
    #  dry-run to check
    $ rsync -arv --exclude .hg --dry-run ~/localsite/* ~/fabacad/
    
    #  actual update of fabacd from localsite
    $ rsync -arv --exclude  ~/localsite/* ~/fabacad/
    
    # proceed with the clone
    #     pull from the remote site
    #     update your local site
    #     add/remove any new files you have on your site
    #     commit the changes
    #     push to the remote site
    #
    $ cd ~/localsite
    $ hg pull
    $ hg addremove
    $ hg commit -m "Added chapter 1, corrected mistakes in intro"
    $ hg push
    
    
  9. Check your work!

Reflection

Must try to follow Neil's advice on allocating time for each part. I spent too much time looking at the design and tweaking it to my use.
I think after each lecture, there needs to be plan on how much work can be done over the days and on each day to draw a line to say "stop" and move on to the next stage.
Perhaps I'll do that this week.

Updates

  • 08 April 2015
    Mercurial saved my life! At 2am, doing an update to the Barcelona server, I had 3 hours of work wiped out as Ferdi must have been updating his pages as well
  • My mistake was not to have my own site (~/www) and then copy it over to the Barcelona archive (~/Desktop/Fablab_archive), I updated a number of files with photos and text and through the hg pull, update the files were lost!
  • In order to recover the files, this is what I did:
    1. hg log | less
      browse through to find the last commit and obtain the revision number e.g. 333
    2. hg cat -r 333 dorville.rodney/c04_electronics_design.html > c04a.html
      This extracts out the file into a new file c04a.html which I checked and found that it was the correct version.
    3. hg revert -r 333 dorville.rodney/
      this reverts all the files to that revision!
      whew!
  • References:


    HTML & CSS

    Mercurial

    Not being of a artistic mind, I have shamelessly borrowed this template (simpleStyle_8) from html5webtemplates, in recognition of a simple, cool and functional webpage design.