Category Archives: Uncategorized

Fixing Slow App Launches on an iPhone 5 with IOS 8

Recently, my iPhone 5 started bogging down in an epic way–it would take forever to launch apps, often stalling out entirely and requiring multiple tries to even get apps to launch. I tried restarting, shutting down other apps, etc. and nothing worked.

I started seriously wondering whether this was an evil plan that Apple had slipped into later versions of iOS 8 to punish folks who’d declined to drop a couple hundred bucks to upgrade to an iPhone 6.

As it turns out, the culprit was a newish setting under Settings > General called “Background App Refresh”. The purpose of this setting is to allow apps to pull down new content when you’re on a wi-fi network, and is no doubt a lovely thing on some level. But, between Dropbox, Chrome, FaceBook, Instagram, Mailbox, Messenger, and a dozen other apps, it was murdering my phone.

I turned it off, and my phone was instantly back to normal. You can control this setting on an individual app level, so perhaps later I’ll experiment with turning off various apps to figure out the biggest culprits. But for now, I’m just happy to have a reasonably working phone again.

Using Bootstrap Modal Dialogs with ASP.Net and Master Pages

This is a short blog about solving a nasty problem with using Bootstrap’s Modal Dialogs with ASP.NET and Master Pages.

Most examples for using Bootstrap’s very robust dialog support go something like this:

Page Code:

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
<link rel="stylesheet" 
  href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css" />
<link rel="stylesheet" 
  href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap-theme.min.css" />
<script type="text/javascript" src="/includes/js/jquery-min.js"></script>
<script src="//netdna.bootstrapcdn.com/bootstrap/3.3.4/js/bootstrap.min.js">
</script>
</head>

<body>
    <form id="form1" runat="server">
        <asp:Button ID="btnShowModal" runat="server" 
            Text="Show Modal" 
            CssClass="btn btn-primary btn-info" 
            data-target="#pnlModal"
            data-toggle="modal" 
            OnClientClick="javascript:return false;" />
        <asp:Panel ID="pnlModal" runat="server" role="dialog" 
           CssClass="modal fade">
            <div class="modal-dialog">
                <div class="modal-content" runat="server">
                    <div class="modal-header">
                        <button type="button" class="close" 
                            data-dismiss="modal">
                            <span aria-hidden="true">&times;</span>
                            <span class="sr-only">Close</span>
                        </button>
                        <h4 class="modal-title">
                          Bootstrap Modal Dialog in ASP.NET</h4>
                    </div>
                    <div class="modal-body">
                        <p>
                            This is the body text
                        </p>
                    </div>
                    <div class="modal-footer">
                        <button type="button" 
                         class="btn btn-default" 
                        data-dismiss="modal">Close</button>
                    </div>
                </div>
            </div>
        </asp:Panel>
    </form>
</body>
</html>

Pushing the button shows the dialog, and everything’s ducky. But try the same thing in an ASP.Net app with a master page and nothing happens.

Why? The answer comes down to the “data-target” attribute of the invoking button, which is meant to tell Bootstrap the panel to activate:

<asp:Button ID="btnShowModal" runat="server" Text="Show Modal"
 CssClass="btn btn-primary btn-info" data-target="#pnlModal"
 data-toggle="modal" OnClientClick="javascript:return false;" />

The problem is that in an application with master pages, the actual rendered name of the pnlModal div will likely become something like “ctl00_ContentPlaceHolder1_pnlModal” and Bootstrap won’t be able to associate it with the necessary JavaScript to show the dialog so the button does nothing.

To solve this, you just need to set the data-target to pnlModal’s clientID (the rendered name). Since data-target isn’t a standard, supported HTML attribute, you can use the Attributes.Add method to set it via the Page_Load event of your code-behind as follows:

Code-behind Code (VB)

Protected Sub Page_Load(sender As Object, e As EventArgs) 
   Handles Me.Load
  If Not Page.IsPostBack Then
    Me.btnShowModal.Attributes.Add("data-target", "#" & pnlModal.ClientID)
  End If
End Sub

…and you’re good to go!


Credit: This post builds upon KHComputers’ excellent contribution about Bootstrap Modal Dialogs in ASP.NET at VBForums

You Can’t Say that on Google Shopping (ctd.)

As per my previous post, I’ve been devoting an inordinate amount of time to trying get Atomic Avenue‘s vast list of comic titles to be accepted for Google’s shopping listings. The chief impediment to this has been Google’s automated content filters, which ban outright any product containing certain words.

In the hopes of (a) helping anyone else who’s treading down this path and (b) embarrassing Google into revising, or at least not placing so much blind faith in their automated filters, I’m presenting this as an ongoing list of words that will apparently get your item banned from Google Shopping.

