Blog

Thoughts on the Current State of Sync

There’s a problem with sync and its name is offline.

Sync on iOS is built on the false assumption that the Internet is everywhere. But the world of humans, airplanes and trains and subways and backroads and basements demonstrate otherwise. Holes of offlineness lurk everywhere and sync on iOS (both with iCloud and DropBox) really falls down hard if you step into one.

Offline Perils

On iOS, your data often isn’t on the phone until you try to access it. Doubtless there have been many a sad businessman who once in the air over the Pacific Ocean discovered that all his music didn’t get on the plane with him.

But that’s not all: did you rent a cabin far out in the woods to work on your book? If you didn’t download it to your iPad ahead of time, it’s going to be an unproductive retreat.

And the problem works the other way, too.

If you live in a city with a metro system you’ll be out of Internet range multiple times a day: and the data you generate on your iPhone might not make it back into the cloud.

For example: I use an app called Notesy to store ideas for future projects. And ideas flow freely while I’m slightly bored on the Underground.

Later, when I go to use the notes on the iPad version of Notesy – its empty. Why? Apps only sync when they are open. The solution isn’t a big deal: open Notsey on the iPhone then manually tell the iPad version to sync – but it’s an irritation that shouldn’t exist.

But the way iOS handles sync can lead to much bigger, serious problems: it’s possible to overwrite new versions of your data with old versions without warning.

Again, as example Byword is my text editor of choice and it uses Apple’s iCloud to sync documents. But because of the sync-only-when-open-rule this can happen:

Monday: Start writing a new script on my iPad.

Tuesday: Continue working on it on my Mac. No problems.

Wednesday: Go back to working on the iPad. But this time I’m offline for some reason. Because Byword can’t sync, I’m working on Monday’s version of the script and, the next time Byword on my iPad connects to the Internet it will replace Tuesday’s work.

While it’s possible to remember over the course of three days where the latest version of a document really is: 1) the user shouldn’t have to & 2) as the time between edits and the number of documents increases, errors are inevitable. Versioning is only useful when you know you've overridden something.

This kind of problem can destroy days or months of work[1]. The result is that I’m never 100% sure that what I’m working on is the current version.

And to be clear: this isn’t Byword’s, or any other app’s, fault. It’s a structural problem with the way iOS limits what apps can do.

That's not even getting started on the horror that can be unnoticed conflicts. For example, take a look at my TextExpander folder:

Thanks a lot, Dropbox.

Thanks a lot, Dropbox.

As most of my work migrates to iOS, sync problems have moved from a nuisance to a business problem. Here’s a list of just my work-related iPad apps that depend on sync:

  • OmniFocus (Task management)
  • Agenda (Scheduling)
  • Byword (Long-form writing)
  • Notesy (Project notes)
  • Notes (Very brief ideas)
  • Downcast & Instapaper[2] (Speculative research)
  • Evernote (Non-text research Notes)
  • 1Password (Secure website access)
  • TextExpander (Faster writing)
  • Dropbox (Document storage)
  • PDF Pen (Document storage)
  • Numbers (Finances)
  • Drafts (Rapid input)

There’s not a one where sync hasn’t messed up: sometimes with disastrous consequences.

Suggestions

Enough complaining, here are two suggestions for how Apple could fix the current problem with iOS sync.

1) Sync Requests

Just as OS X allows applications to specify their power requirements iOS would benefit from letting apps tell it what their sync needs are.

If the user adds data to an app on their iPhone while offline, the app should be able to tell iOS “please wake me up to sync as soon as the Internet is available.”[3]

Going back to my Notesy example from earlier, this would mean that notes created while underground would have a chance of making it to other devices without me having to manually update the app on my iPhone.

2) Midnight Syncs

Sync requests work when an app knows it has data to send to the cloud, but sometimes there’s data in the cloud that the app doesn’t know it needs.

To solve this, iOS should wake up apps to sync if the following three rules are true:

  1. The device isn’t being used.
  2. The device is plugged in and at 100% battery.
  3. The device is connected to WiFi.

Then after spending a day writing in Byword on my Mac, the updates can spread to all my devices automatically.

3) Pin Data

Lastly, iOS should have a clearer way to pin data down to the device. That way specific documents or entire Apps could be given clearer priority for always keeping data locally.

