No, Siri, I Don’t Want To Go There!

ScaredDriversApple’s Maps May Be Improving, But It’s On A Long Road To Recovery

The Problem

So much has been written about Apple’s Maps app and its really obvious errors—wrong street names, bad address placements, unnecessary steps, etc.—but one issue in particular that remains after so many updates to iOS and repeated bug reports to Apple is so obvious I wonder if the colleges Apple recruits from are teaching graph theory at all in computer science courses anymore.  The issue I speak of that causes rending of garments and gnashing of teeth?  Maps loves to change my route after I’ve explicitly chosen one.

When you choose a destination and request directions, a number of alternate routes are often presented.  On occasions like Saturday night, August 13, 2016, when CA-91 was shut down for construction, this useful feature helps avoid tied-up traffic.  As I’ve done often before, I chose one of the more out-of-the-way routes to avoid eventual backed-up traffic and set off on my way.  I might not have started my trip exactly as Apple’s Maps suggested—parking lots, roundabouts, and places to do a U-turn often require a slight deviation of a few hundred feet.

As I’ve experienced before, Apple’s Maps decided that those slight deviations were enough to completely alter my course from the one I chose, directing me miles away from the route I’d chosen earlier and attempting to place me directly in the line of the backed-up traffic I wanted to avoid.

Checking my original bug reported to Apple on this issue, I see that rdar://problem/12552627 filed on October 22, 2012, is still marked as open.  At least it hasn’t been closed as “working as designed.”

The Solution

When a user chooses an explicit, alternate route in Apple’s Maps, any re-routing algorithms should consider any deviations, especially those within a few hundred feet of the start, to be negligible and maintain the same route as closely as possible.  Hopefully Apple will start hiring software developers who can make good use of the tools present instead of wasting time interviewing prospects on how to reverse the characters in a string or any other algorithm that can be looked up in a textbook.

What’s The Best Speed To Avoid Deadlock?

EscapingFromTheOfficeWho Wins When You Keep A Buggy Design Over Fixing It?

The Problem

Multithreaded software development is very hard to do right under the best of circumstances, but there are some pitfalls that just scream “deadlock” without needing a debugging trace.

On a backup software application I worked on some years ago, I was improving its performance, both perceived and real, and after a number of changes that improved it significantly, I found it was possible to consistently put the app into a state of deadlock within two or three minutes.  There was no way to get around it—you had to kill the app—or reboot the computer, as most users would after seeing the Mac’s Spinning Pizza Of Death—to go any further, which was pretty bad for users who expected their files to be automatically backed up.

After a period of investigation, I found there were two threads whose code had existed since the source code’s first check-in (well before my changes), doing locks on the same two objects but in an alternate order from each other.  In other words, this was a classical case of obvious deadlock.  The only reason it never deadlocked before was because the software had been so slow before my changes that it was just pure luck.

An example of what I saw follows:

    // Let's lock the microwaveObject so other threads won't
    // mess with it till we're done
    @synchronized (microwaveObject)
        // Let's lock the refrigeratorObject so other threads
        // won't mess with it till we're done
        @synchronized (refrigeratorObject)
            // Do some stuff with microwaveObject and
            // refrigeratorObject

    // Let's lock the refrigeratorObject so other threads won't
    // mess with it till we're done
    @synchronized (refrigeratorObject)
        // Let's lock the microwaveObject so other threads
        // won't mess with it till we're done
        @synchronized (microwaveObject)
            // Do some stuff with refrigeratorObject and
            // microwaveObject

Obviously, I reversed the order of object-locking in one of the methods (the @synchronized operation) so both methods had the same order and checked it in.

Unfortunately, the original code had been written by a young developer who had extreme ownership issues with anything he wrote.  Since he couldn’t believe he’d made a mistake, this little change turned into a week of meetings with our manager who eventually let the developer try to prove over the next week that he could solve the problem by introducing some speed changes to one of the threads.

