Why the Great Glitch of July 8th Should Scare You

Zeynep Tufekci, on why we should worry about the state of software:

From our infrastructure to our privacy, our software suffers from “software sucks” syndrome which doesn’t sound as important as a Big Mean Attack of Cyberterrorists. But it is probably worse in the danger it poses.

I agree. Duct tape fixing duct tape, and taking short cuts because it has to make money (and never fixed because of ill thought out cost-benefit analysises) is a big problem that will only get worse before it gets better if we aren't careful.

As a profession, we're lucky that we have relativity lax regulation. And we are a massively growing profession which is moving at an incredible pace.

Yes, we did things badly in hindsight, I bet most engineers look at work they did only six months ago and cringe.

But we can't let quality be a second class citizen, and we have to keep things maintained: just as we do with buildings, roads, and cars.

It shouldn't be "more glamorous" to be working on a brand new greenfield project. Me, I love working my skills on keeping things ticking, pushing systems to its limits then putting the bits back together again.

Let's hope I'm not a dying breed.

Speaking: PHPNW

On 7th July at PHPNW.

Testing can be boring, but there's also some interesting ways you can check your application. I'll be going through some interesting tools and techniques, showing them in action, and who knows — maybe we'll break something while we do so.

Slides

Apple Watch In Review

It's been around 6 weeks since I've had my Apple Watch. Whilst not perfect, I'm still very happy with it. Here's a rundown of my thoughts.

I've got the 38mm Sport edition, with the black sports band. It's a lot smaller than I imagined it would be, which is for the better. This means that it doesn't have the bulk of other smart watches, and after the first few days I don't feel conspicuous at all.

Not only does it look good, it feels really nice too. In fact, you forget it's even there. There is a bulge at the bottom where the sensors sit, which I thought may be a problem, but that isn't the case at all.

This is something I never thought would be said in a watch review: the sports band is really quite soft too. It's firm enough to feel secure, but also smooth so that the last thing you're thinking as you put it on is "I'm basically wearing a rubber band around my wrist".

I have to admit, the box was a little bigger than I was expecting: the Watch comes in a case just like any other watch on the market. Unlike other smart watches, this is not a gadget. Apple clearly wants this to be an accessory: using technology to change how we think of watches.

And what a watch it is. Granted, this isn't something that is kept for generations -- I expect the Watch to have an update cycle of about five years -- but I truly think that this is a watch wearer's watch. Unlike the Pebble, which doesn't really have much in terms of quality watchfaces, the Apple Watch has carefully designed faces that look beautiful and are genuinely useful.

But what makes this better than a regular watch, and indeed other smart watches, is the notifications. Within minutes I had muted all sounds, and had turned off both sound and vibration on my phone. The taptic engine is very subtle, and it really does feel like someone tapping you on the wrist. It feels nice, and it doesn't disturb you or anybody else.

One thing, however, that does make it frustrating as a watch is Activation on Wrist Raise. With a classic watch, the time is always there for you to glance at. The Apple Watch requires you move your wrist, then wait, to see the time. The gesture detection isn't quite right either, and so you find yourself exaggerating your arm movement, especially when wearing a coat.

The slight sluggishness is a problem in other areas, too. Apps can often take a noticable time to load; even the glances can take time for the data to appear. But being a first generation device I can't see this being a problem for too long.

Sluggishness aside, compatibility with apps and services is at a high level, especially considering the watch has only been on general sale for a couple of months. Requiring a pairing with an iPhone has been a really smart move: Watch apps can talk to Phone apps, which means that any data you can access on your phone you can access on your wrist.

However, the best integration so far in my book has to be with Health. I put the activiy rings as a complication on my watchface, and whenever I look at my Watch, I know how active I am being, and how close I am to my goal. This is the feature which I'm sure I would miss if I had to do without my Apple Watch.

So, would I recommend it? Absolutely. Especially if you are a watch wearer and a heavy user of iPhone apps, the Apple Watch is a genuinely useful second screen, and turns the timepiece on your wrist into a "Watch Plus".

It's a purchase I don't regret at all. I wouldn't go back to my Pebble Watch, and certainly wouldn't go back to a regular watch. The Apple Watch gives me far too many advantages that improves my life in small ways.

But then again, I'm a gadget lover. And if you're not into gadgets, I'm not sure that you will see the point behind the Apple Watch. And that's ok: it's not for everybody.