Even with pinning data, sync requests and midnight syncs there would still be problems – sync is incredibly troublesome – but these three should go a long way toward getting rid of the kind of problems that temporarily being offline currently cause.


  1. While it is possible to rollback to previous versions of files, often working on older versions of scripts creates structural conflicts that a simple diff can’t solve. This can lead to massive delays which in turn costs money.  ↩

  2. Downcast and Instapaper both have a feature that allows them to sync when you enter or leave a given location (such as your home). While this eliminates most of the problems mentioned above, it’s not a widely practical solution for several reasons: 1) Proper sync should not rely on the user running frequent errands. 2) Having every app on your phone wake up to sync every time you leave your house is a battery killer. 3) iOS devices are currently too RAM constrained to open every app at once anyway. ↩

  3. Of course, this suggestion would decrease battery life. So perhaps the user would need to explicitly grant permission to some apps to be able to request this sync.  ↩

Countries Inside Countries (Bizarre Borders Part 1)

Notes & Corrections:

  • If I didn't make it clear enough in the video, this is about land borders and thus doesn't include bridges. (Which is why Singapore isn't listed)
  • Lesotho is 70,000 times larger than Vatican City, not 70 times.

Script:

When it comes to neighbors, most countries have several options: like North to Canada or South to Mexico.

But there are countries that don't have this freedom of choice, not because they're islands but because they're trapped in another country. For example: tiny Vatican City, which fits inside of not just Italy, but also just Rome.

How Vatican City got surrounded is complicated, but not unique for there is also the Republic of San Marino, home to 30,000 citizens which Italy also completely surrounds. Italy, apparently, is a country that likes countries in its country.

But trapping nations is not just Italy's thing for there's also Lesotho, in South Africa which is both the largest encircled country at 70 times Vatican City's size and the most populated with over 2,000,000 citizens.

The thing that makes these three countries' borders bizarre is that any path in or out must go through the one and only neighbor they have.

But now take a look at The Gambia, which excluding that tiny ocean border, is as surrounded as any nation can get.

If we amend the previous rule to every land route, now we've made a category of single-neighbored nations. Which includes all four of these and countries like Portugal, where the only way in or out is through Spain. Who else is on this list?

Well, there's Monaco which must go through France, Qatar through Saudi Arabia Denmark through Germany, South Korea through North Korea (though South Korea might as well be an island nation for most practical travel purposes)

East Timor and Papua New Guinea both through Indonesia, Brunei through Malaysia

And there are two sets of twins: there is The Dominican Republic whose only neighbor is Haiti and Haiti, whose only neighbor is The Dominican Republic.

And the second set is: Ireland through the United Kingdom and the United Kingdom through Ireland.

A side note here:

While there are tons of 'British' places around the world, some of which border other nations -- these are not part of the United Kingdom. It's complicated.

Though if you wanted to, you could argue that the United Kingdom technically dug a land border under the channel to the continent, presumably to be closer to France, her best friend ever.

Finally, there's one more country in this category: Canada: the largest single-neighbored, nation in the world.

Credits:

Images: jamiejohn, Alaskan Dude, yeowatzup, little_frank, Di.Malealea

Music: Kevin MacLeod

Vatican City Explained

Script

Vatican City: capitol of the Catholic Church, home to the pope, owner of impressive collections of art and history all contained within the borders of the world's smallest country: conveniently circumnavigateable on foot in only 40 minutes.

Just how did the world end up with this tiny nation?

The short answer is: because Mussolini and the long answer is fiendishly complicated so here's a simplified medium version:

The popes used to rule a country called the Papal States that covered much of modern day Italy. It was during this 1,000+ year reign that the Popes constructed St. Peter's Basilica the largest church in the world -- and also built a wall around the base of a hill known as Vatican upon which St. Peter's Stood.

But the Kingdom of Italy next door thought Rome would be an awesome capital for their country and so conquered the Papal States.

His nation destroyed the Pope hid behind the walls of Vatican and conflictingly refused to acknowledge that the Kingdom of Italy existed, while simultaneously complaining about being a prisoner of the Kingdom of Italy -- which according to him didn't exist.

Rather than risk religious civil war by getting rid of the pope the Kingdom of Italy decided to wait him out assuming he'd eventually give up -- but religion is nothing if not obstinate -- and 1, 2, 3, 4, 5 popes and sixty years later nothing had changed.

Which brings us to Benito Mussolini the then prime minister of Italy who was tired of listing to the Pope complain to Italian Catholics about his self-imposed imprisonment so Mussolini thought he could score some political points by striking a deal which looked like this:

1) Italy gave the land of Vatican to the Pope.

