Slowness of Google Docs

Don’t get me wrong. I love Google Docs.

But it’s slowness drives me crazy.

When I start opening a Doc it goes through several frustrating phases (with very rough times):

  1. blank page – 5 seconds
  2. content (which can’t be edited) – another 10 seconds
  3. rendering table of contents in sidemenu – another 3 seconds

The frustrating stages are 2 and 3 where it feels as if I should be able to edit content but can’t.

In total, it’s almost 20 seconds before the content can be edited. What makes it even more frustrating is that during phase 2 it appears as if the content can be edited but can’t until various other things have loaded.

Software and cascading problems

One of my pet peeves about software is how problems seem to cascade. E.g. I have an app I built which is on the App Store. I temporarily took it off the market as a supplier who provides some of the data was experiencing problems. They resolved the issue so I decided to put the app back on the market. I have a bookmark to the iTunes Connect dashboard. The dashboard needs a password. To avoid having to remember all these passwords or write them down somewhere I store in another piece of software called 1Password.

However, I got an error saying “Browser could not be verified”.

I Google’d the problem but the page (https://discussions.agilebits.com/discussion/72074/browser-could-not-be-verified-after-updating-the-1-password-app-on-mac ) was loading extremely slowly. When the page finally loaded it suggested restarting my Mac.

Various software updates took advantage of the system restart so it was around 10 minutes before I could connect to iTunes Connect.

Now, that error had gone but clicking on the password entry didn’t fill out the email and password as usual. I had to manually copy it from 1Password and paste it in.

Finally, once in the iTunes Connect dashboard, I had to figure out how to put the app back on sale. The Dashboard looked like this:

  1.  a menu at the top:

App Store Features TestFlight Activity App AnalyticsSales and Trends

None of which seemed relevant.

2.  a sidebar with:

APP STORE INFORMATION

App Information

Pricing and Availability

iOS APP

3.6.0 Developer Removed From Sale

tvOS APP

1.0 Prepare for Submission

VERSION iOS tvOS

3. a content block with this at the top:

Developer Removed From Sale

Nothing here seemed particularly clear about how you put the app back on the market.

So, some more Google’ing.

The first link was to Apple’s documentation:

https://developer.apple.com/library/content/documentation/LanguagesUtilities/Conceptual/iTunesConnect_Guide/Chapters/ChangingAppStatus.html

The problem with this documentation is that it goes on for literally dozens of pages. I really wanted an answer that didn’t involve half an hour of wading through vast reams of unrelated text.

So I visited the second link on an iPhone development forum:

http://iphonedevsdk.com/forum/business-legal-app-store/113598-app-is-developer-removed-from-sale-can-you-put-it-back-on.html

which went something like this:

Question: Hi guys, just a quick question, when I remove the app from sale (developer removed from sale) it is still in my “menage apps screen”, how can I put it back on sale? Does it need to go through a review process again?

Answer: No, just turn it on again by selecting which country you want it in

Not terribly useful as it didn’t tell you how you select countries.

Back to the Apple docs.

Scanning through it I found, around 3/4 of the way down the document (around 11 pages of text) I finally found the information I needed, confusingly under Removing an App from Sale.

You have to go into Pricing and Availability, select “Available in all territories” and Save.

This was a pretty trivial example but shows off some of the complexity that can accumulate. A simple thing like ticking a box took around an hour to do.

What happens when a browser requests a web page like example.com?

  1. you enter example.com
  2. your browser will do a DNS look up for the IP address of this URL. This process is:
    1. check browser cache – the OS does not tell the browser the TTL for each DNS record so the browser caches DNS records itself for 2 – 30 minutes
    2. check OS cache – e.g. gethostbyname on the Mac and Windows
    3. check router cache
    4. check ISP DNS cache
    5. recursive search
      1. root nameserver
      2. .com nameserver
      3. example.com nameserver
  3. browser sends a GET HTTP request to the web server along with other headers. e.g.
    1. Host: example.com
    2. Accept: types of responses it will accept
    3. Connection: TCP connection
    4. Cookie:
  4.  server probably responds with a 301 Permanent redirect to www.example.com
  5. browser sends out another request to www.example.com
  6.  server handles the request
    1. i.e. it reads the request, any parameters and cookies
  7. server sends back an HTML response which consists of
    1. HTTP/1.1 200 OK header
    2. Cache-Control:
    3. Expires:
    4. Pragma:
    5. Content-Encoding: gzip
    6. Content-Type: text/html; charset=utf-8
    7. Date:
    8. Byte blob which the Content-Encoding section tells you is gzip’d.
    9. Decompress the blob to get the HTML
  8. Browser renders the HTML as it starts receiving it
  9. Browser sends requests for objects embedded in the HTML. E.g.
    1. images
    2. CSS
    3. JS
  10. Browser sends further AJAX

See  Hypertext Transfer Protocol — HTTP/1.1 (RFC 2616): https://tools.ietf.org/html/rfc2616

Uploading an iOS app to the iTunes Store – There are one or more issues with the following platform(s): 1 unresolved iOS issue

Issues

I had various issues updating a recent version of an app we were submitting. The app worked perfectly fine on the App Store except we had the issue:

4:00pm

There are one or more issues with the following platform(s):
1 unresolved iOS issue

which gave:

From Apple
Dear Developer,

On September 1, 2016, we announced that we’re implementing an ongoing process of evaluating and removing apps that no longer function as intended, don’t follow current review guidelines, or are outdated.

We noticed that your app has not been updated in a significant amount of time.

Next Steps
To keep your app on the App Store, submit an updated version for review and make sure it follows the latest App Review Guidelines. If you are unable to submit an update within 30 days, your app will be removed from the App Store until you submit an update and it is approved.

If Your App is Removed
Your app will remain fully functional for current users. They will experience no interruption to services, will still be able to buy in-app purchases, and can re-download the app while restoring from an iCloud or iTunes backup. However, we recommend that you update your app as soon as possible to reinstate it on the App Store and ensure that it remains functional and engaging for new and existing customers.

You can continue to use your current app name, as your app has not been deleted from your account.

Additional Information
Learn more about changes to the App Store and keeping your apps up-to-date.
App Store Improvements
App Review Resources
Debugging Your Apps

Best regards,
App Store Review

We uploaded another version of the app and immediately started running into issues. A few hours here’s where we’d got to:

7:40pm

  1. iTunes Store operation failed.
    Missing 64-bit support. iOS apps submitted to the App Store must include 64-bit support and be built with the iOS 8 SDK or later. We recommend using the default “Standard Architectures” build setting for “Architectures” in Xcode, to build a single binary with both 32-bit and 64-bit support.

Fortunately this was solved using http://stackoverflow.com/questions/32514787/xcode-missing-64-bit-support-with-standard-architectures-enabled

8:00pm

2. iTunes Store operation failed.

Missing required icon file. The bundle does not contain an app icon for iPhone / iPod Touch of exactly ‘120×120’ pixels, in .png format for iOS versions >= 7.0.

8:30pm

From http://stackoverflow.com/questions/18736954/missing-recommended-icon-file-the-bundle-does-not-contain-an-app-icon-for-iph

we made a complete set of icons using https://makeappicon.com/ but same problem.

8:45pm

Finally found the Asset Catalog section in the depths of the Settings under General > App Icons and Launch Images.

So annoying that you can’t copy and paste IDE text like “App Icons and Launch Images”.

Apparently there was already an Asset Catalog (which you can find by clicking the little grey arrow) next to the name of the Asset Catalog. However:

  1. this was empty and
  2. I couldn’t find it in the Xcode file listing

I deleted both xcassets files.

Now I had a red App Icons Source > AppIcon in the Settings. I couldn’t see how to add another Asset Catalog.

This (https://guides.codepath.com/ios/Adding-Image-Assets) suggested clicking on the xcasset file in Xcode however I couldn’t find it. The solution was File > New File and select Asset Catalog. Then click on the Asset Catalog and add the files.

9:00pm

Now the icons were working but we’d created a new error:

None of the input catalogs contained a matching launch image set named  “LaunchImage”.

I now needed to find LaunchImages from somewhere.

Checking through the repo using git but couldn’t it.

9:25pm

I’ve now spent the best chunk of a day trying to re-release a completely working app. I’ve given up and will try again tomorrow.

 

 

 

 

Restarting Apache

This is my current Linux gripe.

Apache has been around for over 20 years now.

Surely, Linux distributions could have arrived at some form of consistency by now.

No!

CentOS
systemctl restart httpd.service

Ubuntu
sudo restart apache2
OR
sudo service apache2 restart

 

Not only is the way you restart the daemon different but even the name used for Apache is different.

Un-f**g-believeable!

WordPress Plugin – an example of bad programming

When you have to break out a debugger to try and figure out why an obvious modification to a piece of third party code isn’t working it’s usually down to bad code. Here’s the problem:

I was trying to add a submenu page to an existing WordPress menu.

Unfortunately, the developer had decided to write a convenience wrapper around some of the existing WordPress Add Menu functionality. Whilst a neat idea (you simply used a render function to that would parse the page name to call the function that rendered the content), they had managed to shoot themselves in the foot by hard-coding the page names in this render function.  E.g. in this render function you had:

What it meant was you had to basically step through the code to find out why things weren’t working.

what’s a good dbm for a phone call (GSM or UMTS)

Basically, for GSM:
-105 to -100 = Bad/drop call
-99 to -90 = Getting bad/signal may break up
-89 to -80 = OK/shouldn’t have problems, but maybe
-79 to -65 = Good
Over -65 = Excellent

More here:

http://www.howardforums.com/showthread.php/1523050-dBm-signal-strength-on-GSM-acceptable-numbers

And how do you find the dbm of your phone signal?

On Android, *#*#info#*#*

i.e. *#*#4636#*#*

It will automatically go into a very detailed set of information screens. No need to tap the Dial button.

https://www.quora.com/Which-brand-of-mobile-phone-do-real-techies-use-and-why/answer/Leonid-S.-Knyshov?srid=3soS

Software avalanche – switch language level to JSX Harmony

I was playing around with some JavaScript in PHPStorm and got this message in yellow at the top of the IDE:

Switch language level to JSX Harmony

The options were Switch Dismiss Cog icon (which has Fix all Annotator Problems in File). After doing a search to see what would happen if I did switch I found very little. So, I decided to go down the rabbit hole and click Switch to see what changed.

Note: to set the language level back after Switching go to Preferences and search for “javascript language” and set it to ECMAScript 5.

screen-shot-2016-10-05-at-10-26-08-amhttp://www.snowcrash.eu/wp-content/uploads/2016/10/Screen-Shot-2016-10-05-at-10.26.08-AM-300x99.png 300w, http://www.snowcrash.eu/wp-content/uploads/2016/10/Screen-Shot-2016-10-05-at-10.26.08-AM-588x194.png 588w" sizes="(max-width: 730px) 100vw, 730px" />

When you select Switch, then you get the option (in Green now, just to confuse things further):

screen-shot-2016-10-05-at-10-19-25-amhttp://www.snowcrash.eu/wp-content/uploads/2016/10/Screen-Shot-2016-10-05-at-10.19.25-AM-300x7.png 300w, http://www.snowcrash.eu/wp-content/uploads/2016/10/Screen-Shot-2016-10-05-at-10.19.25-AM-768x19.png 768w, http://www.snowcrash.eu/wp-content/uploads/2016/10/Screen-Shot-2016-10-05-at-10.19.25-AM-588x15.png 588w, http://www.snowcrash.eu/wp-content/uploads/2016/10/Screen-Shot-2016-10-05-at-10.19.25-AM.png 1163w" sizes="(max-width: 474px) 100vw, 474px" />

File watcher ‘Babel’ is available for this file. Description: ‘Transpiles ECMAScript 6 code to ECMAScript 5’

Add watcher    Dismiss    Cog icon

with

screen-shot-2016-10-05-at-10-22-40-amhttp://www.snowcrash.eu/wp-content/uploads/2016/10/Screen-Shot-2016-10-05-at-10.22.40-AM-300x78.png 300w" sizes="(max-width: 340px) 100vw, 340px" />

  • Edit inspection profile setting
  • Fix all ‘File watcher available’ problems in file
  • Run inspection on …
  • Disable inspection

Given that I was actually in the middle of doing some Symfony programming, I decided to let sleeping dogs lie and set the language level back to ECMAScript 5.

PHP Annotations

Basically, think of docblocks.

The idea behind them originally was to provide documentation on code. E.g. what the parameters of a method were, etc. See these slides for an overview

However, PHP Annotations take this a bit further by letting you inject behaviour. E.g. you can use these docblock statements to change the functionality of the class (i.e. injecting behaviour) which can promote decoupling. E.g. see Symfony uses PHP Annotations for Routing and Doctrine uses PHP Annotations for metadata.

Take a look at these articles / slides:

An overview: http://www.slideshare.net/rdohms/annotations-in-php-they-exist

and a rather interesting counter argument to using them: https://r.je/php-annotations-are-an-abomination.html