Friday, January 30, 2009

Versioning Project Files and Documents

Have you ever started a project, created something usable that you liked, only to lose it somehow? (I usually end up deleting the wrong files, or making irreversable changes to a file). During my days of professional work, I picked up some useful techniques for effectively versioning projects.

For many of us the phrase, "Save and save often" has been burned into our brains for years now. This is a useful technique, but does not help at all, if you accidentally save over a file. There are some ways to avoid this, or version things automatically (eg. Time Machine for OS X Leopard), but this really is not all that useful for versioning files so much as keeping backups.

If you're creating a website (works for any other type of project) and you develop it enough have a beta version, then that would be version 1. You could have backed up version 1 several times, but you still only have version 1. Now, you made a significant change to the design or functionality of it, so you want that to be beta version 2. Where do you store beta version 2? In it's own folder? FTP it to a random server?

The best way that I have used, and which seems to be an industry standard, is using Subversion (or SVN) to store and version your projects. Subversion itself is simply a type of server that allows you to store files and keep backups in a specific structure. A typical user will never interact with the server itself directly. There are plently of applications out there, both paid and free, that will allow you to interface with this server very easily.

You might ask, where is this server located? Well, there are plenty of places that offer SVN services. The first free one that comes to mind is Google Code Hosting. The main benefit, of course, is that it's free. Although, you have a limit of 10 projects that you can store at one time. You must also choose a license for your project, which sometimes is not a good thing if you don't want others to have access to it in any way.

There are a few paid services also, the one that seems to be most prevalent with the companies that I've worked with is BeanStalk, mostly due to its tight integration with 37Signals' other products like basecamp (for project/time management). Beanstalk has a free personal version, but this version is basically a joke (20 Mb storage space, and 1 project maximum). This isn't much of an option since even tiny projects will acrue more than 25 MB of space in a very short period of time.

The service that I use is actually a localized version. This is 100% free, and has 'theoretically' unlimited storage space and an unlimited amount of projects. The way this works, is you download a server (OSX has one built in - although this is a slightly older version of SVN than the most recent) that will run and can allow you to send (check in) projects to it to be versioned and download them back (check out). This will store the files directly on your hard drive in a specified archive space.

To actually manage these files that you are saving versions of, there are several applications out there. The first, and most widely used at the moment, is for PC users. It is called Tortoise SVN. Tortoise is really great if you use a PC; it has very tight integration with explorer, so you don't even notice its there unless you need to manage stored files. Tortoise is free and open source.

For Mac users, the best seems to be an app called Versions, created by a couple companies called Pico and Sofa. Versions is a very powerful application that has built in support for most SVN services, and allows you to create your own local SVN repositories through the interface. This makes it very easy to create versioned projects for anything you're doing. Versions retails for about $50, but for any Mac user it's well worth the relatively small investment.

Versioning is most often used in web development, coding, design, or simple animation. Typically video projects will not be versioned with SVN due to the file size that would be necessary to save so many versions. However, you can version the project files in certain applications that store video files seperately, which can be very useful. SVN is incredibly useful and should be use for every project that involves code, especially code that may be plain text.

For web programmers and designers, I have found that most editor that you can use for the code have very nice integration with SVN servers. Dreamweaver($400) has support for it (though not local support), Eclipse(free) has greate support, and the best that I've used is Coda($100). Coda has very tight integration with locally stored SVN files, and is also well worth the investment to get it running. It beats out dreamweaver by leaps and bounds, but it's for Mac users only.

If there are any other questions about how to get started using SVN, please leave a comment and I'll try to answer them.

Thursday, January 29, 2009

Time Savers

We all are busy, and we're all looking for ways to save time and make time. Any video editor can tell you that shortcuts are essential to working quickly and efficiently. For that reason, I'm going to share a few shortcuts that I find helpful when using a Mac.

