Detecting the Mobile OS version and type – getMobileOSver v1.2

This new release of getMobileOSverJS fixes a bug and adds new features.

The bug fix is if the OS version was two digits (e.g. 10.0), the version number was being truncated one char. This now functions correctly.

Windows Phone is now supported and tested with v8.0 thru v10.0.

There are new flags to make your coding easier, more readable and less error prone. The flags are .android .ios .ipad .ipod .iphone .windowsphone – these are set to true when those devices are detected, so you can say in your code if (getMobileOSver.ios) {...}

The OS version number is now divided into .major .minor . patch version numbers (not strings) make testing for a certain version much easier, for example if (getMobileOSver.major >= 9) {...}

Google Changes Search to Favor Mobile Friendly Sites

On Tuesday, April 22 2015, Google is changing its mobile search algorithm to favor sites that look good on smartphones, a move some are calling “Mobilegeddon”.

This affects searches done from mobile devices only. Desktop search results will not be affected.

This could be bad news for 40% of the top websites that are not mobile friendly, causing them to rank lower in search results.

You can test a website to see if a website is mobile-friendly with this Google test site: https://www.google.com/webmasters/tools/mobile-friendly/

Google also gives priority to pages that load fast. Building a mobile friendly website that loads fast is a must for businesses to be competitive. Contact us, the mobile web experts, to find out how you can improve your website to be mobile-friendly and fast.

Ian Rubbish and the Bizarros – Lovely Day – chords & lyrics

Saturday Night Live ended their 2013 season with a terrific song written by Fred Armisen and performed by Ian Rubbish and the Bizarros, which is Fred Armisen’s punk rock alter ego. This was the last SNL to feature Fred Armisen, Bill Hader (bass) and quite probably Jason Sudeikis (drums). It’s been a great run gentlemen. Thanks for all the laughs.


UPDATE: Download the MP3 single for FREE from the Ian Rubbish website!

Rolling Stone magazine talks about their final performance and the indie rock royalty that joined them on stage.

 

UPDATE: The video is no longer available on Hulu. Their hard drive must be full again.
Here’s the clip on Hulu, and the lyrics and chords are below. Enjoy!

UPDATE 2014-02: View the handwritten lyrics on the IanRubbish website. The lyrics below differ slightly from the original because it was the best I could make out. Bugger all!

UPDATE 2016-03: Check out the video on the NBC SNL site

Ian Rubbish and the Bizarros
"Lovely Day"
performed on Saturday Night Live
season 38 episode 21
May 18, 2013

(verse 1)
D   Dmaj7  D  Dmaj7

          D
When they smash
     Dmaj7
Your things
    D                 Dmaj7
And throw them in the bin
          E     A
You gotta say
              D
It's a lovely day.

(verse 2)
When your cup
of tea
Is filled with the sour milk, see
You gotta say
It's a lovely day.

(bridge)
C            G
Sometimes it seems like
                    D
things are falling apart
C      G              A
Just remember it's so lovely

(verse 3)
If your bike
collides
with where the wasps reside
You gotta say
It's a lovely day.

(verse 4)
If life is changing fast
The future's just the past
You gotta say
It's a lovely day.

(verse 5 a capella)
When your mates
are not around
And you need them
when you're down
You gotta hang on
It's still a lovely day.

(solo)

(repeat 5x - last time a capella)
It's been alright,
I've had a lovely night
With you

copyright © Fred Armisen
copyright © NBCUniversal Media, LLC
transcribed by Jim Bergman
http://jimbergman.net/ian-rubbish-and-the-bizarros-lovely-day

What WebKit version is in what Android version?

UPDATED February 14, 2015

In the data reported by my ScoreKeepr app, some useful info on the version of WebKit used in a Android release.

Please note this is about the Android OS webkit version, which is what you get when an app opens a webview. It is not the same as the default browser (Chrome) on Android 4.0+. Chrome uses its own rendering engine. Why is this important? For developers to know what is embedded in the OS. The Chrome for Android app is updated separately from the webkit version embedded in the Android OS.

