Unboxing joy

Unboxing joy

A good product makes you want to evangelise it. You want to tell the world so they can experience it... and also let them know how awesome you are and how grateful they should be that you brought such a cool thing into their lives ;)

Those products that you can continually appreciate and enjoy, that give you a little bit of delight every time you touch them, or that are so well thought-out that you wonder why everything can't be this good, are rare. I think my MacBook Air is one of those, but on Thursday something arrived that made me feel all joyous again.

broken

I go through earbuds like nobody's business. At the rate I go through them you'd think I was eating them. I've had two sets of Tweaked Audio buds after having their advertising jammed into my ears for the past few months, and both sets broke after about two weeks. The company were nice enough to send me a replacement the first time, and refunded me the second, though they asked for them back but never offered to pay the postage to the US so I've not been inclined.

In the past I've had Apple ones, Phillips ones, Denon ones - which were pretty good - and a load more. I almost exclusively go for the plushy in-ear ones, and if I can find them I'll always go for a remote and mic as they're used almost exclusively with my iPhone. But after a few weeks with my emergency cans - which are enormous and have a cable longer than the German word for chimney sweep - I decided I should move away from things going into my ears and replace them with things that sit ontop. So a quick look round the web turned up the AKG K451 Foldable Mini Headset, and after getting them on Thursday I'm still excited.

This isn't a review of a set of headphones; there's plenty of those around. Instead I just wanted to talk about the beauty in really well thought-out products. These headphones are quite small and fold away nicely. There are two detachable cords: one with a remote and mic, the other without. The cans are beautiful, but the clever part for me is the bag they came in, which I nearly threw away (I'm not one for accessories). The bag contains the second cord and it has a recess that fits the headphones perfectly. I also loved the fact that there were two separate pouches for the cords, so you don't get them mixed up or scrunched together.

pouch

Aside form making me feel warm and fuzzy, what all of this does is encourage me to take better care of my headphones. The lovely baggy pouchy thing with its recesses stops me from wrapping up the cable and stowing the set in my bag. This means they'll last longer and I'll get better value, whereas other manufacturers are possibly geared more towards in-built fallibility and thus repeat custom.

I've no idea how long this pair will last, but I do think I've bought my last pair of earbuds, and hopefully I've found My Brand.

What are the products that get you all hot under the collar?

A Facebook platform developer is giving out data about my family

A Facebook platform developer is giving out data about my family

Over the past few weeks I've received emails from differing addresses, but with the sender name set to that of a close family member. Some of the names are those of people who don't know my email address, and their names are presented in the same way as on Facebook.

This means a developer of an app I, or a family member has used is selling or giving away data about my family, in order to persuade me to read their messages. That data isn't available through Google as you have to be logged in to Facebook to see that data.

This is serious, because it means that those who aren't necessarily as digitally literate will mistake "hey [name] look at this cool link" as a real invitation (yes, they're using my name too, and adding fake signatures like "Sent from my iPad").

Facebook obviously isn't doing enough to protect my data, so I think I'm out. The use of personal data about my family makes me nervous.

What do you think?

Bringing the tweets back

A few weeks ago, Twitter dropped support for their anonymous search API, meaning that all search queries now have to go through OAuth, the authentication protocol used by loads of social sites.

This kinda broke one of my favourite creations: jQuery.tweetspan, which is a simple jQuery plugin that fills an HTML template with tweets from a specific account, or relating to a specific hashtag. IT worked up until a few weeks ago, so this afternoon I've been working on a rebuild.

To get around the problem you need something in-between the browser and the Twitter API. That service needs to have some OAuth details which it passes to Twitter. You then take Twitter's response and pass it back to the browser. So with jQuery.tweetspan having a WordPress plugin built in, I thought I'd just tack that bit ontop. So, using Abraham Williams.'s lovely and simple TwitterOAuth client, I was able to do just that.

