Categories
Uncategorized

T-shirt of the day, and how to clear your (ahem) wizard friend’s browser history

delete my browser history shirt 2

You’d think that a wizard would know about “Privacy Mode” (which I sometimes refer to as “porn mode”), but I suppose one doesn’t pick up that sort of thing when one is on a mission to save Middle Earth.

This T-shirt is available right now for $15 plus free shipping at Woot!

How to delete your wizard friend’s (yeah, right) browser history

delete my browser history shirt

Should a wizard ever ask you to do him this favor, here’s how you do it. The instructions for Chrome, Firefox, and IE come straight from Woot!’s page for the T-shirt, and the instructions for Safari on Mac OS come from Yours Truly.

Instructions for Chrome:

  1. Open your browser
  2. Click the Chrome button in the top-right of the browser window
  3. Select History
  4. Click the Clear browsing data button
  5. From the drop down, select the duration of time you want to delete from your history. To delete all history, select the beginning of time
  6. Check the boxes of the data you would like to delete, including Browsing history and Download history
  7. Click the Clear browsing data button
  8. Slay balrog

For Mozilla Firefox:

  1. Open your browser
  2. Click the menu button in the top-right of the browser window
  3. Select History, then Clear Recent History
  4. Select the time range to clear. To clear all browser history, select Everything
  5. Click Clear Now
  6. Return to Middle Earth as angelic white wizard

For Internet Explorer:

  1. Open your browser
  2. Click the Tools button in the top-right of the browser window
  3. Select Safety, then Delete Browsing History
  4. Check the boxes of the data you would like to delete, including Temporary Internet files and website files, History and Download History
  5. Un-check Preserve favorite website data
  6. Click Delete
  7. Ride forth upon Shadowfax and lead the Rohirrim to victory at Hornburg

For Safari (on Mac OS)

  1. Open your browser
  2. Select Clear History… from the History menu
  3. Click Clear when the Are you sure you want to clear history? dialog appears
  4. Open Preferences by either selecting Preferences… from the Safari menu or typing ⌘, (the “command” and “,” keys simultaneously)
  5. Select the Privacy tab and click Remove all website data…
  6. Click Remove Now when the Are you sure you want to remove all data stored by websites on your computer? dialog appears
  7. Evade the omnipresent glance of the Eye of Sauron
Categories
Uncategorized

How we thought the internet would turn out 20 years ago, and what actually happened

how the internet turned out

Categories
Uncategorized

Mobile roundup: Apple’s astonishing quarter, Samsung’s upcoming quarterly report, and BlackBerry’s modest proposal

Apple’s astonishing quarter

the most profitable quarter ever
Yesterday, which also happened to be the fifth anniversary of Steve Jobs’ iPad announcement…

Apple posted the financial results for their fiscal first quarter of 2015, in which they made a net profit of $18 billion. That’s not just a record for Apple, but for any company, any time in human history. The previous record-holder was the Russian firm Gazprom, the world’s largest extractor of natural gas.

The insanely popular iPhone 6 and 6 Plus carried the company, who sold nearly 75 million iPhones (in previous quarters, they had yet to surpass the 60 million mark, never mind 70 million), a 46% increase from the same quarter in the preceding year. “Greater China” — Apple’s term for the area comprising mainland China, Hong Kong, and Taiwan — helped push Apple over the top. They accounted for $16 billion of the nearly $75 billion revenue for Q1 2015.

This success in China comes at a cost to Samsung, whose market share in the Middle Kingdom is dropping. There’s a good summary of this situation in Bloomberg Business’ article, Apple Learns What Samsung Forgot: How to Sell Phones in China.

If there’s a cloud in all this silver lining, it’s iPad sales, which dropped to 21.4 million, a decrease of 21% year over year. In Wired’s article, How the iPad Went From Massive to ‘Meh’ in 5 Short Years, it’s noted that the iPad lives in that zone between smartphone and laptop, a gap that’s being closed by larger phones and thinner, lighter laptops.

Samsung: Speaking of earnings reports…