Android version WebKit version
Android 2.1-update1 530.17
Android 2.2 533.1
Android 2.2.1 533.1
Android 2.2.2 533.1
Android 2.2.3 533.1
Android 2.3.2 533.1
Android 2.3.3 533.1
Android 2.3.4 533.1
Android 2.3.5 533.1
Android 2.3.6 533.1
Android 2.3.7 533.1
Android 3.2.1 534.13
Android 4.0.1 534.30
Android 4.0.2 534.30
Android 4.0.3 534.30
Android 4.0.4 534.30
Android 4.1.1 534.30
Android 4.1.2 534.30
Android 4.2 534.30
Android 4.2.1 534.30
Android 4.2.2 534.30
Android 4.3 534.30
Android 4.4.x 537.36
Android 5.0.x 537.36

The release of WebView in Android v4.4 is a huge step forward. It is a “complete overhaul” using the Google V8 JavaScript engine, and is based in the open source Chromium project which is the rendering engine and software stack that powers the Google Chrome desktop web browser. TheNextWeb wrote about this as well, which is worth reading.


The release of WebView in Android v5.0 is another step forward. The built in WebView can now be updated independent of the OS. source 1source 2

Why Google will not be patching pre-KitKit (4.4) webview.
(link to article on ZDnet.com)

Google launches a beta channel
for Android WebView on Lollipop

(link to article on TheNextWeb.com)

Beta Channel for the Android WebView
(link to article on the Android Developers Blog)


Chrome App version WebKit version
18.0.1025.166 † 535.19
25.0.1364.123 537.22
26.0.1410.58 537.31
27.x to 40.x 537.36
† Chrome for Android version number jumped from 18 to 25 with no versions in between.

If you have any additional information, please leave it in the comments below, and I’ll update the post.

UPDATE July 11, 2012 – added Android 4.0.4 (Ice Cream Sandwich)
UPDATE August 18, 2012 – added Android 4.1.1
UPDATE October 3, 2012 – corrected 534.3 to 534.30
UPDATE November 9, 2012 – added Android 4.1.2
UPDATE November 23, 2012 – added Android 4.2 (Jellybean)
UPDATE November 31, 2013 – added Android 4.2.1
UPDATE February 15, 2013 – added Android 4.2.2
UPDATE July 29, 2013 – added Android 4.3 & Chrome for Android info
UPDATE Aug 27, 2013 – added Chrome for Android v29
UPDATE Oct 26, 2013 – added Chrome for Android v30
UPDATE Nov 7, 2013 – added Android v4.4 (Kit-Kat)
UPDATE Jan 17, 2014 – added Chrome for Android v31 & v32
UPDATE April 8, 2014 – added Chrome for Android v33 & v34
UPDATE May 23, 2014 – added Chrome for Android v35
UPDATE Jan 11, 2015 – added Android v5.0.x (Lollipop)
UPDATE Jan 11, 2015 – added Chrome for Android v36-v40
UPDATE Jan 27, 2015 – added link to ZDnet article
UPDATE Feb 14, 2015 – added links to TheNextWeb and Android Developers Blog

Fing-Fong-Fooey


Fing-Fong-Fooey is a game similar to Rock-Paper-Scissors, with the same purpose, to select one person in a group to be ‘it’.

While Rock-Paper-Scissors (also called Ro-Sham-Bo) works with two people at a time, Fing-Fong-Fooey is more easily used with a group of people.

It works like this:

Everyone stands together in a circle, and each person makes a fist.

All together in unison, count to three while saying ‘Fing-Fong-Fooey’, and move your fist up and down with the count.

When Fooey is reached, each person holds out one, two or three fingers.

Add up the total number of fingers shown for all players.

Starting from the person that called for Fing-Fong-Fooey, count counter-clockwise starting with the person to their right.

The last person counted is ‘it’.

Example:

John, Lee and Mary are deciding who will drive everyone to the beach. Mary calls for Fing-Fong-Fooey. John is to Mary’s right and Lee is to her left. Each makes a fist and counts together Fing-Fong-Fooey. On Fooey, John puts out 2 fingers, Lee puts out 3 and Mary puts out 2. The total number of fingers is 7. Mary’s counts to 7 starting to her right. John-Lee-Mary-John-Lee-Mary-John. John was the last person counted and is ‘it’. He is the driver for today’s trip.

A variation that works better for larger groups, is to hold out up to as many fingers as there are people in the group. If there are five people, each person can hold out 1, 2, 3, 4 or 5 fingers. Otherwise there is an advantage to be one of the last counted in the circle.