But as my work at Substrakt involves a lot of sites which have Twitter feeds, it'd be a pain to have to update all of these if anything changed. Plus some sites are on WordPress, others Drupal, others Django. So what if I could have a service that acted as a middle-man, but on another server? So, I added a setting to my WordPress plugin - and a function to the jQuery plugin - that let me set a different endpoint. Then, using the same Twitter library, I knocked up a basic service on twitter.substrakt.net, which passes requests through from permitted domains, back to the browser. The upshot here is that, for all the different sites we maintain, we don' need to create different Twitter apps or even specify the OAuth details. We just add that domain to the whitelist, and point jQuery.tweetspan to the twitter.substrakt.net endpoint.

Do check out jQuery.tweetspan. If you like it, fork it, submit a pull request and we can make it better. In theory, the PHP script I wrote should work for non-WordPress sites (as I built it to ignore WordPress functions if they're not available), but it'd be cool to have scripts in other languages, and to have some more helpful documentation.

iOS7 at a glance

iOS7 at a glance

Yesterday, amid a flurry of other tech announcements, Tim Cook and co put on a little show to tell their friends all about Apple's shiny new things. The two most prominent of these were OSX Mavericks, the next release of their desktop operating system - which hails the start of a new naming convention based on Californian place names - and iOS7, codenamed iOS7.

I have an Apple developer account so I thought I'd put it to use and download the first public beta to my phone. It's not yet available for the iPad, though that's coming in the next few weeks. It'll be available to the public later in the year at around the same time as the OSX update goes out.

I think first off that the design team - led now by Jony Ive after Scott Forstall was ditched in light of his fetish for virtual leather - have made a great start with the new, flat design. There's a lot to look at and admire, but there's a lot that will need improvement.

Home screen

One of the most noticeable things about the redesign is the garish tinge most of the new icons have. This isn't a flattering look, and puts me in mind of design from early-90s CGA colour displays. In their opening video piece at the keynote, Apple proved they can make beautiful things that are flat, so I'm hoping - really hoping - that these are stopgaps, or that they listen to their testers.

I was pleased to see a difference in how folders are handled, and with this comes possibly the greatest piece of news any iOS users has ever had: you can move Newstand into a folder. There's a greater emphasis on edge-to-edge design, and some swish animations that take you into and out of apps and folders (also the phone's display fades in and out when you hit Standby, which is cute).

Moments in the Photos app

Under the very thinnest top layer, not a lot has changed; the home screen is still a grid system and apps are still in silos and unable to really talk to each-other. There are nice additions, like the Control Centre which slides up from the bottom and gives you access to All the Things, and I look forward to Apple learning a bit more about the UK and Europe so it can better display "moments" in the Photos app.

It would have been nice to have seen the rumoured combination of apps, like Phone and Contacts, or Camera and Photos, but my guess is that the Phone/Contacts one might actually be a thing, judging by the particularly lacklustre icon.

Currently no third-party apps are affected by the design. I'm guessing the OS detects the version of the SDK that the app is built against (ie: was the app built for iOS6 or a previous version) and displays all the old UI elements, including the black status bar. I haven't tried any of the Apple-built apps from the iTunes store (like iBooks or Podcasts), but I imagine they won't yet reflect the new design.

It'll take a little while for me to figure out how comfortable I am with the legibility of the UI, as the typeface is thin and the contrast isn't super-high. Also the type in dialog boxes is a lot smaller. All of these changes will serve to make the OS look a little less like a Fisher Price toy, but it does throw up a barrier to those whose eyesight is less than perfect.

Looking forward to seeing regular updates from Apple, including the first iPad version. Watch this space, and stuff.

Sentry and Virtualenv

This weekend I had my first real dalliance with Virtualenv, the system that basically allows you to run different versions of Python modules for different environments (ie: different websites). Some people like to go a bit overboard and think that you should have a virtualenv for each website. I think this is overkill and not sensibly maintainable, but then I base a lot of my decisions on the fact that I have to be a Jack of all trades, not solely a developer or a system admin.

Anyway, I'd never needed them so I've never used them, until this weekend when I tried to get Sentry working on a server running Django 1.5. For whatever reason, Sentry's requirements are at the moment frozen at 1.4, so I did what the guide suggested and installed Virtualenv plus Sentry. Which then overwrote my Django installation. But hang on, isn't it not supposed to do that?