samsung q4 2014 report
Samsung will release its 4Q 2014 earnings report on Thursday morning in Seoul (in the UTC+0900 time zone, 14 hours ahead of North America’s Eastern Time), before markets open. According to the Wall Street Journal, here’s what we should expect:

  • Net profit: 4.5 trillion won ($4.2 billion)
  • Revenue: 52 trillion won ($48.3 billion)
  • Mobile: operating profit down 65% from the same time during the previous year, shipped 10 million fewer units as well
  • Chips: a 40% rise in profit, and increased production of mobile processors for both their devices and Apple’s

BlackBerry’s modest proposal

blackberry free market
In a recent post on BlackBerry’s blog, CEO John Chen talks about net neutrality and carrier neutrality, and what he says sounds sane and sensible. He then follows with application/content neutrality, and that’s where things get a little weird:

Unlike BlackBerry, which allows iPhone users to download and use our BBM service, Apple does not allow BlackBerry or Android users to download Apple’s iMessage messaging service. Netflix, which has forcefully advocated for carrier neutrality, has discriminated against BlackBerry customers by refusing to make its streaming movie service available to them. Many other applications providers similarly offer service only to iPhone and Android users. This dynamic has created a two-tiered wireless broadband ecosystem, in which iPhone and Android users are able to access far more content and applications than customers using devices running other operating systems. These are precisely the sort of discriminatory practices that neutrality advocates have criticized at the carrier level.

Therefore, neutrality must be mandated at the application and content layer if we truly want a free, open and non-discriminatory internet. All wireless broadband customers must have the ability to access any lawful applications and content they choose, and applications/content providers must be prohibited from discriminating based on the customer’s mobile operating system.

In other words, “Developers and online services like Netflix should be mandated by law to build BlackBerry apps,” apparently forgetting that in better BlackBerry-dominated times, BBM was a BlackBerry-only service and a competitive advantage.

PC World’s Jared Newman does a great job of explaining why Chen is wrong when it comes to “app neutrality”:

On some level, Chen’s position is understandable. The point of net neutrality is to encourage innovation in online services, and to prevent Internet providers from picking winners and losers. Chen is saying that BlackBerry hasn’t been given a fair shot because app makers have declared iOS and Android victorious.

But there’s a critical difference between net neutrality and the app neutrality that Chen proposes: With net neutrality, non-discrimination is the default. The Internet stops being neutral only if Internet providers create new, discriminatory practices such as blocking, throttling and fast lanes. The point of net neutrality rules is to maintain the Internet in its non-discriminatory state.

With Chen’s proposal of app neutrality, no such non-discriminatory state exists. Each new platform merely creates more work for developers, thereby requiring greater investment. Under Chen’s proposal, the barriers to entry for a small startup would become greater, and innovation would be stifled. App neutrality may be beneficial for BlackBerry, but it would actually counteract the things that net neutrality is trying to achieve.

Our guess is that Chen added “app neutrality” to his article on net neutrality as a way to attract more attention to it, generate discussion, and keep BlackBerry on people’s minds. Well played, sir.

At least it’s not as bad as tweeting BlackBerry promotional messages from an iPhone…

this article also appears in the GSG blog

Categories
Uncategorized

Jimmy Kimmel asks people on the street for their passwords; security hilarity ensues

If someone walked up to you on the street and asked you what your password was, would you say?

The TV show Jimmy Kimmel Live sent an interviewer out on the street to ask (presumably) random people on Hollywood Boulevard what their passwords were. As you might expect, they showed only those people who gave away their passwords (and of that group, only those who signed a release form to appear on the show), but the fact that anyone did so shows that we’ve got a big security problem, and it’s us. A couple of them simply gave them away without question, while a couple of others has to be conned — very easily — into divulging.

This is the technologist’s nightmare. For all the security measures we put into our applications and devices, they can easily be undone by the users. That’s why I often make use of this cartoon when talking about security:

and in this corner we have dave

The article also appears in my personal blog, The Adventures of Accordion Guy in the 21st Century.

Categories
Uncategorized

SWIFTly rising up the programming language charts

swift on redmonk

Click the graph to see it at full size.

For a programming language that came out in beta in June, Swift’s rise in popularity is quite impressive. Stephen O’Grady writes in his report on Redmonk’s Programming Languages Rankings for Q1 2015, while most of the rankings stayed stable, Swift’s meteoric rise from 68th place in Q3 2014 to its present number 22 spot stands out.