This game was used in the TV show House M.D. in the first episode of season 7. Dr. Taub calls for Fing-Fong-Fooey with Dr. Chase and Dr. Foreman. Dr. Taub holds out two fingers, Dr. Foreman holds out two fingers, and Dr. Chase holds out one finger. The total number of fingers is five. Starting with Dr. Foreman who is to the right of Dr. Taub, the count goes Foreman-Chase-Taub-Foreman-Chase. Dr. Chase is ‘it’.

The game is alternately called Fing-Fong-Phooey, although the preferred spelling is Fing-Fong-Fooey.

Creative Commons License
Fing Fing Fooey by Jim Bergman is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License.
Permissions beyond the scope of this license may be available at http://jimbergman.net/about.

Test your web browser for WebSocket support

Google announced an improved way for a web application to communicate with a server. The new method is called WebSockets. You can read more info here on WebSockets.

Here is a quick test to see if your web browser supports WebSockets. At the time this post was published Google Chrome developer channel release 4.0.249.0 is the only browser to support WebSockets.

Here is the JavaScript code (or right click and save file as WebSocketTest.js):

function WebSocketTest()
{
  if ("WebSocket" in window)
  {
    // Google example code
    //  var ws = new WebSocket("ws://example.com/service");
    //  ws.onopen = function()
    //  {
    //    // WebSocket is connected. You can send data by send() method
    //    ws.send("message to send"); ....
    //  };
    //  ws.onmessage = function (evt) { var received_msg = evt.data; ... };
    //  ws.onclose = function() { // websocket is closed. };
    alert("WebSockets supported here!\r\n\r\nBrowser: " + navigator.userAgent + "\r\n\r\ntest by jimbergman.net (based on Google sample code)");
  }
  else
  {
    // the browser doesn't support WebSockets
    alert("WebSockets NOT supported here!\r\n\r\nBrowser: " + navigator.userAgent + "\r\n\r\ntest by jimbergman.net (based on Google sample code)");
  }
}

Sample HTML code (save file as WebSocketTest.html in same folder as .js file above):

<html>
<head>
<title>JimBergman.net - JavaScript: WebSocketTest</title>
<script type="text/javascript" src="WebSocketTest.js"></script>
</head>
<body bgcolor="#FFFFFF">
<a href="javascript:WebSocketTest()">Run WebSocket test</a>
</body>
</html>

You can find more information on WebSocket at the Mozilla Developer Network.


UPDATE May 4th, 2012:


Updated to report browser data using navigator.userAgent.
The previous version of this script used browser data from navigator.appName and navigator.appVersion, which are not consistent in different browsers (mainly Firefox).


UPDATE:


Result of this test on an Windows 7 PC in Google Chrome v4.0.249.0


Result of this test on an Windows 7 PC in Mozilla Firefox v3.5.5


Result of this test on an Windows 7 PC in Microsoft Internet Explorer v8.0.7100.0


Result of this test on an Apple iPhone in OS 3.1.2

Creative Commons License
Test your web browser for WebSocket support by Jim Bergman is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License.
Permissions beyond the scope of this license may be available at http://jimbergman.net/about.

7 Groundrules For An Intelligent Conversation

Everybody loves a great conversation. It is one of life’s simple pleasures. Sharing ideas and perspectives is a great way feel alive and connected. Looking back at the high points in your life, I hope there are some Intelligent Conversations in there.

So establishing some groundrules for an Intelligent Conversation can help you avoid getting sidetracked and wasting time. A groundrule is an agreement between everyone that is the foundation for what you are about to do. House rules is another common phrase used to describe groundrules.

Especially with all the political and financial news lately, there are many important things that are hard to talk about constructively.

Here is how to prepare for an Intelligent Conversation.

(1) Accept the other person WILL disagree with you.

This stops a lot of people right away. An Intelligent Conversation is not “cram your ideas down the other person’s throat”. The whole point of an Intelligent Conversation is to try and see the other person’s perspective. Just because someone disagrees with you doesn’t automatically make you wrong or stupid. Or them wrong or stupid!

It is best not to care if the other person comes around to your way of thinking or not. Your objective is not to prove the other person wrong, but to LEARN if your perspective is the most correct and useful.

If you want to have a conversation with someone that agrees with you, you can do that by yourself.

(2) No name calling or personal attacks. Ever!

This is an absolute requirement. Rather than saying “You’re a dumbass,” try “I disagree with that view, and here are my reasons why.”

Focus on ideas and concepts, not on the person sharing those ideas and concepts.

Telling someone why you think their idea is incorrect is vastly different than telling someone they’re stupid for thinking that way.

