Can I ask Siri if any alarms will ring in the next two hours?

[The short answer is no, at least for now. It’s not as simple as looking at your schedule, because you can set reminders to ring hours or days before an event. It needs to be calculated. Siri could be given the power to do this and would make it easy to know if you should shut off your phone during a performance, or just mute it or add a “Siri, mute alarms for the next three hours.” command.]

★ On the Behavior of the iPhone Mute Switch:

Daniel J. Wakin, reporting for the NYT:

The unmistakably jarring sound of an iPhone marimba ring
interrupted the soft and spiritual final measures of Mahler’s
Symphony No. 9 at the New York Philharmonic on Tuesday night. The
conductor, Alan Gilbert, did something almost unheard-of in a
concert hall: He stopped the performance. But the ringing kept on
going, prompting increasingly angry shouts in the audience
directed at the malefactor.

[Snippage -Ed]

I think the current behavior of the iPhone mute switch is correct. You can’t design around every single edge case, and a new iPhone user who makes the reasonable but mistaken assumption that the mute switch silences everything, with an alarm set that he wasn’t aware of, and who is sitting in the front row of the New York Philharmonic when the accidental alarm goes off, is a pretty good example of an edge case.

Whereas if the mute switch silenced everything, there’d be thousands of people oversleeping every single day because they went to bed the night before unaware that the phone was still in silent mode.

[Part of the problem here was that the marimba sound was apparently the culprit which would cause a lot of performers and conductors to pull up short. But also, while I agree that the phone does the right thing (tricky though that is) it makes me wonder how many people know that the alarms are not silenced when you mute the phone? I’d bet a lot.

Plus check this:

If this is not possible, you’ll want to set the ringer to mute, set the system audio to zero, launch Siri and lower the volume to zero, disable all alarms, and review the Settings > Notifications items in the Notification Center to switch off audio. There’s probably some items Auntie is missing here, but she trusts her nieces and nephews will refine this list in the comments.

[snippage -Ed.]

For those rare occasions where you really need to bypass these design choices, powering the iPhone down will keep it from embarrassing faux pas.

A suggestion I can get behind.]

Source: Daring Fireball

Your tests are lying to you

Your tests are lying to you:

Well designed code is easy to test. As a rule of thumb, anytime I get over about two or three lines of setup code for testing a method, I normally take a step back and ask myself if this method is doing too much.

Test speed

The other advantage of running tests purely in isolation is that they’re fast. Very fast. When I’m coding Rails apps these days, thanks to advice from Corey Haines I’m running a spec_no_rails folder which runs independently from the rest of my Rails app. Rails apps by default epitomise this problem: default model tests exercise the whole system from the database up. By running your tests independently you’re not having to clean the database or start Rails each time you run your tests, which means that much of your interesting code can be tested in under a second. Gary Bernhardt has more information on how to set this up in his excellent Destroy All Software screencast series.

[One thing not mentioned here is a pet peeve of mine. I see a lot of tests where the dev is testing implementation rather than input and outputs. To me, checking how something was implemented is not relevant. That the method returns the expected results for a given input is. “Implementation tests” also causes a great deal of test rewrite when refactoring.]

New York City gets a Software Engineering High School

New York City gets a Software Engineering High School:

This fall New York City will open The Academy for Software Engineering, the city’s first public high school that will actually train kids to develop software. The project has been a long time dream of Mike Zamansky, the highly-regarded CS teacher at New York’s elite Stuyvesant public high school. It was jump started when Fred Wilson, a VC at Union Square Ventures, promised to get the tech community to help with knowledge, advice, and money.

[Cool!]

Source: Joel on Software

Drewbot • “Content” Creep

Drewbot • “Content” Creep:

It’s hard to believe a single word could slate an entire industry for failure. On its own, the word “content” is merely awkward. But as a unit of measurement, “content” affects business is real ways. Ignoring the variables audiences care about in order to populate Excel spreadsheets incentivizes weak writing short on substance and attention spans. All this would be tremendously depressing if it wasn’t creating an enormous opportunity for people with the courage to look beyond the numbers, where it’s too messy to measure, and invest in journalism, videos, photography, and art people might actually enjoy.

Source: inessential.com

Sculley on Apple & TV

BBC News – Ex-Apple boss Sculley sets record straight on Jobs:

I think that Apple has revolutionised every other consumer industry, why not television?

I think that televisions are unnecessarily complex. The irony is that as the pictures get better and the choice of content gets broader, that the complexity of the experience of using the television gets more and more complicated.

So it seems exactly the sort of problem that if anyone is going to change the experience of what the first principles are, it is going to be Apple.

[We’ll see… but it does ring true.]

DD.tumblr: Whoopee, somebody emptied our bank account today

DD.tumblr, Whoopee, somebody emptied our bank account today:

The bank will cover this expense when its fraud department has digested all the details. But meanwhile, the household is skint. So: if you feel inclined to spit in the eye of the nameless rogue(s) who’ve briefly ruined the domestic tranquility around here, I invite you you to go over to the Ebooks Direct store and buy something using the discount code DDGOTSKIMMED, which will give you 20% off whatever you buy. If you feel inclined to reblog or (if you saw this on Twitter) RT this, it’d be appreciated.
(mutter) Miscreants.

[So go over there and buy a few things, and spread the word, put the auspicious back in someone’s 2012.]

SOPA related: Excessive Force Is Dangerous — To View on YouTube

Excessive Force Is Dangerous — To View on YouTube:

So, how is this relevant today? Well, a link on Reddit led me to a disturbing but entirely consistent-with-this trend discovery: Google’s Transparency Report, in which Google describes the number and type of take-down demands it receives. Did you think that the New Professionals would be content arresting photographers in the street? Hell, no. If we’ve gone digital, so have they. And they know how to work the system. Google reports:

We received a request from a local law enforcement agency to remove YouTube videos of police brutality, which we did not remove. Separately, we received requests from a different local law enforcement agency for removal of videos allegedly defaming law enforcement officials. We did not comply with those requests, which we have categorized in this Report as defamation requests.

Click that link and see the statistics for various six-month periods. Note that Google records not just take-down demands (including categories for executive and police demands premised on “national security” and “criticism,” among others), but demands for user identifying information. Police would never abuse the system by demanding the identity of photographers who posted videos documenting their conduct, would they? Heaven forfend.

So: bear in mind, when you consider measures like SOPA, that giving the government increased power over internet posts and increased ability to seek out user information may not just impact talking about music and movies — it might impact our ability to talk about, and document, police misconduct. Think the police would never seek to abuse such power? Then you’re a damned fool.

[This will get worse before it gets better.]