Showing posts with label technology. Show all posts
Showing posts with label technology. Show all posts

Thursday, January 10, 2013

Being a Git!!

To paraphrase Linus Torvalds, he’s an egotistical bastard and so he always names his software projects after himself. Hence the name Git!
This post is not for coders, hackers or other nefarious creatures who write software for a living. This post is aimed at the common (wo)man in an ordinary old business.
Why would that sort of person be interested in Git? The Git that’s a distributed version control system (DVCS)? The Git that’s written for software development teams, like the one that builds and maintains the Linux kernel?
Let’s look at Git a little bit first (please don’t go away…I’m getting to the point). Git is:
  • A file system based version control system. That means it keeps its files in the file system of your computer, accessible to you with all the tools you might normally use to manipulate and work on those files.
  • A distributed system. That means that there doesn’t have to be a centralised repository although there can be. It also means that you can keep a copy of the repository on your local machine - desktop or laptop or both - and you can share it with other users without a central repository…or with a central repository or a number of central repositories.
  • A version control system. That means it keeps track of every change to every file that is added to Git for the life of the repository.
  • Capable of initialising and using remote repositories to enable repositories to be backed up and shared.
  • Lightweight, in the sense that it is trivial to install and manage, but deceptively powerful.
Imagine a scenario where you are an executive in a company, you travel a lot and you are currently working on a major rebranding of a product line. You are using an external graphic designer to create the logo and the “look” for the rebranding.
You want to be able to work on the rebranding project - all the documents and supporting materials - on the plane when you are travelling and in your hotel rooms. Meanwhile the designer is working on the logo, the general branding, the templates for the brochures and product information. She needs your feedback regularly. You’ve tried doing this by email and saving files to your local machine. However your boss is very picky, he wants to make sure this is exactly right. That means that you and the designer have been through multiple iterations and you are both losing track of the file names which are starting to look like logo_draft13_pete_v0.23.
This is the sort of situation where Git excels. It is trivially easy[1] to set up a Git project that saves you all the hassle. It would look something like the following picture.



Here’s how it works:
  • One of you would set up a local repository and, because of your specific needs, that person would also set up a remote repository[2]. It might be possible to operate in this scenario without a remote repository but it will be simpler with one.
  • That person would then add[3] and commit all their relevant files to their local repository.
  • That same person would then push their local repository to the remote repository.
  • Person two would now clone the remote repository to their local machine.
  • Finally person two would add and commit any files that they have that are relevant and that are not yet in the repository. They would then push their local repository to the remote repository. Person one would pull the remote repository. Now both people have all the files in their local repository and all the files are also in the remote repository.
Now the small fly in the ointment is that Git, by design, is a command line tool. Most of us can’t be bothered with tools like that. We are so used to GUI tools that we simply don’t want to work any other way. So we want a setup like this:



Every platform has various Git GUIs available, I use Sourcetree on the Mac but there are lots of choices.
As each person works, they work on the files in their local repository. They add new files to that repository and commit those files. At each commit Git takes a snapshot of the project and gives that snapshot a unique name. You can wind back to any commit at any time. It’s like endless versioning.
When either of you is ready they can push their local changes to the remote repository. This merges those changes into the remote repository. The other person, when next on line, is warned by their GUI tool that they are “behind” the remote repository so they can pull the remote repository to their local repository. That merges those changes in with their work and they can then push their changes back to the remote repository. Then the other person can pull…and so the process goes on[4].
Of course the next thing that happens is that your boss wants to see where the whole project is up to…well they can just clone the remote repository onto their machine and they have all the files to hand. The boss then thinks you need more help, the project’s growing, so he assigns two more members to the team. They just need access to the remote repository, they clone it and they’re ready to go.
This brief run through has barely scratched the surface of how Git can be useful to “non-coders”. For more information start with the following references.
Git homepage
A great Git book freely available on-line.
Github is a hosted Git service with both free and paid plans.
Git is also used as the “back end” for blogs and wikis and a whole range of other tasks. Google around and see what you find.
Oh, did I mention that Git is Free Open Source Software?

  1. Installing Git is a very simple and quick process, indeed if you have a Mac or a Linux machine it may come already installed, if not it’s the work of 30 minutes. Installing Gitolite (see other footnotes) is the work of maybe an hour, mostly getting keys set up. Anybody who can type in the console and can read instructions can do this from the very good directions available. Once installed setting up a repository takes less than 5 minutes.  ↩
  2. Remote in this sense means on a server accessible to the internet. Typically this repository would have its access controlled with something simple like Gitolite. Gitolite enforces extremely fine grained access control and requires all traffic to occur over SSH which is a secure link. Alternatively you could use a hosted service like Github.  ↩
  3. Text formatted like this denotes an actual Git command line command. To add a file called test.txt to Git the command would be entered like this: git add test.txt with add being the key word. You can do it quickly and simply from the command line, or more usually, you can use a GUI tool.  ↩
  4. Git can diff files between commits to show you what has changed. In general this capability is limited to text files of all sorts. Binary files such as PowerPoint, Word, Illustrator…can’t be diffed. Git knows that they have been changed, but can’t tell you visually what has been changed. Nevertheless Git keeps a version of every change that you have committed.  ↩

