Thursday, July 18, 2013

Now, I "Git" it.



Recently, I picked up two of “The Pragmatic Programmers” books, “New Programmer’s Survival Manual” by Josh Carter and “The Developer’s Code” by Ka Wai Cheung, and started skimming through them. A lot of the ideas, suggestions and lessons there was an eye opener for me. Barely 30-40 pages into both texts I was astonished to see how many vital skills and knowledge goes untaught in colleges (especially here in India).  No wonder, we are a cheap labor market for the lowest intellectual level of IT industry, which is in self-delusion of working on the next big thing, while we only do menial labor of code maintenance or simple web-design and the world is rapidly switching to mobile/cloud computing and augmented-reality.

One tool that I came to learn of is the Version Control System. Such a system is used to carefully keep all source-files and dependencies intact over the development cycle of the project. It logs all changes and can be used to “rollback” to previous development stages or versions, if required. It can also be used to “fork” a repository (the project directory containing everything relating to your project) which is another word for copying/cloning your project repository for sensitive changes or features that may otherwise break your previous tested and working code. This way you can test new code and features on existing project without ever messing up your original source-code.

I started learning Git and it was pretty simple and easy to learn, for me at least, as I’ve dabbled with some Bash Terminals on Ubuntu (Linux) and command line terminals don’t intimidate me as much as they used to. I had my humble beginning from Microsoft Visual Studio with Visual Basic 6.0.  Microsoft Visual Studio with its RAD (Rapid Application Development) IDE may have been easy to learn swiftly with simple drag and drop interface, auto-completion and other features. Actually, now, after a few minutes of recalling, I can say that I had the fortunate opportunity of playing with QBASIC and C, in my early school days.

But, here is a note of caution: RAD is not for a true programmer. Visual Studio may have it’s advantages but when something breaks (I am not talking about Bugs), you’ll have to return to the drawing board. Beware! You’ll become complacent, delusional and xenophobic. Trust me. I’ve been there. It is best to learn your craft with the smallest of tools no matter how crude or cumbersome they may seem to you. Once, you’ve built a full fledged “personal” project with them, congratulations, you’ve graduated! From “Personal Project” I mean, a problem or idea that you found independent of books/exercises and implemented it after your fair share of research and development. Then you can switch to whichever tool you want to use and use them.

Another disadvantage of RAD and IDEs are that it’ll never show you the internal system level implementations. How your files are stored or the system/hardware specific dependencies used by your project unbeknownst to you and when you migrate your project or deploy it somewhere else or on the web….Oh boy what a ruckus!

RAD is useful for simple and quick development of applications and systems to test your idea/product and prototype business models linked with that product. They can then be hacked to improve and converted to independent architecture/platforms like Java etc later on (only when you know what’s under the hood). I personally have never witnessed high performance or high scalable systems built with MS Studio. No, sir, I have not. Look around everywhere. They are either built on Open Source and/or custom built.

Returning to Git. Git was developed by Linus Torvalds and his Open Source buddies. I wont detail these unnecessary information that can be wikied. But, I’d like to add that Git has the additional advantage of being distributed and multiuser. It may have other features but, I won’t get  into its details.

Now, people, Let’s get our hands dirty!

Setup::

First, we’ll need to install Git on our systems as only a lucky few of you all would be fortunate enough to have it pre-installed on your system. If you’re running a flavor of Linux you may have it installed somewhere in there. Whatever, here’s the link to it’s setup and official site:

Tutorial::

Now that you’ve got the link to the Official Site. I presume you’d prefer the official guides rather than mine, so I’ll skip the hard part of hand crafting a tutorial and directly link you to a tutorial that I found very useful (especially for the Terminal literate):


No need to be intimidated by this command line tool, it’s available in a GUI friendly version, too. Still, some of you might want to learn the Terminal first and then start using Git, if you’ve got no prior experience with Command Line Terminals. Take another pearl of wisdom, Try the Terminal available with Linux and/or Mac OS X, not Windows. The Windows Command Prompt was never meant to be used as a powerful tool as Windows was originally constructed for the technologically impaired ordinary gentry and many developer tools were scorned upon.
If you’ve returned to this page after getting “Git”. Thank you very much. You didn’t abandon me while I was ranting on and on. A comment or a token of appreciation would work wonders for my aching back that strained, against this uncomfortable sofa, in order to illuminate you with such good ideas.

You must now try GitHub. I’ll leave the requisite research on your dependable Google search skills.

No comments:

Post a Comment