As with any programming language popularity ranking system, Redmonk’s rankings are determined by looking at the online “trail” left by programming language users. Their system uses two key metrics:

  • Discussion of the language on Stack Overflow, where discussions are tagged with language names, and
  • Projects posted on GitHub, where projects are tagged with language names.

O’Grady writes:

During our last rankings, Swift was listed as the language to watch – an obvious choice given its status as the Apple-anointed successor to the #10 language on our list, Objective-C. Being officially sanctioned as the future standard for iOS applications everywhere was obviously going to lead to growth. As was said during the Q3 rankings which marked its debut, “Swift is a language that is going to be a lot more popular, and very soon.” Even so, the growth that Swift experienced is essentially unprecedented in the history of these rankings. When we see dramatic growth from a language it typically has jumped somewhere between 5 and 10 spots, and the closer the language gets to the Top 20 or within it, the more difficult growth is to come by. And yet Swift has gone from our 68th ranked language during Q3 to number 22 this quarter, a jump of 46 spots. From its position far down on the board, Swift now finds itself one spot behind Coffeescript and just ahead of Lua. As the plot suggests, Swift’s growth is more obvious on StackOverflow than GitHub, where the most active Swift repositories are either educational or infrastructure in nature, but even so the growth has been remarkable. Given this dramatic ascension, it seems reasonable to expect that the Q3 rankings this year will see Swift as a Top 20 language.

The other well-known ranking of programming language popularity, the TIOBE Index, puts Swift at the number 25 position in its January 2015 edition. They just named JavaScript as the 2014 language of the year, but as they observed:

It was a close finish. Swift and R appeared to be the main candidates for the title but due to a deep fall of Objective-C this month, a lot of other languages took advantage of this and surpassed these two candidates at the last moment.

Another interesting way to gauge a programming language’s popularity is to count the Swift courses and the number of students on Udemy. As of this writing, there are 53 Swift courses in English, and another 18 in other languages. Three of these courses have 10,000 students or more, the most popular of which is Rob Percival’s The Complete iOS and Swift Course: Learn by Building 15 Real-World Apps. It has over 53,000 students, who’ve paid as much as $199 (that’s the standard price, but there are often sales where you can sign up for much, much less).

If you’re the sort to try to read the tea leaves of programming language popularity to see what the Really Big Deals this year will be, keep an eye on what I’m calling the “Three M’s”: mobile, modelling data, and massive data. The TIOBE folks seem to agree with this assessment:

It is always tempting to try to forecast what will change in 2015. Objective-C will probably lose its dominant position in mobile app development, whereas Java and Swift will gain traction in that field. Java might even become number one of the TIOBE index again. Other trends in progamming are modelling and big data. Here, MATLAB and R appear to be the market leaders. There is a realistic chance that they will enter the top 10 in 2015.

Categories
Uncategorized

A very brief introduction to date formatting in Swift and iOS

The book 'Beginning iPhone Development with Swift'As I wrote in an earlier article, I’ve been working my way through Apress’ Beginning iPhone Development with Swiftan iOS 8/Swift-flavored update of Beginning iOS 7 Development. The original book was released in March 2014, the iOS 8 and Swift betas came out that June, the GM versions came out in September, and the revised book was released in mid-November. In the eight-month span between the original book and the revision, the authors didn’t have much time to try out iOS 8 and Swift, never mind do the rewrite, and as a result, they ended up with a few errors in their text, as well as leaving out some useful material.

I also wrote in that earlier article that in spite of these problems, I still think it’s a good book (as do some other people; it’s got 5 stars on Amazon as of this writing), and where some may see errors and oversights, I see opportunities.

Here’s another opportunity that came up…

The date picker exercise

Chapter 7 of Beginning iPhone Development with Swift, Tab Bars and Pickers, has you build a multi-view app where you use all kinds of “picker” controls. The first view you work on is one with a date picker; here’s a screen shot:

iOS app showing a date picker and a button labelled 'Select'. The selected date in the date picker is 'Today, 4:20 PM'

In this simple view, you use the picker to select a date, tap the Select button, and you’re presented with an alert that looks like this:

