James Magness

Living in the future

News

I was a big fan of RSS before Twitter and social news.

I used Netvibes way back when. Now they are more focused on dashboarding data but once upon a time I had my dashboard and it was a well organised and curated news reader.

I remember the transition from web browsing to news reading. I could do about an hour of browsing in five minutes with my news reader and then get back to work.

Somewhere along the way I stopped using Netvibes and replaced it with social news, Reddit, Hacker News and Twitter. late 2012 I woke up and realised that my opinion was now whatever the highest voted comment on Hacker News was and the number of articles I read and self formed opinions I had had completely dropped away.

To date this year I’ve changed my habits and I read articles before comments and form my own opinion before accepting the hive mind’s. But my tools have stayed the same and I’m back to browsing the web for news.

I’m not loosing anything with the death of Google Reader, I’m coming in fresh from a hiatus on using news readers and I’m going to see how far we’ve come from 2005.

AirPlay on Raspberry Pi

Raspberry Pi is an awesome tiny cheap computer. It’s not super powerful but that’s not the point. It runs linux out of the box. Lots of work has been done on distros to strip out the unnecessary parts and ship with light weight programs.

One of the standout features of the Pi is it’s ability to play 1080p video. This naturally led hackers to tune Xbox Media Centre (XBMC) which was already working on linux to work on the Pi. There are a few different distros over at http://wiki.xbmc.org/index.php?title=Raspberry_Pi I settled on Raspbmc mostly because of the name - shallow I know.

XBMC supports Apple’s Airplay protocol and can be quite easily configured as a headless receiver to give and old stereo Airplay support.

First you need a Raspberry Pi and the minimum accessories to get it going: SD Card, Micro USB power cable, keyboard, monitor. If you’re lost already checkout http://raspberrypi.org to get started. Then a set of speakers and an iDevice.

Follow the Raspbmc download and install instructions from http://www.raspbmc.com/download/ to install XBMC on to your SD Card.

Boot the Pi with the SD card, it takes a short while finishing the base install and updating.

When the Pi has finished installing it will land you on a blue dashboard, using the keyboard to navigate, move to the right and select the System > Settings menu.

  1. From the System > Audio output, set the Audio output to Analog.
  2. From Services > AirPlay, Allow XBMC to receive AirPlay content.

From your iDevice launch an audio player, I’m using Soma FM’s app but Music or any other App supporting AirPlay will work too.

If AirPlay is enabled on the Pi the apps on iPhone should display the AirPlay icon and you can select the “XBMC (raspbmc)” option and start streaming.

You can leave the monitor and keyboard plugged in and even stream video from YouTube, but I think there is something cool about having the minimal pieces of the puzzel and using it just for audio.

It should be possible to get this going wireless with a USB wifi dongle. This is next on my list but everything in this guide assumes wired network.

iTunes doesn’t seem to want to switch over to XBMC but iPhones and iPads are working great. And thanks to the massive range of Apps like SomaFM, rdio, Soundcloud, etc. there doesn’t seem to be a limit on choice.

Enjoy. J

Webstock 2013 Day 1

Pre webstock there was twitter talk of webstock being expensive. While not cheap as I can testify paying my own way this year, the value and inspiration from two days immersed with peers and heros is undeniable. The production value is so polished and the speakers are so well looked after they often clam Webstock is their favourite confrence.

Highlights from day one:

Clay Johnson illustrated all of our ignorance to important local issues and opened our eyes to industrialised media and the damage it is causing society.

Jim Coudal told us to trust our gut and to track our goals not simply set them and don’t look at them again because when you reach a goal your perspective may hav changed.

Artur Bergman gave the first interesting technical talk however I imagine he could have gone a lot more technical if given the chance. I think he struck a great balance giving a really practical talk and teaching everyone a few things about CDNs and ways they will make our sites faster.

Chris Coyier gave a really fun run through of his workflow dropping tips and tricks along the way.

Craig Mod gave some great stories on books and publishing and the special place we reserve for our love of literature. I think he opened our eyes to an emerging industry that is being driven by maturity of blogging and publishing online and showed us some of the ways subcompact publishing is disrupting the incumbents.

Tom Coats picked up where he left off in 2011 for his love of the network and connected things. He gave us insights on why connecting the appliances in our home might be a good idea. He promised twitter clients in all our refrigerators and did the Winnie the Pooh dance.

Day one was choc full of awesome, I haven’t even mentioned the BNZ Startup Alley! Day two is about to start and is set to be amazing.

J

JavaScript Namespace Snippet

Coming back to JQuery and vanillajs after developing with YUI left me wanting to clean up a lot of code. I found I had no consistant Namespace patten. This has been lifted from the HTML5 mobile boilerplate.

/**
 * 2012-11-28 - JRM
 * Simple namespace pattern
 * Seen all over and lifted from HTML5 Mobile Boilerplate
 * https://github.com/h5bp/mobile-boilerplate/blob/master/js/helper.js
 */

(function(document) {

    window.NS = window.NS || {};

    NS.resultNode = document.getElementById('result');

    NS.fn1 = function () {
        NS.resultNode.innerHTML = "Hello Namespace";
    };

})(document);

NS.fn1();

My Luumin Development Environment

The Stack

Luumin is the ultimate task list for creative people. But just being creative and using Luumin isn’t quite enough to actually build the product. Here are the tools that I use as the front end lead to get the job done.

The Luumin architecture is a modern LAMP stack, we’ve swapped out the M(ysql) for Cassandra as the primary data store and built the backend as a platform from day one so all clients connect through our public API.

The stack doesn’t really explain the front end does it? Luumin is an HTML5 application built using YUI Framework, the reason for choosing YUI is because it is awesome.

My Workflow

ssh > screen > vim > builder/shifter > browser > svn

Simple eh?

I do all my development remotely via SSH. It’s a habit I picked up while doing Unix server administration a long time ago. It limits me to work only when I’ve got connectivity, but I can work on any connection.

GNU Screen is the first thing I fire up every time I connect to the server. From one session SSH session I usually run three shells, the first for the markup/css, the second for the JavaScript source and the third for compiling the source. Screen sessions can be disconnected and reconnected to, this means I can sit down at any computer and reconnect exactly where I left off and my development environment is persisted on the server.

Vim is the second habit I picked up doing Unix admin. I roll with a messy config I’ve built over the years. I use tabs over buffers. Pathogen for plugin management, and only a few crucial plugins: jslint, nerdtree, vim-less, vim-yui.

Builder is Yahoo’s legacy Ant build system. Shifter is the brand new node.js based build system that We’re migrating to. Lint code, build modules, strip console logs, minify source.

Chrome current is my browser of choice. It’s been my primary development browser for about two years. The development tools are just better. I spend most of my time switching between Network and Source tabs always with the console underneith.

Still on SVN, locally hosted. Simple deploy workflow only deploying the minified built source to production.

Hardware

I dev on a 2008 Macbook at home and an Ubuntu 12.10 workstation at the office. Hardware doesn’t really matter. Because my workflow is all based on the server, give me a network connection, an SSH client and a browser and I’m happy.


So that’s my setup. It varies on other projects, my PHP dev which has historically been done in Vim has moved exclusivly to NetBeans for need of the debugger. Other side project are very similar to this but won’t necessarily have the build phase and are probably in a git repo.