Categories
Uncategorized

Mobile data at US airports and on major US airlines

airplane takeoff

If you’re a reader of this blog, it’s quite likely that when you go to the airport, as soon as you’ve cleared security and found a perch at your departure gate or on your flight, you typically take out a mobile device and go online. You’re not the only one: look around on any plane or any airport lounge, and you’ll easily see dozens of people staring at glowing rectangles in their hands. Air travel consists largely of sitting and waiting, whether on the ground and in the air, and these days, much of that sitting and waiting is made a little less tedious by going online.

Mobile data performance in America’s busiest airports

departure lounge

Creative Commons photo by Phillip Capper. Click the photo to see the source.

The mobile networks performance research firm RootMetrics regularly posts their “RootScore” reports of mobile data performance by the major US carriers in various locations across the country, including airports. Their latest report on mobile data performance at the 50 busiest airports in the nation appears in their 2nd Half 2014 US Airport Mobile Network Performance Review, published in March. It shows how individual carriers’ networks perform at airports, in terms of online access for web sites and apps (which is one matter) and the completion of tasks (a completely different matter).

Yes, many airports do offer free or paid wifi service, but it’s often spotty, overloaded, and slow. There are many times when it’s better to go online using your own mobile data — especially if you have an all-you-can-eat plan — and that’s why this information is so useful.

The infographic below shows a quick summary of the RootMetrics report on airports, but we recommend that you read their writeup for the full story:

mobile data at us airports

Click the infographic to see it at full size.

Wifi offerings on US airlines

in-flight wifi light

While on the ground, you have the option of using your own mobile data plan or going with airport wifi. In the air, where you can’t use your cellular connection but are now allowed to use wifi (which will eventually change the meaning of “airplane mode”), you have to go with whatever wifi service the airline offers.

More recently, Fortune published the article The crazy economics of inflight wi-fi, where they astutely observe that many of the normal rules don’t apply. Paying more doesn’t necessarily get you better bandwidth, and that’s because the various airlines’ wifi services have different business models (most are treating it as a profit center, a handful as a differentiator) and technology (varying satellite technologies, as well as ground-based cellular services specifically set up for air travel). Another factor is that you’re sharing bandwidth with anyone else on the plane who’s using it. If you’re on a flight full of Poindexters doing business while en route, prepare for sluggish connectivity; if you’re on a red eye where everyone’s asleep and you’re on a deadline and pumped full of espresso or Red Bull, that bandwidth might be all yours.

As with the previous story, we’ve made a nice summary infographic for you, but it’s worth it to read the full article:

in-flight wifi on us airlines

Click the infographic to see it at full size.

What do all these bandwidth numbers mean, anyway?

speedometer

Simply put, “bandwidth” refers to the speed at which data is transmitted in a network, and these days it’s typically measured in Mbps, short for megabits per second. If you recall, all computer information boils to down to ones and zeroes — binary digits, or bits for short — and a megabit is about one million of those bits. The chart below should make numbers and rates of bits more meaningful:

Speed
(in Mbps)
Email a picture
(1.5 MB, or 12 million megabits)
Download a song or long PowerPoint presentation
(8 MB, or 64 million megabits)
Download an ebook or short video
(20 MB, or 160 million megabits)
20+ less than 1 second <4 seconds 8 seconds
10 2 seconds 7 seconds 16 seconds
5 3 seconds 14 seconds 32 seconds
1 12 seconds 64 seconds 160 seconds

this article also appears in the GSG blog

Categories
Uncategorized

How to fix the common “no sound from AVPlayer/AVAudioPlayer” problem in iOS/Swift programming

maxwell sound and his shoe phone

Maxwell Smart, the protagonist of the 1960s spy comedy Get Smart, and his shoe phone,
quite possibly the first mobile phone to make regular appearances on a TV show.

swift kickWhile answering this question on Stack Overflow, I noticed that in the “Related” list running down the right-hand side of the page that there were several similar questions. They essentially asked the same question:

I’m not getting any errors, so why isn’t the AVPlayer or AVAudioPlayer in my iOS app playing anything?

I’ve seen this question asked often enough that I’ve decided to post this article as an answer that I can point to from now on.

Here’s the short answer:

Because your AVPlayer or AVAudioPlayer went out of scope just as the sound started playing.

The long answer, complete with code examples, appears below.

To make my point as clear as possible, the examples will be simple: they’ll be attempts at creating an app that plays an MP3 located at a given URL. That way, all you have to follow along is either type in or copy-and-paste code without having to bring a sound file into your project. While these examples use an AVPlayer object to play an online MP3, what I’m demonstrating is equally valid for apps that use an AVAudioPlayer object to play an MP3 stored as a local file or in memory.

