Technology

Posts filed under Technology

It shouldn’t have been that hard.

Filed in TechnologyTags: , , ,

A week ago, I had finally decided on what I wanted in my online photo albums. I wanted a design that was simple to use and simple to look at, a design that would show off my photographs rather than distract from them. In html terms, to me, this meant a single page with controls to view the thumbnails and navigate between photographs, a single page without the flashes of multiple page reloads. I knew exactly what I wanted.

So I sat down and began on the design. Structure first; i.e., html, or in my case, xhtml. There was no style information in the structure. It was pure structure, the way xhtml is supposed to be. It looked good and straight forward. Then the style. CSS. I've done a lot of css work over the past year while I've worked on my blog, changing, improving and developing the blog's design. I've become quite familiar with css but I refuse to bow down to tweaking my css for the sake of arrogant egotistic non-compliant browsers. Writing the css for the photo album was not a piece of cake, but it wasn't difficult either.

Then there was the JavaScript. The JavaScript did nothing but hide and show various sections and photographs of the photo album. It did nothing else. It didn't rewrite the html or the css. It didn't do anything fancy except to remember the photograph being displayed and be able to show the next or previous one upon request.

Finally, there was the data. Each photograph would have a title and perhaps a caption to describe it. There would be a cover page photograph and there would also be one thumbnail for each photograph in the album. That was a lot of data. Writing that data each time I create a new album would be a lot of work, and I'd need a straight mind to remember to keep the html clean and valid while writing the data. It wouldn't be easy.

So I wrote an AppleScript application (i.e., 'Create blog album'). Whenever I needed to create an album, I would simply drag the photographs onto the application which would then launch, ask me for album information, ask me for the titles and captions for each of the photographs and then proceed to write the complete html file for the album. It worked great and didn't take all that long to write.

But there was a potential problem. What would happen if I wanted to add another photograph or two to the album? The Indonesia 2005 Day 1 album I was working on would not change over time but other albums I have planned would definitely change, albums like "Backyard Wildlife" and "Yesterday Hong Kong". How would I deal with that? It finally occurred to me that I could store the photographs together with titles and captions in Apple's iPhoto application and access the information via AppleScript.

I then edited the script application (i.e., 'Create blog album from iPhoto v1') to ask the user to choose from a list of iPhoto albums and then automatically glean the titles and captions from iPhoto before building the html file. It was wonderful.

I then reworked the whole process so that the person viewing the albums could choose from two sizes: smaller and larger. This meant creating another complete set of photographs and thumbnails, and it required another edit of the script application (i.e., 'Create blog album from iPhoto v2') .

The result was beautiful considering that I'm a relative beginner (admittedly an advanced AppleScript programmer but a novice at everything else). The application worked and it worked well…

The finished photo album

The finished photo album. It only took one week to write (sarcasm intended).

until people began to access the album from my blog. Some people, including my wife at work, reported not being able to see the contents of the album. Most of them were using I.E. which unfortunately is the most prominent of the arrogant non-compliant browsers. I was going to ignore the I.E. browser problem but my conscience got to me and I decided to see what I could do.

Some research on the 'net taught me that I.E. has its own way of looking at a web page, its own way of breaking the page down into individual pieces and its own way of finding those pieces. It wasn't really a shock to me; Microsoft has done this for years; but it was disappointing. Still, my JavaScript code was simple. It shouldn't be too hard to change the code so that it would work with I.E. as well as the other browsers, right?

Wrong. It was hard, too hard for me. This was my first attempt ever at JavaScript and although I was able to use both of the accepted methods for finding the individual pieces of the web page (getElementById and document.all), I still wasn't able to get the code to work.

In the meantime, I discovered another problem, something which to me was completely illogical. The css style code I wrote for the blog albums 'turned off' (i.e., display='none') any part of the web page which was not supposed to be seen. For example, when the Introduction section was shown, the thumbnail and photograph sections were turned off, and all of the photographs were turned off until the person viewing the album chose to view those photographs, one at a time. To my logic, if the photograph was not 'turned on', then the browser shouldn't download it. After all, the person wasn't going to see that photograph so why download it? Unfortunately, I.E., Mozilla and possibly one other modern browser I tried insisted on downloading every single photograph referenced within the album as soon as the album was loaded. With 22 photographs in thumbnail, smaller and larger sizes, that came to a total of 90 image files for the Indonesia 2005 Day 1 album. Sorry. To me, that was totally unacceptable.

In the end, I had to; at least temporarily; admit defeat and resort to the most basic of techniques: one html page per photograph. I edited my script application yet again (i.e., 'Create blog album from iPhoto v3') and now have a blog album that everyone can view without any significant problems. The album's not perfect. The JavaScript version was perfect, just not usable by many of the people who wanted to see it.

Just when I thought all of my problems had been solved, I discovered that there was no way to upload multiple html pages to my blog server (TypePad, admittedly designed for bloggers, not web developers). All in all, there were 48 html files for the Indonesia 2005 Day 1 album. Uploading them one at a time would take a lot of mouse clicks and a long time. Consequently, the album is not being stored on the blog server. It's on Apple's .mac server instead although just as easily accessible from my blog.

Update. Everything is now on another independent server run by LivingDot. I'm still using MovableType but I'm pretty much in complete control of the blog design. My photo albums still use the same design but are now exported directly from Aperture after I built a couple of custom Aperture web themes and an AppleScript script to make small adjustments to the output. Everything is nice now, for the time being at least ;-)

Sometimes, perfection costs a lot, and even then, the result might not be what you hoped for. I'm not finished with the blog album design yet. I still think the JavaScript version is workable and I have one or two ideas about where the problems are. If I can solve them, I'll definitely use the JavaScript version again. Until then, I'll have to be content with the plain old vanilla style html version of the album.

This would have been so much easier if everybody supported the standards, but there's always somebody who has to make it hard for everyone else.

Sigh!

Motorola’s ROKR iTunes mobile phone

Filed in Technology

My wife and I looked at the new Motorola ROKR iTunes phone today here in Hong Kong. We weren't impressed. The plastic used to build the phone was... too plastic! I wondered if it would survive even a single drop to the ground.

My wife who has been using a Nokia 8310 since I can't remember when decided to buy the Sony Ericsson W800i instead. While almost twice the price of the ROKR, I don't think we made the wrong choice and I'm sure it'll work well for her for many years to come.

And it's fully supported by Mac OS X's iSync so what else can I say.

The future of television

Filed in TechnologyTags:

Say goodbye to television as you know it.

Just as PodCasts are allowing absolutely everybody to make and distribute their own radio shows, VideoCasts are also allowing the ordinary people to make and distribute videos. No longer will what we can see on TV be controlled by the rich television companies. No longer will we be forced to watch the Olympic Games because every single available channel is showing them.

In the beginning, PodCasts were made by everyday people, but they became so successful that even big corporations like ABC and NBC decided to get involved and make their own productions. They were rightfully concerned about getting left behind. The same thing is going to happen with video and I don't think the television companies are ready for it.

Of course, video is a completely different animal to audio. Significantly more money and resources, and many more people are usually necessary to produce a good video series, so you won't see shows like Stargate or C.S.I. get released in VideoCast format any time soon.

But one day, VideoCasts will be just as professional and complex as today's television, and we'll be able to watch anything we want, when we want (at least until companies like Google in collusion with governments filter everything 'distasteful' from our search results).

VideoCasts will be the true IPTV that everyone is talking about. I can't wait!

Interview on moShow (2005/09/01)

Filed in Press, Technology

On Wednesday, I did an interview with the folks over at moShow where they specialise in podcasts and mocasts (I'm not sure if they're the same. Podcasts are supposed to be audio-only because current iPods; where the podcast name comes from; cannot play video whereas mocasts; ie, Mobile-casts; can be played on mobile cameras where video is possible.).

Anyway, I talked my head off and they had enough material for three episodes. The first episode is already available so if you're interested, head on over to moShow and listen in. The other episodes will become available on the coming two Thursdays.

Note. The interviews are in Cantonese.

Captioned images

Filed in Technology

Some of you may have already noticed. I've now added captions to my images. I think it's far superior to relying on Image Title parameters (ie, the Tool Tip text popups you usually see) and adds value to the images. I've been developing them for quite some time but couldn't get the images to centre on the page until today when a couple of nice people on the css discussion list gave me pointers. The web community is truly a great and helpful place.

I don't know how they look in IE but they look great in Opera, FireFox, Safari and OmniWeb.

Quiet on the blog front

Filed in Technology

My apologies to those of you waiting and hoping for new articles from me. I've been very busy over the last few weeks with computer upgrades and developments. I've also spent considerable time watching Dragon Ball Z and am currently spending every night at TVB working on a new series in which I only have a few scenes but because of the martial arts involved; I'm not the one fighting; require an exorbitant amount of time filming every night from five or six in the afternoon through to five or six in the early morning.

It is quite normal for me to require a rest after a period of being very busy. The computer upgrades and work I've done over the last few weeks took a lot out of me and I've not had the mental energy to write anything for the blog.

In addition, I've thought about the blog a lot and really want to avoid writing about daily trivial events. Some people have commented that blogs are digital diaries. I disagree but at the same time have to admit that it would be far easier for me to simply write about where I'll be and what I've eaten rather than about larger issues in general. I don't want this blog to be trivial so I've decided to keep triviality to a minimum. That means that articles won't be appearing frequently but those that do appear will hopefully be of a better quality and hopefully worth reading.

One piece of news. I've been asked to write a column for a local free newspaper called am730. My articles will be published once or twice a month and I'll copy them here as well after they've been published in the newspaper. Writing the articles will be difficult to say the least because the articles will be in Chinese, and they'll need to be interesting. Hopefully with time, my Chinese will improve, and hopefully, my readers will be patient with me in the early stages as I get adjusted to the new challenge of writing in Chinese.

Incidentally, if you are one of those loyal readers who visits my blog every day hoping to see a new article, remember that you can subscribe to the blog using the grey Bloglet subscription form under the Archives list to one side of the blog. Once subscribed, you'll be automatically notified by email of new articles posted to my blog.

Thank you everyone for remaining interested in my blog. I'll post again soon.

Mac OS X “Tiger”

Filed in Technology

Many people know that I'm an avid user of Apple computers. I've been using Apple computers since around 1989 when I purchased my first Apple computer, the IIci. Actually, it wasn't my first Apple computer. The first Apple computer I ever owned was a IIe purchased, used and sold back in 1983 before the first Macintosh was ever released.

desklamp iMacThese days, I'm using a 'desklamp' iMac with a 17" screen, running Mac OS X 10.3 "Panther". It's very solid. Applications almost never crash and when they do, they have no affect on other applications running at the same time. At this very moment, I have only seven applications running, but there are usually in excess of 15 applications running at any time including email, web browser, text editors and photograph processing applications.

For two years, I worked with the SilverFast scanning application from Lasersoft Imaging so I know my way around scanners pretty well. I recently switched to digital photography when I purchased the Canon 350D. One of the reasons for this was that it simply takes too long to scan film. Scanning one roll of 35mm film can take hours, even with the latest Nikon Coolscan 5000ED film scanner (I own the Coolscan 4000ED). Of course, I'm extremely finicky about my photos so I take time to make sure that every scanned photo looks as good as possible.

Last month, just one day prior to my birthday, Apple released the next version of Mac OS X named "Tiger". I would usually update my computer almost as soon as the upgrades are released but I'm taking my time this time. Tiger is a big upgrade and I'm definitely going to upgrade. With the new version of iSync, I'll finally be able to synchronise my computer's calendar and address book with my Nokia 7610 phone (although I wonder how many of my customised phone entries will get synchronised). And the ability to search for and find anything anywhere will be a big efficiency boost with the use of Spotlight.

For now though, I'm going to wait. The first version of Tiger was rushed out the door, possibly to increase company earnings for the current quarter, and possibly to get broad public beta testing done before the upcoming developers conference. Whatever the reason, I don't think people should upgrade to Tiger just yet.

iBook_green I've read that update 10.4.1 is coming soon, possibly next week. I've also read that it only fixes three dozen or so known bugs. To me, that's not enough knowing the number of bugs reported on the Macintouch and Macfixit sites. I'll probably wait until 10.4.2 is released before I take the leap and upgrade my computers; including an aging but still totally usable green 'clam shell' iBook.

Since I'm talking about Apple computers, it might be prudent of me to mention that there is a Macintosh User Group here in Hong Kong. I was a member for many years and still attend their meetings from time to time. I have quite a few friends in the group, and quite vivid to me at this very moment is the memory of being at a HKMUG meeting when news of the 911 attack was broadcast on television. The meeting was stopped and all attention was cast to the television as we watched the second plane hit the towers. I'm very cynical when it comes to 911. I believe Bush shares much of the responsibility for the attack but that's a sensitive issue and one which I'll not discuss at this time.

In any case, hold off until 10.4.2 before upgrading to Tiger; if you can stand the wait.

A better look for my blog

Filed in Technology

A few days ago, I began looking at the way my blog was styled and considered methods of improving it or at least making it look nicer. I'm a perfectionist in many ways so placing style information within the actual web page was not the way to go. Instead, I used style sheets (technically known as Cascading Style Sheets or CSS for short). They're similar to the way text styles work in word processors. They were developed by the World Wide Web consortium as a way to simplify and centralise the visual design of web pages but took a very long time to be fully embraced by the web community at large. These days, we're looking at version three of the CSS standard and other than Internet Explorer, almost every browser is on board to fully support the standard soon.

I'm not going to bore you with the techie details because they are boring for all but the people actually using CSS to make their web sites more attractive, functional and manageable.

Anyway, after three nights of customising the layouts and style sheets, my blog's pages are fully scalable. So if you think the text is too small to read, simply enlarge it using your web browser's Bigger Text function and the whole page will scale appropriately; even the left and right columns. If you need really big text, I'd suggest getting a 17" monitor and enlarging the page to the full size of the screen. I tried it, and it works great.

Other improvements: Pictures within the stories will scale down if you narrow the middle column, and they now have a nice black border for better definition. The calendar in the left column now indicates dates with linked stories much more effectively.

And in case I forget, there's also the new Subscribe to email notification feature in the right column. If you'd like to be notified every time I post a new article, type your email address into the field and click the Subscribe button. RSS news feeds still work too if you'd prefer to use RSS.

I'm definitely not a web expert, so if you find any glitches in my blog regarding the placement and size of the text or pictures, please let me know.

As advanced as CSS is, there are still a few aspects of it which are quite mind-numbing. How properties 'cascade' is a little complex in some situations, and creating a scalable page using relative em values was not easy either. The technology still has a way to go before it's really mature, and we're still waiting for wysiwyg web page layout applications which fully support CSS rather than tables and in-tag style properties. On the other hand, if you write the code for your web page with sound structure, then laying it out and adding appearance properties to it becomes relatively easy; once you fully understand how CSS works.

I won't talk much about web technologies. I suspect that for the majority of my readers (Douglas excepted of course), web technologies would be very boring to read about.

My next article will be more to the liking of most of my readers: ie, coffee!