Archive for the ‘Projects’ Category

Yet another JavaScript logger

While writing Beginning Google Maps Applications, I grew accustomed to using GLog.write() while debugging any JavaScript I was working on. It was a wonderful alternative to alert(). That was great while I was working on map related projects but without the Google Maps API, it wasn’t there. Finally the other day, frustrated the 100th time I accidentally put my browser into an infinite alert loop, I decided to write up a quick logger myself. Afterwards, I realized there were already a bunch on the net but I had fun writing my own and even learned a few DOM tricks. For any of you out there who want to use it, go nutz. I’ve called it JSLog and the primary methods are JSLog.write(); which outputs escaped angle brackets while JSLog.writeHTML() outputs the raw input.

JSLog Window

The best part is now when debugging things like Prototype AJAX calls, you can easily log and see all the exceptions!

new Ajax.Request( 'example.php', {
    onComplete:function(request){
        try {
            //do whatever you need to an errors will be logged!
        } catch (e) {
            if(JSLog) JSLog.write(e);
        }
    }
});

No more errors floating into dream land!

To use it, just download the source or add

<script type="text/javascript" src=http://jeffreysambells.com/openprojects/JavaScript/JSLog.js"></script>

to the head of your document.

MacBook’s back and it’s getting a workout!

We’ll last week they finally got my new keyboard in at the Apple store and it took a few days to fix so I’m just getting back on-line with my MacBook. I was annoyed by the fact my ‘P’ key was busted, but it was fixed without question or cost and I was impressed by the professionalism and quality. My MacBook came back cleaner than went it went in - not a fingerprint to be seen anywhere - and although it took me forty-five minutes to find a parking spot at Yorkdale mall, and the Apple store was shoulder to shoulder when I got there, the staff quickly retrieved my repair without an appointment and i was in and out in under ten minutes! (Although I could have spent some more time there looking at iPods and such but I didn’t want to be tempted so I quickly left)

Now that I have my computer back, I’ll be putting it to good use in the coming months. I’m doing a technical review of an upcoming PHP book and have another book I’ll either be authoring or co-authoring as I’m just working out the final details. Along with abiding by my new daughter’s schedule, it’s going to be a few busy months.

A midday surprise

Went to lunch at the conference and figured I’d browse the books at the regisration desk. Guess what I found…

book.jpg

They’re Here!

UPS guy just came. The book is printed! and I assume hitting the shelves any day now!

The Printed Book!The Printed Book!

Stolen Idea!

As I may have mentioned before, along with my job at We-Create, I work early mornings at Greystone Golf Club in the turf crew. It’s very relaxing (well, if you find walking/running +6km behind a mower relaxing) and I have hours to just think and enjoy the environment. I come up with some of my best ideas while cutting grass and watching the sun rise. For example, not even a week ago, I was thinking about my new MacBook Pro and thought “Hey, wouldn’t it be neat if I could darken the background behind the current application, similar to the popular Lightbox JavaScript.” That would make it even easier to pick out the windows associated to my current application.

Not knowing a lot about desktop software I filed it under ‘Rainy Day Projects’ and was excited at it’s possibilities. Then came today. While catching up on Digg, I cam across Doodim, that does exactly what I had in mind! Someone has been reading my Rainy Day file. I guess I should hide it better!

Doodim

It’s Done!

I’m a published author. Yes it’s true! We’re just assembling the site now at googlemapsbook.com so it’ll be filling with more content in the next week. Look for it in your local bookstores mid August!

Full Desktop

SnappyAlbums: A quick photo viewer

As you may have read, I’ve been playing with Apple’s Aperture software lately and really like it, with the exception of the ‘Web page’ export features. As an experience web developer and designer I was less than enthusiastic about the results I was getting. I looked into creating my own templates but it seems very cumbersome and seemingly not well thought out. I still intend to play with it some more, maybe the templating will improve in the next version, but while I do, I needed a way to get my photos up and on-line quickly with minimal effort and preferably a decent presentation. I whipped up a very quick PHP/ImageMagik/Lighbox script that fit the bill quite nicely. All I have to do now is create a directory and upload images into it and the script handles the rest. For pretty URLS, it also requires an Apache rewrite file. You can see an example here (Minty Photos!).

The script is very simple and I plan on extending it further, adding more features such as reading the EXIF info from the JPEG files to add comments and such. All in all it’s pretty handy and I’ve dubbed it SnappyAlbums and have provided a download link for you to enjoy. I have no intention of ever writing a back-end or administration area for it, the only thing I want to do is use FTP to create folders and upload pictures, the rest, if anything, I’ll do in Aperture or similar image editing software.

I’m an author… well almost.

A few years back when I was just finishing university, I purchased one of the Masters of Flash books published by Friends of Ed. Back then, I was really into flash, spending many late nights creating neat and original things—projects I considered worthy of a chapter in such a book. I had Joshua Davis’s PrayStation web site as my home page and I vowed then and there that within three years I would produce something similarly cool and write a chapter for a book.

—Fast foward about five years.—

Since the glory days of university and my experimentation with flash as a web app platform, my focus and priorities have changed. At work, our use of flash shifted from integrated web application to simple graphical eyecandy—and I got bored making things just fly around the screen. I haven’t touched flash in more than a year and a half, not because I dislike it, but because my interests have move towards the wonderful world of web standards and getting all you can out of XHTML, CSS and pals. My most visited bookmarks have changed from FlashKit and PrayStation (though I still think Josh’s work rocks) to web standards sites such as CSSZenGarden, AListApart and the personal sites of other Web Standards zealots such as Dan Cederholm, Jeffrey Zeldman, Jason Santa Maria, Shaun Inman, Cameron Moll, Douglas Bowman and Dave Shea. As well, I’ve shifted from being known as the ‘Cool Graphic Design Guy’ to ‘Cool Research and Development Guy’ (Yes, R&D can be cool when you work for a company like We-Create and you have almost free rein on what you’re allowed to R&D). Meanwhile, my now five year old vow to write a chapter in a book made it’s way to the back of the filing cabinet, where I lost it with the other crunched and dusty pages of ideas, never to be seen again. And it was, until recently.

Almost by accident I was handed the opportunity not to write a chapter, but to co-author an entire book on some almost brand new stuff that everyone’s excited about. It seems that somehow through the grapevine, I knew the right people, at the right time. The offer to write the book—I can’t yet say what the subject is or who it’s for as it’s still "hush hush"—suddenly rekindled that drive and excitement I had years ago.

My excitement was additionally compounded by a yearning to write. Since leaving university, I’ve missed the late night writing and research sessions before a big paper was due. You’ve all been there, the pressure on, awake at four in the morning, trying to finish a 60 page research report on Ink Tack and the Tensile Strength of Web Offset Paper, due at 8:00 am and you still have an hour commute on the train, plus a 20 min walk in downtown Toronto to get to school… We’ll OK maybe you haven’t been exactly there but you get the point. When you’re in school you always say you won’t miss it, but you really do.

While working on the first chapters of the book, I’ve also been excited to discover I really enjoy the writing process, both from the authors point of view and the editors point of view. Educated in a print production background, I’m well aware of all the technical aspects that go into the printing, publishing and distribution of a book, but this is the first time I’ve experienced it from the other side of the fence, and I must say I enjoy it. At the same time however, I also still have a lot to learn.

So until I can tell you what the book is about, I’ll just say that I’m excited and working hard. I think all you web developers out there will find the end product really useful and I’m just happy that I can now submit my work via email, rather than taking an hour long train ride into downtown Toronto at 6 in the morning!

Content & imagery © Copyright 2007 by Jeffrey Sambells as appropriate.