There are no pronounceable, respectful words I could use for that manager or my colleague.

After a week, the developer admitted defeat, and I began responding to calls from the recruiters who regularly contacted me.

Before I eventually moved on, that manager made two other executive decisions that convinced me to leave as soon as possible.

The first was that he was personally convinced beyond any discussion it would take twice as long to develop a solution to support two mounted cloud-storage hard drives (aka NAS drives) than supporting a single one (three times as long for three drives, four times for four drives, etc.), so he decided that to cut development time, our customers should not be able to mount more than one drive at a time.  I asked him if he’d ever heard of a for-loop—he looked at me like I’d grown a second head.  He had told me shortly after he took over the team (he wasn’t my team’s original manager) that he used to do software development.  His understanding of basic software development principles explains why he moved to management.

The manager’s second brilliant decision was to not support backing up the full data of Mac OS X files because the Windows team architect said the corresponding Windows product doesn’t support multi-fork/named-stream files (aka extended attributes on HFS+ volumes), so there’s no need to do the same for HFS+ data.

In addition to explaining how unethical it would be to produce a backup product to the cloud that didn’t preserve all of a customer’s data, I explained there was absolutely no technical reason preventing us from doing so, since our cloud-based drives supported WebDAV, and the Linux-based OS running on our cloud storage supported AppleDouble, which was its method for preserving extended attributes.

At least the manager didn’t listen to the Windows architect when he suggested we use Microsoft Silverlight to do cross-platform software development.

When I finally gave my notice, I was asked to stay longer, but I could not fathom remaining any more than a week to offer the needed knowledge transfer.

The Solution

Software development requires many skills, but one of the most important ones that cuts across practically all fields is a level of humility, to be willing to accept when your solution is either not right or even the best.  When you find yourself in such an environment with colleagues or management who consistently make poor choices that affect your ability to succeed, and they refuse to listen to reason—beware when “consensus” becomes a hammer—it’s best to move on or risk damaging your career by association.

Writing a sequel to Office Space might work, too!

If I Can Rotate My iPhone, Why Can’t I Lock It In Place?

SelfieTakenWhileLyingDownMy iPhone Can Rotate To Landscape Mode So Why Can’t The Device Orientation Lock Keep It There?

The Problem

There are a few apps that work better on my iPhone 6s in landscape mode, so I typically use them that way, and sometimes I want to use them while lying down.  As most people know, when you hold your iPhone while lying down, it’s very easy to accidentally move your phone slightly so it rotates back and forth between portrait and landscape mode when not desired.  Unfortunately, when you swipe up and select the orientation lock button, the iPhone switches back to portrait mode.  Apple’s official answer:  it’s working as designed.

The Solution

If an app is designed to work in landscape mode, and you rotate it to landscape mode, you should be able to choose the device orientation lock option to keep it in landscape mode, at least while within that app.  Other apps that don’t support landscape mode can do what they want.  It’s not that hard or unreasonable.  Often Apple does a great job with design, but not in this case.  The design needs to change.

Update [September 25, 2016]

On September 23, 2016, the web site published the article Feature Request: iPhone 7 stereo speakers amplify the need for Music app landscape support that details even the choice to not support landscape mode, regardless of whether or not the device orientation is locked, in one of Apple’s most important stock apps, Music.  Apparently not enough people at Apple have used the Music app on an iPhone 7 yet.

Also, Apple appears to have chosen to rename the Device Orientation Lock as Portrait Orientation Lock.  I guess that’s one way to choose to not fix a bug but instead to rename it as a feature.

Who Wins Between Yellow Street And Red Traffic Lights?


Street Lights Should Not Compete With Traffic Lights On North First Street in San Jose, CA

The Problem

In San Jose, CA, and many other cities, white street lights have been replaced with yellow street lights in an attempt to reduce light pollution.  While a noble cause, perhaps the departments in charge of this should have driven this route at night.

