Archive

Archive for April, 2009

Google Me

April 29th, 2009 amclean No comments

I’ve often found myself amused by the fact that “Google” has become a verb. I’m more than willing to admit that most of the learning I do is from Google, and most of my more tech-savvy friends would say the same. I have a friend that uses Yahoo and I harass him every time I see him use it.

Which brings me to this happy announcement: I am now for the first time officially on Google.

Categories: News Tags:

Application.cfc ColdFusion Feature

April 26th, 2009 amclean 1 comment

Admittedly my expertise in ColdFusion is a work in progress. I learn by reading and by doing, but of course there is a lot to read and do.

I started programming with PHP, under the prodding of my best friend who suggested I would have fun with it, and because he said it would serve me the best since it is very widely accepted. But after a time, need arose for a ColdFusion developer and so I began studying a new language.

Many tasks I struggled with in PHP are so much simpler in CFML. Forms, for example can be generated in a built-in Flex runtime, and look absolutely stunning when given proper formatting.

But I wanted to share my favourite feature of CFML, or specifically CF8 (since I’m not sure what functions were available to previous versions, this could be old, old news).

CFML has this great concept called Application.cfc. The ColdFusion application server will always look for this file before processing the code of any given page. And so, using this feature, I will show you what I found so cool.

Below is an example of my demo application.cfc file.

<cfcomponent>
	<!--- Name the application --->
    <cfset this.name="Simple CFML Application">
    <!--- Turn on session management --->
    <cfset this.sessionManagement=true>
    <cffunction name="onApplicationStart">
        <!--- Any variables set here can be used in any page in the app --->
        <cfset APPLICATION.companyName = "Company Inc.">
        <cfset APPLICATION.title ="Simple Application">
    </cffunction>
    <cffunction name="onRequestStart">
    	<cfinclude template="includes/header.cfm">
        <cfreturn true>
    </cffunction>
    <cffunction name="onRequestEnd">
    	<cfinclude template="/includes/footer.cfm">
    </cffunction>
</cfcomponent>

Now you’ll notice a few things about the code above. First I’ll note that I won’t bother posting the header and footer code since that would take up too much space and isn’t vital to this exercise. But most importantly I’ll mention the onRequestStart and onRequestEnd tags. Processing a CFML file constitutes the “request” and so what this is saying is “before you process the page, use the application.cfc to determine what to do before and after”.

So here is the cool part.  I place the application.cfc file alongside my index.cfm file (and of course my /includes directory holding the header and footer information), and… voila! With an absolutely empty index.cfm page containing exactly 0 lines of code, here is the result:

The beauty of being able to have all your constant variables, menus, etc. stored in a single file that will automatically be applied to code processed in the same directory is self evident. In fact I find it forces me to organize application structure more logically, since I tend to need to create small popup windows that need not have the same menu structure as most other pages, and so I put these into their own directory with a blank or modified application.cfc of their own (by default, the ColdFusion server will look in the page’s directory for the application.cfc file, then will check its parent, and will keep looking until it finds one or until it reaches the root).

So that about covers my favourite feature of ColdFusion (thus far).

Categories: ColdFusion Tags:

How To Uninstall Flash

April 25th, 2009 amclean No comments

I stumbled across a strange problem today. I was called to a home where I was told that Adobe Flash Player was giving errors. Easy fix, I thought.

The problem presented when the user was forwarded a link to a YouTube video and gave the error message: “Hello, you either have JavaScript turned off or an old version of Adobe’s Flash Player. Get the latest Flash player”. The diligent user promptly checked Internet Explorer’s settings and confirmed JavaScript was enabled (which I also independently confirmed). This of course left Flash as the culprit. I attempted to reinstall Flash from the Adobe Flash Player site which is supposed to confirm the install by playing a video, and although a box came up claiming it installed successfully, there was no video to confirm the claim.

After a bit more research, I came across the following Adobe Knowledge Base article “How to uninstall the Adobe Flash Player plug-in and ActiveX control”, which supplies an actual flash removal tool. Evidently the ActiveX installer in IE checks for the existence of the Flash ocx or possibly if it is registered, but if the file is corrupted, it will still report a successful install. Removing and reinstalling flash solved the issue. It may also be important to note that there were additional removal tools for OS X.

Categories: Windows Tags:

iLife ’09 Review

April 23rd, 2009 amclean 4 comments

(Imported from my entry at blog at blog.reallyhq.com, oroginally posted January 30th.)
Tuesday January 27th saw the release of iLife ’09 to the world.

I’ve had a chance to experiment with some of the new features, and thought I’d share them with our readers. I’ll be concentrating on my three favorite programs in the iLife suite, namely iPhoto, iMovie, and Garageband. iDVD and iWeb have made some UI improvements but are for the most part identical to the earlier versions, so for now I’ll leave them out of the review.

iPhoto

Mac users will generally be familiar with previous generations of iPhoto organization by event.  iPhoto ’09 adds to its arsenal the ability to search by person (Faces) or location (Places).

Faces