Note: The speculation as to cause is my own; Google will not disclose the reasons, although attempting to place individual keyword ads gives different error messages as to why they were rejected which offers some help in narrowing in the probably causes.

Animax (for us, a ThunderCats clone comic series, or the name of a Japanese animation company; for Google, apparently restricted because it’s the name of a pet medication).

Archer [& Armstrong] – Best guess: they don’t have an issue with the inoffensive Valiant title, but that the word “Archer” sounds like a weapon to them.

Antabuse  For us, an indie comic featuring, well, ants. For Google, apparently restricted as a medicine name.

Belladonna As in Brian Pulido’s Belladonna. Also the name of a deadly poison, which best guess is causing it to be banned as a medicine name.

Black – Unbelievable. For us, this bans innumerable comics, including Black Widow , Black Ops, The Black Knight, and even Batman: Blackgate. What Google has against the word “Black” is anyone’s guess.

Muse As in 10th Muse or any number of Liefeld-esque spin-offs. Apparently also the name of an ED treatment.

Pandora – For us, another bad-ass female with her own comic book. Not banned because it’s the name of a streaming music service, apparently, but because it’s the street name of some sort of herbal mixture that you can smoke as a “legal high” in Britain under the name, “Pandora’s Box”

Rage – As in Beneath the Valley of the Rage, or the onetime Avengers character.

Revenge – As in Revenge of the Sinister Six or Dracula’s Revenge

Sentinel – As in Captain America: Sentinel of Liberty. Best guess: because it’s also the name of a pet anti-tick collar.

Spawn (and any variants, including Curse of the Spawn). I’m lost on this one.

Sword(s) – Interestingly, there seems to be a strange line drawn here. Titles involving “Sword” are banned utterly; Titles with “Swords” are disapproved as well, but occasionally offer the option of requesting a manual review.

Annals of Bad Customer Relations: Comcast Edition

Try this one on for size: Slip a 3-year (!) contract into a single sentence in the middle of a business internet service install agreement. When customer tries to drop that service after 2-1/2 years, threaten them with massive penalties for cancelling early. Offer to waive those fees if the customer extends the service they’ve had for several years at the customer’s second location, by signing a new 3-year contract there.

But it turns out there’s one the final “gotcha” — the service extension has to be from the same business division (“Comcast Business Internet”) — not just the same company (Comcast). Oh, and did we mention that the business internet group’s starter plans cost twice as much money for a third of the speed as the plans offered by their residential division.

After weeks spent talking with their many tiers of customer support, including liaising with their special group set up by the “VP of Customer Satisfaction”, Comcast was apparently unable to work a deal by which a longtime customer of their business division–trying to become a longtime customer of their residential division–didn’t get punished in the process.

Got the bill today: $964.43. Right below:

“Thank you for being a valued Comcast customer!”

No Free Lunch, Small Business Edition: The New California Paid Sick Leave Act

Last session, the California Legislature, in its infinite wisdom, decreed that all businesses–no matter how small–must now give paid sick leave to their employees. Effective July 1st, 2015, all employees now get 1 paid hour of sick leave for every 30 hours worked.

Sounds great, no?

Unfortunately, they failed to pass a corresponding provision which automatically made California businesses 3.33% more profitable. Instead they’ve essentially decreed that labor costs for all California employers have gone up by 3.33%, provided the employees ever get sick–or simply “get sick”.

We’re a tiny business, and we’ve always played it straight with our employees, so we asked them what they’d want us to do about this one. Surprisingly, nobody was in favor of taking a 3.33% wage cut, and I think they realized that there was a distinct lack of Scrooge McDuck-style piles of gold in the office which we’d been rolling around in on our breaks. So the 3.33% cost increase wasn’t simply going to come from some our of petty cash as we wheeled gold ingots from the secret vault.

No, new legislated costs like this would have to come out of our operating capital, show up as deferments or cuts to new hiring, or get raided from my kids’ all-too-inadequate college fund. There’s no free lunch here, no matter how much our glorious betters in Sacramento might like to declare such in their great benificence.

In the end, we decided that the meager paid holidays at the company just became unpaid holidays, in approximate proportion to the number of new “sick days” that had magically been created. It sucks for everyone, and I’m a little heartbroken to have to give up on paid time off between Christmas and New Years–a perk we’d been proud to make happen since we had a single employee working out of our living room years ago. It just didn’t seem right to force folks to work over the Christmas break, and we were proud to be able to give our folks that time off. After twenty years, that tradition just ended.

Then there’s the effect on the relationship between the employees and the employers. When paid sick time isn’t part of the employment deal, wondering about motives is rarely an issue. If you called in sick, we sent wishes for your speedy recovery, and tried to juggle things at the office as best we could to keep things running without you. No work meant no pay, so we didn’t need to question your motives too much, if ever.

Now, the incentives have changed, and frankly, any employee who doesn’t take every hour they’re entitled to is the sucker.  I guess we all get to look forward to endless rounds of calls which start with “<Cough!> <Cough!> Gee, I’m feeling sick today and can’t make it in…”, along with the mutual looking the other way and trying not to wonder whether we should feel bad for the employee, or vaguely resentful they were shirking.

So let’s see: more distrust between employees and workers, less predictable work schedules, pro-forma sick-call acting sessions, and cancelled holidays.

Great law, folks. Well done. Well done indeed.

VacationBlogging: Places to Go in the Southwest?

My family and I are starting to plan out a road trip from San Jose through the Southwest, going as far as Texas. I’m hoping to take son Neil on some college tours, view the Houston Space Center, hit Universal Studios and a few other things, but if any of the folks reading this have suggestions for amazing local things that we shouldn’t miss, please drop me a line at pbickford@human-computing.com.

Thanks!

-Pete

…And speaking of Music: David Byrne’s “How Music Works”

Son Neil gave me a genius Father’s Day gift: a set of audiobooks, including David Byrne’s “How Music Works”. The book, by the former Talking Heads frontman, is a thoughtful and thought-provoking analysis of how music and people interact, how the business of music is changing, and how technology has shaped music production and recording. He weaves his own experiences writing songs, recording, and performing with Talking Heads, as well as his myriad solo projects.

Byrne’s influences are widespread–sometimes almost bafflingly so–and his career has bounced from minimalist art-pop to afro-cuban-infused dance music to full-blown Latin salsa/cumbia band/singer albums that had to have left more than a few fans of his previous work scratching their heads. That said, he clearly knows his music, and he’s had a lot of time to think about it.

One of the things Byrne has going for him is that–though highly intellectual–he mostly avoids the trap of lecturing the audience about the correct social and political points of view, preferring to ask pointed questions instead of merely browbeating the audience into accepting his views. He’s also fairly objective about the mechanics of the recording industry’s various profit-sharing schemes–warning about the dangers of certain recording contract and advance arrangements, while acknowledging that there are trade-offs in regard to promotional budgets and marketing exposure. In short, that the record business is actually a business, with all sides needing to see advantage in an arrangement in order to succeed. It’s not solely comprised of noble musicians and greedy record company executives–a cartoon view espoused by too many others.

That said, he does allow flashes of anger to color his commentary from time to time, and clearly sees the usual suspects: Bush and Cheney, as horrific people for doing the things that he silently accepts–if a little uncomfortably–from his new hopebringer Obama. He also singles out liberal bete noir David Koch as an awful person for…contributing to the funding of an art center–to his mind, an act of expiation for the moral sins of… he never says. It must be assumed that the crime Koch must be assumed to be atoning for is that of being David Koch. Still, Byrne avoid the sort of long tirades that would turn a musical treatise into a political one, and manages to preserve for the most part, the observational tone of the book.

Byrne comes off as generally insightful, but there are a few suspect bits (were disco mixes actually specifically mixed to sound good on amyl nitrate?) and he credits the “disco sucks” feeling on anti-gay and anti-black sentiment on the part of traditional rock and pop crowds. I have a far less sinister explanation from my personal experience as a teen at the time in question. The modern racism/homophobia explanation is revisionist nonsense. None of the people I knew were the slightest bit concerned with it being “black music” and most of us didn’t really know what gay was–much less have a phobia of “gay music”.  We simply didn’t want to have to look like idiots trying to dance in front of girls.

Sure, most of us jeans-and-t-shirted young men could emphatically head-bob and even do a slow foot shuffle when we were really getting into the latest Led Zep or Van Halen tune, but the idea of having to bust out some sort of shiny clothes and play Jr. John Travolta on the dance floor was frankly terrifying to us. Girls will  happily dance to anything (and look great doing it), but competing in this brave new musical arena involved a host of new skills that few of us were equipped for, and at which we knew we were unlikely to succeed.

We welcomed disco about as much as union auto assemblers welcomed industrial robots. And the auto assemblers wouldn’t have to face the additional humiliation of having the girls they’d been oogling laughing at them, then going home with the robot. Little wonder that the idea of slam dancing or headbanging seemed infinitely preferable to many of us. There’s no need to invent a motive of racism or homophobia for male teens, when sheer terror of looking bad in front of girls was a near universal phenomenon of the times.