As you’re driving along North First Street in San Jose, the street lights appear in practically the same spots as the traffic lights from various perspectives, and there are points where a yellow street light is far more visible than the relatively close-by red traffic light.  Thankfully, I’ve never had an accident in that area, but I’ve seen a good number of drivers speed through a very stale red light.

The Solution

While it’s expensive and time consuming to make any change to city streets, hopefully the city of San Jose, CA, will examine the night driving conditions on North First Street and reconsider the placement of some of their street lights.  In the meantime, please be extra alert while driving, and let the city know about your observations, too.

Third-Party Mail Drop Support Needed In Apple Mail


iCloud May Be Secure, But Companies Prefer Their Own File Sharing Services

The Problem

For a few years, Apple’s Mail application has supported a great feature, Mail Drop, which automatically handles sending large attachments by storing them in iCloud storage and including a link in emails that expire after a period of time.  Unfortunately, after many reports of government spying, talks of back doors, laws against encryption, etc., even Apple’s iCloud is looked on skeptically by many.  Also, some companies prefer their own large-file-attachment services for security and network traffic reasons—I’ve used one while on contract with one company that requires a Java applet to work, and saying it’s not very usable is an understatement.

The Solution

In recent years, Apple introduced sandboxed extensions so applications may use solutions by third-party developers—things like marking up a document, using an alternate keyboard, etc., and it seems reasonable that this mechanism could be used in Apple’s Mail app to support third-party mail drop services.  When I asked Apple to support this, I was told there are no current plans to add this support.  It would be great if the appropriate teams within Apple changed their minds.  Maybe other mail application developers will beat Apple to the punch?

How Can Intrapreneurship Improve The Bottom Line?


Are Employees Modern-Day Serfs?

The Problem

We live in a constantly innovative world, but most innovation comes from smaller companies while larger organizations tend to be slower or less risk-taking.  While there are many reasons for this, one I know of personally is the lack of recognition employees get for being innovative.

Many companies financially reward employees for patents they author, but patents aren’t the only ways innovation increases, and employees may receive little incentive or support if they have an idea even slightly askew from their day-to-day work.  In fact, many companies actively choose to stifle their employees through employment contracts that state all inventions and product ideas are owned by the company even if not part of their workload or thought about and worked on by an employee on their own time with their own resources.

Some time ago I turned down a very lucrative software development job from a hiring manager who took umbrage at the side projects on my resume, projects I worked on to improve my own life and skills in software development (these focused on the Mac OS X platform at the time, although I also now work on iOS projects).  He said that if I were developing any software on my own time in my home with my own equipment, he wanted it only to be his software.  I asked him if he thought the car mechanic who took care of his car at the local dealership should not be allowed to work on his own car in his own garage in his own home.  He didn’t answer, and I told him that I could not accept his conditions.

Many companies find their own staff lacking the perspective or skills they need, so a common practice nowadays, especially by Silicon Valley giants, is to perform an acqui-hire, where a smaller company is bought mainly for its talent and sometimes its products, and all are folded into the purchasing company.  While this may benefit everyone in the short-term, there are plenty of articles and social media postings that report these employees left almost immediately after their stock options or grants were vested.  In most cases, these employees leave because they are no longer able to innovate within the culture of their new company.

The Solution

If employees had the opportunity to pursue their own endeavors on their own time with their own resources, companies might eventually be able to tap that talent.  When I’ve had the opportunity to do this without fear of being sued by my employer, I’ve often discovered more novel approaches in work-related problems no matter how unrelated the projects.

Looking at how Alphabet (aka Google) does this might inspire some companies.  However, companies should avoid any control, real or imagined.  An obvious first step is that an employee should not be required to ask any manager in their company for permission—many managers are simply too vested in their own projects and easily prone to turn everything down regardless of how well an employee handles his or her work.  One manager I had a few years ago was so controlling he told me to quit submitting bugs I found with the beta release of one of our company’s products no matter how much they hindered me (the product I worked on was an add-on to that product), and it was due to be released in a few months.