and…

2) Italy gave the Pope a bunch of apology money

In return

1) The Pope acknowledged that Italy existed and

and…

2) The Pope promised to remain neutral in politics and wars.

On the off chance that, you know, Mussolini thought this might be a thing.

The deal was signed and a new country, Vatican City was born.

And today the tiny nation on a hill has all the things you'd expect of a country: its own government that makes its own laws that are enforced by its own police, who put people who break them in its own jail.

It also has its own bank and prints its own stamps and issues its own license plates, though only its citizens can drive within its borders presumably because of terrible, terrible parking -- and as the true mark of any self-respecting nation: it has its own top-level domain: .VA

But, despite all these national trappings Vatican City is not really like any other country. Hold on to your fancy hat, because it's about to get weird:

To understand the Vatican: there are two people and two things that you need to know about: the famous pope, the incredibly confusing Holy See, The Country of Vatican City and along with that the almost completely unknown King of Vatican City.

But first the Pope: who gets a throne to sit upon and from which he acts as the Bishop for all the Catholics in Rome.

Actually all Bishops in the Catholic Church get their own thrones but because the Bishop of Rome is also the Pope his throne is special and has it's own special name: The Holy See.

Every time a Pope dies or retires there is a sort of game of thrones to see which of the bishops will next get to occupy the Holy See.

So while Popes come and go the throne is eternal. As such the name The Holy See not only refers to the throne but also all the rules that make the Catholic Church the Catholic Church.

When Mussolini crafted that aforementioned deal, technically he gave the land of Vatican City to The Holy See -- which, believe it or not, is a legal corporate person in international law. Basically every time you hear the words The Holy See think Catholic Church, Inc of which the Pope is the CEO.

Now back to the King. The King of Vatican City has absolute, unchecked power within the country's borders and his presence makes Vatican City one of only six remanning absolute monarchies in the world, including Brunei, Oman, Qatar, Saudi Arabia, and Swaziland. The King's absolute power is why Vatican City can't join the European Union because only democracies are allowed.

Through Vatican City does, strictly speaking, have a legislative brach of government -- staffed by cardinals, appointed by the pope -- the King of Vatican City can overrule their decisions and at any time for any reason.

So why do you never hear about the King of Vatican City? Because though King and Pope are two different roles, they just happen to be occupied by the same person at the same time -- which has the funny consequence that, because the Pope is elected and the King is all-powerful but they're the same guy it makes Vatican City the world's only elected, non-hereditary absolute monarchy.

It's this dual-role that makes untangling Vatican City so difficult because the Pope, depending on the situation either acts as The King of the country of Vatican City or the Pope of the Holy See.

Got it? No? OK, here's an analogy:

Imagine if a powerful international company, say Grey Industries, had a CEO who convinced the United States to give one of its islands to the Company which then made the island into a new country -- Greytropolis -- with an absolute monarchy as its government and the law that the King of Greytropolis is, by definition, the CEO of Grey Industries.

It's pretty obvious at that point that the CEO should move his corporate headquarters to the new nation -- so that the laws of the country can benefit the company and the company's global reach can benefit the country. As for the man in the middle sometimes it's good to the the CEO and sometimes it's good to be the king.

That is essentially Vatican City.

But if you're still confused, don't worry even other countries can't keep it straight. For example the United Nations has The Holy See the corporation as a member but not Vatican City the actual country. And The Holy See gives passports to Vatican City citizens that other countries accept even though those passports come from a company, not a country.

And speaking of Vatican City citizens, they are perhaps the strangest consequence of the Pope's dual role as religious leader and monarch.

While other countries mint new citizens with the ever popular process of human reproduction Vatican City does not. No one in Vatican City is born a citizen -- and that's not just because, within a rounding error, there are no female Vaticans.