Wednesday, January 2, 2013

Which Blogging Platform?

I’m looking for a new blogging platform without a lot of success. So, here are the criteria:
  • Must store posts in a user-accessible directory structure as text files. I’m not going to be stuck again unable to get posts out if I want to migrate somewhere else.
  • Must be able to use Markdown as the preferred markup language.
  • Must be self-hosted.
  • Technical requirements:
    • Any of PHP, Ruby (but I’m stuck at 1.8.7 on the server so no requirements for 1.9.x), Python…Mac OS 10.6.8 is the server version and we’re stuck there for various reasons for the foreseeable future
    • Simple to install - I don’t want to have to spend days installing and then have a heavy management load. So installation should be fully scripted or installer based
    • Git backend would be a big bonus. We’re running Git with Gitolite on the server. It’s magically easy to install and use and I’m a big fan. No hosted Git solutions though please…so no Github or Heroku
  • Should provide existing CSS, templates and blog structure. I don’t want to have to fight for days to set up a site that looks OK and has some basic structures such as menus
  • Preferably with its own on-board commenting system
  • Must be FOSS (Open Source) software
If you know of anything that fits the bill please talk about it in the comments or head over to Twitter and tell me about it…I’ll be eternally grateful.

Wednesday, March 24, 2010

Shoes and ships and sealing wax...

Guglielmo Marconi (1908)

Not quite about those things, but related. I was thinking about "technology" and it's impact on our lives. In particular I was thinking about the "march" of technology, the way technology develops and changes and the rate at which it does. Modern things like mobile phones and iPods are relatively new conceptually and relatively new in terms of their length of use. I can remember the first time I saw a "mobile" phone. It was 1988 and it was a large installation in the boot of a car. The dialling prefix was 007 I think! How things have changed, and quite rapidly too. Within about 2 years of seeing that I was regularly seeing handheld phones.
Three of the things I use in my daily life date back a relatively long way however in "technology years":
  • The sextant dates back at least 250 years in its present form and longer in concept. Yes the sextant really is not required equipment today but it does a very effective job and it's relatively unchanged over a long period of time;
  • The 35mm camera. Oskar Barnack built the first prototype of the 35mm camera in 1913 and after a delay because of the first world war the camera went into production in 1924. Very little has changed with the 35mm camera in that time - particularly if you still use a Leica.
  • HF radio. Marconi is credited with the invention of HF radio, though there are many challenges to that claim and many contributors. Nevertheless, HF radio has been around for over 100 years. Sure the rigs of today are very different to Marconi's spark gap rigs but the propagation and principles haven't changed. You can hear morse used every day on the bands. Some people use it exclusively and manually key it as well.
The thing that gets me thinking is that although each of those technologies (and Morse as well) is, to some extent, anachronistic they are each viable and effective tools today. Why do some pieces of technology endure and why do some come and go? Will any of the "inventions" of today endure for 100 years or more into the future in a largely unchanged form?
And another thought - why have I used so many inverted commas today?

Monday, March 22, 2010

Solitude and Connectedness

I've been thinking about those two - perhaps polar - concepts recently. Think about undertaking an ocean passage in a small boat. If you're like me, without all the technological gee-gaws, that means a period of enforced disconnection. Except for your fellow crew you are largely cut off from the world.
Contrast that with daily life. Increasingly we are connected everywhere and always. Walking down the street, riding on the tram, we are always able to send and receive email, tweet, or browse the web. We can get the news, indeed we can report the news. Take a snap with the phone, email it to a news gathering organisation or just tweet it. If we wish we are always connected.
I first saw this sort of ubiquity of communication back in 2002. I had been doing business with a guy in the States and he would reply to my emails immediately, whenever I sent them. It seemed strange. When I visited him in the States I found him welded to his Blackberry. He said he responded to email on it whenever it arrived. I was appalled, how can you live like that?
I don't think that I've ever reached that level of obsession, but I do think I'm partly addicted. I feel disconnected if I'm out of contact. I want to "connect" and contact, I want to know, to browse, to read. All good you say. I suspect not. I suspect that it has got "bad" when you don't go to sea, for instance, because you can't bear to be disconnected.
When I finish an ocean passage, however sedate or gruelling it might have been, I always feel refreshed and relaxed. I'm often dog tired with weird sleep patterns, but I'm mentally refreshed. I think that the fact that I've had to disconnect, the fact that I may have had to challenge myself physically and mentally, the fact that I've lived and worked with others in a confined space means that my brain has some peace.
So why does this matter? The bottom line is that the sense of "connectedness" that I get from modern technology is probably false. I think that it leads to disconnectedness at a real level. I don't connect, at a real level, with myself and with those around me. Technology actually gets in the way. My mind buzzes, I can communicate at some level with others all over the world, but ultimately it's not real.
What do you think?