Well done, Apple

Hollywood reporter:

Apple has decided to change course and pay labels for the rights to stream their music during a 90-day free trial. The moves come after Taylor Swift penned an open letter to the hardware giant, writing that she found the company's insistence "disappointing" and "shocking."

It wasn't so long ago Apple would've not given a crap and not made a change. I hope we see a lot more decisions like this, now we are firmly in the Cook era.

Swift's reaction: "She was thrilled and very thankful and excited to see how quick we responded."

Well done, Apple.

More Top Gear details revealed

From BBC News:

"We'll look at what we have to put in, what we need to put in, and then we'll see what we might want to put in," he continued.

"The first thing I'm going to do is sit down [with the Top Gear production team] and say, 'tell me what you know.'"

I found the "new" Top Gear format getting stale in recent years, so I'm pleased to hear that Chris Evans will not only be presenting, but also producing, a post-Clarkson Top Gear.

I'm a fan of Evans, he has history taking something great and making it even better. And it's already began by promising that there will be a female in the new lineup.

Failure — it's ok

I've been thinking a little bit about the usual, and understandable, reaction from the average developer when they learn that there's a problem with their code.

That it's a bad thing.

Here's the thing: developing is hard. There's so many moving parts that I would be concerned if therewasn't a problem in the software, somewhere.

Two mantras that I'm fond of, of which I'm unsure of the genesis, spring to mind:

  • Nothing in the world is perfect. If something is completely without fault, it could be said that its fault is that too much time and energy was spent in creating it

  • If the code base to a piece of software is without fault, that's because it does nothing interesting

The magic isn't in getting it right the first time, or even the second or the third time: it's in working as a team to make the best you can, given the constraints.

SVN proxy settings for IntelliJ

Proxy settings in OS X are weird. If you use SVN, Intellij wants to be different.

You need to set the proxy settings for each project if you're behind a project. Do this by going toSettings -> Version Control -> Subversion and make your changes. If you have the proxy settings set up in IntelliJ you may want to just use those -- or you can set up your own individual settings in there.

So there we have it.

Achieving the Ken Burns effect using CSS

The Ken Burns effect is a common technique used in video-making where a photograph or image is zoomed in and panned across, to make for more interesting visuals.

This effect can now be achieved using CSS's animations properties. I've made up some example code to give a basic demonstration of what can be achieved.

To be able to pan across an image, we would need to use a size that's bigger (either taller or wider) than we'll be showing on the page, and we need to use CSS to tell the browser not to try and squeeze the image to the size we gave it. We use the object-fit property alongside setting a widthheight, andoverflow property to do this:

img:hover { object-fit: cover; overflow:hidden; width: 300px; height: 300px; }

Once we've done that, we need to do the effect! This is achieved using CSS animations. Here, I've used CSS classes which I give the image to create two different animations depending on whether the image is a landscape or portrait image: each will pan in a different direction (across or up).

.portrait{ animation: portrait 30s; } @keyframes portrait { from {object-position: bottom;} to {object-position: top;} } .landscape{ animation: landscape 30s; } @keyframes landscape { from {object-position: left;} to {object-position: right;} }

Notice that I've used unprefixed attributes here, but some browsers may need to be prefixed, or may not support either animations or object-fit.

Using :target CSS

I've recently discovered a new CSS pseudo-property, so decided to try it out on this site. If you click on the comments link to any of the blog posts, the comments area will now be highlighted. (Edit: Since writing this article, I have changed both engine and design of this site, and I no longer have comments nor do I use this CSS feature anymore).

It's highlighting whichever area is in the target part of the url (the bit after the hash, eg. inexample.html#target the target is self-named).

The CSS I'm using is:

#respond:target { background-color: #ddd; padding: 8px; }

which sets the #respond item to have a grey background colour if it's the current target. But it can be used for other things. Maybe if you have a list of for example support questions, and you want to only show an item if it's been navigated to, you can possibly use the following:

HTML:

<div id="question1"> <p>Question 1</p> <p class="answer">Answer to question 1</p> <div> <div id="question2"> <p>Question 2</p> <p class="answer">Answer to question 2</p> <div>

CSS:

.answer { display: none; } :focus .answer { display: block; }

With some Javascript to show/hide the answers, of course.