Tag Archives: programming

Coda-Coda-Coda-Chameilian

And other bad 1980′s puns.

The real title should be

I wish my websites where this simple

Came across what appeared to be a very nifty IDE. If you are making simple relatively stand alone websites Coda is absolutely genius. It’s available through the App Store, but I bought it via download.

What makes it so slick is that it’s a bit of Komodo, Safari, CSS Edit, FileZilla, SVN and Terminal in one package. It’s super easy to flip between Editing, Previewing, Uploading and working with version control all mixed into one. It has those nice little Mac touches (brace matching doesn’t just change the color of the brace, it hits with with a radar blip animation to really draw your attention).

What’s more it updates as you work, so working with CSS, this feels like a really really solid replacement for CSS Edit.

However, for heavy duty app work – I still find myself going back to Komodo, CornerStone, and Firefox.

Why?

  1. Debugging.

    If I need to debug something, Komodo’s integrated debugger is genius and that saves me more time than anything.

  2. Code Folding.

    Komodo supports folding code in the editor so I can quickly compress classes and functions and get a quick overview of my code.

  3. Better Completion

    Coda does a great job of offering completion suggestions for standard calls, but Komodo actually scans your code and most of the time does a great job of making suggestions from the local variables, or class definitions. that makes it a lot easier to use verbose or self documenting variables names.

  4. Batch Checking, Revert, and Compare

    I might be missing something but I couldn’t find a way to submit all my changes as once. Further, I couldn’t find a way to revert to the latest version of a file and I don’t see a way to do a quick file compare. Of course Komodo doesn’t support that last one either, but Cornerstone really makes these things easy to do.

  5. console.log() isn’t good enough

    There are times you just really need a javascript debugger and the one from Apple and Firebug are both fantastic.

  6. Syntax Highlighting Gets Lost

    For historical reasons we work with large files. Coda often gets lost parsing those files and we lose syntax highlighting. That’s disappointing.

All in all if I had a simple (view php file) website that was basically HTML and CSS then Coda is fantastic. I’ll keep working with it, but it’s interesting the things you can learn working with a new tool. What I really do love about it, is that it keeps all of my Site information in one package – Terminal login (so I can check out changes on the server). FTP so I can move files back and forth.

What would really be great of all these features is if Coda would implement code folding and fix the syntax highlighting. I’ll keep running it for a while, but at $99 it’s one of my more expensive tools.

Adobe AIR

Adobe AIR Getting your Application Version

I couldn’t believe how hard this was to find. If you are programming with Javascript and HTML in Adobe AIR you might want to know what version your application is (the runtime has it’s own version). If you want to get it out of the XML application descriptor then you need to parse the XML file.

Personally I hate XML. Mostly because they made the brain dead decision to allow white space BETWEEN TAGS to count as a node. I don’t know who thought that was a good idea but it makes processing XML files REALLY hard and it encourages creating unreadable files that have no formatting.

But, here’s a simple function modified to allow you to pull the application version:

/**
 * getAppVersion
 * gets the application version from the application descriptor
 * Just for the record, I hate XML.
 * @returns ver {string}    The application version as a string
 */
function getAppVersion() {
    var xmlString = air.NativeApplication.nativeApplication.applicationDescriptor;
    var appXml = new DOMParser();
    var xmlobject = appXml.parseFromString(xmlString, "text/xml");
    var root = xmlobject.getElementsByTagName('application')[0];
    var appId = root.getElementsByTagName("id")[0].firstChild.data;
    var appVersion = root.getElementsByTagName("version")[0].firstChild.data;
    var appName = root.getElementsByTagName("filename")[0].firstChild.data;
    air.trace("appId: " + appId);
    air.trace("version: " + appVersion);
    air.trace("filename: " + appName);
    return appVersion;
}

Why I like AIR

I have become enamored with Adobe AIR (http://www.adobe.com/products/air/) because it lets me leverage my web programming for the desktop.  In college a classmate of mine once postulated his theory for the “Conservation of Stupidity”.  It goes like this, there is a finite amount of ignorance we all must carry around with us for our entire lives.  In order maintain that level every time we learn something new, we have to jettison something old.  The trouble is the brain doesn’t consult with us before it dumps the old to make room for the new.

For me, that theory manifests itself when I’m learning a new programming language.  I just love my children too much to run the risk of forgetting their names so I can learn a new programming language.  In reality, the real issue is that it takes time to get good at a programming language.  And it is really annoying to have to learn a new programming tool change, process, framework just so I can apply it in a new arena (e.g. the desktop).  Enter AIR.  With AIR (in theory) I don’t need to learn anything new.  At least as far as programming languages go.

I’ve started to have some fun with WordPress plugins and my new favorite Javascript API JQuery.  I know Microsoft has some fantastic free tools, but I work on a Mac and all my websites are Linux based so no C-Sharp for me.

As for Apple, while I love my Mac, the overhead of learning CoaCoa doesn’t translate well into the web.  Of course there’s flash, but well… it’s Flash, and that too has it’s features.  But the real reason I like web programming is that modern browsers are so powerful, you can make some really sophisticated user interfaces and skin them with a few lines of Javascript, HTML and CSS.  And AIR lets me do that, but being Adobe they have a heavy preference for all things Flash and Flex.  Me, I like Javascript and PHP.  While they are supported there seems to be more examples of F/F than J/P.

So if I find something useful, I’m hoping the web crawling spider bots pick it up and share it.

– Scott