The only way to become a citizen is for the King of Vatican City to appoint you as one. And the King only appoints you a citizen if you work for the Pope -- who is also the King.

And because the King is all-powerful your citizenship is at his whim. If you quit your job for the Pope, the King -- who is also the pope -- will revoke your citizenship.

These rules mean that Vatican City doesn't have a real permanent population to speak of: there are only about 500 full citizens -- which is fewer people that live in single skyscrapers in many countries -- and all these citizens work for The Holy See as either Cardinals or Diplomats or the Pope's bodyguards or other Catholic-related jobs.

So it's best to think of Vatican City as a kind of Sovereign Corporate Headquarters that grants temporary citizenship to its managers rather than a real city-state like Singapore: which has a self-reproducing population of citizens engaged in a variety of economic activities both of which Vatican City lacks.

But in the end, the reason the world cares about Vatican City is not because of the citizens within its walls but because of the billion members of its church outside those walls.

Credits

Images: Tony Perrottet, Marc Simonetti, chongeileen, Chris Wary, buzzwax, proimos (2), edwardlangley, duncanh1, sonofgroucho, phxdailyphotolady, antmoose, jetheriot, isa lias, kengz, joseag, erwin soo, jamiejohn, iamagenious, Toshio Kishiyama, Perrimoon, jeffd, gaspa, alecea, dgodin, & Mike Murphy

Music: Kevin MacLeod

Q&A with Grey

Hello Internet,

Here we are: 500,000 subscribers -- well, actually… by the time I finished this video it's a bit more than that -- but who knew that after I promised to do a Q&A that the pope would resign?

Anyway...

When I uploaded my first explanation video just over two years ago now, I would never have expected this: over half a million subscribers and 16 videos with over a million views. Who knew rapidly spoken educational videos could be so popular?

Thank you, Internet.

Now, as promised -- though slightly behind schedule -- it's time to answer some of your questions.

"What's your educational background?" Rodrigo, Campo Grande, Brazil

I went to school in New York where I earned two college degrees, one in physics and one in sociology. After that I moved to London and earned a PGCE in Science Education, and became a qualified physics teacher in England.

"How long does it take to create a video?" Tracey, Ohio

I've tracked my time to get an accurate answer and every minute of final video you see takes me between 10 and 20 hours of writing and animating to make. So a typical 5 minute video is 50 to 100 hours of work.

While that's a lot, it doesn't include the research phase which is difficult to quantify -- some of the videos I've made I'd been collecting notes on for more than a year before starting.

"What was you favourite video make?" Brittany P, UK

The 2012 video was the most fun by far -- mainly because I didn't have to do a lot of complicated research and I got to complain about things I don't like.

"What change would you make to the education system?" Lumbajack Gangsta, Austin, TX

Instead of grouping kids by age, I'd group try grouping them by ability instead.

The idea that just because a kid is 14-years-old they're ready for trigonometry is weird. No other part of human society organizes itself this way and for good reason: it artificially slows down the best and brightest.

"What is do you think should be in the curriculum but isn't?" Jamaal, Arizona

Computer programming. I was kind of shocked and horrified when I started teaching in the UK to discover there were no real computer programming lessons.

Of course, there are only so many classes in the day, and everyone wants their pet subject taught in schools, so the equally important question is what to get rid of to make room for computer programming and, without the slightest hesitation I'd ditch the foreign languages classes -- after all, computer programming is getting us closer and closer to a universal translator anyway.

"What do you do when you receive pennies?" johnjac, Owasso

I die a little inside thinking about how political systems can distribute tiny costs across large numbers of people to the benefit of a few.

"What's your favorite element?" Rasmus, Denmark

I don't have a favorite but I'm irrationally fond of Tungsten mainly because my wedding ring is made out of it.

"What's the story behind your logo?" Joshua B.

It's basically a personal flag for my love of science and technology.

When I first started this channel, I thought that I would make videos mostly about those two things, but for various reasons, that hasn't happened yet.

And besides, it's not like there's a shortage of good science channels on YouTube.

By the way, If you really like the logo, you can get it on t-shirts and now coffee mugs -- which is particularly appropriate as coffee is the fuel that without which these videos could not be made.

"What do you do in your free time?" Sam L, Higginsville, MO

I like to horseback ride through the mountains.