If the company should be involved at all, a completely independent department of intrapreneurship should be created, one whose only goals are the employee’s personal growth and the company’s success at large.  The department should only advise and assist the employee and not restrict in any way, operating as an internal incubator.  As an extra incentive, intrapreneurs should also be significantly rewarded if their companies choose to purchase their projects but not punished if they don’t.  The book publishing industry operates like this—a publisher usually has the right to buy and sell an author’s first few books, and if they decline, the author then has the right to shop it around.  At the very least, no-moonlighting rules should be made illegal from employment contracts.  After all, if a company’s CEO can be on the board of directors of another company, why can’t their employees work at another job on their own time?

Why Can’t iTunes Count?


A Human Interface Guidelines Indictment Against iTunes

The Problem

I’m an avid user and supporter of Apple’s software and hardware for well over 30 years and have also developed software for practically every platform the company has made—so far that includes the Apple II, Apple III, Macintosh (680×0, PowerPC, Intel), iPhone, and iPad.  In most cases, their solutions work great and are far more intuitive than any competitor’s, and when they don’t, I can usually figure out a workaround—sometimes changing a configuration script, developing a fix based on only the current operating system, building my own solution, etc.  Whenever possible, I also let Apple know about the issue using their bug reporting web app at and provide as many details as I possibly can—being a software developer, I know what it’s like to get a report that says “your software doesn’t work” with nothing else (the phrasing is usually more colorful and far less helpful).

And then there are problems that make you wonder if anyone ever bothered to test something.

For quite a few releases of iTunes under OS X (at the time of writing, that includes iTunes 12.4.1 under OS X El Capitan 10.11.5), I include its iOS device synchronizing functionality in that category.  Yes, I did say “quite a few releases,” and that means “years.”  And, yes, I’ve reported the issue repeatedly, but the only thing that changes is that the bugs get closed as duplicates.  On one of my first reports, I was asked to submit some info from my iTunes library, but still nothing has been fixed.

The problem I’ve seen is that iTunes doesn’t seem to know how to count the number of books I have on my iPad and how many it should synchronize with my Mac when I say I want all books synchronized.  Naturally, I’m concerned about whether or not some or all of my data will be lost.

While Apple’s iBooks app is designed to work with books purchased through the iTunes Store, it can also open PDFs and other files saved in the ePub format.  When I buy books from other online storefronts, I prefer to use iBooks rather than other apps due to its ease of use, readability, and intuitive UI.  As part of the iBooks ecosystem, those books can be synchronized through iTunes to all my devices for convenient reading at any time.

In the past few years, it’s this synchronizing functionality that iTunes should be doing well that’s broken:  it gets confused about whether or not I have a book, how many copies of it I have, whether I still want to synchronize all books, and whether there’s really an update to a book or not.

According to where I look, whether on my iPad or within iTunes, the number of books I have are 126, 140, 141, 148, 161, or 300.  In these cases, I’m referring to items of all types as books, both ePub and PDF files.

Count 126

No matter how many times I change the setting within iTunes on my Mac to synchronize all my books with my iPad, it keeps reverting to some subset of my books.  This number changes as I add new books, but right now, the selected number of books iTunes chooses to synchronize is 126.  Since the setting for all books appears to never get saved, once I plug in my iPad to my Mac and the automatic synchronization is finished, I then must choose my iPad’s icon in iTunes, the Books section under Settings, and change the setting from Selected books to All books, followed by the Apply button at the bottom of the iTunes window.  Once I change the setting to All books and the synchronizing is finished, my book count increases to 140 books.  I’ve also tried to fix this by manually selecting each non-selected book, but that’s tedious, and it still doesn’t fix the problem—the setting for All books does not stick.

Count 140

