Microformats and jQuery
June 20, 2008
I’ve been reading a book on Microformats, written by John Allsop. I’m not very far into the book yet, but so far it sounds very interesting.
I’ve read a fair bit about Microformats in many blog posts, and the microformats website itself is very informative. While I understand and appreciate that microformats are important for the greater good of the internet infrastructure, as a business owner and manager of the development team, I’ve been struggling to find a business proposition as to why we should start using them in our website development.
I assumed they would make coding more complex and perhaps increase client budgets (through development time) for no real gain for the client. I’m still tossing around the idea in my head, of how can the client really benefit from the use of microformats on their website.So I decided to play with a few microformats and dreamed up a hCard and jQuery combination (or mashup?).
Using jQuery it was really easy to dig into the body of the page and pull out address information, which is exactly what microformats are all about, creating markup that firstly humans can read and second computers can read.
Once you have the data using jQuery, your imagination is the limit really. I came up with a few trivial examples. The first example demostrates mining for the address and simply linking it to maps.google.com.au. The second example mines for the addresses and then as you click on them, plots them on a Google Map. I was amazed at how quickly and easy it was to program these examples using jQuery.
With this expirmentation I’ve found the business proposition and argument as to why we should start programming using microformats where possible; they make development easier and faster all the while increasing the infrastructure of the web!
You can download the source for the microformat and jQuery examples.
Tree Inspector, Version 0.3
June 4, 2008
I’m at it again! We had another tree problem the other day which I was involved in fixing. However, this wasn’t a standard sized tree, it was huge!
I whipped out the tree inspector and starting working away on the tree. Everything was going smoothly, but with such a large tree and so many levels deep, it became really confusing, really fast!
I’ve updated the tree inspector with +, - and | placed strategically so it looks a little more like the trees as displayed in Explorer (on Windows). I will update this to use images at some point, but I didn’t want to make the distribution of the tree inspector hard (at the moment it is one file, and nice and easy to install). I’ll look into embedding images into the HTML using base64 encoding.
I’ve also encountered a seemingly common problem with the basic HTTP authentication that I added in the last version. On a couple of windows based servers the basic http controlled authentication (using the WWW-Authenticate header) wasn’t working properly (better described here).
If you’re working with a shared host, this is not always so easy to fix. In this instance, it was easier to comment the authentication code out of the script, upload, use it and then delete the file. I decided to make it easier to disable the authentication, and now you can turn it on or off by changing the bUseAuthentication variable at the top of the script.
Happy tree fixing.
Tree Inspector, Version 0.2
May 26, 2008
I had a situation this morning, in which I had to whip out the Tree Inspector to resolve a problem with a FarCry tree. Some of the nlevel values were wrong, but Tree Inspector didn’t allow me to fix those; so now it does!
I’ve added a version number to the top (along with a h1 title), and you can now modify the nlevel values by checking the checkbox appearing next to each node.
It also occurred to me, that if this file sits unprotected on a website, someone who knows the name of the file can do some real damage. So I’ve added basic Authentication support to the script so it is now protected by default.
You should change the username and password before using the script, and I suggest you upload the file, use it and then remove it. Just like the install directory (that comes with FarCry), this is a file that shouldn’t be sitting on a production server.
Cairngorm Stub Files
May 23, 2008
I really like Cairngorm, I think it is an excellent framework to build RIAs in. I just don’t like all the work, memory involved in setting it up all the time.
I’m not really sure how others do this, but I usually grab an example application (such as the Advanced Cairngorm Store) and start ripping out all the bits and pieces I don’t need. This is a laborious and boring task, so I decided to do something about it.
I created a set of Cairngorm Stub Files (setup under the com.example path). They contain stub-code/files for most of the Cairngorm infrastructure that you would usually use in a Cairngorm project.
The files make a nice starting point, and because there are so many bits and pieces to the Cairngorm Framework, they also act as a nice cheat sheet to all of the classes, and patterns in Cairngorm.
Let me know if you find any bugs and I’ll update the stub files.
Automated Apple TV Conversions
May 21, 2008
I recently purchased an Apple TV. I’m really enjoying watching my iTunes purchases on my TV, rather than my little MacBook screen. And surprisingly, I’m really enjoying the RSS feature, there are some really great Podcasts available.
With the Apple TV having limited support for various popular codecs such as XVid and DivX I needed a way to quickly and easily convert my XviD and DivX content to H.264. Of course, you can use ffmpegx, but I wanted a more automated solution.
After much research using Google, finding bits and pieces but not one easy solution, I wrote an Apple Script to solve my problems.
I’ve attached the Script to a folder in my “Movies” folder called “ToConvert”. As soon as I drop a video file into the folder, it asks me if I’d like to have the file converted, when you select “Yes” it starts converting and some 40 minutes later drops the file into the “Converted” folder, as an iTunes and Apple TV friendly MP4 file.
The Script uses the ffmpeg encoder, but the one that comes as part of the ffmpegx application (ffmpegx is a nice GUI wrapped around ffmpeg and a few other video encoders, such as X264).
You can try the file out for yourself, but you will have to make some modifications first. Download the file and open it up using Apple’s Script Editor application. Make sure you have ffmpegx download and installed, I installed mine into the Applications folder, if you have installed it in another location you’ll need to adjust the path. You’ll also need to customise the path to the converted folder, my “Converted” folder lives in my movies folder, so you’ll want to customise that path too.
You can also customise the settings that are used to encode the video. I haven’t tweaked the settings in the Script yet, I plan too, but I don’t have too much time to muck around with these sorts of things. I’m not 100% with the encoding quality based on the settings currently, so I do plan on experimenting and altering those.
Once you’ve done all that, attach the script to a folder, drop a DivX AVI into it and, fingers crossed, it starts converting!
I might even spend some time improving the Script if enough people find it useful. Good luck!
Enpresiv Developers Blog
May 21, 2008
Wow, I haven’t posted in a long time! Almost one year. My blogging record never has been that consistent, however. With changes in my role at work, hopefully I’ll have more time to blog and more interesting things to blog about.
Speaking about blogging, we’ve recently launched the Enpresiv Developers Blog. It was only launched yesterday, so the idea of blogging is still working its way around the office, but I’m sure in time the number and quality the of blog posts will increase.
I’ll be posting on both blogs, and from time to time I’ll post the same post on both blogs.
The main aim of the blog for Enpresiv Developers to improve communication and programming knowledge within the office. So often, in day to day programming, we might resolve the same problem in isolation, unbeknown that the developer sitting next resolved that challenge last week. If we find anything that we need to store (its hard to remember everything, especially utility scripts or neat SQL code), think will be interesting or want to discuss with others, we’ll blog about it!
I’ve just posted an item about the Tree Inspector, a nice little file which can help you to resolve any problems you might be having with the FarCry Site Tree. It automatically highlights problems that it finds, and you can even attempt to resolve the problems directly from the same script!
PhotoCam; My First Adobe Apollo Application
June 9, 2007
I finally found a little bit of time to try out Adobe Apollo. My first attempt was mearly just to get one Apollo application up and running, so I decided to do something simple. PhotoCam takes your webcam stream, allows you to take a ’snapshot’ and save it off to the hard drive as a JPG. You can download the source or try the application out. Besure to have the Adobe Apollo Runtime pre-installed.
I must say, I really do like Apollo. I used the Flex Builder Extensions to author with, and it was just so easy to code and get working. I was expecting a few problems, being an Alpha product, but everything just worked! And if you’re a Flex developer, than you’re in luck; apart from the Apollo specific libraries, you’re basically coding a Flex Application!
reCaptcha
June 6, 2007
Every so often you stumble across an idea which is really quite simple, but actually does some good in the world too (a WIN WIN). I’ve recently come across such a project, which is an extension of the popular captcha concept.
Most of us use captchas daily; simply put, it’s an image containing a smudged word in which you need to type and get it right before you can move forward. It’s used in blogging applications all the time (when you’re posting a comment for example) and is used to determine if the user is a human or a computer (computers struggle to decipher the word in the image correctly).
Anyway, reCaptcha is a project in which the captcha image is a word from a scanned book that the computer can’t recognise and therefore needs to be deciphered. Humans can do this, computers can’t. We’re deciphering things for the sake of security anyway, so why not put our deciphering skills to some use!
It’s an interesting read, and there’s more to it than you first think. One of the problems they had to overcome was, if the computer couldn’t read the word, how would the captcha system clarify if the user got the decipher right?
What’s even better is that it’s completely free! It’s one of the better captcha implementations I’ve seen too, as it allows for audio challenges. There’s a few platform specific implementations of it including a nice version in ColdFusion by Robin Hilliard.
technorati tags:recaptcha
goplan.org First Impressions
June 6, 2007
Although ALL my time is taken up with my business Enpresiv, I do like to have a couple of side projects going to keep my development skills up (I’m doing less development with Enpresiv these days), and so I can try out some ideas and experiment a little.
I’ve just launched a small side project, and decided I’d give goplan.org a shot to help manage the development. I’ve used Basecamp before (the leading web application in this space) on a number of personal projects, and I’ve really enjoyed the experience.
I’ve only just started to use goplan.org so these are my first impressions, I’m sure I’ll have different things to say as I keep using it. However, I’ll start on a positive note with the design. I really like the design of goplan.org, it is clean, clutter less and is very simple to use; in fact, in points it’s too simple and a little more information at times would be handy.
I think the feature set is one of it’s strongest selling points. The feature that goplan.org does better than Basecamp is bug management or tickets. Basecamp doesn’t have a direct function dedicated to bug management or tickets, and because I’m a web developer, bug/ticket handling is a really nice feature to have.
The only bad thing about goplan.org is, it’s speed! I signed up yesterday and started my first project, and I must say, it was really slow. I was even questioning continuing my trial. However, when using working with goplan.org today, it was much faster. In fact, speed was not even an issue. I’m not sure what was going on yesterday, but I hope the speed continues!
Google Maps ColdFusion Tag; now with official Google Maps API Driving Directions support
June 5, 2007
As the rather long title says, I’ve just updated my Google Maps ColdFusion Tag with support for the new official Google Maps API Driving Directions. In a previous post, I launched Driving Directions for my Google Maps ColdFusion Tag, however it didn’t use anything official from Google to achieve this. Adding support for the official API from Google will allow me to make it more feature rich and much more robust and stable.
There are a couple of other nice enhancements, including some JavaScript methods so you can update the directions on the maps, without having to reload the page. I’ve also added some more driving directions examples.
You can download the source (or a zipped 0.4 version) and check it out via subversion over at RIAForge.