Faces grants you the ability to identify pictures of people by tagging their faces using the same process as Facebook does, except that iPhoto scans each photo after it is imported to detect what it perceives to be a face. I chose those words deliberately because certain patterns are rarely detected as false positives. Over the weekend I visited my in-laws out of town and my wife and I snapped a few pictures of our son playing with an umbrella that happened to have a floral pattern to it. Somehow these flowers (orange petals on yellow background) were detected as faces. There were a few other cases but they were rare and were caused by similar situations. When the photos are imported and scanned, any unidentified faces are tagged to the photo as unidentified but do not affect how anything is displayed until you begin identifying the faces. Any false positives are easily removed from the image by clicking on the black “X” at the top left of the box.

Once you begin identifying people in the pictures, the magic really happens. The more photos you tag of each person, the smarter the system gets. Once you have identified at least one photo, the system then provides suggestions from its catalogued database for matching faces. With either the click of a button or a simple mouse drag you can single or mass-select images to indicate whether the suggestions have correctly identified the person in question. All identified portraits are posted to a corkboard for organizing. Then with a double click you can see every tagged picture of that person, which can be extremely useful when you have as many pictures as I do and you are searching for a specific photo. So far I’ve imported a bit over 30,000 photos and although on my slightly underpowered Mac Mini struggles a tiny bit, the system handles the load quite well with little to no load time of the library.

Places

Places is a novel feature, one that may not be fully appreciated until newer generation digital cameras distribute among the masses. The technology behind this amazing feature is known as “GeoTagging”. Perhaps if you have played with Google Earth, you will have noticed small blue squares dispersed across the land and sea. When you click on them, they show a photo taken from approximately that spot. These images are tagged with GPS or latitude/longitudinal coordinates and are written to the file’s EXIF data (also referred to as Metadata), the same data that indicates the model of camera that took the picture, exposure settings, etc. When you import a GeoTagged photo into iPhoto, the program will then cross-reference the coordinates with cities, points of interest, municipalities, and more to indicate a name to the coordinates. I manually tagged a number of photos with a third-party program and imported them to iPhoto. Sure enough, the pushpins showed up on the map perfectly. Any of these pushpins can be selected to display all the photos taken in that location, or there is a button at the bottom left that will show all the photos tagged in the viewable area. Also worth noting is the ability to override the name of the identified sites with custom names. Instead of displaying the name the city or town you reside in, you can simply rename it to “Home”.

For those of you interested in using this feature, I would highly recommend purchasing a camera with a built-in GPS receiver. However, there are very few models to choose from at this point. The iPhone has a tagging feature associated with its camera, for those of you fortunate enough to own one. Failing that, there are viable alternatives to get the same tags to your photos, it just involves more legwork.

You can purchase a GPS data logger: a small handheld device whose sole purpose is to sync  up with a satellite and log everything from your latitude/longitude to your speed/elevation. I tested the AMOD GPL3080 with complete success. It can be set to write a log every 1, 5, or 10 seconds with varying levels of detail. This information is written to a file in a specific format that you can then import into your computer and marry to the photos taken along your route based on the timestamp on the files. This sounds more complicated than it is, and there is a surprising abundance of information available through our beloved Google on the subject regardless of the model of GPS logger.

iMovie

Travel Maps

My favorite new feature of iMovie would have to be the ability to create an animated travel map.
About two three years ago I took a trip to Scotland with a friend of mine. I had a camcorder with me nearly the entire time and had intended to create a DVD to give to my traveling partner when we returned. But some of the effects I had in mind for the DVD were at the time impossible to perform without some very professional and complicated tools that I simply did not have access to. One effect in particular was the travel map. The video below shows the end product, but the ease of creating this clip was mind-boggling. I merely had to pick a map (several to choose from), then pick a starting location and an ending location. The program filled in the blanks and created a beautifully rendered travel map. There are some finer customization options to add some unique elements to the appearance.

Transitions and Titles

A nice new feature of iMovie is the ability to override transitions by simply dragging a new one over top of the old one. In earlier versions, you were forced to delete a transition before replacing it. The same is true with titles, and in this case by bringing up a menu, you can hover the mouse over all the different title options which will display your customized text in realtime so you may see what it would look like without actually making the change. This feature alone has the potential to be a huge time saver.

GarageBand

Store Front


A pleasant new addition to the music-creating GarageBand is the concept of Lessons. Similar to the iTunes platform of purchasing songs or video, GarageBand allows you to download piano and guitar lessons from a built-in storefront. You can choose from the free lessons which go over the basics, or there are “premium” paid lessons from artists including Sting, John Fogerty and Norah Jones who show both simplified and advanced methods for playing some of their more famous songs. Having become rusty in my 20-some-odd years without piano lessons, for me this is a welcome addition to the already great software.

Categories: Software Tags:

Hello world!

April 22nd, 2009 amclean No comments

Welcome to the grand opening of my tech blog. My aim here would be to document tips and tricks for myself and others to use in application to ColdFusion, PHP, and MySQL development, and also for Windows and OSX platforms.

My background was once mainly server and network administration, but at the prodding of a very persistent professional who happens to be my best friend, I delved into the world of web application development. I also have a passion for reading, writing, film, television, and have a wife, a son, and a daughter. In short, I am a man of many hats.

I look forward to writing more, and in the meantime I thank you for visiting.

Categories: News Tags: