Don’t Assume All Web Users Have a Fiber-like Connection

I have pointed out for more than a decade how poorly many web pages are coded. They often assume a very low latency connection and without it the user experience is poor.

Most of the web really sucks if you have a slow connection

The flaw in the “page weight doesn’t matter because average speed is fast” is that if you average the connection of someone in my apartment building (which is wired for 1Gb internet) and someone on 56k dialup, you get an average speed of 500 Mb/s. That doesn’t mean the person on dialup is actually going to be able to load a 5MB website.

This is so true. While living in Asia I had a perfectly good connection to watch high resolution video but just the latency would cause many websites to be unusable (or so frustrating you wouldn’t want to use it). The huge number of files that must be downloaded as well as the large size of that content is something that most sites don’t care about. I can only assume they just test the pages on their fiber connection and if it works they are ok. This is a very bad idea for nearly every website.

When I was at Google, someone told me a story about a time that “they” completed a big optimization push only to find that measured page load times increased. When they dug into the data, they found that the reason load times had increased was that they got a lot more traffic from Africa after doing the optimizations. The team’s product went from being unusable for people with slow connections to usable, which caused so many users with slow connections to start using the product that load times actually increased.

This illustrates some additional interesting tidbits: learning from data requires thought, potential customers are avoiding you for reasons you are likely unaware of. Learn to get a deep understanding of your customers and potential customers focus on the customer’s “Jobs to be Done.” Also learn to be thoughtful about the use of data: Understanding Data, Simpson’s Paradox, Managing to Test Result Instead of Customer Value, All Data is Wrong, Some is Useful, Data is only a Proxy – it isn’t reality.

The quoted post is good. But it doesn’t display a date 🙁 This is a very bad oversight for such an article (where the date of the article can greatly impact what you take from of it). By looking on the RSS feed I was able to see it was published in 2017.

Related: Functional Websites are Normally Far Superior to AppsThe Edge-case Excuse for Poor Software Coding PracticesDelighting CustomersFocus on End UsersUse Urls: Don’t Use Click x, Then Click y, Then Click z Instructions

The Edge-case Excuse

I find the excuse that the bug is just for your small “edge case” as an explanation for why it won’t be fixed annoying.

I have found “edge cases” to actually mean we don’t want to fix it. Often the issue isn’t needing some special code to deal with an “edge case” it is the coding was done poorly and breaks in many different “edge cases.” It isn’t that those edge cases need to be coded for. It is that the code should have been written in a robust way that didn’t break for lots of “edge cases” but the excuse given for not fixing the fundamental coding fragility is the bugs found are just “edge cases.”

There are real instances where “edge cases” is a justifiable excuse. For example, adding in special code to deal with some odd category of users that just isn’t worth the cost.

But I just am so tired of fragile coding being excused as if breaking in lots of “edge cases” is perfectly acceptable when the only reason it fails is because the code is fragile instead of being built in a robust way to begin with. The issue isn’t that you have some special edge case that you want special coding for the issue is the code was written in an unnecessarily fragile way that makes it not work unless you follow a list of acceptable use cases.

Code should avoid adding in requirements that are not necessary. The edge case excuse I see used far more due to requirements that the code added which never should have existed instead of actually being an edge case that would require special code. For example, most web pages don’t require javascript (or IE, or flash, or downloading 5 mb of code to view simple text…) to do what should be done (display text, display images…) but some sites code their page to break if javascript… isn’t used by the user. Seeing this as an “edge case” issue missing the point of creating code that has superfluous requirements for the user that create “edge case” failures where they shouldn’t exist but for poor coding practices. In some cases jasvascript is required to do fancy things that are useful, in which case gracefully degrading and potentially not working fully is acceptable.

Related: W. Edwards Deming and Software DevelopmentSoftware Supporting Processes Not the Other Way AroundComplicating SimplicityWhich Prime Minister Said “The last programme I wrote was a Sudoku solver in C++”?

Which PM Said “The last programme I wrote was a Sudoku solver in C++”?

The last programme I wrote was a Sudoku solver in C++ several years ago, so I’m out of date. My children are in IT, two of them – both graduated from MIT. One of them browsed a book and said, “Here, read this”. It said “Haskell – learn you a Haskell for great good”, and one day that will be my retirement reading.

This quote was by Prime Minister Lee Hsien Loong of Singapore in April 2015. I must say I think the Western governments could be more effective with more scientists, engineers and coders in positions of power

His father was the first and long time Prime Minister of Singapore – Lee Kuan Yew

Another quote from the speech

40 years ago, after doing a math degree, I went on to study computer science, on my father’s advice. He said there is a future in that, and he was right. So for the Smart Nation Programme Office, I have put Minister Vivian Balakrishnan in charge, reporting to me. Vivian is both a hacker and a dabbler – He used to be an eye surgeon but since he does not get to operate on eyes nowadays, he dabbles in building simple robots, assembling watches, wireless devices and programming apps. His day job is to be the Minister for the Environment and Water Resources, and so when he builds apps, he uses the real time APIs generated by the Ministry.

It is useful to have governments around the world with different priorities. While the USA has turned against science and engineering in many ways others can pick up the slack. The USA had for decades been firmly in the position of promoting science and engineering. And the results of that are still blessing the USA with economic benefits including the wonderful results of silicon valley and far flung software development throughout the country.

photo of the Marina Bay Sands resort that resembles 3 sky-scapers connected on top by a large ship

The Marina Bay Sands casino and resort hotel has 3 towers connected on top by a what looks like a large ship. Singapore has a huge, and economically important port.

Singapore can improve but they sure do many things well. And the sense to continue supporting science, engineering and emerging technology will benefit them economically as we move into a world where those fields only grow in importance.

