mrforbes design - a web design and development studio

Blog - One Byte at a Time

Technology moves fast. Its hard to keep up. By the time you've mastered one tool, another has come along to replace it. You can't catch up, so just take it one byte at a time.

Archive for the ‘Software’ Category

Eclipse, Subversion, Subclipse, oh my…

Friday, August 10th, 2007

Version control is a wonderful thing. Sadly, not enough companies are implementing it to protect the integrity of their documents, and countless hours are wasted trying to repair the damage that is done.

At my previous place of employment, our department begged management for months to allow us to install Subversion, an open-source source control application. They said ‘no’, the problem being that they didn’t want to give the department root access to our own development server (huh?). As a result, there were on more than one occasion instances where someone would work on something, someone else would work on it (without downloading the newest version) and hilarity, or something the opposite, would ensue. Considering we were operating on razor thin margins, in terms of billable hours for web development - this was a killer.

Of course, I never thought about using version control at home either, since I am only one person and I would doubtlessly NOT overwrite my own files. I mean, how could that ever happen?

A few days ago, I was working on a site, and I made some changes, saved the file (thinking I could undo it if any problems resulted), and saw there were some errors. I flipped back to Eclipse and went to undo but oh no! Eclipse encountered an error, and I lost access to the file. I ended up spending about 30 minutes going back and replacing what I had lost. Billable time wasted, lesson learned.

I had always thought that Subversion required installing an Apache module, so I went to their site to see about how to accomplish this, and I also was planning to look for instructions on completing this task in WAMP. When I found the link to the Windows stand-alone subversion server.. it was like Christmas is July.

Installation was a breeze - I followed the documentation to install the SVN server as a service on windows, create a repository, and I was pretty much set (As a side note - after doing this I discovered that a fellow named Brian Kohrs had created a one click installer, found here).

Now, I installed TortoiseSVN, which is a nice GUI that integrates with the Windows Explorer Shell. It wasn’t bad, but I don’t like to switch programs any more than I have to. As a result, I searched for and discovered Subclipse, which as you may have guessed is a Subversion plugin for Eclipse.

If you already have Eclipse and Subversion installed, you can get Subclipse through the Eclipse installer by putting in the following url: http://subclipse.tigris.org/update_1.2.x.

Once it’s been installed, you can go to Window->Open Perspective->SVN Repository Explorer. Right click anywhere in the window that opens, click on ‘new’ and pick one of the repositories you’ve created (the easiest way to create a new repository is through TortoiseSVN. Go into windows explorer, create a new directory, and ‘right click->Tortoise SVN->Create Repository here’). Then, to put a new project into Subversion, just do ‘new->project->SVN->checkout projects from SVN’ and pick the repository you want. That’s it.

At this point, the only thing you need to remember to do is update the repository regularly - if you don’t you can still lose code. If you are working as part of a team, you can either lock the files you have checked out, or you can allow anyone to edit, and all the changes will be merged when the file is updated to the repository. Either way, adding version control to your applications is sure to save you time at some point. With or without Eclipse, it is now easy to install and easy to use, so there’s really no excuse not to.

Site Tags:

Goodbye Windows Vista

Tuesday, August 7th, 2007

How ironic, that I resume updating this space on a regular basis by continuing where I left off over two months ago. If you check the post previous, you’ll see the point at which I began by cursing Windows Vista for the poor performance of Adobe Photoshop - yet in the end decided that the slowness was in fact a blessing in disguise.

Slowness I can handle. Instability, I cannot.

I was recently trying to apply a windows update, when Vista up and froze on me. Not a temporary freeze, but a ‘you must unplug your computer to get out of this freeze’ (BTW - does anyone know how to unstick a frozen machine without unplugging it? Yeah, power button is real useful when you can only use it to turn the power ON). Upon restart, the computer - having crashed in the middle of an update - could not figure out how to complete the boot back into Vista. This resulted in an episode of restoring the system to its previous point (before the update). Normally, this would not have been a big deal - however by that point I felt like a boxer who had already gone 10 rounds too many against an opponent who was lacking in intelligence, but made up for it in sheer endurance. Of all the problems I had encountered with Vista - a Windows Update causing it to crash… that was the knockout punch.

I did a system restore to the point immediately preceding the update, and proceeded to move all of my important files off to an attached network drive. Muttering sharply beneath my breath the entire time, I waited until I had completed my backups, and then gleefully restarted and booted into my Windows XP cd. I must admit, I have rarely felt as joyful as I did when I elected to format the partition, and watched the progress bar slowly erase all of those painful Vista memories.

Having re-installed XP, I was reminded of what it was like to have an efficient working environment again. Photoshop once again ran smoothly, my hard disk no longer spun for reasons I could not fathom, and all was again right with the world.

Except for one thing.

Does anyone out there want a slightly used copy of Windows Vista Ultimate?

Site Tags:

My Windows Vista Rant

Monday, May 28th, 2007