Once I correct iTunes every time I plug in my iPad so that it synchronizes all my books, the count of books becomes 140 with my current set of books.  However, that’s not the same number that my iPad believes I have.

Count 141

Within iBooks on my iPad, when I choose to select all my books, not counting my current samples from the iTunes Store, I get 141 books, which is close to what iTunes thinks is the full list, but which one is missing?  Why should I have to run through and look at each one?

Count 148

Within iBooks on my iPad, when I choose to select all my books, including the samples from the iTunes Store, I get 148 books.  A reasonable feature that should be added is an automatic category for samples like the ones for Most Recent, Titles, Authors, and Categories (I’ve submitted a feature request for that, too, and it’s still not in iOS 9.2).  Scrolling through a long list looking for a red triangle in the upper right corner of each book’s image is awfully tedious, especially when one of those samples may be within a series (i.e., two or more books related to a storyline).

Count 162

Within iTunes on my Mac, an automatic playlist of books gets generated under Books within the section titled On My Device, and it lists a total of 162 books.  Looking through it, some books are listed more than once, and iTunes shows affordances that suggest the media listed can be played or shuffled, which doesn’t make any sense for books.  In order to copy this list for any comparison at all, or to sort the list differently, I need to choose the button labeled Edit Playlist, which is at the far right side of the window, far enough away from the music-like affordances that it can be missed on a screen larger than 13″ (my MacBook Pro is one of the last 17″ models Apple produced—I like to see lots of stuff and prefer using larger screens).  In order to choose a different size for the columns shown, rather than dragging on the area in between columns, I must right-click (or control-click) on the column header and choose to automatically size either that column or all columns—some of my books have a number of authors, and that really makes for a wide view that cannot be resized afterwards.

Count 304

Within iTunes on my Mac, once I choose the button labeled Edit Playlist, the number of books shown in the left list is now 304.  Thankfully, in this mode, I can not only select all my books, but I can finally do something useful and copy them to the clipboard.  There are checkmarks next to each book, but they aren’t enabled, so that’s a loss.  When a book is duplicated in this list, each line is grouped with the same section at least, so there’s some code somewhere that recognizes the listings are the same.  When I paste this list in the text editor BBEdit and use the Kill Duplicates text filter, I find that I actually have 140 unique books.  In the right list for the Edit Playlist panel, the count for my books is 162.  Unlike the left list, I cannot copy the items in this list even though I can select all the items.  When I scroll through the right list, I can see some books duplicated.  The only good thing you can do with the right list is choose how to sort the list of books:  manually, by name, or by author.  Once you click the Done button, this sort order is reflected for the books listed in the On My Device, Books list, but you can’t choose ascending or descending order.  Also, books with numbers at the start of their titles are listed at the bottom of the list rather than at the top, a deviation from the order commonly used in the US, even while titles with definite and indefinite articles (A, An, and The) at the start are ignored in favor of the next non-article word; for example, my list shows this order:  Starfire, The Swift Programming Language, A Tale of Two Cities.

Purchased, Not on This iPad, iCloud icons, etc.

On iOS devices, there’s a section for items purchased and the ones not on the device.  Sometimes these numbers mean something, sometimes clicking on the iCloud icon works, and sometimes it doesn’t.  After choosing to download an update or a book that is supposedly not on my iPad (which almost always is actually present, openable, and readable), the setting rarely gets cleared even when forcibly killing the iBooks app or rebooting the device.

The Solution

Many have written extensively about whether iTunes should be one application or many, related to the fact that books, device synchronizing, and the like are separate from buying and listening to music, and while splitting the app up may solve the issues I’ve discussed, including fixing the mismatched affordances for shuffling and playing, the fact remains:  the app has serious bugs and poor human-interface-guidelines compliance that have remained for quite some time.  Some in Apple would say that iTunes should be given some love.  Hopefully, at Apple’s Worldwide Developers Conference 2016 next week, this will be demonstrated.