Take a Screenshot of your iPhone

Mar 28
2009

I needed to take a screen shot of a site on my iphone for some testing at work, I had seen screen shots from iphones before but wasn’t sure how to take one. This is what you do:

Press the home button and the power button for about a second at the same time. The screen will flash white and the phone will make a camera noise. the image is saved as a .png in your pictures folder…DONE! simple and easy.
iphone screen shot

Making your web pages faster – Part 1 (JavaScript at the Bottom)

Mar 12
2009

From the dawn of web development we have been told javascript calls to external files (and page level too) should be placed in the head of your
document along with CSS, title, meta etc. Although this is not wrong a perceived page load to the user may seem longer with js at the top, let me explain:

First off some facts:
- XHTML strict doctypes (and others) allows for the <script /> tag anywhere in the DOM
- Web browsers stop page rendering operations to process javascript
- If your javascript is written properly JavaScript functionality won’t start it’s interactions until after page load

Web browsers download assets simultaniously until javascript is encountered, it then stops everything, gets the javascript, processes the script contents. You can probably see where this is going, if the svrips are in the <head> of the document all your javascript has to process before a single image, form element, <p> has rendered. The user waits, it processes, and once the js is processed we see the page come in.

Why is this a problem you ask when on a high speed connection you can barely notice?
Two reasons:
1. not everyone has a high speed connection. Through Critical Mass I have done work for some very large companies that have large user bases outside North America where often their “high speed” isn’t so speedy
2. Web 2.0 ( I hate that term, but I will use it ) is very javascript heavy, it seems that every project there is more and more interactions that are somehow touched by javascript. Keep the experience as snappy for the user as possible regardless of what we perceive their actual download experience to be.

Best practice would dictate that regardless of the size of the javascript download, having the page render so the user can see something happening then add your javascript events on page load at the bottom of the page.

Do your users a favour, don’t make them wait for javascript, let them see all your content and pretty pictures sooner! They will thank you*.

*Users may not actually thank you, but you can feel happy that you made your site better for them


If you are interested in this and more techniques, I didn’t think this up and you can see a list of them at: Yahoo! Exceptioal Web Site Performance Rules

Also you can check the efficiency of yours (and others) pages using: YSlow for Firebug

Disclaimer: this WordPress theme is not something I have built and I have not built in these techniques for froosh.ca, my personal site is always the last thing that gets attention.

Optimize Your Web Site For Weight (Where to start. Client Code)

Mar 24
2008

Many developers forget in this age of high bandwidth cable modems and RIAs that not everyone has the benefit of a fast connection. In fact, many of us forget that in some countries *cough* Canada *cough* one has to pay through the teeth for every bite we download on our mobile phones. What about lower bandwith users overseas, even behind the great firewall of China I’m told the high bandwidth users have a much slower experience that we have here in North America.

So, where does one start? How can you reduce page weight and keep the same beautiful design and web 2.0 functionality you worked so hard to implement? The following are some ways you can reduce initial, and post page load sizes, there are literally hundreds of ways to optimize your page download size, this covers a very small few.
Read the rest of this entry »

Installing a VAMP server (Vista Apache MySQL PHP)

Sep 13
2007

There are some minor challenges to install Apache/PHP/MySQL on Vista (shoulda’ bought another Mac, I know, I know, I need a windows machine too). I just used the installers I didn’t want to mess with compiling from source.

I don’t know why I always install the 3 applications in this order but it seems to go well for me.

Apache Download:

  1. Load the Apache download page in your browser.
  2. Under the heading: Apache HTTP Server 2.2.6 is the best available version click the link Other files
  3. Browse to: /binaries/win32/ in the directory structure, and download the version you require

PHP download:

  1. Browse to the PHP download page and download the latest and greatest Windows installer.

MySQL download:

  1. Browse to the MySQL download page and choose the flavour that’s right for you (probably Windows ZIP/Setup.EXE (x86))

Rinse and Repeat

Follow the steps below for each installer and all will work out well for you. If you have any problems during install go back and follow the steps again but click ‘repair’

  1. Because of the M$ ‘security features’ you have to run the installer as an Administrator (see post coming soon on this little gem :-| )
    1. Open the start menu and right click the Command Prompt icon, click “Run as Administrator”
    2. Change directories to the location of the installer, type the installer file name (hint: start typing then hit tab), hit enter.
    3. Follow the installation instructions as normal
  2. Repeat for next installer!

Hopefully after this you will have a working copy of each application. as far as setup…that’s a different beast, and there are lots of posts and books on that elsewhere, and I tire of typing.:) One hint though you will have to edit the httpd.conf file though the “Administrator” command window or open your favorite editor as administrator to edit the file.