iOS app with date picker and button, overlaid with an alert showing the selected date as '2015-01-14 21:20:13 +0000'

Note the format of the date displayed in the alert:

  • It’s not formatted in the most readable way.
  • It has too high a level of detail. The user didn’t enter the number of seconds or a time offset.
  • I entered the time in my time zone (4:20 p.m., Eastern Standard Time, or GMT-5), but the alert is displaying the time for GMT.

Here’s what the book had to say about this:

Note
The date picker does not allow you to specify seconds or a time zone. The alert displays the time with seconds and in Greenwich Mean Time (GMT). We could have added some code to simplify the string displayed in the alert, but isn’t this chapter long enough already? If you’re interested in customizing the formatting of the date, take a look at the NSDateFormatter class.

I’d much rather have the alert look like this…

iOS app with date picker and button, overlaid with an alert showing the selected date as 'Wednesday, January 14, 2015 at 4:20 PM'

…but they’d left doing so as an exercise for the reader. Let’s go through this exercise, shall we?

The original code

Here’s what the view looks like in the Storyboard:

datepicker view

And here’s the code for buttonPressed in the corresponding view controller:

@IBAction func buttonPressed(sender: AnyObject) {
  let date = datePicker.date
  let message = "The date and time selected: \(date)"
  let alert = UIAlertController(
    title: "Date and time selected",
    message: message,
    preferredStyle: .Alert)
  let action = UIAlertAction(
    title: "That's so true!",
    style: .Default,
    handler: nil)
  
  alert.addAction(action)
  presentViewController(alert, animated: true, completion: nil)
}

In this code, we’re simply taking the value from the date picker’s date property and using its string representation in the string constant message. In iOS, dates are represented by instances of the NSDate class, which is all about representing a single point in time. While it has the date property for access the date stored within, it doesn’t have any members for formatting that date.

Enter NSDateFormatter

iOS has a number of formatter classes, whose job is to take data and convert it into a text representation, typically for the benefit of the user. These classes have names that end with the word Formatter and are subclasses of the abstract class NSFormatter. You can find out more about these classes in NSHipster’s excellent overview.

The book pointed us towards NSDateFormatter, a class that serves two purposes:

  • Converting NSDate objects into string representations, and
  • Converting strings into NSDate objects.

NSDateFormatter has a class method called localizedStringFromDate that does what we want. Given the following:

  • An NSDate instance,
  • A style specifying how we want the date part of the NSDate instance formatted, and
  • A style specifying how we want the time part of the NSDate instance formatted

…it returns a string representing the NSDate instance in the format we specified.

We specify the styles for the date and time using values from the NSDateFormatterStyle enum, which has the following values:

  • NoStyle: Unstyled.
  • ShortStyle: Typically numeric-only, such as 1/14/15 and 4:20 PM.
  • MediumStyle: A medium-length style, using abbreviations. Examples are Jan 14, 2015 and 4:20:00 PM.
  • LongStyle: A longer style with full text. Examples are January 14, 2015 and 4:20:00 PM EST.
  • FullStyle: Full style with complete details. Examples are Wednesday, January 14, 2015 and 4:20:00 PM Eastern Standard Time.

For our code, we’ll use FullStyle for the date and ShortStyle for the time. Here’s what the revised code looks like — the highlighted lines show the new or modified code:

@IBAction func buttonPressed(sender: AnyObject) {
  let date = datePicker.date
  let formattedDate = NSDateFormatter.localizedStringFromDate(
    date,
    dateStyle: .FullStyle,
    timeStyle: .ShortStyle)
  let message = "The date and time selected: \(formattedDate)"
  let alert = UIAlertController(
    title: "Date and time selected",
    message: message,
    preferredStyle: .Alert)
  let action = UIAlertAction(
    title: "That's so true!",
    style: .Default,
    handler: nil)
  
  alert.addAction(action)
  presentViewController(alert, animated: true, completion: nil)
}

This code gives us the date in a more user-friendly format.

This example scratches the surface of what’s possible with NSDateFormatter. You should take a look at Date Formatters, which is part of a larger section of their documentation called Data Formatting Guide.