First, let’s do it the wrong way

Many “why isn’t my app playing any sounds?” questions on Stack Overflow include code snippets that make the same mistake that I’m about to demonstrate. Fire up Xcode and follow along…

xcode new single view application

Create a new single view Swift application in Xcode, then replace the contents of ViewController.swift with the following code:

// Our quick and dirty sound streaming app,
// done the WRONG way. It compiles,
// but doesn't play any sound.

import UIKit
import AVFoundation // The AV Foundation framework lets us work
                    // with audio and video files

class ViewController: UIViewController {
  
  override func viewDidLoad() {
    super.viewDidLoad()

    println("Setting up.")
    
    // If you'd rather not use this sound file, 
    // replace the string below with the URL of some other MP3.
    let urlString = "http://www.stephaniequinn.com/Music/Pachelbel%20-%20Canon%20in%20D%20Major.mp3"
    let url = NSURL(string: urlString)!
    
    // We'll instantiate our player here, inside viewDidLoad.
    let avPlayer = AVPlayer(URL: url)
    
    println("About to play...")
    avPlayer.play()
    println("...and we're playing!")
  }

  override func didReceiveMemoryWarning() {
    super.didReceiveMemoryWarning()
    // Dispose of any resources that can be recreated.
  }

}

Feel free to run it in either the simulator or on a device. You’ll see a blank screen and hear…nothing. The only feedback you’ll see in the app is in Xcode’s output pane, where you’ll see the messages from the println functions:

output

If you look at the code, you’ll see that everything happens in the viewDidLoad method. The output from the println functions — combined with the lack of error messages and the fact that the code compiled — suggests that code in viewDidLoad is being executed, even though you’re not hearing anything.

Take a look at where the AVPlayer instance is created. It’s inside the viewDidLoad method, which means that its scope is limited to viewDidLoad. Once viewDidLoad has executed its final line, the println function that outputs “…and we’re playing!”, all its local variables go out of scope, including avPlayer, which contains the reference to the AVPlayer object that’s supposed to be playing the MP3. Without that reference, that AVPlayer object gets cleaned up by the system and gets zapped out of existence. Simply put, the app did start playing the MP3, but stopped very, very shortly afterwards; probably on the order of milliseconds.

viewdidload 1

Hopefully, what I just told you gave you the hint for making the app work properly. Let’s try doing it the right way…

The right way

Replace the contents of ViewController.swift with the following code:

// Our quick and dirty sound streaming app,
// done the RIGHT way. It compiles,
// *and* it streams audio from an URL.

import UIKit
import AVFoundation // The AV Foundation framework lets us work
                    // with audio and video files

class ViewController: UIViewController {

  // This time, we'll declare avPlayer as an instance variable,
  // which means it exists as long as our view controller exists.
  var avPlayer: AVPlayer!
  
  override func viewDidLoad() {
    super.viewDidLoad()

    println("Setting up.")
    
    // If you'd rather not use this sound file, 
    // replace the string below with the URL of some other MP3.
    let urlString = "http://www.stephaniequinn.com/Music/Pachelbel%20-%20Canon%20in%20D%20Major.mp3"
    let url = NSURL(string: urlString)!
    avPlayer = AVPlayer(URL: url)
    
    println("About to play...")
    avPlayer.play()
    println("...and we're playing!")
  }

  override func didReceiveMemoryWarning() {
    super.didReceiveMemoryWarning()
    // Dispose of any resources that can be recreated.
  }

}

Note the difference: this time, we’re creating avPlayer as an instance variable. That means that its scope is the viewController instance. As long as the viewController exists, so will avPlayer. And since this app has only one view controller, it means that avPlayer — and the AVPlayer object it references — will exist as long as the app is running.

Try running the app again. As long as the simulator or device can access the ‘net and there’s actually an MP3 at the URL specified in urlString, you’ll hear that MP3 playing.

viewdidload 2

Once again: the answer to the problem is that your AVPlayer or AVAudioPlayer instance needs to be scoped at the view controller level, and not at the level of a method. That way, the player exists as long as the view controller instance does.

Categories
Uncategorized

Organizational structures: a survival guide

Doghouse Diaries has a great infographic that explains how to survive within the major organization types:

org structures

Infographic created by Doghouse Diaries. Click to see the source.

Related reading: Org charts of the big tech companies.

Categories
Uncategorized

Client brief vs. client budget

In two photos, one from Jurassic World and one inspired by it, here’s the difference between what many clients want and what they’re willing to pay:

client brief v client budget

Found via J.C. Hutchins. Click the photo to see the source.

Categories
Uncategorized

Don’t troll on LinkedIn

This appeared on my LinkedIn feed this morning:

ballsy good luck fixed