The first way will keep them open to what you’re saying, the second will make them defensive and they will stop listening.

(3) Always be polite.

There are many things included in this groundrule:

Listen first (Don’t interrupt.)

Be respectful and courteous (Don’t be condescending, rude or dismissive.)

Give the other people a chance to be heard (Don’t be a ‘ball hog’ and do all the talking.)

A bad example is the way discussions are held on cable news or talk shows. They are trying to get people to watch and sell advertising much more than they are trying to help you become better informed.

A good example? A well respected journalist is perhaps is the way it supposed to be done. How does Barbara Walter have a conversation vs Howard Stern? (I’m using these as an example of their style, not their substance.)

(4) Try and understand from their point of view.

Try listening to just the words the other person is using. Repeat back to the person what they just said, and see if you got it right before sharing your opinion. Ask them politely to explain to you again if you did not correctly understand what they are communicating.

Where many people get caught up is they hear what they want to hear. They filter what they hear through their own beliefs. Try to put yourself in the other person’s shoes.

For example, I like baseball more than football. Some people think that means I hate football. That’s not what I said — I like football too — but there is an assumption on the meaning.

“You shall listen to all sides and filter them for yourself.” — Walt Whitman

(5) Be willing to check your facts, and admit when you need more information or need to do more research.

“I don’t know” or “I don’t know enough” is not a bad thing.

Nobody knows everything, and there will be times people know things that you don’t. Stubbornly sticking to incorrect facts and information defeats the purpose of having an Intelligent Conversation.

Having an open mind has got to be one of the hardest things to do. But it can be one of the most rewarding.

This is really hard to do with topics like politics and religion. There may even be topics that have to be off limits, and cannot be discussed.

(6) Separate the emotional from the factual.

There are times you’ll feel a certain way about something just because. That’s OK. Everyone has things they believe that are not rooted in any fact.

There are things you associate very powerful positive or negative feelings with that hugely influence how you feel. Even if the facts contradict how you feel.

Accept your feelings, and accept other people’s feelings. This where you have to exercise self control, as feelings are not likely to change.

(7) Be humble in victory and gracious in defeat.

Nobody likes a gloating winner and nobody likes a bitter loser.

If you do persuade others to see things your way, be kind and tread lightly, or you may change their mind back. So no bragging or boasting about how smart you are or how right you are.

If you have changed your mind and now agree with someone else’s point of view, be grateful to have learned something new. It is not a contest to be won or lost.

Thank you for reading my thoughts on having an Intelligent Conversation.

What do you think? Are there any more rules that should be added to this list? Or any removed?

UPDATE 2009-12-29: An excellent post on How To Disagree on Paul Graham’s blog here: http://www.paulgraham.com/disagree.html

Written by Jim Bergman copyright 2008
Please excerpt no more than 50 words and link back to this page.

Creative Commons License
7 Groundrules For An Intelligent Conversation by Jim Bergman is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License.
Permissions beyond the scope of this license may be available at http://jimbergman.net/about.

Adding Costco Gas Stations to Google Maps

How many time have you gone to search for something on the Internet, and it just wasn’t there?

Many times travelling over the last few years, I’ve wanted to know where there was a Costco gas station along my route. Their gas prices are usually the most competitive in a particular area. Finding a location along your route is hard to do when all you have is a list sorted alphabetically by State and City.

So I took the PDF of Costco Gas Stations from the Costco website, extracted it, massaged the data to import it into a database, converted it into KML, and added it to Google Maps.


View Larger Map

I discovered after importing the data, that Google Maps paginates your data set after 200 entries. Since the original data was sorted by State and the City, all the locations are not shown at once. There are 300 Costco Gas Stations in the list.

A more useful arrangement would be to sort the data by ZIP code, and break it into two sets: East and West. I’ll try to find some time for that in the next week.

There were some data validation problems with the original data set also, mainly having to do with non-plain text characters in the data. For example, 1001 Boul. Jean-Baptiste-Rolland, Saint-Jérôme, Quebec J7Y 4Y7 failed validation. The é and ô had to be changed to e and o.

Disclaimer: I was not asked by Costco to do this, and have no ties other than a common membership.

In what way could this map be improved? Leave your suggestions in the comments.

Creative Commons License
Adding Costco Gas Stations to Google Maps by Jim Bergman is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License.
Permissions beyond the scope of this license may be available at http://jimbergman.net/about.