Prime Minister Lee Hsien Loong made the source code, the exe file, and a sample printout available after asked being asked about it online.

Related: If Tech Companies Made SudokuChina’s Technology Savvy Leadership (2008)Scientific Illiteracy (USA lead Singapore in this undesirable trait)Math Education Results Show China, Singapore, Korea and Japan Leading

Hacking Saved Apollo 13

Apollo 13 is a great movie on hacking. Hacking is applying intelligence to systems (including computer systems) to achieve a goal.

That can be done by criminals or devious people but it doesn’t have to be. It is a bit annoying that some people equating hacking only with criminal behavior.

The hacking culture is much more about figuring out ways to make technology work for people than about criminals. We shouldn’t let a small sub-set of hackers defile the term.

photo of the Apollo 13 Command Module

The Apollo 13 command module in which the astronauts splashed down into the Pacific Ocean. by HrAtsuo, via Wikimedia Commons.

When the oxygen tank exploded, Commander Jim Lovell made the famous statement: “Houston, we’ve had a problem.” The engineers on the ground and astronauts had to devise solutions to several very difficult problems and execute them quickly in order to return the damaged spacecraft to earth.

The amazing hacking done by the engineers (including the astronauts) at NASA to create a solution to the serious problems faced by Apollo 13 allowed the astronauts to return home safely. Without the amazing hacking done by those government employees the astronauts would have died.

It is also good to remind people, government workers do amazing things. Sure government workers can also harm society with bad work or by implementing bad policy. But it isn’t the fact that they work for the government that defines the value of the work they do.

Related: Hacking the Standard Bike WheelBuild Your Own Tabletop Interactive Multi-touch Computer (2009)ModSecurity, Adjustments for WordPressPhusion Passenger Tips and Troubleshooting Ideas

Very Simple Process to Claim Authorship of Pages with Google

Update: August 2014 Google abandoned this project so there is no point wasting your time on it. As I have stated elsewhere Google’s efforts are so unreliable (Google nearly always fails and then closes whatever you invested your time in) that you should careful consider if you bother with their stuff (much mores than any other company). This has been true since Larry Page became the CEO and means that I avoid Google initiatives. I also abandon, or at least don’t waste more of my time investing in anything Google buys. Without a strong extra case to justify bothering with something from an organization proven to be so unreliable it just isn’t sensible to treat Google efforts as reliable.

With authorship I figured the odds were that even with Google’s poor track record this was something worth bothering with. Oops. I have to recalibrate to assume even less chance of Google making something that won’t just be a waste of my time for future efforts.

There are lots of posts explaining how to claim authorship of pages with Google. I find them very complex, by and large.

I was able to use this simple process.

  1. Include by author text with a link to the author page using rel=”author” In WordPress you can just edit the theme page to have the author link include the rel=”author” tag.
  2. <a rel="author" href="http://johnhunter.com/">John Hunter</a>

    For WordPress blog with multiple authors here is the syntax to use (this pulls the author url from their profile. The author can update their web site url when logged into the blog.

    <a rel="author" href="<?php the_author_meta('user_url'); ?>"><?php the_author() ?></a>
  3. Then connect author page to Google+ profile. You can make this most any page (Google may exclude some free sites). Most people use the about page or author pages on the same blog they are trying to claim authorship of. But all that really matters is linking this page to your Google+ profile (obviously substitute your url), I have many sites with my material so my home page is what I used, I just added the following to that page.
    <a href="https://plus.google.com/u/0/123" rel="me">Google+</a>
  4. Then link your Google+ profile to the authorship page you want to use. You can add it under Other profiles or contributor to. This is the trickest part do to very bad UI of Google+ you have to go into edit mode and then click on the areas (there is no indication they are editable until you click – extremely bad UI, Google seems to very much like this hard to understand hidden UI elements lately, hopefully that will end soon). Likely Google will fix this at some point so this part will no longer matter.

To test out whether things are working you can go into Google webmaster tools to the rich snippets area. Test out a url you claimed authorship of and you should see something like:

search result with photo

Google can now use your Google+ profile to include a photo (from your Google+ profile) next to search results

With those simple changes over 1,000 posts on my blog were updated. It took far longer to search for and read a bunch more complex ways of accomplishing this than actually doing this once I was able to see what little had to be done. Writing this post took way longer. Now I just have to do step one for other sites and blogs and they will all be updated to show my authorship (for those I already had on my Google+ profile, if they were not listed there yet they have to be added).

There are many benefits to establishing authorship through Google.

  • Google can include your photo next to search results. Especially until people get tired of this, it will likely increase clicks on your links. And even after people are tired of it, if they notice your photo (and respect you) that may well increase clicks.
  • Builds your personal brand
  • Google can use authorship as an additional factor in calculating the worth of a page for a specific search.
  • Google can get a feel for what areas you are an expert in. First by just analyzing what your write about. But more importantly they will be able to use this extra layer of information to determine AuthorRank (similar idea to PageRank) by seeing links to your authored material.
  • Hopefully this can allow for RSS feeds by author (no matter where the content is published) eventually, if it doesn’t already.

Knowing authorship will allow Google to improve search result quality, so I can understand why they are pushing for it. It is a bit annoying how they keep pushing Google+ but this implementation seems tolerable. Some posts make it sound like you have to make your “authorship page” the Google+ profile, but really you can decide the authorship home page (for me johnhunter.com). They do pull your profile photo from Google+ to use, which is less than ideal.

Using Git and Github

To download a repository hosted on github

git clone git@github.com:account_name/repo_name.git

The git@github.com:account_name/repo_name.git will be shown on the home page for the repository on github.com

To update your code from the master branch of the repo:

git pull origin master

To commit the changes you have made locally:

git commit -m "the message explaining what these code changes did"

To send your changes to the repo at github:

git push origin master