dates and times in swift - smallRelated articles

How to work with dates and times in Swift, part one: An introduction of Cocoa’s date and time classes, and how they work together. This article covers UTC (Coordinated Universal Time), and the key classes: NSDate, NSCalendar, NSDateComponents.

How to work with dates and times in Swift, part two: Calculations with dates: Now that we’ve got the basics, it’s time to do some date arithmetic: comparing two dates to see which one is the earlier and later one, finding out how far apart two dates are, and adding and subtracting from dates.

How to work with dates and times in Swift, part three: Making date arithmetic more Swift-like: Cocoa’s date and time classes have an Objective-C heritage, which in the Swift context, feel kind of clunky. In this article, I look at ways — and by ways, I mean helper functions and class extensions — to make date calculations feel more like Swift.

How to work with dates and times in Swift, part four: A more Swift-like way to get the time interval between two dates: This quick article shows you how to make an operator overload that makes getting the time interval between two dates more like subtraction.

You might also want to check out: How to program an iOS text field that takes only numeric input with a maximum length

Categories
Uncategorized

Mobile pundit Tomi Ahonen’s predictions for smartphone vendors in 2015

tomi ahonen - mobile pundit

Tomi Ahonen, Nokia executive during its heyday, mobile consultant to Fortune 500 companies, prolific author, and all-round mobile curmudgeon, has published his predictions for the mobile handset industry in 2015 on his blog, Communities Dominate Brands. The title of his article, So the Smartphone ‘Bloodbath’ Annual Preview for Year 2015 – This is so boring, gives you a taste of his writing style: a little hyperbole, and a lot of stream of consciousness. It’s a big, monolithic block of text, chock-a-block with the asides that are his stock in trade, and it’s a lot to wade through.

We’ve taken Ahonen’s article and distilled it for what we think are the big take-aways from his 2015 predictions. As always, this sort of future-telling should always be taken with a grain of salt — while he often has brilliant insights into mobile tech (it’s why we read what he has to say), he’s been known to be oh-so-very-wrong from time to time (as everyone is).

Samsung

Samsung’s sitting pretty as the world’s largest handset maker, at almost twice the size of the next runner-up, and larger than the 2nd- and 3rd-place vendors combined. They’re also the largest of the “major handset makers who genuinely cater to the global mass market” (as opposed to Apple, who are aimed at the higher-end customer, or BlackBerry, whose focus is the enterprise). Their “everywhere” status means that they’ll make good money and stable, but it also means that investors can’t count on them to be as “ridiculously profitable” as Apple.

samsung galaxy k zoom

Samsung’s weakness, according to Ahonen, is their sales management, which he describes as “a total disaster”. They produce a confusing array of all-too-similar models, and fail to highlight interesting and innovative devices like the Galaxy K Zoom, which reimagines the smartphone as a camera with a great lens and 10x optical zoom that just happens to have a phone rather than the other way around, priced 20% below the latest iPhone model. Given that:

  • most people’s phones are their cameras these days,
  • we can’t post enough photos on Facebook, Twitter, Instagram, and SnapChat, and
  • camera quality is a big factor in many people’s smartphone choices,

you’d think that this would be a heavily-marketed, big-selling Android phone. But just try to find it at your local store.

samsung tizen

Tizen, Samsung’s troubled, oftendelayed device operating system that they they hope will free them from dependency on Google and Android, is expected to debut at this year’s CES, where it’ll debut on its TV sets. While the Tizen Alliance — a rag-tag group of a dozen hardware manufacturers who’ve promised to release Tizen-powered devices — seens to have fizzled out, Ahonen still believes that Samsung’s market size and clout, combined with the sort of effort and execution Samsung can make when they’re doing things right, mean that Tizen could be a game-changer over the next couple of years.

Apple

apple and ios

Apple has historically been one of Ahonen’s blind spots. Back when Nokia, Motorola, RIM, and Palm were the ones to beat, he consistently downplayed Apple. Later, as Nokia was going down in flames, his thesis was that the iPhone didn’t kill Nokia, Nokia’s response to the iPhone did.

apple watch