To which the answer is "yes, unless you specifically state the environment you want your package installed into". I use PIP, so I needed to add an -E argument followed by the directory of my Sentry environment. Once done, I needed MySQL installed in the same environment. I'd previously installed the Python MySQL wrapper via Ubuntu's package manager, but that wouldn't work for my virtualenv so I downloaded a package that would give me access to the mysql_config program Python needed, then built the MySQL module from source. Pretty easy really.

Once done I had a fully-working installation of Sentry. But I'd been here before, only a few days ago, except without virtualenv. Every time I sent a test message to Sentry, the client (the site sending the message) would time out. Every friggin' time. And it wasn't until a few hours ago that I thought "Oh hang on, I've not installed sendmail". Suffice it to say, that sorted all my problems, and I'm an idiot for the second time this weekend (I can't remember what Saturday's one was).

I often find myself frustrated when everyone else seems to think that something works, when it clearly doesn't. Usually this is because of a small piece of knowledge everyone else takes for granted. That's not a slam, but it is a fact of the Internet, so hopefully this post will serve as a friendly note to anyone who's having difficulties. If you're dealing with a virtual environment, you've activated it (via the source command or similar) but your packages don't seem to install into that environment, check whatever system you're installing that it knows which environment you want.

  • If using python setup.py install, make sure you've activated the environment so that the python binary you're referring to is the virtualised one.
  • If you're using pip, make sure to specify -E /path/to/env at the end of the command, because PIP is a system-wide command and it doesn't automatically recognise that you're in a specific virtualenv, so by default it'll put its packages in the "global" dist-packages directory (or equivalent).

Happy coding!

Instacast vs Pocket Casts

Instacast vs Pocket Casts

I'm a pretty fickle app user, always ready to ditch the old and reliable for the new and shiny, but while this does mean I probably spend a little more on apps than is sensible, I do at least get a decent sense of the market... at least, for my particular spheres of interest.

There are quite a few podcasting apps available in the iOS app store. Downcast seems quite popular, but its barebones UI and seeming lack of features left me looking for something better.

My friend Caroline told me about Pocket Casts about 18 months ago, and up until recently I've been using it religiously. As a bus-riding commuter, podcast-listening is without a doubt the thing I use my iPhone for the most, so I want an app that's reliable, allows me to get to what I want quickly and let me stream, subscribe, skip, resume and download with the minimum of fuss. Pocket Casts fits the bill pretty much perfectly.

It's got a decent UI but which is prone to the occasional bug, and which contains a little skeuomorphism (though not nearly as much as you'd have found in Apple's own offering up until a couple of months ago), and it does its job well. It's easy to skip forward and back through an episode, speed up the speech or share what I'm listening to. If I were to niggle, maybe it'd be nice to see the album art next to each podcast in the Episodes view, so I could see at a glance what's coming up without having to read anything. But to be honest, I'd have been happy using this forever had I not been tempted to hop across the pond.

After reading about it via Twitter I decided to give Instacast a go. It's been newly upgraded with a bunch of new features, but most of these mean nothing to me as I wasn't acquainted with the old versions.

What did catch my eye was something I knew Pocket Casts was missing: a sleep timer. With Instacast, I can start a podcast playing while I get ready for bed, and plug my iPhone into charge while I drift off, safe in the knowledge that the podcast wont' end before I doze off. It sounds silly, but I've woken myself up from a doze before to turn a podcast off, lest the app burn through all my subscribed episodes while I sleep. Sounds daft, but I promise you it is a thing.

Also, Instacast is available on the iPad (as a universal app, not a scaled-up phone version). and 'cos I can sync my subscriptions via that lovely cloud thing, I can start a podcast on one device and finish it later on another. Unlikely, but it does mean that if I hear about a video podcast I like, I can subscribe to it on the phone - as it's nearest to hand - then watch it later on the iPad. First world problems need first world solutions, people!

I've only been using Instacast for a little over a day, but it's more feature-rich than Pocket Casts. It has nice swipe gestures for marking episodes as played, and I can put shows that are on hiatus in a special bin so they're out of my main feed but still get updated. I can set push notifications for certain shows, and tell the app to stop playing after the current episode, not rattle on through my list.