Commenter’s name redacted because everyone deserves a shot at online redemption.

In the end, the only reason LinkedIn has stayed a social networking site for professionals is that its users treat it as such. There’s lots of room for funny (or attempting-to-be-funny) replies in discussions on LinkedIn, but once the trolling begins, we lose a valuable forum for making those connections that make business possible.

(And seriously, trolling the Cancer Society? Ballsy! Good luck!)

This article also appears in The Adventures of Accordion Guy in the 21st Century.

Categories
Uncategorized

Taylor Swift to Apple: I knew you were trouble

taylor swift - i knew you were trouble

“But I say to Apple with all due respect, it’s not too late to change this policy and change the minds of those in the music industry who will be deeply and gravely affected by this. We don’t ask you for free iPhones. Please don’t ask us to provide you with our music for no compensation.”

If you read one article about Apple today, make it Taylor Swift’s piece about Apple not paying artists during the three-month trial period during which Apple Music will be free to users. If you read another, make it The Loop’s commentary on Swift’s piece.

Categories
Uncategorized

Mobile roundup: BYOD, FYOD, and SYOD

BYOD: Four big benefits

byod

Entrepreneur cites a couple of studies from last year that say:

  • Most companies have some kind of program allowing employees to use their personal mobile devices for work, and…
  • More than a third of the mobile devices in today’s workplaces are employees’ personal devices.

They point to four reasons why BYOD — that’s short for “Bring Your Own Device” — boost productivity. If your organization already has a BYOD program, you’ve prObably already internalized these, and if not, you may want to think about them:

  1. BYOD gives employees the freedom to choose where and how they work. This sort of freedom is so valuable to a significant number of people; 20% of respondents to a Flexjobs survey of 1,500 people looking for work showed that they’d take a pay cut for flexible work options.
  2. BYOD instills a greater sense of ownership. Letting people use personal devices helps them extend that sense of ownership to their work. The end result is often motivated, engaged employees who “go the extra mile”.
  3. BYOD is a way to attract and retain creative talent. Allowing the use of personal devices is a signal to employees that you trust their judgement on a number of dimensions: their personal choice of technology, their preferred way to work, and to work outside the constraints of the office. It says “we don’t think of you as a corporate drone, but as an intelligent, capable human being,” which is a powerful statement in a world that seems to be increasingly commoditized.
  4. BYOD can reduce your operating expenses. A well-crafted BYOD plan can cut the cost of purchasing, managing, and maintaining a fleet of mobile devices, and reduce your IT team’s workload.

The trick is to make sure that you’ve thought out your organization’s approach to BYOD. A key part of this process is coming up with a set of policies on appropriate use of BYOD devices for work, and educating your users about these policies and how to use their personal mobile devices effectively and securely.

FYOD: Fix your own device! (or: Supporting increasingly self-reliant users)

self-reliance-in-it

FierceCIO points to a recent study that features two seemingly contradictory observations about employees and their relationship with their companies’ IT departments:

  • They’re generally satisfied with their companies’ IT departments and the service they’re getting from them.
  • They’re also more self-reliant than ever and are willing to take care of their own IT issues, despite the fact that IT departments of all sizes are quick to respond to requests for help.

In fact, going to IT for help with a technical issue isn’t the first thing most employees with tech troubles do. The vast majority prefer to take matters into their own hands:

The practical lesson that you should take from this data is that if you want happy, productive people with a minimum of downtime from tech issues, you should provide them with IT resources that enable them to help themselves, especially for issues that can be handled without IT department intervention. Simple “how-to” guides for common tech problems posted on an internal company site — perhaps even contributed to and edited by your employees themselves, and edited and enhanced by your IT department — are often all you need to help maximize uptime and free your IT team to work on the issues that can’t be dealt with by end users.

SYOD: Smuggle Your Own Device

SYOD

The downside of the growing tendency towards IT self-reliance is something that we like to call “SYOD”, short for “smuggle your own device”. That’s when employees use personal devices for work, accessing corporate online resources without the knowledge or approval of IT departments. Ernst and Young have pointed out that SYOD often arises in the absence of any BYOD program, and in 2013, research firm Ovum reported that:

  • Nearly 70% of employees who own a smartphone or tablet use it to access corporate data.
  • Of those employees:
    • A little more than 15% access that data without the IT department’s knowledge.
    • Almost 21% access that data in defiance of an anti-BYOD policy.

If SYOD is happening at your organization, it means that there are needs that aren’t being met, and that people are being self-reliant, actively helping themselves and looking for solutions. This as an opportunity to help them, and perhaps even to recast IT as an enabler rather than a barrier.

this article also appears in the GSG blog

this article also appears on the enterprise mobile blog