I have written a couple of blog posts for Object Partners where I now work. They are both on creating a web server, or more specifically a web service API, with Node. The standard library to use is Express, but I have been exploring Hapi. There are two posts up so far. Check them out: Creating a Node server with Hapi and Joi.
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.
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?
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.
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.
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.
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 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.
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 have created a permanent page for bgStretcher2, so it is easier to find from the side bar, so look here.
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
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?
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.
I also noticed that the reflection of the Space Needle was coming in really clear, so I posed her to get the best reflection.
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.