Tag Archives: Dreamweaver

Diff-ing commands on Mac

There are several tools to compare files for changes out there for Mac OS X. I’ll cover a few here. The first and most basic is diff. From the command line, it looks like this:

diff -u old_file new_file

Where of course old_file is the old suspected filename, and new_file is the new one. This will give you a quick glance at what is new. Each line of difference in the new file will be preceded by a plus (+) symbol, and each difference in the old one will be preceeded by a minus (-) Last saved timestamps will appear at the very top of the output.

A cool trick – if you use TextMate, you can pipe your diff output to it and take advantage of TextMate’s fancy-schmansy code coloring:

diff -u old_file new_file|mate

Shift + Control + Option switches Textmate to the Diff bundle, and Shift + Control + Command + D will give you access to the context menu for all of the diff commands. Great for you Lightning Ruby Ninja™ coders out there who insist on never letting the tips of your fingers leave your keyboards.

If you have the XCode Developer Tools installed, you get a second option installed: opendiff, laced with a GUI app called FileMerge:

opendiff old_file new_file

What is cool about this is that if you run opendiff from the command line, FileMerge takes over and shows you your differences with sexy Mac-ness, replete with an array of search and code merging commands at your disposal. That’s hot.

If you like BBEdit, and who doesn’t, you have bbdiff at your disposal too:

bbdiff old_file new_file

BBEdit has a file comparison and merging utility built in which does not suck at all.

Extra Coolness for Dreamweaver users: Select opendiff or bbdiff in your prefereces to compare files with their corresponding GUIs this way:

  • Dreamweaver > Preferences > File Compare
  • Click Browse
  • Select bbdiff or opendiff from the file dialog, click OK, and enjoy.

Lusty. So there’s a few options for finding out what your colleague did to break your perfect code. Happy diff-ing!

Pimp my Reader

I am a fan of the Google Reader application for managing my RSS subscriptions. The advantage of having all my feeds organized in one convenient web repository is proving to be quite handy (much as del.icio.us has been for bookmarks) and I like Readers’ own ability to produce new RSS feeds from my content categories.

But the UI, much like a lot of Google’s apps, leaves a lot to be desired. (Gmail – I’m looking at you.)

Fortunately, Jon Hicks has put some lipstick on this pig. Enter Google Reader Theme. Installation is fairly trivial, and the result is a more pleasant and usable interface. As of this writing, it works for Firefox, Camino, Opera, Omniweb, and Safari.

Nice work! Looks much better now – thank you.

Jon also mentions he was using CSSEdit for the skinning work. I like this tool – have been using it since somewhere in the 1.x days. I find it very useful for quickly digesting the styles in an existing theme, such as an open-source project that I want to skin by leveraging existing styles. For starting from scratch, nothing can beat TextMate or Dreamweaver for cranking out standards-compliant XHTML and CSS in rapid-fire mode.

This is a great capability, to be able to create your own skins for sites you visit frequently. User customization supports even further the idea that we as web developers need to continue to separate content from design as much as possible, to produce semantic, meaningful markup, and to make our code as simple and as well-documented (self-documenting/semantic) as you can.

Zend/PHP Conference, days 3 & 4

We wrapped up the Zend/PHP conference today and overall it was quite a good show. At the very least, I have my work cut out for me here. I have a stack of books that I picked up at a nice show discount from the Sams booth, based on recommendations from many of the others I met at the show.

I’ve been teaching CSS classes for the past several months, and one colleague described my sessions as something like “sit down, fly by the seat of your pants, and try to hang on…” OK, now I really know what that feels like! Each session was only 45 minutes, and some of these guys were really plowing through some deep coding concepts at warp speed.

My personal highlights for the last two days of event were Chris Shiflett’s Security Audit Howto session, learning about the Qcodo development framework, and meeting up with the guys at Interakt. It was especially cool to finally meet Alexandru Costin face to face, since we’ve had conversations via email for years.