Now I know any novice Mac user is likely familiar with a slew of shortcuts that they use from day to day. For instance, Command-Tab and Command-Q (if you don't know what these are, you should, so just try them out) are some pretty common go-to keyboard shortcuts. So instead, I'm going to share some shortcuts that I find myself using on a daily basis, but which I don't think most users take advantage of. So here we go.

Command-W
This keyboard shortcut will close out the active window. This is especially useful in an internet browser when you want to close out a single window or tab (yes, this shortcut works to effectively exit a single tab, both in Safari and Firefox). Keep in mind, this shortcut will not quit a program altogether.

Shift-Command-Bracket (either [ or ])
This keyboard shortcut is useful in both iChat and web browsers (Firefox and Safari). It will toggle through whatever tabs you currently have open. The direction of the bracket will determine the direction of the toggling. Keep in mind, to use this in iChat, you must select in Preferences to group chats into one window.

Command-Click
This shortcut applies to clicking on links. When in a browser, clicking on a link while holding Command will open the link in a new tab. This shortcut also works in other programs. For instance, Command-Clicking a link in the Mail application will load the link in a web browser, but will leave Mail as the active application.

Command-Spacebar
If you are like me, you don't keep all of your applications in your dock. When I want to access those applications that don't find a home in my dock, I often take advantage of spotlight. Instead of wasting precious seconds moving my hand to the mouse, I often just that Command-Spacebar (in that order) to open up the text entry box for Spotlight. Then opening those rarely-used programs becomes a breeze!

Option (when using a shortcut menu in the finder)
I find this shortcut most useful when dealing with PDF files. Many PDF files open in Adobe Reader by default, but I prefer them to open in Preview. To accomplish this, I can control-click on a PDF in the finder and choose "Open With." However, if I control-click, and then hold the Option key, the menu changes to display "Always Open With." After selecting a program, the file will always open with the specified program, regardless of which computer it's viewed on.

Wednesday, January 28, 2009

On Vocationalism

Children in Nigeria try out their computers provided through the One Laptop Per Child InitiativeI recently read a transcript of a very old interview with computer education visionary, Alan Kay, about what needed and still needs to happen to make computer-assisted learning a success. Some of his conclustions made me realize that no matter how old or young the student is, the bottleneck is usually the educator.
"Virtually all learning difficulties that children face are caused by adults' inability to set up reasonable environments for them. The biggest barrier to improving education for children, with or without computers, is the completely impoverished imaginations of most adults. - Alan Kay"
With our society's constant fixation on terms like "job security" and, as Kay puts it, "vocationalism," students are often forced down a path that develops competency in a trade, but fails to foster the curiosity and intuition that lead to a lifelong love of learning.

It always used to bother me when people would ask what I wantned to be when I grew up. It wasn't because I didn't know or was scared of the future - it was actually the opposite - I had too many things in mind for myself. As Robert Heinlein said in Time Enough for Love, "Specialization is for insects."

It seems that as soon as technology invades the classroom, we shift from emphasizing conceptual learning to prioritizing tactical skills. I say, "Why not both?" Check out the interview with Kay to challenge your thoughts about how and why we should be educating.

So rather than trying to create scenes like this one:


We should be striving for this:



(Disclaimer - the prior image comparison does not an any way represent any hostility toward OLPC, which I feel is one of the most important efforts of the 21st century.)

Tuesday, January 27, 2009

Isaac Asimov's Foundation Trilogy

The Foundation Trilogy
by Isaac Asimov

My favorite science fiction author by far is the legendary Isaac Asimov. Asimov has remained a foundation for the science fiction genre because, unlike what you find on the Sci-Fi channel or on the shelf of your local Barnes & Noble, his books are equal parts of both science and fiction.    

The Foundation Trilogy is almost certainly his greatest triumph. The term trilogy is perhaps a bit deceptive, as each novel is comprised of two or more related novellas. The stories are anchored upon the fictional science of psychohistory. Asimov's fictional use of the term refers to the process of combining history, sociology, and mathematical statistics to make precise predictions of the collective actions of human populations over extended periods of time. 

Hari Seldon, famed mathematician, has discovered through the use of psychohistory that the Galactic Empire, though outwardly strong and nigh impregnable, is on a collision course with events that will result in its total collapse, an event so catastrophic it will plunge the galaxy into a Dark Age lasting well over 30,000 years. With the doom of the Empire inevitable, Seldon fabricates an intricate plan. Using his full knowledge of psychohistory, he places a colony, a Foundation, of specially selected people groups on the planet Terminus, located on the brim of the galaxy.  He places them in such a way that after the collapse of the Empire, Terminus will aid in the reconstruction of the galaxy and reduce the Dark Age to a mere 1,000 years.

The rest of the novellas document how the Seldon plan unfolds. It is fascinating to see the ingenuity of Seldon's placement of the Foundation. It isn't long before Terminus is the dominant planet it its area, despite its small population and lack of a military. Terminus controls the surrounding planets' populations in a number of ways,  including literally inventing a religion and spreading it to them. 

I won't go through the whole plot here, but trust me, it's a great read. Things get really interesting in the second book, Foundation and Empire. A spontaneous mutation occurs in the fabric of history which was impossible for Seldon to predict. A telepathic warlord known as The Mule begins a military campaign that causes Terminus to completely deviate from the Seldon plan. Here we learn of the existence of a Second Foundation that watches over the first and attempts of keep the Seldon plan in check.

My bottom line is that The Foundation Trilogy is an awesome read. It is intricately scientific, realistic, and fascinating. If you're looking for a science fiction novel that contains actual science, or you just want to check out the roots of contemporary sci-fi, the books are a great choice. There's a reason they call Asimov the Father of Science Fiction.
 
(By the way, there are actually more Foundation books, outside of the original trilogy. The original trilogy is Foundation, Foundation and Empire, and Second Foundation. Start there.) 

Monday, January 26, 2009

You are not invisible on the web

I'm convinced a way to truly get to know someone is to look at the history tab on their browser. I don't recommend actually doing this. It's creepy and I don't think your friends and family would appreciate it.

Think about how your web history reflects your personality.  The average person spends several hours each day online.  It's our primary method for gathering information.  When was the last time you didn't google something you wanted to know?  

Do you check the Drudge Report every five minutes?  Do you Facebook stalk romantic interests?  Are you googling communism and anarchy?  Are you addicted to pornography?  

You can tell a lot about a person based on how they browse in their spare time.  Search engines know us better than we know ourselves.  Think about all the information Google gathers when a person has web history enabled for their account.  That is why the first line in their Code of Conduct is, "Don't Be Evil."  Imagine what Google could do if they chose to be.

This isn't a conspiracy theory.  I just think people forget the internet is a public place.  It's an exchange of information that leaves you vulnerable for potential invasions of privacy.  Here is a podcast I produced that discusses the topic a little more.



Monday, January 19, 2009

Check 1 Check 1 Check Check Sibilance Sibilance

The first post ever on the Digital Corps blog. Mother of God...what have I done.