Faster, easier web page browsing with PageAccel

For those of you who are eager to jump to the chase and use my PageAccel plugin, please head over to the PageAccel home page and install (should take 10 seconds, tops).


 

I recently learned about the Accelerated Mobile Pages (AMP) Project, an open-source initiative led by Google to accelerate content on mobile devices. The idea, in short, is this: by streamlining web page content to include only the most critical pieces, web users on mobile devices can experience pages which load faster, are easier to read, and do not have the “clunkiness” which plagues content originally created for desktop browsers. Google’s goal is two-fold: to drastically improve the mobile user experience by providing simplified web pages, as well as providing a programming framework for web designers and developers to use in creating this content.

According to a report at SearchEngineLand reported by Google, “The median load time for AMP is 0.7 seconds, the time it takes for your eye to blink twice. By contrast, the median load time for non-AMPs is 22.0 seconds, the time it takes for you to leave the site and never come back.” Which page would you rather view?

I recently started noticing some of this AMP content myself on my own mobile device, as Google has been incorporating AMP pages in its web search content for a several months now. From Google’s own blog post on the search result incorporation, “[this] shows an experience where web results that that have AMP versions are labeled with The AMP Logo. When you tap on these results, you will be directed to the corresponding AMP page within the AMP viewer.”

See Google’s own view of the differences side by side (on the left is a non-AMP experience, and the right is the AMP experience):

amp2
amp1

Here is an additional slide deck from Google, which describes the project:

 

If you’ve not viewed any AMP pages yourself, I’ll tell you that my own personal experience has been excellent. Having streamlined, faster loading pages without much of the cruft that typically is served has been excellent.

I quickly began craving this experience in my own desktop browser.

The vision

I started formulating some goals:

  • I wanted a painless experience to closely replicate the AMP experience on my mobile device.
  • If I clicked or navigated to a page with AMP content, I wanted that to load in my browser.
  • If I wanted to switch back and forth between AMP content and standard desktop content, I should be able to do that.
    • And I wanted to be able to save that choice permanently for a website. Much in the way that AdBlock Plus allows enabling and disabling for a given web site, I should be able to do that, too.

The more I pondered this, the more I realized that a simple Chrome extension (as Chrome is my current browser of choice) could likely achieve this. I had never built a Chrome extension before, and so this would be both a good learning experience and also provide an avenue to share my work with others (through the Chrome Web Store).

The Chrome extension – PageAccel

I set out to build my first Chrome extension. I won’t go into detail about the challenges that I faced in developing the work; I will say that I did learn quite a bit about the race conditions which quickly pop up when programming a Chrome extension (given Chrome’s highly asynchronous, callback-based APIs) and dealing with Chrome’s Web Store support team (which is highly automated and thin on actual humans to answer seemingly simple questions).

In the end, I had built my first simple Chrome extension, PageAccel, which is satisfying the goals that I laid out. It’s basic yet totally functional, doesn’t require any input from the user, and successfully detects when AMP content is available and switches the user to use that content seamlessly and painlessly. The extension indicates visually to the user when browsing AMP content, if it’s not already obvious due to the “lightining” fast load time and simplified pages (I chose a lightning icon for the extension itself). The entire project is open-sourced in GitHub, and I’m hoping to receive some feedback from the internet at large if others find this extension useful as I do!

What is it like to use PageAccel?

Rather than explain with more words, I’ve included the screenshots which are part of the PageAccel page in the Chrome Web store:

screenshot1
screenshot2
screenshot3
screenshot4

 

Does it help? Yes!

In my own use in the last few weeks (which of course is not a uniform sample of all web content), I’m seeing that somewhere between 10% – 25% of the pages that I visit have AMP content. Much of this simplified, accelerated content has been authored by mass media (some randomly selected news websites: BBC, The Guardian, CNN, and the like (c’mon NPR, switch over!)) and tech blogs and information sources (not a big surprise here). I’m hoping over time I’ll continue to see an uptick in fraction of pages which have AMP versions overall; if the growth rate reported by SearchEngineLand is any indication (“only three percent were using AMP in March 2016, versus 11.6 percent in June 2016”), then my extension will become more and more useful over time – at the very least, to me.

 

Read More

A new succulent pot

A trip to Flora Grubb yesterday (during which we expected to find a few specimens to add to our collection) resulted in a sizable purchase, after we realized that we had arrived on a “20% off all stock” day!

We purchased a variety of small and medium succulents and repotted them in an old pot which was overflowing with tiny aloe.

Unfortunately, I don’t know all of the species in here, but I know I have at least one echevaria, a hawarthia, and an aloe (one of the old ones).

February Succulents 1

February Succulents 2

If you know what species we have (or even the genus), please comment down below so we (and everyone else) knows what we’ve got potted!

Some succulent-specific basics I’ve learned (or already knew):

  • Don’t overwater. Watering twice per month in the growing season (late spring – early fall) and once per month other times is plenty. Watch out especially for pots with poor drainage.
    • Don’t water the leaves. If the pot has drainage holes in the bottom, just set the pot in a bowl of water and let the water soak up to the top of the soil.
  • Use well-draining / cactus soil
    • For example, 1/3 humus, 1/3 perlite, 1/3 sand would work.
  • Be careful – leaves are fragile. On some species, they can be knocked off with a very light touch.

Read More

What is a scientific evidence-based treatment for the common cold?

We all get common colds from time to time; they’re no fun, but rarely life threatening. The common cold in humans is primarily caused by a family of viruses called rhinoviruses, of which there over ninety nine types, which makes finding a “common cure” for all of them unlikely. While no silver bullet cure is likely in sight, at least something to lessen the annoying symptoms would be nice: the cough, the runny nose, the headache, the body soreness, the fatigue.

Clearly, there are steps that one can take when already infected to lessen the intensity and duration of symptoms, including getting enough rest and drinking plenty of rehydrating liquids. As a former biologist, I’ve long been interested in how viruses operate in the body and how we can best treat them pharmacologically (with drugs). While there are many over-the-counter remedies marketed to us, today I became very interested in what drugs I should be reaching for to keep me the happiest when a common rhinovirus has made its home in my sinuses. Which drugs should I purchase that have been proven by scientific study to actually help with cold symptoms, rather than being clever medicinal cocktails that simply sound great in marketing material?

one

A scientific, evidence-based checklist for treating the common cold with drugs

I’ve put together some very straightforward guidelines for what to do and take when needing relief:

  • Begin treatment as soon as you notice cold symptoms
  • Take a sustained-release first generation anti-histamine
  • Take a nonsteroidal anti-inflammatory (NSAID)
  • Continue taking these every 12 hours until cold symptoms go away
  • Add an oral decongestant if the anti-histamine and NSAID treatment does not relieve symptoms

All of these pointers came directly from www.commoncold.org, a website with comprehensive yet digestible scientific evidence-based information about the common cold, prevention tips, and treatments. The site has been put together by two medical doctors who specialize in virology and infectious diseases. See their credentials here and here. These tips come from published, peer-reviewed clinical trials, not just anecdotes, “common knowledge”, or hearsay.

Let’s go through the most interesting recommendations one by one and pick them apart.

Begin treatment as soon as you notice cold symptoms

This may be obvious to some people, but for others: the facts here are that “cold symptoms appear as early as 10 hours after a cold infection has started and increase in frequency and severity for 48 hours. After 48 hours, the symptoms usually begin to decline as the result of the natural course of the illness. For this reason, a cold treatment will do the most good when taken at the first recognition of symptoms. The treatment is thus applied over the period when most illness is expected (the first 3 days of infection).”

Another reason to treat early is that nose blowing is very likely to cause sinus disease in colds, and early treatment reduces the frequency of nose blowing by reducing nasal mucous.

A third reason (if you didn’t have enough already) is that the majority of common cold sufferers have clogging of the eustachian tubes between the ar and the throat, which may reduce the frequency of complications involving ear infections.

Take a sustained-release first generation anti-histamine

This one was the big news to me. I had previously thought that no anti-histamines would help reduce symptoms of the common cold, but it turns out that the first generation of anti-histamines can actually reduce symptoms. The first generation of anti-histamines are known as sedating; they often cause drowsiness as a side effect. (References 1, 2, 3)

I have a hard time finding them in stores, but they include:

  • chlorpheniramine (Chlortabs, etc)
  • brompheniramine (Bromfed, Dimetapp, Bromfenex, Dimetane, BPN, Lodrane, etc)
  • clemastine (Tavist)

They have all been shown to be effective in randomized, double-blind studies and sustained-release versions of them are the most effective.

Important: second generation anti-histamines, those which are non-drowsy, are not as effective as the first generation.

Take a nonsteroidal anti-inflammatory drug

We know these as NSAIDs, perhaps the most popular being Ibuprofen. NSAIDs are great for pain relief, inflammation, and fever, which often accompany nasal discomfort (Reference 5). Not as much research has gone into this area, but there are some clinical trials for using NSAIDs for the common cold.

Add an oral decongestant if the anti-histamine and NSAID treatment does not relieve symptoms

Decongestants shrink the tiny blood vessels in the nose, which are most at fault for causing nasal congestion. Nasal sprays work wonders very quickly, but wear off fast and can cause burning. Taking oral decongestants are less powerful and don’t work as quickly, but don’t cause as much discomfort. They are safe in recommended doses, even for those with high-blood pressure, but they typically don’t work for more than three days straight. (Reference 6).

What doesn’t work

There are plenty of items to buy at the nearby Walgreens, and plenty of medication that your doctor can give you that will NOT work for treating the common cold.

  • Cough medicine
  • Expectorants
  • Vitamin C mega-doses
  • Antibiotics

Let’s pick these claims apart, too.

Cough medicine

Medicines that work have well-documented clinical trials showing that they work; cough medicines have little such documented medical trials for in colds. It’s no surprise that few studies showing high effectiveness show up in medical journals – they are not effective, at least not at the doses which are safe for us to take.

Expectorants

Expectorants help with thinning mucous, which can help to prevent secondary infection. But they do little to help with the primary viral infection of the common cold. At best, they help with cough, but their effectiveness is mixed.

The Vitamin C myth

“There have been at least twenty well controlled studies on the use of mega doses of vitamin C in the prevention of colds, the treating the duration of colds, and in treatment of the severity of colds, and in none of those instances has there been any, really good evidence that vitamin C in mega doses does anything.” – Dr. Marvin Lipman, NPR

So why do people so adamantly believe that a mega-dose of vitamin C is an effective treatment for the common cold? For one, vitamin C is good for you – very good for you. Most people believe that if something is good for you, more of it must be better. However, this isn’t really based in any kind of real science – about 200mg is all the body can absorb per day. Perhaps equally (if not more convincing) is the placebo effect – the psychological effect (but not truly physical effect) of drugs. In other words, if you want to take a mega-dose of vitamin C, go ahead – but just know that it is not treating your symptoms.

Antibiotics

Antibiotics are some of the worlds greatest medicines – many of them exist on the list of the World Health Organizations list of Essential Medicines. However, they are useful to destroy bacteria, not viruses. Common colds are caused by viruses, and no dose or type of antibiotic known to medical doctors or researchers destroys viruses. Let me be clear – your doctor might prescribe antibiotics for something that feels like a virus – but know that your doctor is prescribing it to clean up a bacterial infection (which they may feel in their professional opinion is causing your symptoms). You may not have a common cold, after all. I’ll not get into antibiotic over-prescription here; that is a huge topic on its own.

Extra references

I included some references without direct web urls.

1. Doyle, W.J., T.P. McBride, D.P. Skoner, B.R. Maddern, J.M. Gwaltney, Jr., and M. Uhrin. 1988. A double-blind, placebo-controlled clinical trial of the effect of chlorpheniramine on the response of the nasal airway, middle ear and eustachian tube to provocative rhinovirus challenge. Pediatric Infectious Disease Journal. 7:229-238.

2. Gwaltney, J.M.Jr., J. Paul, D.A. Edelman, R.R. O’Connor, and R.B. Turner. 1996. Randomized controlled trial of clemastine fumarate for treatment of experimental rhinovirus colds. Clin. Infect Dis. 22:656-662.

3. Gwaltney, J.M., Jr., and H.M. Druce. 1997. Efficacy of brompheniramine maleate for the treatment of rhinovirus colds. Clinical Infectious Diseases. 25:1188-1194.