Nah, it's mostly just Reddit.

Speaking of which...

"Would you rather fight 100 duck-sized horses or 1 horse-sized duck?" techtakular, Alex, va

One horse-sized duck. The cube-squared law means the legs of a horse-sized duck probably wouldn't be structurally sound. Easy fight.

"Are there going to be more "politics in the animal kingdom" videos?" Oli

Yes, I'm sorry, I know this playlist is unfinished and, if any of the videos videos I've ever made can be said to be important, it's these.

I promise at least one more about the single transferable vote, but I don't make any promises about when that will happen.

"Do you think third parties will ever gain ground in the United States?" Kerl, Florida

No.

The problem isn't politics or voter apathy, it's the system that creates the politics and voter apathy.

The US election system is pretty much the worst in the civilized world -- often voting for a 3rd party isn't just a waste it's also a vote against your own best interests.

3rd parties really can't thrive under those conditions.

"What's one technology you wish to see before you die?" zigonick, MO, USA

Immortality technology.

Where do you get your ideas?

It's been my experience that creative projects are self-sustaining. The more you write, the more things you want to write about and the more you program the more programming ideas you have.

For me each video spawns more videos. The daylight saving one, for example, originally contained spots for information about longitude and time zones and the seasons that got cut but will probably become their own videos at some point.

Also, I listen to a monstrous number of audiobooks and podcasts. If you're interested, you can see some of my favorites here. These help me keep in touch with the wider world and expose me to ideas and information that I would not have come across on my own.

"If you could live at any time in history when would it be?" Bonnie, Scotland

I wouldn't.

Allow me to summarize all of human existence with this single graph.

"What's the best way be successful on YouTube?" Joe Kowalski, 44074

Make videos people want to watch.

I'm not trying to be glib here but when asked this question I see many YouTubers talk about the importance of upload schedules and managing your social media and collaborations, and my experience says that's completely backwards.

If you're videos aren't interesting, no one will care that you upload them regularly. And twitter followers don't get you views, views get you twitter followers and people who want to collaborate with you.

I know it's not very helpful advice, but it's the most truthful advice I can give.

"What is the most interesting fact you've ever been told." Stu1278, England

It's difficult to pick just one from an entire lifetime, but last year Veritassium visited me in London and walked me through the process by which trees get water from their roots to their leaves.

That sounds really boring but it was one of the most mind-blowing conversations I've had in a long time.

"How often do you engage with professionals while you research?" theLarom, Washington, DC

For me, being confused and frustrated with a topic is a vital part of figuring out how to explain it to others so I'd say 95% of research I do on my own.

If I'm really out of my depth on a topic -- like the debt video and the pope video -- I try very hard to find an expert to look over the final draft of my script but time constraints and finding trustworthy experts is sometimes a bit difficult.

"What is your favorite internal organ?" trint99, DFW, TX

The Brain -- because it's the one that's me.

"Is there any part of science do you want to be proven wrong?" Jrod N, Massacusetts

Yes, the current interpretations of the ultimate fate of The Universe all make me sad.

"Can you answer 10 questions in under 30 seconds?" YouReadMeName

1: "What is your favorite scientific study ever published?" Marie, Reno, NV

Unskilled Are Unaware: Further Explorations of (Absent) Self-Insight Among the Incompetent.

Link in the description.

2: "Hogwarts house?" Zeinoun Awad, Lebanon

Ravenclaw. (I'd hope)

3: "Celsius or Fahrenheit?" Kubez

Fahrenheit.

4: Kirk or Picard

Picard.

5: "Do you wear glasses?" Spartacus McFancy Pants

Uh, yeah.

6: "Favorite empire?" Caleb Glickman, USA

The second one. Those monks were awesome.

7: "How can a country be totally self sufficient -- as in no imports or exports?" Amberjack1973

Simple, resort to a medieval level of technology.

8: "Favourite sport?" soccernhlfan, Canada

No.

9: "Should science play a bigger role in politics?" Dip, London, UK

What, you mean the method by which we determine truth? Yeah, I think it should.

10: "Can you answer 10 questions in under 30 seconds?" YouReadMeName

Apparently.

Alright, thanks to everyone who submitted questions -- it's been fun, Internet.

Credits:

Music by: Broke for Free.