Ahonen’s prediction that we should start to see the final transformation of Apple into a niche OS and out of the mass market as Android assumes the position for mobile devices that Windows had for desktop computers. As for the Apple Watch, he says that yes, the iFaithful will line up to buy it, but in the end, even they will reject it in the long run.

Lenovo

lenovo

They did well for themselves in the laptop world by buying an internationally-recognized and respected brand — IBM’s ThinkPad — and turning it into a profitable business. It appears that they’re trying to repeat history now that they own the Motorola marque. Buying these brands are smart moves, says Ahonen, allowing them to sidestep the reputation of “cheap Chinese” that other vendors like Huawei and ZTE have to contend with, especially given the rave reviews their most recent phones have received. Moto, and not Xiaomi, is the biggest threat to Samsung, according to Ahonen.

Google

google

Here’s the Ahonen take in a single sentence: They won, and the only way they can lose is if they themselves screw it up.

The “Next Five” (Coolpad, Huawei, TCL, Xiaomi, ZTE)

the next five

Here in the U.S., none of these brands — Coolpad, Huawei (“WAH-way”), TCL, Xiaome (“SHOW-mee”, the first syllable rhymes with “cow”), and ZTE — are household names, but in Ahonen’s list, they’re the next runners-up after the top three smartphone vendors (Xiaomi recently moved up to the number 3 position). Xiaomi is getting a lot of press right now, partly because of its dramatic growth, and partly because they’re hardcore Apple copycats.

If he had to bet on members of the “next five”, Ahonen would put his money on Huawei and ZTE, because selling phones requires more than product, but also relationships with carriers worldwide. Huawei and ZTE have been selling telecom equipment to the carriers for years, so they have an “in” that upstarts like Xiaomi don’t.

Legacy brands (such as HTC, LG, and Sony)

legacy

Ahonen doesn’t see these vendors — HTC, LG, and Sony — making much of a mark. He says that while they may see the occasional quarter where they see “record profits” (or have moments in the sun, as LG seems to be having with well-reviewed phones like their G3), these will be fleeting moments followed by “obsolescent models are overflowing in the showrooms then there are returns to the factory and suddenly huge losses generated”. “The brand and sales channel,” he argues, “is of far more value to one of the rising stars (mostly from China) who want to take over the world than to a legacy manufacturer who suddenly sees big losses.”

BlackBerry

blackberry

“One of the saddest stories in tech,” says Ahonen. He says that the Passport and Classic missed the mark, and that while they may find a home catering to the enterprise, either as a hardware vendor or as a pure software play, they’ll never return back to the top 10. They’re even slipping out of the top 20 right now.

Microsoft (the company formerly known as Nokia)

lumia

Just as he has a bit of a blind spot for Apple, Ahonen has a sore spot about Windows Phone. He can’t talk about it without seething with rage, and especially at the Microsoft exec-turned Nokia CEO-turned Microsoft exec Stephen Elop. We’ll condense his four paragraphs on this topic to:

  • They’re soooo dead. We still have no idea why 1/3 of Lumia phones haven’t been activated!
  • Microsoft can’t kill off their smartphone business now. The best thing they can do is fire the current Windows Phone executive VP of Devices and Services (Elop) and let some hapless, well-intentioned patsy run it into the ground.
  • Expect them to ditch the phone hardware division sometime in the next three years.

The other mobile OSs

firefox sailfish ubuntu

The short version: They don’t stand a chance.

The Company still known as Nokia

real nokia

Microsoft may have bought Nokia’s handset business, but they didn’t buy the entire company. There’s still a company called Nokia that makes networking equipment for carriers, mobile mapping and navigation technologies, and even mobile devices. Right now, they’re contractually forbidden from making smartphones under their own brand for another year or so, but they’ve put out a well-reviewed tablet. Ahonen believes that with their relationships with carriers and the right execution, Nokia could make an Android-powered comeback. As a bonus, he follows this with a (long, so very, very long) “Hollywood scenario” in which Nokia’s ability to turn dying businesses around (as they did with Siemens’ telecom and Motorola’s networking divisions) and the brand loyalty they’ve earned worldwide make it surpass Apple and become Samsung’s biggest rival. It reads like fan fiction, and even he admits that it’s a very unlikely scenario.

this article also appears in the GSG blog