This is pretty geeky, so sorry non-technical reader. There’s a glossary at the bottom if you’d like to follow along.
I’ve been developing a PHP database driver for work, and this week I proposed it as a new PECL (pronounced “pickle”) package. Unfortunately, they use CVS for their packages. I’m used to Git.
So, I created a cvsroot/ directory and imported my driver to it. After a couple tries, I figured that out. Then I was confused, all my files were suddenly named file,txt instead of file.txt. Then I realized that this was my master repository, and I had to check out code from there. So, I made a cvsstuff/ directory and did
$ cd cvsstuff $ cvs co mongo
And it did the right thing! Cool.
So now I had to do it with php.net’s remote repository. I tried checking out a couple packages to get a feel for the syntax. Then I figured out my import command, triple checked it, and was about to press enter when… hmm, where was it getting the path to the directory I was importing? I was in my home directory, so… oh, crap. So, I almost uploaded my home directory to a public repository on php.net (for Windows users, this is roughly equivalent to uploading My Documents). My hand was hovering over the enter key, but I didn’t!
I successfully uploaded my driver, and all was well.
Non-technical person explanation:
- PHP
- you’ve heard of it, maybe? It’s a programming language, like C++ or Java, except it’s usually used for making webpages.
- Database
- information storage, usually can be pictured as a bunch of tables. MySQL is the most famous, my company’s is called Mongo (www.mongodb.org).
- Database driver
- when you create a database, like our company did, you want everyone, regardless of what language they program in, to be able to use it. So you write drivers, which translate a programming language to database-speak.
- PECL package
- PHP has a system set up so, if someone write a useful program in PHP, it’s easy for you, halfway around the world, to download it and use it. It’s called PEAR, and it lets you type:
$ pear install cool-package
And then you have cool-package installed on your system, too. All the packages are open source.
- CVS/Git
- When you’re working on a programming project, often you’re like, “I’ll just fix this little thing here.” And then when it’s fixed, suddenly no one can log in and you can’t remember exactly what you changed and the your company crashes and burns. And that is where version control software comes in. Whenever someone makes a change, they use a program like CVS to say “I’ve changed lines 4, 6, and 23 of MyProg.java.” Then they send this change to the central computer, who has the master code and updates it with the person’s change. If the change turns out to break stuff, there’s a record of exactly what changed and you can revert the code back to its original state. CVS is the grand-daddy of all version control, Git is another, more recent version control system.