There are elements of both apps' interfaces that could be improved, but I think these two are probably the best on the market and any choice really comes down to personal preference. There's nothing wrong with Pocket Casts, and I may go back to it, but for now I think I'm going to enjoy settling in with Instacast and its many features.

Now, I did hear rumour that one of these apps was going to get a might more social, and as a chap who likes to scrobble - but doesn't want to mix hist last.fm music listings with his podcast plays - the app that implements this the best might win me over completely.

Bot for now, I think the winner of this battle is podcasting. Oh yeah, I totally went there.

Pelican is Python's answer to Jekyll

After briefly going down the Hacker News rabbit hole, I stumbled upon Pelican, an open source, static site generator written in Python. These have become increasingly fashionable over the past months, as they can be hosted anywhere and can be built locally or on a server.

If I didn't have my own blogging platform or I wanted to go down the route of writing without a CMS, Pelican would definitely be one to consider.

idoxiny is back!

idoxiny is back!

Last year I built a thing called idoxiny (or "I do X in Y"). When I moved away from Amazon's hosting, this was one of the sites that didn't make the transfer, but as it was something that enjoyed a little bit of success, I thought I'd bring it back.

I'm luckily in a position not to need it, but if there are others looking for work, and who want to find a quick way of advertising what they do and where, or post a shout-out to anyone who has skills they need, it will hopefully prove useful.

Best thing to do is to sign up at idoxiny.com clicking either the "I'm a freelancer" or "I need a freelancer" button, pop in a few details and connect your account to Twitter. Then follow @idoxiny for tweets that might just help you find what you're after.

I've only just got it back up and running, so if you find any bugs, do let me know. Otherwise, happy hunting!

DjangoCon roundup

DjangoCon roundup

So, it's been a few days since I got back, and I've finally had time to decompress, although I'm definitely going to enjoy a nice, long bank holiday weekend doing nothing. But before I put DjangoCon to bed, I thought I'd just write up my experiences in brief, and dump all my notes for anyone who might be interested.

I've already written quite extensively about my personal experiences in Warsaw, but as my notes can attest, I really did get something out of it other than meeting some great people and eating some yummy noms. I've learned how to be a better Python developer, how to get more out of Django and how to test and improve the security of the sites I build. At the sprints I started my first community-minded project, called Obtainer, and have some great resources to help me get my feet under the table with the Django community at large.

Thank you to everyone who took the time to talk to me during the con, and to James, Valberg and the rest of the guys who made my Friday. Thank you to the organisers for putting on an incredible conference - good luck to the French contingent for 2014! - and to Warsaw for being beautiful.

If you're into development, couldn't make it at the con or just want to crib off my notes, here are my notes :)

Day one

Day two

  • postgres.app (PostgreSQL for OSX)
  • django-hstore (key-value support for PostgreSQL and Django)
  • djorm-ext-expressions (addons for Django and PostreSQL
  • django-db-tools (aightweight piece of middleware to enable READ_ONLY mode)
  • Don't store sessions in the database... it's slow
  • I really need to start using Redis, and probably move to PostgreSQL
  • Brunch (watch files for changes, ie for LESS compilation)
  • Salt (Pythonic configuration manager)
  • docopt (create argument parsers by writing help strings)
  • symver.org (semantic versioning)
  • Surprised that, apparently not that many apps use TemplateResponse
  • ponycheckup.com (security checkup for Django sites)
  • Two Scoops of Django (book)

Day three

  • Don't put anything on self when extending Admin, as it's a security issue
  • Class-based views are good for HTTP method detection
  • Look into View Mixins
  • PyCharm (Python IDE)
  • BreakfastSerial (Python programming for Arduino)
  • Look through code for transaction.commit_on_success and replace with transaction.atomic
  • gargoyle (feature management)
  • Blue-green deployment pattern
  • django-mutant (dynamic model management)
  • collections.defaultdict (create dicts with default values)
  • sets (quick access, unordered lists of items that must be unique)
  • Use sorted() function rather than list.sort()

Todo

  • Find or start a Python user group in Birmingham
  • Check your Ubuntu version for Amazon search scandal

Randoms

Blind man bluffs it in Poland - Day five

Blind man bluffs it in Poland - Day five

Oops.

After getting into the hostel at around 4:30 and eating a petrol garage sandwich, I'd set my alarm for 9am so I'd have enough time to get myself to the Gamma Factory in town, to attend the first day of sprints. I woke up at 11:45, checked my phone and saw the alarm was marked to go off on weekdays. Today was Saturday.

After all my talk yesterday of wanting to be part of the community, and signing up to attend a workshop on committing code to Django, I'd failed. If I turned up I was going to be late, I'd almost certainly miss the workshop and would end up walking around aimlessly searching for something to do.

All of this would've made me feel like a gaping arsehole, but for this simple phrase:

I regret nothing.

I'd had a memorable and potentially life-changing night, and one of the side-effects of having such a night is that you can't always be in tip-top condition the next day. So I got showered, dressed and out the door to my taxi.

Now, a note on being blind in the back of a non-English speaking driver's cab. In Birmingham, it's pretty common to have an Asian taxi driver. Sometimes they're first-generation immigrants and very occasionally their English isn't all that great. But I've never had a problem asking what I owed and paying. This wasn't true of Warsaw.

That's not a criticism at all. I don't expect people to speak my native tongue, but it does create a problem when you can't read the numbers on screen and they can't say them in English. But this is my problem, and I've tried to solve it in different ways. What tends to be the most effective is getting it written down on a receipt, as a) that's not abnormal and b) it's relatively easy to communicate.

So after hopping out of the car I headed indoors to the Gamma Factory, an interesting, sparsely-decorated venue which put me in mind of bits of the Custard Factory in Digbeth, but cooler and with a lot more spit-and-sawdust.

As I'd guessed, I wasn't able to join in with anything as people were hard at work on their own projects, so I took a seat and began work on my own idea.

For the uninitiated, sprints (which is a term I've only known inside the Python community but I'm sure exists outside it) are a little like hackathons. They're time set aside for working intensely to achieve a goal. That goal might be to fix a bug, start work on a new feature, or document an existing one.

Because I'd missed the intro, I'd forfeited my ability to work on Django or anything related, so I got to work on something I'd wanted to build for a week or so. I won't go into the details, but it's a hopefully useful tool that I can open source and deploy online for people to check out.

The sprints - certainly the first day - were pretty heavily over-subscribed, meaning the organisers didn't have enough food for everyone. But once again they rose to the challenge and went above and beyond, feeding people with chicken and rice, chocolate cake, and pizzas both vegetarian and meaty. This echoed the feeling I got through the whole conference. Obviously I don't have a previous one to compare it to, but I feel like the Polish organising committee really did their attendees proud. Hats off to 'em.

We had to leave at around 6:30pm and so I raced to finish my project. I'm happy to say I pretty much smashed it, thanks to having a good prototyping toolset (as I'd mentioned in yesterday's talks) and a bunch of code that only needed minor improvements. I'll be putting the results of that online as soon as I've got access to wifi and a clear head.

James and I had been working across from each-other all day, and we ended up in a group of people from across Europe, in search of a "real" meal before the unofficial "drink up", which was in a park by an overpass. We found a faux-Brazilian restaurant - a sort of Hooters affair - and chewed over the last three days of talks, then headed out on foot to the venue.

It turned out that this weekend marked a national holiday in Poland. Everything on Sunday was to be closed, and everyone who is everyone was outside drinking in a big public piss-up. It had a nice atmos; there were loads of people but the whole thing felt really safe and without the rowdiness you'd expect from a British affair, but then there aren't that many opportunities for Brits to drink outdoors so we kinda like to let our hair down when the time does arrive.

I tried throughout my week in Poland not to attach myself to someone like a leech, in the hope that they'd keep me safe, so I always had to strike a balance between letting the night take its course and getting home with safety in numbers. I hope James didn't feel like I glommed onto him too much, but it was for his company and the laughs, not for anything else that I think we ended up bumping into each other or hanging out. He did let me grab the first taxi, too.

I ended Saturday night full to the brim with heavy beer, having eaten well and experienced a Polish piss-up. I think it went pretty well.

Photo by Father Jack