4. Gaffey, M.J., D.L. Kaiser, and F.G. Hayden. 1988. Ineffectiveness of oral terfenadine in natural colds: evidence against histamine as a mediator of common cold symptoms. Pediatric Infectious Disease Journal. 7:223-228.

5. Insel, P.A. 1996. Analgesic-antipyretin and antiinflammatory agents and drugs employed in the treatment of gout. In Goodman and Gilman’s The Pharmacological Basis of Therapeutics, 9th ed. J.G. Hardman, L.E. Limbird, P.B. Molinoff, R.W. Ruddon, and A.G. Gilman, editors. McGraw Hill, New York. 617-657.

6. Hoffman, B.B., and R.J. Lefkowitz. 1996. Catecholamines, sympathomimetic drugs, and adrenergic receptor antagonists. In Goodman and Gilman’s The Pharmacological Basis of Therapeutics, 9th ed. J.G. Hardman, L.E. Limbird, P.B. Molinoff, R.W. Ruddon, and A.G. Gilman, editors. McGraw Hill, New York. 199-248.

Read More

How to stop junk postal mail

Few people I know actually enjoy receiving junk mailings, whether they be in email inboxes or postal mail boxes. Over the years, I’ve managed to whittle down the amount of unsolicited postal mail that I receive to a few items a week, but have not been able to rid myself of it entirely. I still receive the odd credit card offer, clothing catalog, and coupon circular that I immediately deposit in my recycling bin. Wouldn’t it be great if I could just alert these companies to the fact that I never read their mailings, and that they should stop spending money printing and sending them to me?

Turns out that there is!

junk_mail

How to stop most* junk postal mail forever**, for free

*In practice for me, about 80%

** If you change addresses, you’ll need to to do this all over again

Upon recently educating myself about San Francisco’s recycling laws, I found a number of helpful tips and websites for alerting companies that you wish to stop receiving their junk postal mail. Here are a series of steps to follow:

  1. Opt-out of all sorts of catalogs and mailings at DMAChoice. This requires creating a username and password linked to your email address. Time spent: 5 minutes
  2. Prevent unsolicited credit card offers at Opt-Out PreScreen. This requires entering some personal details so that the big three credit bureaus (Equifax, TransUnion, and Experian) know that you are you. Time spent: 5 minutes
  3. Prevent yourself from receiving RedPlum coupon circulars at RedPlum’s website. Time: 5 minutes.
  4. Prevent yourself from receiving ValPack coupon circulars at Cox Target Media’s website. Time: 5 minutes.
  5. Prevent yourself from receiving PennySaver coupon circulars by writing to (must send them a letter) (time: 10 minutes)
    1. Harte-Hanks Direct Marketing
      Attn: Consumer Preferences
      c/o Pennysaver
      2830 Orbiter Street
      Brea, CA 92821
      Phone: (800) 422-4116

Total time spent: about 30 minutes!

Why do I get so much junk mail?

When you subscribe to many publications, place credit card orders, order items through the Internet (or through the mail!), join organizations, donate to charities, or enter sweepstakes, chances are that the fine print in the legaleze for interacting with these companies allows them to collect your personal information, and in many cases, share it with other companies for marketing purposes.

How effective is this, and when will I stop receiving junk mail?

While placing yourself on these “do not mail” lists can be instantaneous, having your junk mail disappear is not. Companies may take weeks to months to get updates from these lists and stop sending mailings. And, in many cases companies are not legally obligated to stop sending you mail – these “do no mail” lists are the industry’s “self-regulatory” answer to threats of legislation to regulate their activities. As self-regulation goes for these sorts of things, they typically work fairly well, but are not perfect. So I caution you to not expect all of your junk mail to disappear, nor for it to go away overnight.

Additionally, as mentioned above, often when transacting with companies (via purchasing their goods, donating to their causes, etc) you are giving the sender the OK to send you mail. Even after you stop receiving mail from a given sender, if you “re-engage” with them (by buying products, answering surveys, or donating) after they stop sending you things, it is often interpreted as your desire to start receiving their mailings again. Caveat emptor.

In practice, my junk mail decreased by about 80% of it’s volume, and within about 3 months. Your milage may vary.

Good luck!

Read More