I’m sure everyone who has used Vista has at least one. The things about it that make you just want to pull your hair out. It could be the User Access Controls (I turned it off as soon as I installed Vista - I couldn’t download my Quicken data with it turned on, in fact it never even offered to LET me download it). It could be the fact that file transfer/addition/deletion time is directly proportional to the NUMBER of files, rather than the SIZE of the files (huh?).

For me.. its Vista and its interaction with Adobe Photoshop, CS3 edition.

My computer isn’t THAT slow. Its a Pentium D 820, with 1GB (too little for Vista BTW) RAM, and 320GB worth of HDD space in a RAID 0 configuration. I have a GeForce 7800 video card so Aero shouldn’t be an issue. Yes, the computer is nearly two years old, but I’m quite sure the issue is not with the parts. You see - opening a file in Photoshop for me is a ’sit and have a cup of coffee in the meantime process’. Opening a file takes a good five to ten seconds. That would be fine if I were referring to a 300ppi 8×10 page layout, or something of the ilk. But I’m not. My reference is a 12k .png. No, that isn’t a typo. 12k.

You can imagine my frustration when I’m creating small buttons, and each time I open one I have to wait 5-10 seconds for it to actually appear on the screen, at which point Photoshop acts like its on its last breath. I have the same problem when I create a new document. It doesn’t matter how big or small it is, I sit and wait. Why?

I suppose I should be grateful - after all, I used to only sip on my coffee once in awhile, and it would last a good 4 hours to go through a cup. Now, I take a small sample at each file load, and I’m going through a few cups a day. I’ve got more energy. My skin is looking a little better, and I’m losing weight (caffeine is an appetite suppressant).

Ok, I’ve reconsidered. Here’s to you Windows Vista - for giving me more time for coffee.

Site Tags:

Eclipse

Monday, May 21st, 2007

I recently began to wonder if there was an IDE out there that would suit my style of development better than Dreamweaver. As a result, I began scouring the internet for reviews and information on other PHP environments, which would hopefully speed up my development process. After trying such applications as Komodo and Zend Studio, I decided to check out Eclipse. I had looked into Eclipse almost a year ago, and had never actually installed it. It seemed daunting to me at the time, though I can no longer remember why. In actuality, the installation and transition has been smooth.

Installation
To install, first go to http://java.sun.com/javase/downloads/index.jsp and download the Java Runtime Environment. Eclipse is a Java application. Then, head over to http://www.eclipse.org to download the latest Eclipse version.

Once you’ve done that, you can visit http://www.zend.com/de/pdt to get Zen’s PHP IDE for Eclipse. With that, you’ll get quick reference to PHP functions, PHP code completion, and the possibility to get local debugging installed. This part was a little tricky though, as i had to download the full PDT version to get some of the required libraries (just copy this plugin directory to the plugin directory of the Eclipse you downloaded from eclipse.org). Not too bad though.

The best part of installing Eclipse, is that you don’t actually install Eclipse. Once you unzip it, and copy over the plugins folder from the PDT version on Zend.com, double-click the .exe and you’re up and running. Adding plugins to Eclipse is easy too - follow the instructions for updating on the Zend site and you’ll be able to add anything, because the method is the same - only the links will change.

Add-ons
Beyond the PHP IDE (if you use PHP) - get a hold of Aptana, a Javascript/HTML/CSS IDE for Eclipse. It also comes with an FTP tool, though it is a little basic. It won’t do the ‘upload to server on save’ action that Dreamweaver will, but you can right-click a file and select synchronize to upload. This minor negative hardly outweighs the benefits.

There are two more things you’ll probably want to download for Eclipse - a plugin to allow virtual word wrapping (no, word wrapping is not available by default - there’s a good explanation out there if you google it). Here’s the link. Also, an application so you can view images in folder’s within the eclipse structure. This just makes it easier to upload images through the Eclipse FTP, instead of having to use a separate program (though you WILL need one to do things like change folder permissions). You can get one here.

Features
I’ve been using Dreamweaver for years, and Homesite before that. Moving to Eclipse was relatively painless, because of the areas where it outshines Dreamweaver.

  1. Price
    It’s free, the PHP IDE is free, Aptana is free. You can’t beat that.
  2. Function Reference and Folding
    I don’t mean referring to PHP or Javascript functions (though it provides that also). Instead, I’m talking about the window on the right side that shows all of your functions and classes, so you can find the one you need quickly and easily. Default code folding also assists in speeding up location times.
  3. Highlighting
    Eclipse highlights the line of text you are currently editing. This may not seem like much, but I find it very handy.
  4. Code Completion / Class Reference
    Did you write your own class, want to reference it, but can’t remember the parameters? Just leave your mouse over the function call and it will show you.
  5. Proper Indenting
    I always fought with DW to get it to tab-indent properly. Not only does Eclipse do it automatically when you open a curly brace, but it indents properly nearly all of the time.
  6. Performance
    Dreamweaver also seemed a bit bloated to me - perhaps it was all the WYSYWIG stuff that I never used… In any case, Eclipse is much quicker, though it does love to use your memory - generally about 200mb.

I’ve been using Eclipse for about a week now, and I would recommend anyone to give it a shot. It may not be for everyone, but its certainly made me a more efficient programmer.

Site Tags: