Upgrade to bgStretcher2

The bgStretcher2 script is now at version 2.2. This script allows you to view images full screen using only javascript and no flash. One side effect of showing an image that fills the screen in both height and width without changing the aspect ratio is that you are likely to clip part of the image. If someone comes to your site with a widescreen display and your images are square, then you will not see the bottom of you image. It can’t be helped.

There is a solution, but it involves a compromise. To make sure that you always see the entire image, you need to find whether width or height will fill the screen without clipping the images. Then you will have spaces on the sides or top depending on the aspect ratio of your image. This seems to be what most people are looking for, so I now default the script to do this. This can be changed by setting fitImageToBrowser:false in the config options to reset the script back to the original behavior.

New Version of bgStretcher2

Yea, we have a new version of the bgStretcher2 script. The version has been bumped from 2.0 to 2.1 and it is available for download right now. See the bgStretcher page.

What is bgStretcher?

Well, check out the official page, but simply, it is a way to have a javascript based photo gallery and slideshow that appears full screen in your browser.

So, what’s new?

  • First, there was a general rewrite to clean up and remove duplicate code.
  • The code was documented, so it should be easier to follow.
  • Fixed the issues people were having when clicking on albums quickly. (The slideshow would appear to stop working)
  • Moved some setup code from the html page to the bgStretcher2.js script.

You should be able to just drop the new bgStretcher2.js file in. I would advise cleaning up the html page that you are using to avoid conflicts. I have moved a lot of the setup code that was here into the main script file, which makes the html look much cleaner and simpler.

Thickbox content over flash movie.

I have been using the ThickBox plugin for WordPress on my site for a while now. When you click on a link, the images are shown in their own window with a darkened background. This worked great until I put together something on another of my photography sites here. At the top is a flash movie (yes, I know I don’t like having a flash movie, I will move on to HTML5 video when I can) and at the bottom are images. When you click on the images you get the same lightbox effect as the plugin. The only trouble was, it was pointed out to me that in IE, the video stayed on top. Oops.

A little searching the internet found the solution. Check out here for the fix, and here for some background on how it works and for other options you have. It is now working as expected. Thanks Steve for pointing that out to me.

iPad Ready and bgStretcher2 Update

I took this picture, from my iPod, of an iPad showing off my portfolio. It looks amazing. The images are actually sized perfectly for this device. But there was something weird. All the images in the night album, and the occasional other image won’t show. I get the blue image not found icon. Very weird. I wonder if they are exported with some weird settings. Not sure how that happened.

I was also able to confuse the javascript by pressing on the album and next/previous buttons. I will have to take a look at that. As noted yesterday, it doesn’t work well on the iPhone either. I also checked Kelby’s site again, and it looks great too, just not on the iPhone. I am wondering how that device reports it’s screen size. I might just need to look for that browser and then display presized smaller images.

If you want to get a rough idea of what your site would look like on the iPhone, check out iPad Peek. It doesn’t show the broken images like the iPad did, but it will give you a sense of size and how your content will fit. Just enter your site in the address bar at the top.

Are you iPad Ready? (No flash allowed)

Are you a photographer with a flash site? Do you know that the iPad, just like the iPhone, will not display flash content? What’s a photographer to do? Scott Kelby looked at this earlier today.

When Kelby first put up his flash portfolio, I decided to create a javascript only portfolio site to do the same thing. See my portfolio here, and my post here.

I think my code is successful, to a certain extent. It works great on the desktop, but doesn’t work as well on the iPhone, and I don’t yet know on the iPad. Need to try that out. Anyone that wants to comment about that, please do.

I think that my issue on the iPhone is the size of the images. I think they need to be smaller to save on bandwidth, and prevent the phone’s browser from having to scale the images so much. That may be the issue on Kelby’s site too, because his new non flash site didn’t work well on the iPhone either. His new portfolio is also a jQuery javascript site done by RC. It was too slow to be useable on my phone. I wonder if image size is the issue there to. Now his site was optimized for the iPad, not the iPhone, but I want mine to work on both. I will need to do some more testing with smaller images to see.

Full Screen Slideshow in Javascript

So I now have a full screen slideshow in Javascript, without using flash, and I wanted to tell you how I did it, and how you can do it too. I will talk a bit about Javascript here, but you will be able to download the jQuery plugin I have without needing to know much, if all you want is to implement the gallery.

I got the idea for this plugin after looking at a flash version of Scott Kelby’s portfolio. I just wanted to give it a try in Javascript.

I have created a permanent page for bgStretcher2, so it is easier to find from the side bar, so look here.

Upgrading WordPress and MySql on 1and1

Upgrading WordPress is trivial now. I wanted to upgrade from 2.8 to 2.9, so I went to my dashboard and pressed the “Please update now” link. I got a few warnings, a message to make sure I did a backup first, and then finally a button I could press to do the upgrade.

Only it didn’t work. WordPress 2.9 needs MySql 5.0 or higher. Crap. I had a 4.something MySql version. I went to the 1and1 control panel. No way to upgrade. No way migrate. S.O.L. When I had created my blog and the database for it, which didn’t seem like all that long ago, the default on 1and1 was to create a 4.x database. Now I was in trouble.

Hey, no problem I thought. I was told to do a backup before the upgrade, and I had done that. I used the phpMyAdmin tool to do the backup, I could do a restore to a new 5.x table the same way, right? Not exactly. I had a LOT of data in my database. 1and1 will only let you import 2meg. I had 4 times that. I needed to reduce some data.

I know, compression! First I tried to do the data dump with zip compression. Then I found out that the import tool didn’t support it. Sheesh. Then I tried the gzip compression. For me, this resulted in exactly the same file size. This wasn’t working at all. I just need to get rid of some data. Continue reading

I hate pair programming

Hand in Hand 

First, to clarify, I don’t hate the two lovely girls in this picture, but they can be quite the pair. Second, my mother told me never to say hate, so maybe that was not a good title. How about “I detest pair programming.”

Don’t get me wrong, I don’t want to be stuck in a cave for a couple of months and then crawl out bleary eyed and pronounce that I have created the perfect piece of code. I love collaboration. I go to others for help, input, guidance,¬†or to reciprocate for someone else.

What I¬†don’t like, is sitting¬†in a cube with two people where one person types and the¬†other looks over their shoulder all day.¬†Maybe I haven’t had the right person to do this with. Maybe¬†that is why the pair of kids in the picture works. They have their issues, but they get along well, and have similar goals most of the time.

When I am paired with someone, and they have the keyboard, I just feel like one of two things occurs. I am sitting there bored wondering why they just don’t let me type, or they are whipping through some material I have never worked with, and I am lost when I don’t get to “drive”. When I have the keyboard, I just find it annoying to have someone asking if the code could be done differently every 5 minutes. I don’t mind getting feedback, and code reviews are great. I have no problem working on a task, checking for ideas, implementing my approach, then getting feedback, and maybe refactoring. I just don’t like it in real time.

I don’t see the benefit. Luckily it only looks like we are doing this while several of us are new. It won’t last forever. Have you ever had to work for an extended time period in a pair? Did it work?

Space Needle Reflections

This post is all about the space needle, and reflections. Annie and I were out walking through the Seattle Center area when I noticed the reflections on the side of the Music Experience building. Annie had the idea to sit on the wall and get her with her reflection.

The Annie Experience

I also noticed that the reflection of the Space Needle was coming in really clear, so I posed her to get the best reflection.

Annie and the Needle

I had actually been here earlier and was looking for reflection shots, but this was later in the day and the light was a bit better. It was a better angle for the reflection.

Continue reading