Another unforgettable piece of this event overall has to be reiterated: Marc Andreessen’s keynote, where he discussed PHP as being one of the first really developer-centric programming languages and picking up where Java left off in this respect, really got the attention of everyone there as well as the media. The Slashdot article on Marc’s comments will give you a flavor of the discussion, and it’s really tipped off something very large. We will see more of this debate in the months and years to come.

If I had to pick one thing as a chief takeaway from this show, it would have to be just being able to meet all these other great developers and share ideas. This was the first Zend/PHP conference, and I’m really looking forward to next year.

Blueberry Tiger

While my old PowerBook waits in the shop for a new motherboard (yes, the PB12 shall rise again), I am using a blueberry iMac. This was a low-end 350 MHz type, and it has a decent 576 MB RAM installed.

I had no problem wiping the system and installing Panther. But of course I can’t leave well enough alone, so I set myself about the task of figuring out a way to install Tiger on this old heap.

Now given that Tiger ships on DVD, and given that the blueberry gumdrop sitting on my desk has no DVD drive, nor FireWire port for booting up from an external DVD drive, this was a bit of a problem. Sure, I had a whole bunch of spare external hard drives, and some even had USB. This might work.

So the first thing I did was to borrow my wife’s iBook, which had the internal DVD drive. I took one of the old external drives, in this case a LaCie 20GB external 2.5″ Pocket Drive with both USB and FireWire ports, and plugged it in to the iBook. I then installed Tiger onto the LaCie drive. In the process, I experimented with the custom installations. This iMac has a 7 GB internal hard drive, and the default Tiger install is around 4.7 GB. I’d like to add an order of fries with that whopper. Interestingly, I found that if I remove all but the Epson printer drivers from the install configuration, I could save myself a full gigabyte of disk space. Removing all but the Traditional Chinese language translations saved me almost as much. I got the final instal down below 2.8 GB (although that seems to balloon up later…)

The installation completed rather quickly over a FireWire cable, and now I had a good lightweight install of Tiger on the LaCie drive. I tested a boot of it to the iBook and it worked perfectly.

Now I went over to the iMac. First, I plugged in the LaCie via USB to the iMac. This drive requires external power if you’re using USB, so I had to plug it in to it’s A/C adapter. I popped in a Panther install CD and ran the installer. The computer reboots off the CD and I now can do things to the internal drive via Disk Utility, available from the Installer drop-down menu. I clicked the Restore tab and dragged the external LaCie icon to the Source field, and the internal drive to the Destination field. For good measure, I clicked the Erase Destination preference. I clicked the Restore button, and let ‘er rip. Went to bed. These iMacs were notoriously quiet, so I couldn’t hear a thing during the cutover process, and slept soundly

Next morning I checked and the process seemed to work. Unplugged the LaCie, set my Startup Disk preference, and it rebooted into Tiger. After a billion updates, she’s running 10.4.2.

Now, this thing is of course slow, but surprisingly responsive enough to get basic work done. I am running BBEdit, Interarchy 7, and surprisingly, Dreamweaver 8 effectively. Dreamweaver is a bit of a hog, but I’m mostly just working in code view and applying some PHP behaviors and using file synchronization. Really, with the code completion, it’s still faster than typing in BBEdit. I’m currently installing PHP5 and MySQL 4.1, and those ran OK under 10.3, at least good enough for local development.

Well, good. Now to install that image on the old Tangerine 266 MHz box…

DW8

What I love about the new Macromedia Dreamweaver 8:

  • The Mac installer is a smaller download than the windows version.
  • CSS code completion improvements
  • PHP coder improvements and support for PHP5
  • Improved CSS rendering
  • CSS visualization of margins and padding
  • Faster than the last version
  • Background file operations
  • Document tabs and window management commands like Tile, Cascade, and Save Panel Layout Sets – oh my.
  • The full studio comes with a Contribute 3 license.
  • Improved support for web standards
  • Find diffs using integrated BBEdit or opendiff

Best version of Dreamweaver. Ever.